Search Results

Search found 96 results on 4 pages for 'criterion'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • notification scheduling question

    - by sims
    Hi Stackers! I'm building an app that needs to send out notifications to users depending on user definable "notifications". So the notifications are not per event. They are arbitrary. A cron job should query the database and send out emails when it finds an event with matching criterion. The is a scheduling app. So naturally, one of the criterion is time. I think I've figured it out, but I'm sure there are better ideas out there as it seems to be a fairly common thing to do. I think I'll limit the users ability to "minutes before hand" to get notified as opposed to seconds or hours. So I have an eventA and notificationA. notificationA should be triggered if an event is due within 45 minutes. So eventA starts at 17:30. The user should be notified at 16:45. But the cron job might not run exactly at 00 seconds. So when the difference is not 45 minutes and 0 seconds it is, say, 45 minutes and 5 seconds. Notification time is past. Email doesn't get sent. User misses event. Shugar. We should also take into account that the cron job might take a long time to run. So maybe we should only trigger it every 5 minutes. So we need a bigger interval maybe. So then my guess would be to say that: if ((eventDueTime - now notificationTimeValue - interval) && (eventDueTime - now < notificationTimeValue + interval)) sendTheFrikinNotificationAlready(); It seems kind of risky if the there are thousands of notifications to send out. I guess I could make a thread for each notification and then a thread for each event that matches the criterion. That might help. Does that make sense? Any other ideas? Thanks!

    Read the article

  • 6 Guidelines For You to Create a Fast Loading Website

    As you may have heard that Google has implemented a new criterion to determine your rankings on search results, the website speed. Increasing your website loading speed is not only important for getting a high search ranking and it will also affect your visitors' perception about your website.

    Read the article

  • Go Easy on the Budget With Affordable Web Hosting

    While there are not many such services available, it becomes all the more important to be able to meet to the criterion demands of people who need these services. As the need to find the best of these services comes at a time when people to think about the needs of which they can find Affordable Web Hosting at their benefit, there will always be a need to find the most influential designs in which they can make up for the right ways in which they can dominate the top search engines of the world.

    Read the article

  • Using hibernate criteria, is there a way to escape special characters?

    - by Kevin Crowell
    For this question, we want to avoid having to write a special query since the query would have to be different across multiple databases. Using only hibernate criteria, we want to be able to escape special characters. This situation is the reason for needing the ability to escape special characters: Assume that we have table 'foo' in the database. Table 'foo' contains only 1 field, called 'name'. The 'name' field can contain characters that may be considered special in a database. Two examples of such a name are 'name_1' and 'name%1'. Both the '_' and '%' are special characters, at least in Oracle. If a user wants to search for one of these examples after they are entered in the database, problems may occur. criterion = Restrictions.ilike("name", searchValue, MatchMode.ANYWHERE); return findByCriteria(null, criterion); In this code, 'searchValue' is the value that the user has given the application to use for its search. If the user wants to search for '%', the user is going to be returned with every 'foo' entry in the database. This is because the '%' character represents the "any number of characters" wildcard for string matching and the SQL code that hibernate produces will look like: select * from foo where name like '%' Is there a way to tell hibernate to escape certain characters, or to create a workaround that is not database type sepecific?

    Read the article

  • JPA 2 Criteria API: why is isNull being ignored when in conjunction with equal?

    - by Vítor Souza
    I have the following entity class (ID inherited from PersistentObjectSupport class): @Entity public class AmbulanceDeactivation extends PersistentObjectSupport implements Serializable { private static final long serialVersionUID = 1L; @Temporal(TemporalType.DATE) @NotNull private Date beginDate; @Temporal(TemporalType.DATE) private Date endDate; @Size(max = 250) private String reason; @ManyToOne @NotNull private Ambulance ambulance; /* Get/set methods, etc. */ } If I do the following query using the Criteria API: CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<AmbulanceDeactivation> cq = cb.createQuery(AmbulanceDeactivation.class); Root<AmbulanceDeactivation> root = cq.from(AmbulanceDeactivation.class); EntityType<AmbulanceDeactivation> model = root.getModel(); cq.where(cb.isNull(root.get(model.getSingularAttribute("endDate", Date.class)))); return em.createQuery(cq).getResultList(); I get the following SQL printed in the log: FINE: SELECT ID, REASON, ENDDATE, UUID, BEGINDATE, VERSION, AMBULANCE_ID FROM AMBULANCEDEACTIVATION WHERE (ENDDATE IS NULL) However, if I change the where() line in the previous code to this one: cq.where(cb.isNull(root.get(model.getSingularAttribute("endDate", Date.class))), cb.equal(root.get(model.getSingularAttribute("ambulance", Ambulance.class)), ambulance)); I get the following SQL: FINE: SELECT ID, REASON, ENDDATE, UUID, BEGINDATE, VERSION, AMBULANCE_ID FROM AMBULANCEDEACTIVATION WHERE (AMBULANCE_ID = ?) That is, the isNull criterion is totally ignored. It is as if it wasn't even there (if I provide only the equal criterion to the where() method I get the same SQL printed). Why is that? Is it a bug or am I missing something?

    Read the article

  • Is null return path reliable indication of a bounce?

    - by Vasiliy Faronov
    I have a mailbox that receives bounces as well as normal email (the latter includes messages from automated services). I want to filter out the bounces and forward them to another mailbox. Assume I cannot change the envelope return path in email I send. Is “null return path” a reliable criterion to tell bounces from normal mail? Roughly how many false positives and false negatives can I expect if I apply it?

    Read the article

  • What different desktop environments and shells are available?

    - by Amith KK
    This question exists as it fills a specific criterion. While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will likely be closed per the FAQ. More information on the software-recommendation tag. What different desktop environments or shells are there for Ubuntu users to install? Please list one desktop environment or shell per post with: a description on why you like or suggest it (features, performance, etc.), a good screenshot, preferably of it running on Ubuntu and showing off some of its features, the minimal requirements required for it to be usable some instructions on how to set it up.

    Read the article

  • How to spot a good social media marketer

    - by fiftyeight
    It's a bit subjective but helpful and on-topic IMO, mayebe should be made community wiki I've been in contact with some guest bloggers lately which are interested in publishing posts on my website's blog, so far I've done a regular weekly blog and had a guy marketing it, but he's too busy to do more work right now. Now I need someone to market these blog posts on social media, the last guy I just got by recommendation from a friend, but now I need to find one myself. What criteria should I check when it comes to social media marketers? Do the number of followers and fans on their accounts and/or the number of votes they get for articles they market mean anything, or is impossible to know if it's spam? That's about the only criterion I could think of so far... Thanx to anyone who helps

    Read the article

  • What is the most handy function you've ever came across? [closed]

    - by Viniyo Shouta
    Obviously everything is 'handy' when it comes to programming terms, but some get a highlight spot, like containers, matrix trasnformation functions and many others. But in this case please mention the one it was more handy to you, saved you from sparing hours resolving a problem, or even the one you like more, What is it and what does it does? I'll start with an example. Language: C++ Function: std::sort (STL) What does it does: Arranges the elements in a specified range into a nondescending order or according to an ordering criterion specified by a binary predicate. (It arranges a container in decreasing order) Why of this question? Because I want to learn how to if possible make my own implementations of these functions for pure studying purposes, to enhance knowledge

    Read the article

  • Criteria SpatialRestrictions.IsWithinDistance NHibernate.Spatial

    - by idjones82
    Has anyone implemented this, or know if it would be difficult to implement this/have any pointers? public static SpatialRelationCriterion IsWithinDistance(string propertyName, object anotherGeometry, double distance) { // TODO: Implement throw new NotImplementedException(); } from NHibernate.Spatial.Criterion.SpatialRestrictions I can use "where NHSP.Distance(PROPERTY, :point)" in hql. But want to combine this query with my existing Criteria query. for the moment I'm creating a rough polygon, and using criteria.Add(SpatialRestrictions.Intersects("PROPERTY", myPolygon));

    Read the article

  • NHibernate FetchMode.Lazy

    - by RyanFetz
    I have an object which has a property on it that has then has collections which i would like to not load in a couple situations. 98% of the time i want those collections fetched but in the one instance i do not. Here is the code I have... Why does it not set the fetch mode on the properties collections? [DataContract(Name = "ThemingJob", Namespace = "")] [Serializable] public class ThemingJob : ServiceJob { [DataMember] public virtual Query Query { get; set; } [DataMember] public string Results { get; set; } } [DataContract(Name = "Query", Namespace = "")] [Serializable] public class Query : LookupEntity<Query>, DAC.US.Search.Models.IQueryEntity { [DataMember] public string QueryResult { get; set; } private IList<Asset> _Assets = new List<Asset>(); [IgnoreDataMember] [System.Xml.Serialization.XmlIgnore] public IList<Asset> Assets { get { return _Assets; } set { _Assets = value; } } private IList<Theme> _Themes = new List<Theme>(); [IgnoreDataMember] [System.Xml.Serialization.XmlIgnore] public IList<Theme> Themes { get { return _Themes; } set { _Themes = value; } } private IList<Affinity> _Affinity = new List<Affinity>(); [IgnoreDataMember] [System.Xml.Serialization.XmlIgnore] public IList<Affinity> Affinity { get { return _Affinity; } set { _Affinity = value; } } private IList<Word> _Words = new List<Word>(); [IgnoreDataMember] [System.Xml.Serialization.XmlIgnore] public IList<Word> Words { get { return _Words; } set { _Words = value; } } } using (global::NHibernate.ISession session = NHibernateApplication.GetCurrentSession()) { global::NHibernate.ICriteria criteria = session.CreateCriteria(typeof(ThemingJob)); global::NHibernate.ICriteria countCriteria = session.CreateCriteria(typeof(ThemingJob)); criteria.AddOrder(global::NHibernate.Criterion.Order.Desc("Id")); var qc = criteria.CreateCriteria("Query"); qc.SetFetchMode("Assets", global::NHibernate.FetchMode.Lazy); qc.SetFetchMode("Themes", global::NHibernate.FetchMode.Lazy); qc.SetFetchMode("Affinity", global::NHibernate.FetchMode.Lazy); qc.SetFetchMode("Words", global::NHibernate.FetchMode.Lazy); pageIndex = Convert.ToInt32(pageIndex) - 1; // convert to 0 based paging index criteria.SetMaxResults(pageSize); criteria.SetFirstResult(pageIndex * pageSize); countCriteria.SetProjection(global::NHibernate.Criterion.Projections.RowCount()); int totalRecords = (int)countCriteria.List()[0]; return criteria.List<ThemingJob>().ToPagedList<ThemingJob>(pageIndex, pageSize, totalRecords); }

    Read the article

  • Accessing parent-level controls from inside a ComboBox's child controls

    - by eponymous23
    I have XAML similar to this: <ListBox ItemsSource="{Binding SearchCriteria, Source={StaticResource model}}" SelectionChanged="cboSearchCriterionType_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Name="spCriterion" Orientation="Horizontal" Height="20"> <ComboBox Name="cboSearchCriterionType" Width="120" SelectionChanged="cboSearchCriterionType_SelectionChanged"> <ComboBox.Items> <ComboBoxItem IsSelected="True" Content="Anagram Match" /> <ComboBoxItem Content="Pattern Match" /> <ComboBoxItem Content="Subanagram Match" /> <ComboBoxItem Content="Length" /> <ComboBoxItem Content="Number of Vowels" /> <ComboBoxItem Content="Number of Anagrams" /> <ComboBoxItem Content="Number of Unique Letters" /> </ComboBox.Items> </ComboBox> <TextBox x:Name="SearchSpec" Text="{Binding SearchSpec}" /> <TextBox x:Name="MinValue" Text="{Binding MinValue}" Visibility="Collapsed" /> <TextBox x:Name="MaxValue" Text="{Binding MaxValue}" Visibility="Collapsed" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> As you can tell from the markup, I have a listbox that is bound to a collection of SearchCriterion objects (collectively contained in a SearchCriteria object). The idea is that the user can add/remove criterion items from the criteria, each criterion is represented by a listbox item. Inside the listbox item I have a combobox and three textboxes. What I'm trying to do is change the visibility of the TextBox controls depending on the item that is selected in the ComboBox. For example, if the user selects "Pattern Match" then I want to show only the first textbox and hide the latter two; conversely, if the user selects "Length" or any of the "Number of..." items, then I want to hide the first TextBox and show the latter two. What is the best way to achieve this? I was hoping to do something simple in the SelectionChanged event handler for the listbox but the textbox controls are presumably out of the SelectionChanged event's scope. Do I have to programmatically traverse the control hierarchy and find the controls?

    Read the article

  • Good value for declaring "Position reached" in geo coords

    - by poeschlorn
    Hi Guys, I've written a kind of navigation system for pedestrians. The only thing is, that I need a criterion to finish the navigation. My values are gives as lat/long pairs. What would you assume would be a good value to say, both positions are equal/near enough to tell the user that he has reached the goal? Please keep also in mind, that it's idfficult to say "directly equal", because GPS modules may have variances... greetz from europe, poeschlorn

    Read the article

  • Need some help with a NHibernate Query

    - by cwap
    Hi all Say I got 3 entities: Business, Employee and Payment. A payment has a foreign key to an Employee, while the Employee has an foreign key to a business. Now, I want to create a query which gives me all payments for a given business. I really don't have a clue about how to do this - I guess I want something like: mySession.CreateCriteria<Payment>() .Add(Criterion.Expression.Eq(/* Employee_FK => Employee.Business_FK == BusinessID */); Any help would be greatly appreciated :)

    Read the article

  • MySQL Search (Sort by Relevance)

    - by atif089
    Hi guys, Can any one help me how to sort rows by relevance for the following criterion ? tbluser First Name Last Name tbleduc School College University On the search form the user has following fields Name School College University Where School College and University are Optional.. And Name is split into 2 words (other words in middle are omitted), first word is taken as first anme and last word as last name.. Now I would like to implement search based on relevance. Thanks for the help :)

    Read the article

  • mysql bug database error

    - by user963499
    Why is that when I search a row in my database, it ended up 0 results? In fact, there are rows that meet my search criterion when I view them manually, but the search button doesnt work as it is. Heres how you can see there are rows that have '0000-00-00 00:00:00' in them, but when I used the search feature, it ended up like this: take note that Im entering it in the right field which is 'AcctStopTime'. TIA

    Read the article

  • How can I export the results of my script to file?

    - by Meepster
    I need to get some details out of hundreds of XML files that were written for reporting. The script below provides the correct results, but I want them in file, cvs, xls, or txt so I can provide a list of the database fields that are in use by these reports. $get = get-childitem D:\Data\Desktop\Projects\Reports\Test -include *.xml -recurse ForEach ($xmlfile in $get) { $Report = $xmlfile $Fields = [xml](Get-Content $Report) $Fields.reportsettings.fieldlist.field | select @{ L = 'Description'; E = {$_.desc}}, @{ L = 'Field Name'; E = {$_.criterion}}, @{ L = 'Field ID'; E = {$_.id} } } Thank you very much for your time!

    Read the article

  • What causes memcache to delete keys?

    - by Arkaaito
    Our memcache install recently started removing keys, and we're not sure why. Large groups of keys vanish at the same time. Memcache reports that evictions are low to non-existent, and our app has no way to clear memcache (it can only delete specific keys). Even keys of which the app has no knowledge get deleted, so we're pretty convinced they're getting expired. However, our memcache configuration hasn't been touched in some time. Has anyone debugged an issue like this before, and if so, are there any steps you'd recommend we take? How flexible is memcache's expiration policy - is it possible that we're suddenly running into a criterion based on (say) write frequency to a key?

    Read the article

  • Is Page-Loading Time Relevant?

    - by doug
    Take this (ServerFault) page for instance. It has about 20 elements. When the last of these has loaded, the page is deemed "loaded"--but not before. This is certainly the protocol used by our testing service (which is among the small group of well-known vendors that offer that sort of service). Obviously this method is based on a clear, definite endpoint--therefore it's easy to apply w/ concomitant reliability. I think it's also the metric used by the popular Firefox plugin, 'YSlow.' For my employer's website, nearly always the last-to-load items are tracking code, tracking pixels, etc., so from the user's point of view--their perception--the page was "loaded" well before it had actually loaded based on the criterion used by our testing service (15-20% is a rough estimate). I'm sure i'm not the first person to consider this nor the first to wonder if it is causing micro-optimization while ignoring overall system-level, or user-perceived performance. So my question is, are there are other more practical (yet still reasonably precise) measures of page loading time?

    Read the article

  • links for 2010-06-02

    - by Bob Rhubart
    @eelzinga: Oracle Service Bus 11g communication with Oracle SOA Suite 11g, DirectBindings, part1 Oracle ACE Erikc Elzinga launches a series of post in which he will describe how to develop various  Oracle Service Bus 11g to Oracle SOA Suite  process flows. (tags: oracle otn oracleace soa servicebus) @Atul_Kumar: Integrate UCM (ECM/Content Server) with Microsoft Active Directory as LDAP Provider Atul Kumar's step-by-step instructions. (tags: oracle otn enterprise2.0 ucm ecm ldap) Stefan Hinker: Is my application a good fit for CMT? "The first and most important criterion for suitability is always the service time of your application," says Stefan Hinker.  "If this is sufficient, then the application is OK on CMT. If it is not, and the reason is actually the CPU and not some other high-latency component (like a remote database), you will need to test on other CPU architectures." (tags: oracle sun cpu cmt sparc solaris) @deltalounge: Definitions of Services and Processes Peter Paul shares a collection of useful definitions gathered from the works of many of the big thinkers in the SOA space.  (tags: oracle otn soa businessprocess) OTN TechCast: Oracle Solaris Virtualization - Oracle Solaris Video Joost Pronk, CTO for Oracle Solaris Product Management, provides an overview of the robust virtualization functionality built into the Oracle Solaris OS. (tags: oracle otn solaris virtualization)

    Read the article

  • What is the correlation between programming language and experience/skills of their users?

    - by Petr Pudlák
    I'm sure there is such a correlation, because experience and skill leads good programmers to picking languages that are better for them, in which they're more productive, and working in a language forms how programmers think and influences their methods and skills. Is there any research or some statistical data of this phenomenon? Perhaps this is not a purely academic question. For example, if someone is starting a new project, it could be worth considering a language (among other criteria of course) for which there is a higher chance of finding or attracting experienced programmers. Update: Please don't fixate on the last paragraph. It's not my intention to choose a language based on this criterion, and I know there are other far more important ones. My interested is mostly academic. It comes from the (subjective) observation and I wonder if someone has researched it a bit. Also, I'm talking about a correlation, not about a rule. Sure there are both great and terrible programmers in every language. Just that in general it seems to me there is a correlation.

    Read the article

  • Workflow workarounds: tracking individual column changes

    - by PeterBrunone
    This post is long overdue, but since the question keeps popping up on various SharePoint discussion lists, I figured I'd document the answer here (next time I can just post a link instead of typing the whole thing out again).In short, you cannot trigger a SharePoint workflow when a column changes; you can only use the ItemChanged event.  To get more granular, then, you need to add some extra bits.Let's say you have a list called "5K Races" with a column called StartTime, and you want to execute some actions when the StartTime value changes.  Simply perform the following steps:1)  Create an additional column (same datatype) called OldStartTime.2)  When the workflow starts, compare StartTime to OldStartTime.    a) If they are equal, then do nothing (end).    b) If they are NOT equal, proceed with your workflow.3)  If 2b, then set OldStartTime to the value of StartTime.By performing step 3, you ensure that by the end of the workflow, OldStartTime will be equal to StartTime -- this is important because the workflow will continue to run every time a particular item is changed, but by taking away the criterion that would cause the workflow to run the second time, you have avoided an endless loop situation. 

    Read the article

< Previous Page | 1 2 3 4  | Next Page >