Search Results

Search found 883 results on 36 pages for 'subset'.

Page 19/36 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • SQL Average Data Based on Distance

    - by jsmith
    I'm pretty new to SQL. I have a database with records based on road/milepoints. My goal is to get an average value every 52.8 ft along the road. My related table has data every 15 ft, this table of course has a foreign key relating it to the primary table. If I wanted to pull out the average value every 52.8 ft, along a given milepost, how would I go about this? Example Data: RecID Begin_MP End_MP 100 0 0.56 RecID MP Value1 Value2 100 0 159 127.7 100 0.003 95.3 115.3 100 0.006 82.3 107 100 0.009 56.5 74.5 100 0.011 58.1 89.1 100 0.014 95.2 78.8 100 0.017 108.9 242.5 100 0.02 71.8 73.3 100 0.023 84.1 80.2 100 0.026 65.5 66.1 100 0.028 122 135.8 100 0.031 99.9 230.7 100 0.034 95.7 111.5 100 0.037 127.3 74.3 100 0.04 140.7 543.1 The first Data is an example of a Road. The second subset of data are the values I need to query out every 52.8 ft. Thank you

    Read the article

  • Methods for content uniqueness calculation on C#

    - by sashaeve
    I have a set of text files. I want to calculate a content uniqueness for different subsets. E.g. we have 10 documents (A1 - A10) and want to calculate the uniqueness for subset of documents A1 and A2. So the result must be some value from 0 to 1 (1 - absolutely unique content, 0 - absolutely dublicated content). What methods for content uniqueness calculation do you know? Please suggest these methods with .NET implementations. Thanks.

    Read the article

  • The fastest way to do a collection subtraction

    - by Tony
    I have two Sets. Set<B> b is the subset of Set<A> a. they're both very huge Sets. I want to subtract b from a , what's the best practice to do this common operation ? I've written to many codes like this , and I don't think it's efficient. what's your idea ? for(int i = 0 ; i < a.size(); i++) { for (int j=0 ; j < b.size() ;j++) { // do comparison , if found equals ,remove from a break; } } And I want to find an algorithm , not only applies to Sets, also works for Array.

    Read the article

  • Problem with linq-to-xml

    - by phenevo
    I want by linq save my xml in csv and I have o problem. This bracket are here beacuse without it this code is not displaying (why ? ) bracket results bracket <Countries country="Albania"><Regions region="Centralna Albania"><Provinces province="Durres i okolice"><Cities city="Durres" cityCode="2B66E0ACFAEF78734E3AF1194BFA6F8DEC4C5760"><IndividualFlagsWithForObjects Status="1" /><IndividualFlagsWithForObjects Status="0" /><IndividualFlagsWithForObjects magazyn="2" /></Cities></Provinces></Regions></Countries><Countries .... XDocument loaded = XDocument.Load(@"c:\citiesxml.xml"); // create a writer and open the file TextWriter tw = new StreamWriter("c:\\XmltoCSV.txt"); // Query the data and write out a subset of contacts var contacts = (from c in loaded.Descendants("Countries") select new { Country = (string)c.Element("Country"), Region = (string)c.Element("region"), Province= (string)c.Element("province"), City = (string)c.Element("city"), Hotel = (string)c.Element("hotel") }).ToList(); Problem is that loaded.Descendants("Countries") gives me 45 countries but all fields are null.

    Read the article

  • Oracle AQ dequeue order

    - by yawn
    A trigger in an Oracle 10g generates upsert and delete messages for a subset of rows in a regular table. These messages consist out of two fields: A unique row id. A non-unique id. When consuming these message I want to impose an order on the deque process that respects the following constraints: Messages must be dequeued in insertion order. Messages belonging to the same id must be dequeued in such a fashion that no other dequeuing process should be able to dequeue a potential successor message (or messages) with this id. Since the messages are generated using a trigger I cannot use groups for this purpose. I am using the Oracle Java interface for AQ. Any pointers on how that could be achieved?

    Read the article

  • vectorization of a text file

    - by Fox
    I am trying to implement vectorization of a text file...I have created a dictionary (Unique words in all the documents) ... Which is the best way to implement this in java? For example - My dictionary has the following words - {w1, w2, w3, w4} And I have 2 documents each having subset of the words in the vocabulary. I need to write to a text file the matrix in the form -- 1,3,4,0 0,0,2,1 Here each row represents a document and the values represent the occurrence of each word in the document. Can you suggest me the most efficient way to implement this in Java?

    Read the article

  • Chain LINQ IQueryable, and end with Stored Procedure

    - by Alex
    I'm chaining search criteria in my application through IQueryable extension methods, e.g.: public static IQueryable<Fish> AtAge (this IQueryable<Fish> fish, Int32 age) { return fish.Where(f => f.Age == age); } However, I also have a full text search stored procedure: CREATE PROCEDURE [dbo].[Fishes_FullTextSearch] @searchtext nvarchar(4000), @limitcount int AS SELECT Fishes.* FROM Fishes INNER JOIN CONTAINSTABLE(Fishes, *, @searchtext, @limitcount) AS KEY_TBL ON Fishes.Id = KEY_TBL.[KEY] ORDER BY KEY_TBL.[Rank] The stored procedure obviously doesn't return IQueryable, however, is it possible to somehow limit the result set for the stored procedure using IQueryable's? I'm envisioning something like .AtAge(5).AboveWeight(100).Fishes_FulltextSearch("abc"). In this case, the fulltext search should execute on a smaller subset of my Fishes table (narrowed by Age and Weight). Is something like this possible? Sample code?

    Read the article

  • How to share WinForms and code between 2 projects

    - by Richard Bysouth
    Hi I have a working Windows Forms app (split into an EXE and a few DLLs). Now I've been asked to look at creating another app (MyAppLite) that has only a very small subset of the functionality. Think of it as similar to MS Word Viewer vs. MS Word. Everything that I need to build MyAppLite is contained in the main solution - essentially I need to use a couple of the WinForms and whatever bits in the DLLs they call into. What would be the best way to do this? I was thinking of creating another Project in my solution for MyAppLite, then adding the necessary source files as links (using Add Existing Item Add As Link in Solution Explorer). I definitely wouldn't want to maintain 2 copies of the source code. FYI it's a .NET 2.0 VB app, using VS2008. thanks Richard

    Read the article

  • [AS3] htmlText not showing bold or italics font

    - by Conor
    So I have a MovieClip asset with a dynamic textfield sitting inside of it. I export my .fla as a .swc to use within Flash Builder 4, and create instances of the asset with code, populating the text dynamically from XML. My issue is that even though I have htmlText enabled, bold and italics tags don't appear to be working. I have a feeling it is because when I created the asset in Flash CS4, the text field makes you specify the font, and the subset of that to use (Regular, Bold, Oblique, etc). Is there any way to get the htmlText to render bold and italics tags properly without having to completely rethink the way I'm creating all these fields?

    Read the article

  • Flash FLVPlayback states

    - by rob5408
    I'm writing my own class to manage a skin for an FLVPlayback component. It works 90% of the time, but sometimes the state get really messed up. Specifically, the video is playing, meaning I can see it play and the VideoEvent.PLAYHEAD_UPDATE event is firing, but when I poll the FLVPlayback component about its playing property, it returns false. I assume this may be because 'buffering' is kind of a subset of 'playing', but I cannot confirm this in the documentation. I guess another way to ask this question is, "Does the FLVPlayback component ever buffer while it is in a stopped state?"

    Read the article

  • SQL count NULL cells

    - by Giuseppe
    Dear All, I have the following problem. I have a table in a db, with many columns. I can do different kind of select queries, to show, for example, for each record that satisfies a condition: all cells from columns with names ending in _t0 all cells from columns with names ending in _t1 ... To get the column lists to form the queries I use the information schema. Now, the problem: each query returns a record with a subset of the columns of the big table. This means that I can get a row of (all!) NULLs. How can I ask my query to reject such rows without having to type in explicitely the column names (i.e. by saying where col_1 is not null, col_2 is not null...)? Is it possible? Thanks in advance!!! Sep

    Read the article

  • XML format for blogs and/or CMS

    - by user288713
    I'm writing my own blog/CMS engine (using WebApp and Google App Engine), and I'm looking for a light-weight XML format to use for content storage. Is there some already existing format that could be used for this purposes? Maybe some subset of the DocBook or ePub format? I had a look at those and they seem to be a little of overkill for what I want to do. Then again WXR (Wordpress eXtended RSS) or the one from Pluxml (pluxml.org) might be suited as well. Any ideas?

    Read the article

  • Partial compilation of openwrt project

    - by yosig81
    I would like to get an idea or reference to compile only subset on the openwrt project. i am aware of the menuconfig utility but this is not enough for my goal. i would like to compile only the tool-chain (binutils + gcc + glibc) for a specific target (ar71xx) and also the kernel. now, after looking in the makefiles etc, i have noticed that most of the work in actually patching the toolchain and the kernel and then compile it. is there any option to stop build process after the patching so i can have only the source code patched and i can write my own make file to compile it?

    Read the article

  • "Arbitrary" context free grammars?

    - by danwroy
    Long time admirer first time inquirer :) I'm working on a program which derives a deterministic finite-state automata from a context-free grammar, and the paper I have been assigned which explains how to do this keeps referring to "arbitrary probabilistic context-free grammars" but never defines the meaning of "arbitrary" in relation to PCFGs. I assume they mean "any old PCFG" but then why not just say "any PCFG"? The term also turns up in several Wikipedia entries. At the top of the CFG page there is a reference to arbitrariness in relation to CFGs on ("clauses can be nested inside clauses arbitrarily deeply"), but doesn't make clear why someone would refer to a PCFG or subset of PCFGs as arbitrary. In case anyone is curious, the paper is Parsing and Hypergraphs by Klein and Manning (2001); I've also been reading two other papers by them related to this one (An Agenda-Based Chart Parser for Arbitrary Probabilistic Context-Free Grammars and Empirical Bounds, Theoretical Models, and the Penn Treebank) which use the term extensively but never explain it either. Thanks for your help!

    Read the article

  • TableAdapter to return ONLY selected columns? (VS2008)

    - by MattSlay
    (VS2008) I'm trying to configure a TableAdapter in a Typed DataSet to return only a certain subset of columns from the main schema of the table on which it is based, but it always returns the entire schema (all columns) with blank values in the columns I have omitted. The TableAdpater has the default Fill and GetData() methods that come from the wizard, which contain every column in the table, which is fine. I then added a new parameterized query method called GetActiveJobsByCustNo(CustNo), and I only included a few columns in the SQL query that I actually want to be in this table view. But, again, it returns all the columns in the master table schema, with empty values for the columns I omitted. The reason I am wanting this, is so I can just get a few columns back to use that table view with AutoGenerateColumns in an ASP.NET GridView. With it giving me back EVERY column i nthe schema, my presentation GridView contains way more columns that I want to show th user. And, I want to avoid have to declare the columns in the GridView.

    Read the article

  • DataView Vs DataTable.Select()

    - by Aseem Gautam
    Considering the code below: Dataview someView = new DataView(sometable) someView.RowFilter = someFilter; if(someView.count > 0) { …. } Quite a number of articles which say Datatable.Select() is better than using DataViews, but these are prior to VS2008. Solved: The Mystery of DataView's Poor Performance with Large Recordsets Array of DataRecord vs. DataView: A Dramatic Difference in Performance So in a situation where I just want a subset of datarows based on some filter criteria(single query) and what is better DataView or DataTable.Select()?

    Read the article

  • Using * in SELECT Query

    - by libregeek
    I am currently porting an application written in MySQL3 and PHP4 to MySQL5 and PHP5. On analysis I found several SQL queries which uses "select * from tablename" even if only one column(field) is processed in PHP. The table has almost 60 columns and it has a primary key. In most cases, the only column used is id which is the primary key. Will there be any performance boost if I use queries in which the column names are explicitly mentioned instead of * ? (In this application there is only one method which we need all the columns and all other methods return only a subset of the columns)

    Read the article

  • MVVM (ICommand) in Silverlight

    - by Andrey Khataev
    Hello! Please, don't judge strictly if this question was discussed previously or indirectly answered in huge nearby prism and mvvm blogs. In WPF implementation of RelayCommand or DelegateCommand classes there is a such eventhandler /// <summary> /// Occurs whenever the state of the application changes such that the result of a call to <see cref="CanExecute"/> may return a different value. /// </summary> public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } } but in SL subset of namespaces there are no CommandManager class. And this is where I'm stuck. I haven't yet found an workaround for this in MVVM adoptation for SL (PRISM is so complex for me yet). Different simple HelloWorldMVVM apps don't deal with at all. Thanks in advance and sorry for my English -)

    Read the article

  • Umbraco -- controlling access to media by membership

    - by Ryan
    I need to set up access to media files with the following structure: A media folder is designated as belonging to a specific member group. Then, a sub-folder below that needs to be available to a subset of members from the parent's member group. Any thoughts on how this can best be accomplished? I'll render the actual file download links with a user control, but how should I set up this access control on the back end? I need a member-group picker and a multiple member picker. Do these exist anywhere?

    Read the article

  • ideas for algorithm? sorting a list randomly with emphasis on variety

    - by Steve Eisner
    I have a table of items with [ID,ATTR1,ATTR2,ATTR3]. I'd like to select about half of the items, but try to get a random result set that is NOT clustered. In other words, there's a fairly even spread of ATTR1 values, ATTR2 values, and ATTR3 values. This does NOT necessarily represent the data as a whole, in other words, the total table may be generally concentrated on certain attribute values, but I'd like to select a subset with more variety. The attributes are not inter-related, so there's not really a correlation between ATTR1 and ATTR2. Any ideas for an efficient algorithm? Thanks! I don't really even know how to search for this :)

    Read the article

  • How does bundler work (in general)?

    - by MAP
    Hello, I'm pretty new to Ruby/Rails but I was taking a look at bundler and was wondering how it works exactly. Do you install a full set of gems like normal gem install XYZand then use the Gemfile to pull a certain subset of those gems for use with a specific application? Or do you not install gems normally anymore and just include them in the Gemfile and then do a bundle install to include them all in a bundle that is then used with your application? Thank you so much for taking the time to answer this, I'm just a little confused on what bundler's functionality is exactly. -- MAP

    Read the article

  • Where is App.config?

    - by Zian Choy
    I'm trying to set up logging with Microsoft's Enterprise Library (log4net seems to be a dead project). I'm using VB .NET 2008 and VS 2008. I've searched all over the MSDN documentation, CodePlex docs (including the Hands-On labs that installed and then vanished), and online tutorials to no avail. They all refer to a mysterious "configuration file" or "App.config" that I can't find and can't seem to add. I even tried adding a new text file and renaming it "App.config" but that only made VS 2008 spit out a red wavy line on a blank file. Any suggestions for finding the elusive app.config would be greatly appreciated. (and, if that makes the EntLib configuration tool show up, I'll be absolutely delighted) Edit: I've been tricked! The tree in VS 2008 isn't a true superset-subset relationship, which is why I got so frustrated. To wit, the top of the tree: And a 'sub-section' of the tree.

    Read the article

  • TypeError: Python thinks that I passed a function 2 arguments but I only passed it 1

    - by slhck
    I work on something in Seattle Repy which is a restricted subset of Python. Anyway, I wanted to implement my own Queue that derives from a list: class Queue(list): job_count = 0 def __init__(self): list.__init__(self) def appendleft(item): item.creation_time = getruntime() item.current_count = self.job_count self.insert(0, item) def pop(): item = self.pop() item.pop_time = getruntime() return item Now I call this in my main server, where I use my own Job class to pass Jobs to the Queue: mycontext['queue'] = Queue() # ... job = Job(str(ip), message) mycontext['queue'].appendleft(job) The last line raises the following exception: Exception (with type 'exceptions.TypeError'): appendleft() takes exactly 1 argument (2 given) I'm relatively new to Python, so could anyone explain to me why it would think that I gave appendleft() two arguments when there obviously was only one?

    Read the article

  • Iphone & Web App synch

    - by Jack Welsh
    I am trying to build an Iphone App client for our CRM solution so our sales people would be able to access the information available in our CRM through an Iphone App. I am trying to find out what is the recommended approach to architect the application when it comes to the database. I am not sure where should the data reside, should I save a subset of the data on the iPhone, or should I just rely on webservices and pull the information I need from the database whenever I need it. Also, is there any best practices or frameworks to build such applications on the Iphone.

    Read the article

  • How do I create a solr core with the data from an existing one?

    - by steve_d
    Solr 1.4 Enterprise Search Server recommends doing large updates on a copy of the core, and then swapping it in for the main core. I am following these steps: Create prep core: http://localhost:8983/solr/admin/cores?action=CREATE&name=prep&instanceDir=main Perform index update, then commit/optimize on prep core. Swap main and prep core: http://localhost:8983/solr/admin/cores?action=SWAP&core=main&other=prep Unload prep core: http://localhost:8983/solr/admin/cores?action=UNLOAD&core=prep The problem I am having is, the core created in step 1 doesn't have any data in it. If I am going to do a full index of everything and the kitchen sink, that would be fine, but if I just want to update a (large) subset of the documents - that's obviously not going to work. (I could merge the cores, but part of what I'm trying to do is get rid of any deleted documents without trying to make a list of them.) Is there some flag to the CREATE action that I'm missing? The Solr Wiki page for CoreAdmin is a little sparse on details.

    Read the article

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