Search Results

Search found 17924 results on 717 pages for 'z order'.

Page 134/717 | < Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >

  • Ridiculously Simple Erlang Question

    - by Aiden Bell
    Read (skimmed enough to get coding) through Erlang Programming and Programming Erlang. One question, which is as simple as it sounds: If you have a process Pid1 on machine m1 and a billion million messages are sent to Pid1, are messages handled in parallel by that process (I get the impression no) and is there any guarantee of order when processing messages? ie. Received in order sent? Coming from the whole C/Thread pools/Shared State background ... I want to get this concrete. I understand distributing an application, but want to ensure the 'raw bones' are what I expect before building processes and distributing workload. Also, am I right in thinking the whole world is currently flicking through Erlang texts ;)

    Read the article

  • Next and Previous MySQL row based on name

    - by NightMICU
    Hi everyone, I have a table with details on personnel. I would like to create a Next/Previous link based on the individual's last name. Since personnel were not added in alphabetical order, selecting the next or previous row based on its ID does not work. It is a hefty table - the pertinent fields are id, name_l, and name_f. I would like to order by name_l, the individuals' last name. How would I go about accomplishing this task? Thanks!

    Read the article

  • Sort/Enumerate an NSArray from somewhere in the middle?

    - by Kenny Winker
    I have an NSArray, with objects ordered like so: a b c d e f I would like to enumerate through this array in this order: c d e f a b i.e. starting at some point that is not the beginning, but hitting all the items. I imagine this is a matter of sorting first and then enumerating the array, but I'm not sure if that's the best technique... or, frankly, how to sort the array like this. Edit Adding details: These will be relatively small arrays, varying from 3 to 10 objects. No concurrent access. I'd like to permanently alter the sort order of the array each time I do this operation.

    Read the article

  • Reverse Breath First Search in C#

    - by Ngu Soon Hui
    Anyone has a ready implementation of the Reverse Breath First Search algorithm in C#? By Reverse Breath First Search, I mean instead of searching a tree starting from a common node, I want to search the tree from the bottom and gradually converged to a common node. Let's see the below figure, this is the output of a Breath First Search: In my reverse breath first search, 9,10,11 and 12 will be the first few nodes found ( the order of them are not important as they are all first order). 5, 6, 7 and 8 are the second few nodes found, and so on. 1 would be the last node found. Any ideas or pointers?

    Read the article

  • How to retrieve the ordered list of best articles having a minimum number of votes by using HSQL ?

    - by fabien7474
    I have a Vote domain class from my grails application containing properties like article_id and note I want to HQL query the Vote domain class in order to retrieve the 5 best rated articles having at least 10 votes. I tried : SELECT v.article_id, avg(v.note), count(*) FROM vote v where count(*) >= 10 group by v.article_id order by avg(v.note) desc limit 5; But unfortunately the insertion of where count(*) >= 10 throws an error. How can I do that in a simple way? Thank you for your help.

    Read the article

  • How to use JQuery to truncate the contents of option tags?

    - by George
    Hello! Please take a look here: http://www.binarymark.com/Products/FLVDownloader/order.aspx What I am trying to do is to get rid of the prices inside the option tag. On that page you can see a drop-down box under Order Information, Product. I want to remove the prices from all the options that contain them in that box, so get rid of " - $75.98" for example. I am not used to JQuery, but I realize it would be possible - just not sure how to do it, so your help would be greatly appreciated. Thanks. George

    Read the article

  • How to handle right to left languages in Flash (pre version 10)?

    - by Maan Ashgar
    Hello, We are currently working with Flex creating a web application. We are having trouble taking Arabic text from the user and displaying correctly (like in a chat feature). While presumably Flash 10 will solve this problem, we don't want to force our users to upgrade. Flash flips the order of the sentence's words. so if I wrote something like "Hello World" in the text field, it will appear as "World Hello" in the chat area. Is there a standard way to work with Right to Left languages in Flash? *We currently flip the order of the words with a function, but it things get messed up when using English or special characters in the chat like :) or :D *

    Read the article

  • Invoicing vs Quoting or Estimating

    - by FreshCode
    If invoices can be voided, should they be used as quotations? I have an Invoices tables that is created from inventory associated with a Job or Order. I could have a Quotes table as a halfway-house between inventory and invoices, but it feels like I would have duplicate data structures and logic just to handle an "Is this a quote?" bit. From a business perspective, quotes are different from invoices: a quote is sent prior to an undertaking and an invoice is sent once it is complete and payment is due, but how to represent this in my repository and model. What is an elegant way to store and manage quotes & invoices in a database? Edit: indicated Job === Order for this particular instance.

    Read the article

  • Android Extend BaseExpandableListAdapter

    - by Robert Mills
    I am trying to extend the BaseExpandableListAdapter, however when once I view the list and I select one of the elements to expand, the order of the list gets reversed. For example, if I have a list with 4 elements and select the 1st element, the order (from top to bottom) is now 4, 3, 2, 1 with the 4th element (now at the top) expanded. If I unexpand the 4th element the order reverts to 1, 2, 3, 4 with no expanded elements. Here is my implementation:`public class SensorExpandableAdapter extends BaseExpandableListAdapter { private static final int FILTER_POSITION = 0; private static final int FUNCTION_POSITION = 1; private static final int NUMBER_OF_CHILDREN = 2; ArrayList mParentGroups; private Context mContext; private LayoutInflater mInflater; public SensorExpandableAdapter(ArrayList<SensorType> parentGroup, Context context) { mParentGroups = parentGroup; mContext = context; mInflater = LayoutInflater.from(mContext); } @Override public Object getChild(int groupPosition, int childPosition) { // TODO Auto-generated method stub if(childPosition == FILTER_POSITION) return "filter"; else return "function"; } @Override public long getChildId(int groupPosition, int childPosition) { return childPosition; } @Override public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { if(convertView == null) { //do something convertView = (RelativeLayout)mInflater.inflate(R.layout.sensor_row_list_item, parent, false); if(childPosition == FILTER_POSITION) { ((CheckBox)convertView.findViewById(R.id.chkTextAddFilter)).setText("Add Filter"); } else { ((CheckBox)convertView.findViewById(R.id.chkTextAddFilter)).setText("Add Function"); ((CheckBox)convertView.findViewById(R.id.chkTextAddFilter)).setEnabled(false); } } return convertView; } @Override public int getChildrenCount(int groupPosition) { // TODO Auto-generated method stub return NUMBER_OF_CHILDREN; } @Override public Object getGroup(int groupPosition) { return mParentGroups.get(groupPosition); } @Override public int getGroupCount() { // TODO Auto-generated method stub return mParentGroups.size(); } @Override public long getGroupId(int groupPosition) { // TODO Auto-generated method stub return groupPosition; } @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { if(convertView == null) { convertView = mInflater.inflate(android.R.layout.simple_expandable_list_item_1, parent, false); TextView tv = ((TextView)convertView.findViewById(android.R.id.text1)); tv.setText(mParentGroups.get(groupPosition).toString()); } return convertView; } @Override public boolean hasStableIds() { // TODO Auto-generated method stub return true; } @Override public boolean isChildSelectable(int groupPosition, int childPosition) { // TODO Auto-generated method stub return true; } } ` I just need to take a simple ArrayList of my own SensorType class. The children are the same for all classes, just two. Also, how do I go about making the parent in each group LongClickable? I have tried in my ExpandableListActivity with this getExpandableListView().setOnLongClickableListener() ... and on the parent TextView set its OnLongClickableListener but neither works. Any help on either of these is greatly appreciated!

    Read the article

  • check external website registration

    - by Arsenal
    Hi, I'm trying to create a PHP based game where you have to do all sorts of simple but un-obvious tasks in order to progress to the next level (eg. refresh browser, press keyboard combination, ...) Kinda like the game "this is the only level" (if anyone has ever heard of it) Now I was thinking: Would it be possible to create a level where they'd have to sign up at a different page in order to progress to the next level? So say for example they need to sign up to goal.com and if they're signed up they proceed to the next level. The page would need to constantly check if the signup process on the other site is completed. Is this even possbible? And if so, any thoughts on how? Thanks!

    Read the article

  • How can I merge two lists and sort them working in 'linear' time?

    - by Sergio Tapia
    I have this, and it works: # E. Given two lists sorted in increasing order, create and return a merged # list of all the elements in sorted order. You may modify the passed in lists. # Ideally, the solution should work in "linear" time, making a single # pass of both lists. def linear_merge(list1, list2): finalList = [] for item in list1: finalList.append(item) for item in list2: finalList.append(item) finalList.sort() return finalList # +++your code here+++ return But, I'd really like to learn this stuff well. :) What does 'linear' time mean?

    Read the article

  • Property in class is IEnumerable<TDto> get TDto.A == a

    - by Miau
    So I have a class is something like this public class Order { //some other stuff ... //setting the internal _orderItems collection ... IEnumerable<OrderItems> OrderItems { get { return _orderItems; } } public class OrderItem { //other stuff public string ProductName {get; set;} } If I have a collection of orders of some sort and have access via linq to the order, something like myOrderRespository.Where(x=>x.OrderItems) Then I only have access to getEnumerator there, waht I would like it to be able to do something like myOrderRespository.Where(x=>x.OrderItems.ProductName == "Blah") Is this possible? this is a made up scenario and its pseudo code I m trying to simplify the problem so its easy to explain ( so please forgive me if there are a few errors) Cheers

    Read the article

  • MySQL Query exceptions

    - by Wayne
    In one page, it should show records that has the following selected month from the drop down menu and it is set in the ?month=March So the query will do this $sql = "SELECT * FROM schedule WHERE month = '" . Clean($_GET['month']) . "' AND finished='0' ORDER BY date ASC"; But it shows records that has a value of 2 in the finished column and I don't want the query to include this. I've tried $sql = "SELECT * FROM schedule WHERE month = '" . Clean($_GET['month']) . "' AND finished='0' OR finished = '1' OR finished = '3' ORDER BY date ASC"; But it shows records on different months when it shouldn't be. So basically I want the record to exclude the records that has the value of 2 in the record that will not be shown in the page.

    Read the article

  • How extension methods work in background ?

    - by Freshblood
    I am just cuirous about behind of extension method mechanism.Some questions and answer appear in my mind. MyClass.OrderBy(x=>x.a).OrderBy(x=>x.b); I was guessing that mechanism was first orderby method works and order them by a member then returns sorted items in IEnumarable interface then next Orderby method of IEnumarable Order them for b paramater.But i am wrong when i look at this linq query. MyClass.Orderby(x=>x.a).ThenOrderBy(x=>x.b); this is slightly different and tells me that i am wrong.Because this is not ordering by a then b and not possible to have such result if i was right.This get me confuse enough... Similiar structure is possible to write withot extension methods as first query but second is not possible.This prove i am wrong . Can u explain it ?

    Read the article

  • Optimally reducing maximum flow

    - by ArIck
    Given a parameter k, I'm trying to delete k edges from a directed graph such that the maximum flow is reduced by as much as possible. The graph has a source s and a sink t, and the capacity of each edge is one. The graph may or may not contain cycles. My proposed solution would be to first perform a topological sorting on the graph, using an algorithm that "forgives" cycles -- perhaps by ignoring edges that lead us back to the source. Then (assuming k = 1): i = 0 for each vertex u order by topological(u) for each edge (u, v) order by topological(v) descending if topological(v) > topological(u) then delete (u, v) if ++i = k then return else // edge doesn't contribute to max flow, ignore Would this work, or am I totally off-track here?

    Read the article

  • Linq To Sql Left outer join - filtering null results

    - by Harry
    I'd like to reproduce the following SQL into C# LinqToSql SELECT TOP(10) Keywords.* FROM Keywords LEFT OUTER JOIN IgnoreWords ON Keywords.WordID = IgnoreWords.ID WHERE (DomainID = 16673) AND (IgnoreWords.Name IS NULL) ORDER BY [Score] DESC The following C# Linq gives the right answer. But I can't help think I'm missing something (a better way of doing it?) var query = (from keyword in context.Keywords join ignore in context.IgnoreWords on keyword.WordID equals ignore.ID into ignored from i in ignored.DefaultIfEmpty() where i == null where keyword.DomainID == ID orderby keyword.Score descending select keyword).Take(10); the SQL produced looks something like this: SELECT TOP (10) [t0].[DomainID], [t0].[WordID], [t0].[Score], [t0].[Count] FROM [dbo].[Keywords] AS [t0] LEFT OUTER JOIN (SELECT 1 AS [test], [t1].[ID] FROM [dbo].[IgnoreWords] AS [t1]) AS [t2] ON [t0].[WordID] = [t2].[ID] WHERE ([t0].[DomainID] = 16673) AND ([t2].[test] IS NULL) ORDER BY [t0].[Score] DESC How can I get rid of this redundant inner selection? It's only slightly more expensive but every bit helps!

    Read the article

  • How can I reduce the number of loops in this VIEW in Rails when using :collection?

    - by Angela
    I am using the :collection to go through all the Contacts that are part of a given Campaign. But within that Campaign I check for three different Models (each with their own partial). Feels like I am going through the list of Contacts 3x. How can I make this alot leaner? <h2>These are past due:</h2> <% @campaigns.each do |campaign| %> <h3>Campaign: <%= link_to campaign.name, campaign %></h3> <strong>Emails in this Campaign:</strong> <% for email in campaign.emails %> <h4><%= link_to email.title, email %> <%= email.days %> days</h4> <% @contacts= campaign.contacts.find(:all, :order => "date_entered ASC" )%> <!--contacts collection--> <!-- render the information for each contact --> <%= render :partial => "contact_email", :collection => @contacts, :locals => {:email => email} %> <% end %> Calls in this Campaign: <% for call in campaign.calls %> <h4><%= link_to call.title, call %> <%= call.days %> days</h4> <% @contacts= campaign.contacts.find(:all, :order => "date_entered ASC" )%> <!--contacts collection--> <!-- render the information for each contact --> <%= render :partial => "contact_call", :collection => @contacts, :locals => {:call => call} %> <% end %> Letters in this Campaign: <% for letter in campaign.letters %> <h4><%= link_to letter.title, letter %> <%= letter.days %> days</h4> <% @contacts= campaign.contacts.find(:all, :order => "date_entered ASC" )%> <!--contacts collection--> <!-- render the information for each contact --> <%= render :partial => "contact_letter", :collection => @contacts, :locals => {:letter => letter} %> <% end %> <% end %>

    Read the article

  • Re-ordering collection C#

    - by Adam
    Hi - I have a problem which I cant seem to find answer to through searches (either that or I am searching for the completely wrong thing!). I have a list of items called "Top 10" in a sortedlist item that is populated from my DB (SortedList where int is position and string is item). I want to be able to move items up & down the list order at the click of a button and then save the new order back to the DB. I am OK with the DB part it is just the re-ordering I am really struggling with - is a sortedlist the correct collection for this? Many thanks for any advice offered.

    Read the article

  • Multiple LIKE in SQL

    - by ninumedia
    I wanted to search through multiple rows and obtain the row that contains a particular item. The table in mySQL is setup so each id has a unique list (comma-delimited) of values per row. Ex: id | order 1 | 1,3,8,19,34,2,38 2 | 4,7,2,190,38 Now if I wanted to pull the row that contained just the number 19 how would I go about doing this? The possibilities I could figure in the list with a LIKE condition would be: 19, ,19 ,19, I tried the following and I cannot obtain any results, Thank you for your help! SELECT * FROM categories WHERE order LIKE '19,%' OR '%,19%' OR '%,19%' LIMIT 0 , 30

    Read the article

  • php search and replace

    - by Dave
    I am trying to create a database field merge into a document (rtf) using php i.e if I have a document that starts Dear Sir, Customer Name: [customer_name], Date of order: [order_date] After retrieving the appropriate database record I can use a simple search and replace to insert the database field into the right place. So far so good. I would however like to have a little more control over the data before it is replaced. For example I may wish to Title Case it, or convert a delimited string into a list with carriage returns. I would therefore like to be able to add extra formatting commands to the field to be replaced. e.g. Dear Sir, Customer Name: [customer_name, TC], Date of order: [order_date, Y/M/D] There may be more than one formatting command per field. Is there a way that I can now search for these strings? The format of the strings is not set in stone, so if I have to change the format then I can. Any suggestions appreciated.

    Read the article

  • How do you keep track of what you have released in production?

    - by systempuntoout
    Tipically a deploy in production does not involve just a mere source code update (build) but requires a lot of other important tasks like for example: Db scripts (tables, query..) Configuration files (differents from test\production) Batch to schedule Executables to move to the correct path Etc. etc. In our company we just send an email to a "Release email address" describing the tasks in order, which changeset need to be published (TFS), which SP need to be updated, db scripts and so on. I believe there's not a magic tool that does these tasks automagically in order, rollback included; but probably there's something better than email that helps to keep track of releases in production. Do you have any tools to suggest or practices to share?

    Read the article

  • What are the pros/cons to these 2 ways of defining parameters for a web service method

    - by Antony Scott
    I have an existing web service I need to expand, but it has not gone into production yet. So, I am free to change the contracts as I see fit. But I am not sure of the best way to define the methods. I am leaning towards Method 2 for no other reason than I cannot think of good names to give the parameters classes! Are there any major disadvantages to using Method 2 over Method 1? Method 1 [DataContract(Namespace = Constants.ServiceNamespace)] public class MyParameters { [DataMember(Order = 1, IsRequired = true)] public int CompanyID { get; set; } [DataMember(Order = 2, IsRequired = true)] public string Filter { get; set; } } [ServiceContract(Namespace = Constants.ServiceNamespace)] public interface IMyService { [OperationContract, FaultContract(MyServiceFault)] MyResult MyMethod(MyParameters params); } Method 2 public interface IMyService { [OperationContract, FaultContract(MyServiceFault)] MyResult MyMethod(int companyID, string filter); }

    Read the article

  • dynamically updating a datagrid from a XML file c# 3.5

    - by Farstucker
    I have a datagrid that is populated via XML file when the form loads. Everything is working great but I would like the datagrid to update dynamically when a new order is received (Separate class receives a data stream and updates the file). Im looking for suggestions on how this should be done. (ie using a timer update every second, or monitor the file using FileSystemWatcher.. etc) Since where here, I might as well mention that in order to update the datagrid Im clearing the whole data set and Re-reading the file using: DataSet.Clear(); DataSet.ReadXml("file.xml"); dataGridView1.DataSource = DataSet; if this is not the proper approach, please offer any alternate suggestions.

    Read the article

  • Maintaining the query string in ASP.Net MVC

    - by Mantorok
    Hi all Just beginning my journey in ASP.Net MVC and I have a query about something before I dig myself in too deep. I have a table, which is paged, and I have 2 controls above the table: Dropdown that defines order of the results and apply button next to it Textbox that defines a filter and apply button next to it What I need to achieve is that if the user changes the order or adds a filter I fire of an AJAX call to my action like such: /Membership/Users?sort=value&filter=value&page=pagenumber. So my controller action is: // GET Membership/Users?sort=&filter=&page= public ActionResult Users(string sort, string filter, string page) So I have 3 questions: Is this the correct approach? What would be the best way to ensure that the query string is maintained, bearing in mind that the action will nearly always be called by Jquery/Ajax functions? If I wanted to link directly to this action passing the arguments would I need to hard-code the querystring? Thanks

    Read the article

< Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >