Search Results

Search found 757 results on 31 pages for 'grouping'.

Page 17/31 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Visual Studio File Groupings

    - by Daniel
    In Visual Studio 3 files are typically grouped together: filename.aspx filename.aspx.cs filename.aspx.designer.cs Is there a way to add another file that grouping so that it can be collapsed and out of view? filename.aspx filename.aspx.cs filename.aspx.designer.cs customfile.cs Thanks

    Read the article

  • MySQL Group By and bracketing according to age.

    - by text
    Is that possible that MySQL can handle grouping of data according to age bracket? In my users table, age value is their actual age. I want to group them according to age bracket. For example: ages below 1 year old as age1, 1-4 yrs as age2, 5-9 yrs. old as age3 and so on.

    Read the article

  • K-means algorithm variation with minimum measure of size

    - by user1464628
    I'm looking for some algorithm such as k-means for grouping points on a map into a fixed number of groups, by distance. The number of groups has already been decided, but the trick part (at least for me) is to meet the criteria that the sum of MOS of each group should in the certain range, say bigger than 1. Is there any way to make that happen? ID MOS X Y 1 0.47 39.27846 -76.77101 2 0.43 39.22704 -76.70272 3 1.48 39.24719 -76.68485 4 0.15 39.25172 -76.69729 5 0.09 39.24341 -76.69884

    Read the article

  • Is there any way to group edit buttons in MediaWiki?

    - by Mark Robinson
    Is there any way to group the edit buttons displayed above the edit dialog in MediaWiki? By grouping, I mean like Word does (and even this editor) - you can add dividing lines to group them so that e.g. Bold and Italic are in one group, numbered list and bullet points in another. We've added lots of new buttons (in EditPage.php) and they are in a logical order, but at 30 buttons it is a bit overwhelming for some users.

    Read the article

  • How do I create an NSArray with string literals?

    - by Kyle
    I'm attempting to create an NSArray with a grouping of string literals, however I get the compile error "Initializer element is not constant". NSArray *currencies = [NSArray arrayWithObjects:@"Dollar", @"Euro", @"Pound", nil]; Could someone point out what I'm doing wrong, and possibly explain the error message?

    Read the article

  • Free server solution for strict content photos with geotags

    - by Max Gontar
    Hi! I would like to create some kind of open free "group" posting of photos with geotags First I thought about Panoramio, but seems there is no API for photos upload. By now I can see only two ways: Flickr - there are groups but you have to approve group membership anyway, or use tags for grouping which is bad for maintenance Custom server solution which will cost efforts and hosting Can you suggest other free photo services with geotags functionality, or opensource solutions? Thank you!

    Read the article

  • Percentage function for a group based on another group.

    - by Jeff O
    I have two grouping levels in a report. Group A can have a Percentage() of the entire report and so can Group B, but I would like to know the Percentage() of Group A of Group B. Even if I code it, it seems like once the inner and outer groups have created their footers, I can't go back to to the inner group and set it's value. Example: Group A Total 50 Group A percentage of Report Total = 33% Group A Percentage of Group B Total = 33% but I want 50% Group B Total 100 Group B Percentage of Report Total = 66% Report Total 150

    Read the article

  • MySQL Hibernate sort on 2 columns

    - by sammichy
    I have a table as follows Table item { ID - Primary Key content - String published_date - When the content was published create_date - When this database entry was created } Every hour (or specified time interval) I run a process to update this table with data from different sources (websites). I want to display the results according to the following rules. 1. The entries created each time the process runs should be grouped together. So the entries from the 2nd process run will always be after the entries from the first process run even if the published_date of an entry from the first run is after the published_date of an entry from the 2nd run. 2. Within the grouping by run, the entries by sorted by published_date 3. Another restriction is that I prefer that data from the same source not be grouped together. If I do the sort by create_date, published_date I will end up with data from source a, data from source b etc. I prefer that the data within each hour be mixed up for better presentation If I add a column to this table and store a counter which increments each time the process is run, it is possible to create a query to sort first by counter and then by published_dt. Is there a way to do it without adding a field? I'm using Hibernate over MySQL. e.g. Hour 1 (run 1) 4 rows collected from site a (rows 1-4) 3 rows collected from site b (rows 5-7) hour 2 (run 2) 2 row collected from site a (rows 8-9) 3 rows collected from site b (rows 10-12) ... After each run, new records are added to the database from each website. The create date is the time when the record was created in the database. The published date is part of the content and is read in from the external source. When the results are displayed I would like rows to be grouped together based on the hour they were published in. So rows 1-7 would be displayed before rows 8-12. Within each hourly grouping, I would like to sort the results by published date (timestamp). This is necessary so that the posts from all the sites collected in that hour are not grouped together but rather mixed in with each other.

    Read the article

  • MYSQL Select statment Order By with Group By

    - by mouthpiec
    I have the following simple SQL statment SELECT id, name, value_name, value_id FROM table GROUP BY id ORDER BY value_id DESC when grouping I would like to get the value_name and value_id of the tuple where the value_id is the biggest. The way it is i am getting the smallest value. For example 1, name1, valuename, 3 (where i know that there is a value_id of 5) Can you please help?

    Read the article

  • group member dropdown in visual studio 2008

    - by knittl
    in visual studio is the member dropdown, where you can select all members of the current type alphabetically ordered. is there an option which allows grouping of the members? i.e. all constructors before all methods before all properties before all events before all fields? if there is not, bad for me, i guess—it would really enhance productivity

    Read the article

  • Extending DataGrid/Changing DataGrids header

    - by drasto
    Is there any way how to override DataGrids header line ? Or at least its behaviour ? I'm trying to implement Outlook-like grouping of the table. That is allow user to drag column header out of the table to the dedicated area to sort by that column (for example XamDataGrid has that feature, you can see how it works here). I cannot use any commercial solutions. I will be thankfull for any experiences, ideas, code, notes or tutorials.

    Read the article

  • Inject Rows into Silverlight DataGrid

    - by Stephan
    Does anyone know of a way to inject rows into a Silverlight DataGrid? I need a way to add totals rows after every 6 entries. The totals are for all rows above the summary row, not just the previous six. I've tried doing it with grouping but that only shows the totals for the group and displays the totals rows above the actual rows. I would prefer to use a DataGrid for this if possible, but all solutions are welcome.

    Read the article

  • Django: GROUP BY two values

    - by AP257
    I would basically like to do the same as this question, but grouping by combinations of two values, rather than just one: SELECT player_type, team, COUNT(*) FROM players GROUP BY player_type, team; Does anyone know whether, and how, this is possible in Django? I'm using 1.2.

    Read the article

  • SQL Cartesian product joining table to itself and inserting into existing table

    - by Emma
    I am working in phpMyadmin using SQL. I want to take the primary key (EntryID) from TableA and create a cartesian product (if I am using the term correctly) in TableB (empty table already created) for all entries which share the same value for FieldB in TableA, except where TableA.EntryID equals TableA.EntryID So, for example, if the values in TableA were: TableA.EntryID TableA.FieldB 1 23 2 23 3 23 4 25 5 25 6 25 The result in TableB would be: Primary key EntryID1 EntryID2 FieldD (Default or manually entered) 1 1 2 Default value 2 1 3 Default value 3 2 1 Default value 4 2 3 Default value 5 3 1 Default value 6 3 2 Default value 7 4 5 Default value 8 4 6 Default value 9 5 4 Default value 10 5 6 Default value 11 6 4 Default value 12 6 5 Default value I am used to working in Access and this is the first query I have attempted in SQL. I started trying to work out the query and got this far. I know it's not right yet, as I’m still trying to get used to the syntax and pieced this together from various articles I found online. In particular, I wasn’t sure where the INSERT INTO text went (to create what would be an Append Query in Access). SELECT EntryID FROM TableA.EntryID TableA.EntryID WHERE TableA.FieldB=TableA.FieldB TableA.EntryID<>TableA.EntryID INSERT INTO TableB.EntryID1 TableB.EntryID2 After I've got that query right, I need to do a TRIGGER query (I think), so if an entry changes it's value in TableA.FieldB (changing it’s membership of that grouping to another grouping), the cartesian product will be re-run on THAT entry, unless TableB.FieldD = valueA or valueB (manually entered values). I have been using the Designer Tab. Does there have to be a relationship link between TableA and TableB. If so, would it be two links from the EntryID Primary Key in TableA, one to each EntryID in TableB? I assume this would not work because they are numbered EntryID1 and EntryID2 and the name needs to be the same to set up a relationship? If you can offer any suggestions, I would be very grateful. Research: http://www.fluffycat.com/SQL/Cartesian-Joins/ Cartesian Join example two Q: You said you can have a Cartesian join by joining a table to itself. Show that! Select * From Film_Table T1, Film_Table T2;

    Read the article

  • concatenation of all combination from different Lists in c#

    - by shan
    i have a List and i m grouping it into different lists. like:-List("a","b","c","it","as","am","cat","can","bat") 3 list List1:-a,b,c List2:-it,as,am List3:-cat,can,bat how can i concat the all possible combination from this lists. output like: a,it,cat b,it,cat c,it,cat a,am,cat b,am,cat c,am,cat . . . . etc so on...

    Read the article

  • Group mysql query by 15 min intervals

    - by gsiener
    I've got a monitoring system that is collecting data every n seconds (n ~=10 but varies). I'd like to aggregate the collected data by 15 minute intervals. Is there a way to corral the timestamp column into 15 minute chunks to allow for grouping to work?

    Read the article

  • Who use syslog for logging his web application

    - by user137246
    I was wondering if somebody use syslog to log his web application errors/warning/info ? It could be quite useful in a deployment environment with a lot of servers. If yes, what kind of client visualisation you can get to watch errors and grouping the same errors into batch? Do you use other techniques than syslog to achieve this kind of logging functionality?

    Read the article

  • SELECT GROUP BY latest entry in INBOX msg sent by user

    - by Mohatir S
    i am building a simple PM for my personal website where a user can join and send message to the registered users on my website, i am stuck in grouping and selecting latest user (by latest msg time) in INBOX page my table : id msg_from msg_to msg date in_del out_del i want to show latest user's id each in a group here is my SQL query : SELECT ttalk.id, ttalk.msg_from, users.first_name, users.last_name FROM ttalk INNER JOIN users ON ttalk.msg_from = users.id WHERE ttalk.msg_to = '$_SESSION[user_id]' AND ttalk.in_del='0' GROUP BY ttalk.msg_from DESC LIMIT 500 Thanks in advance :-)

    Read the article

  • R: optimal way of computing the "product" of two vectors

    - by Musa
    Hi, Let's assume that I have a vector r <- rnorm(4) and a matrix W of dimension 20000*200 for example: W <- matrix(rnorm(20000*200),20000,200) I want to compute a new matrix M of dimension 5000*200 such that m11 <- r%*%W[1:4,1], m21 <- r%*%W[5:8,1], m12 <- r%*%W[1:4,2] etc. (i.e. grouping rows 4-by-4 and computing the product). What's the optimal (speed,memory) way of doing this? Thanks in advance.

    Read the article

  • Parsing groupings of strings (Python)

    - by j00niner
    I have a string that looks something like this: [["Name1","ID1","DDY1", "CALL1", "WHEN1"], ["Name2","ID2","DDY2", "CALL2", "WHEN2"],...]; This string was taking from a website. Their can be any amount of groupings. How could I parse this string and print just the Name variables of each grouping?

    Read the article

  • Analytic functions – they’re not aggregates

    - by Rob Farley
    SQL 2012 brings us a bunch of new analytic functions, together with enhancements to the OVER clause. People who have known me over the years will remember that I’m a big fan of the OVER clause and the types of things that it brings us when applied to aggregate functions, as well as the ranking functions that it enables. The OVER clause was introduced in SQL Server 2005, and remained frustratingly unchanged until SQL Server 2012. This post is going to look at a particular aspect of the analytic functions though (not the enhancements to the OVER clause). When I give presentations about the analytic functions around Australia as part of the tour of SQL Saturdays (starting in Brisbane this Thursday), and in Chicago next month, I’ll make sure it’s sufficiently well described. But for this post – I’m going to skip that and assume you get it. The analytic functions introduced in SQL 2012 seem to come in pairs – FIRST_VALUE and LAST_VALUE, LAG and LEAD, CUME_DIST and PERCENT_RANK, PERCENTILE_CONT and PERCENTILE_DISC. Perhaps frustratingly, they take slightly different forms as well. The ones I want to look at now are FIRST_VALUE and LAST_VALUE, and PERCENTILE_CONT and PERCENTILE_DISC. The reason I’m pulling this ones out is that they always produce the same result within their partitions (if you’re applying them to the whole partition). Consider the following query: SELECT     YEAR(OrderDate),     FIRST_VALUE(TotalDue)         OVER (PARTITION BY YEAR(OrderDate)               ORDER BY OrderDate, SalesOrderID               RANGE BETWEEN UNBOUNDED PRECEDING                         AND UNBOUNDED FOLLOWING),     LAST_VALUE(TotalDue)         OVER (PARTITION BY YEAR(OrderDate)               ORDER BY OrderDate, SalesOrderID               RANGE BETWEEN UNBOUNDED PRECEDING                         AND UNBOUNDED FOLLOWING),     PERCENTILE_CONT(0.95)         WITHIN GROUP (ORDER BY TotalDue)         OVER (PARTITION BY YEAR(OrderDate)),     PERCENTILE_DISC(0.95)         WITHIN GROUP (ORDER BY TotalDue)         OVER (PARTITION BY YEAR(OrderDate)) FROM Sales.SalesOrderHeader ; This is designed to get the TotalDue for the first order of the year, the last order of the year, and also the 95% percentile, using both the continuous and discrete methods (‘discrete’ means it picks the closest one from the values available – ‘continuous’ means it will happily use something between, similar to what you would do for a traditional median of four values). I’m sure you can imagine the results – a different value for each field, but within each year, all the rows the same. Notice that I’m not grouping by the year. Nor am I filtering. This query gives us a result for every row in the SalesOrderHeader table – 31465 in this case (using the original AdventureWorks that dates back to the SQL 2005 days). The RANGE BETWEEN bit in FIRST_VALUE and LAST_VALUE is needed to make sure that we’re considering all the rows available. If we don’t specify that, it assumes we only mean “RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW”, which means that LAST_VALUE ends up being the row we’re looking at. At this point you might think about other environments such as Access or Reporting Services, and remember aggregate functions like FIRST. We really should be able to do something like: SELECT     YEAR(OrderDate),     FIRST_VALUE(TotalDue)         OVER (PARTITION BY YEAR(OrderDate)               ORDER BY OrderDate, SalesOrderID               RANGE BETWEEN UNBOUNDED PRECEDING                         AND UNBOUNDED FOLLOWING) FROM Sales.SalesOrderHeader GROUP BY YEAR(OrderDate) ; But you can’t. You get that age-old error: Msg 8120, Level 16, State 1, Line 5 Column 'Sales.SalesOrderHeader.OrderDate' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. Msg 8120, Level 16, State 1, Line 5 Column 'Sales.SalesOrderHeader.SalesOrderID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. Hmm. You see, FIRST_VALUE isn’t an aggregate function. None of these analytic functions are. There are too many things involved for SQL to realise that the values produced might be identical within the group. Furthermore, you can’t even surround it in a MAX. Then you get a different error, telling you that you can’t use windowed functions in the context of an aggregate. And so we end up grouping by doing a DISTINCT. SELECT DISTINCT     YEAR(OrderDate),         FIRST_VALUE(TotalDue)              OVER (PARTITION BY YEAR(OrderDate)                   ORDER BY OrderDate, SalesOrderID                   RANGE BETWEEN UNBOUNDED PRECEDING                             AND UNBOUNDED FOLLOWING),         LAST_VALUE(TotalDue)             OVER (PARTITION BY YEAR(OrderDate)                   ORDER BY OrderDate, SalesOrderID                   RANGE BETWEEN UNBOUNDED PRECEDING                             AND UNBOUNDED FOLLOWING),     PERCENTILE_CONT(0.95)          WITHIN GROUP (ORDER BY TotalDue)         OVER (PARTITION BY YEAR(OrderDate)),     PERCENTILE_DISC(0.95)         WITHIN GROUP (ORDER BY TotalDue)         OVER (PARTITION BY YEAR(OrderDate)) FROM Sales.SalesOrderHeader ; I’m sorry. It’s just the way it goes. Hopefully it’ll change the future, but for now, it’s what you’ll have to do. If we look in the execution plan, we see that it’s incredibly ugly, and actually works out the results of these analytic functions for all 31465 rows, finally performing the distinct operation to convert it into the four rows we get in the results. You might be able to achieve a better plan using things like TOP, or the kind of calculation that I used in http://sqlblog.com/blogs/rob_farley/archive/2011/08/23/t-sql-thoughts-about-the-95th-percentile.aspx (which is how PERCENTILE_CONT works), but it’s definitely convenient to use these functions, and in time, I’m sure we’ll see good improvements in the way that they are implemented. Oh, and this post should be good for fellow SQL Server MVP Nigel Sammy’s T-SQL Tuesday this month.

    Read the article

  • Observations in Migrating from JavaFX Script to JavaFX 2.0

    - by user12608080
    Observations in Migrating from JavaFX Script to JavaFX 2.0 Introduction Having been available for a few years now, there is a decent body of work written for JavaFX using the JavaFX Script language. With the general availability announcement of JavaFX 2.0 Beta, the natural question arises about converting the legacy code over to the new JavaFX 2.0 platform. This article reflects on some of the observations encountered while porting source code over from JavaFX Script to the new JavaFX API paradigm. The Application The program chosen for migration is an implementation of the Sudoku game and serves as a reference application for the book JavaFX – Developing Rich Internet Applications. The design of the program can be divided into two major components: (1) A user interface (ideally suited for JavaFX design) and (2) the puzzle generator. For the context of this article, our primary interest lies in the user interface. The puzzle generator code was lifted from a sourceforge.net project and is written entirely in Java. Regardless which version of the UI we choose (JavaFX Script vs. JavaFX 2.0), no code changes were required for the puzzle generator code. The original user interface for the JavaFX Sudoku application was written exclusively in JavaFX Script, and as such is a suitable candidate to convert over to the new JavaFX 2.0 model. However, a few notable points are worth mentioning about this program. First off, it was written in the JavaFX 1.1 timeframe, where certain capabilities of the JavaFX framework were as of yet unavailable. Citing two examples, this program creates many of its own UI controls from scratch because the built-in controls were yet to be introduced. In addition, layout of graphical nodes is done in a very manual manner, again because much of the automatic layout capabilities were in flux at the time. It is worth considering that this program was written at a time when most of us were just coming up to speed on this technology. One would think that having the opportunity to recreate this application anew, it would look a lot different from the current version. Comparing the Size of the Source Code An attempt was made to convert each of the original UI JavaFX Script source files (suffixed with .fx) over to a Java counterpart. Due to language feature differences, there are a small number of source files which only exist in one version or the other. The table below summarizes the size of each of the source files. JavaFX Script source file Number of Lines Number of Character JavaFX 2.0 Java source file Number of Lines Number of Characters ArrowKey.java 6 72 Board.fx 221 6831 Board.java 205 6508 BoardNode.fx 446 16054 BoardNode.java 723 29356 ChooseNumberNode.fx 168 5267 ChooseNumberNode.java 302 10235 CloseButtonNode.fx 115 3408 CloseButton.java 99 2883 ParentWithKeyTraversal.java 111 3276 FunctionPtr.java 6 80 Globals.java 20 554 Grouping.fx 8 140 HowToPlayNode.fx 121 3632 HowToPlayNode.java 136 4849 IconButtonNode.fx 196 5748 IconButtonNode.java 183 5865 Main.fx 98 3466 Main.java 64 2118 SliderNode.fx 288 10349 SliderNode.java 350 13048 Space.fx 78 1696 Space.java 106 2095 SpaceNode.fx 227 6703 SpaceNode.java 220 6861 TraversalHelper.fx 111 3095 Total 2,077 79,127 2531 87,800 A few notes about this table are in order: The number of lines in each file was determined by running the Unix ‘wc –l’ command over each file. The number of characters in each file was determined by running the Unix ‘ls –l’ command over each file. The examination of the code could certainly be much more rigorous. No standard formatting was performed on these files.  All comments however were deleted. There was a certain expectation that the new Java version would require more lines of code than the original JavaFX script version. As evidenced by a count of the total number of lines, the Java version has about 22% more lines than its FX Script counterpart. Furthermore, there was an additional expectation that the Java version would be more verbose in terms of the total number of characters.  In fact the preceding data shows that on average the Java source files contain fewer characters per line than the FX files.  But that's not the whole story.  Upon further examination, the FX Script source files had a disproportionate number of blank characters.  Why?  Because of the nature of how one develops JavaFX Script code.  The object literal dominates FX Script code.  Its not uncommon to see object literals indented halfway across the page, consuming lots of meaningless space characters. RAM consumption Not the most scientific analysis, memory usage for the application was examined on a Windows Vista system by running the Windows Task Manager and viewing how much memory was being consumed by the Sudoku version in question. Roughly speaking, the FX script version, after startup, had a RAM footprint of about 90MB and remained pretty much the same size. The Java version started out at about 55MB and maintained that size throughout its execution. What About Binding? Arguably, the most striking observation about the conversion from JavaFX Script to JavaFX 2.0 concerned the need for data synchronization, or lack thereof. In JavaFX Script, the primary means to synchronize data is via the bind expression (using the “bind” keyword), and perhaps to a lesser extent it’s “on replace” cousin. The bind keyword does not exist in Java, so for JavaFX 2.0 a Data Binding API has been introduced as a replacement. To give a feel for the difference between the two versions of the Sudoku program, the table that follows indicates how many binds were required for each source file. For JavaFX Script files, this was ascertained by simply counting the number of occurrences of the bind keyword. As can be seen, binding had been used frequently in the JavaFX Script version (and does not take into consideration an additional half dozen or so “on replace” triggers). The JavaFX 2.0 program achieves the same functionality as the original JavaFX Script version, yet the equivalent of binding was only needed twice throughout the Java version of the source code. JavaFX Script source file Number of Binds JavaFX Next Java source file Number of “Binds” ArrowKey.java 0 Board.fx 1 Board.java 0 BoardNode.fx 7 BoardNode.java 0 ChooseNumberNode.fx 11 ChooseNumberNode.java 0 CloseButtonNode.fx 6 CloseButton.java 0 CustomNodeWithKeyTraversal.java 0 FunctionPtr.java 0 Globals.java 0 Grouping.fx 0 HowToPlayNode.fx 7 HowToPlayNode.java 0 IconButtonNode.fx 9 IconButtonNode.java 0 Main.fx 1 Main.java 0 Main_Mobile.fx 1 SliderNode.fx 6 SliderNode.java 1 Space.fx 0 Space.java 0 SpaceNode.fx 9 SpaceNode.java 1 TraversalHelper.fx 0 Total 58 2 Conclusions As the JavaFX 2.0 technology is so new, and experience with the platform is the same, it is possible and indeed probable that some of the observations noted in the preceding article may not apply across other attempts at migrating applications. That being said, this first experience indicates that the migrated Java code will likely be larger, though not extensively so, than the original Java FX Script source. Furthermore, although very important, it appears that the requirements for data synchronization via binding, may be significantly less with the new platform.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >