Search Results

Search found 58499 results on 2340 pages for 'temporal data'.

Page 248/2340 | < Previous Page | 244 245 246 247 248 249 250 251 252 253 254 255  | Next Page >

  • [WPF] Format datagrid row foreground depends on data

    - by ktutnik
    Hi everyone, Im new in wpf, i though it was an easy task. i searched in the internet but not lucky to found any help regarding this problem. <Style TargetType="{x:Type DataGridRow}"> <Setter Property="Foreground" Value="{Binding Converter=conditionToColorConverter}"/> </Style> the problem is how to pass the row data to the value.. the converter will return RED or BLACK color when specified properties of the row data match some category. or maybe there is an easy way to do that? Thanks in advance Kin

    Read the article

  • dhtmlxgrid: getting an xml string of grid data

    - by user823527
    The dhtmlxgrid documentation is saying that I should be able to get a string with the grid data with the serialize feature. mygrid.setSerializationLevel(true,true); var myXmlStr = mygrid.serialize(); I'd like to use that feature to get the updated grid data. But I don't get the xml string. Is that feature not available in the open source version? If I could get a csv string, that would also be OK. But I don't get that either. var gridcsv=mygrid.serializeToCSV(); document.getElementById("mytextareax").value = gridcsv; The html information for the grid is: <a href="#" onclick="savegrid();">Save Grid</a> <textarea id="mytextareax"><rows><row id='r1'><cell>index ... </rows></textarea> <div id="mytextarea" style="width:400px; height: 400px;"> </div> <div id="gridbox" style="width:600px; height:270px; background-color:white;"></div> <a href='#alfa' onClick="ser()">Reload grid with another structure</a> <br> The script for creating the grid is: <script> mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("../../codebase/imgs/"); mygrid.loadXML("../common/grid500.xml"); function ser(){ mygrid.clearAll(true); mygrid.loadXML("../common/gridH3.xml"); } function savegrid(){ alert('save grid'); mygrid.setSerializationLevel(true,true); var myXmlStr = mygrid.serialize(); /* document.getElementById("mytextarea").innerHTML = myXmlStr; */ document.getElementById("mytextareax").value = myXmlStr; alert(myXmlStr); } </script> Is there any way to get the data out of the dhtmlx grid to be able to create my own xml file from it?

    Read the article

  • Refernce platform specific System.Data.SQLite

    - by Dmitriy Nagirnyak
    Hi, I am using SQLite for the unit testing and might use it as a database for local development/staging. The System.Data.SQLite has basically 2 versions: x86 and x64. Correct one should be used for the specific platform. I have 64 bit Win7, other guys in the team might use 32-bit OSs. The server's platform is not known at this stage. If I use 32-bit version of the assembly on 64-bit platform I get BadImageFormatException: Could not load file or assembly 'System.Data.SQLite'. I believe similar will happen trying to use 64-bit assembly on 32-bit platform. So my question is what is the best way to reference the SQLite assembly so that it does not depend on the platform and people can just use it? It is ok to use 32-bit version of assembly on a 64-bit platform (Maybe there is a switch for that somewhere?). Thanks, Dmitriy.

    Read the article

  • Collection <NSCFSet: 0x1b0b30> was mutated while being enumerated. How to determine which set?

    - by jamone
    I'm doing a bunch of core data inserts and after 20k or so inserts with saves every 1-2k I get this error: Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <NSCFSet: 0x1b0b30> was mutated while being enumerated.' I'm trying to figure out which NSSet is causing this. I've done a search and the only NSSets in my code are the autogenerated ones that handle the Core Data relationships. I'm using NSXMLParser and for each element found creating a new entity (if a matching one doesn't already exist). So I will create a state entity and then populate all the city entities and then do a save. This means that a state's NSSet *cities is getting added to but I don't see why you can't do that.

    Read the article

  • Using XMLDecoder to cast Encoded XML to List<>

    - by Ender
    I am writing an application that reads in a large number of basic user details in the following format; once read in it then allows the user to search for a user's details using their email: NAME ROLE EMAIL --------------------------------------------------- Joe Bloggs Manager [email protected] John Smith Consultant [email protected] Alan Wright Tester [email protected] ... The problem I am suffering is that I need to store a large number of details of all people that have worked at the company. The file containing these details will be written on a yearly basis simply for reporting purposes, but the program will need to be able to access these details quickly. The way I aim to access these files is to have a program that asks the user for the name of the unique email of the member of staff and for the program to then return the name and the role from that line of the file. I've played around with text files, but am struggling with how I would handle multiple columns of data when it comes to searching this large file. What is the best format to store such data in? A text file? XML? The size doesn't bother me, but I'd like to be able to search it as quickly as possible. The file will need to contain a lot of entries, probably over the 10K mark over time. EDIT: I've decided to go with the XML serialisation method. I've managed to get the code for Encoding working perfectly, but the Decoding code below does not work. XMLDecoder d = new XMLDecoder( new BufferedInputStream(new FileInputStream("data.xml"))); List<Employee> list = (List<Employee>) d.readObject(); d.close(); for(Employee x : list) { if(x.getEmail().equals(userInput)) { // do stuff } } When the program hits List<Employee> list = (List<Employee>) d.readObject(); an exception is thrown claiming that "Employee cannot be cast to java.util.List". I've added a bounty to this and anyone that can help me solve this problem once and for all will get lots of lovely points. EDIT 2: I've looked a bit more into the problem and have come across Serialization as a potential answer. If anyone can look into this for me as I've no experience with Serialization or Deserialization I'd be very grateful. It can provide an Object with no problems whatsoever, but I really need to return it in the same format as it went in (List). EDIT 3: Ugh, this problem is really starting to drive me crazy and to be honest I'm starting to think that it's an unsolvable problem. If possible, could someone take a look at the code and help provide a solution for me?

    Read the article

  • How to better create stacked bar graphs with multiple variables from ggplot2?

    - by deoksu
    I often have to make stacked barplots to compare variables, and because I do all my stats in R, I prefer to do all my graphics in R with ggplot2. I would like to learn how to do two things: First, I would like to be able to add proper percentage tick marks for each variable rather than tick marks by count. Counts would be confusing, which is why I take out the axis labels completely. Second, there must be a simpler way to reorganize my data to make this happen. It seems like the sort of thing I should be able to do natively in ggplot2 with plyR, but the documentation for plyR is not very clear (and I have read both the ggplot2 book and the online plyR documentation. My best graph looks like this, the code to create it follows: the R code I use to get it is the following: library(epicalc) ### recode the variables to factors ### recode(c(int_newcoun, int_newneigh, int_neweur, int_newusa, int_neweco, int_newit, int_newen, int_newsp, int_newhr, int_newlit, int_newent, int_newrel, int_newhth, int_bapo, int_wopo, int_eupo, int_educ), c(1,2,3,4,5,6,7,8,9, NA), c('Very Interested','Somewhat Interested','Not Very Interested','Not At All interested',NA,NA,NA,NA,NA,NA)) ### Combine recoded variables to a common vector Interest1<-c(int_newcoun, int_newneigh, int_neweur, int_newusa, int_neweco, int_newit, int_newen, int_newsp, int_newhr, int_newlit, int_newent, int_newrel, int_newhth, int_bapo, int_wopo, int_eupo, int_educ) ### Create a second vector to label the first vector by original variable ### a1<-rep("News about Bangladesh", length(int_newcoun)) a2<-rep("Neighboring Countries", length(int_newneigh)) [...] a17<-rep("Education", length(int_educ)) Interest2<-c(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) ### Create a Weighting vector of the proper length ### Interest.weight<-rep(weight, 17) ### Make and save a new data frame from the three vectors ### Interest.df<-cbind(Interest1, Interest2, Interest.weight) Interest.df<-as.data.frame(Interest.df) write.csv(Interest.df, 'C:\\Documents and Settings\\[name]\\Desktop\\Sweave\\InterestBangladesh.csv') ### Sort the factor levels to display properly ### Interest.df$Interest1<-relevel(Interest$Interest1, ref='Not Very Interested') Interest.df$Interest1<-relevel(Interest$Interest1, ref='Somewhat Interested') Interest.df$Interest1<-relevel(Interest$Interest1, ref='Very Interested') Interest.df$Interest2<-relevel(Interest$Interest2, ref='News about Bangladesh') Interest.df$Interest2<-relevel(Interest$Interest2, ref='Education') [...] Interest.df$Interest2<-relevel(Interest$Interest2, ref='European Politics') detach(Interest) attach(Interest) ### Finally create the graph in ggplot2 ### library(ggplot2) p<-ggplot(Interest, aes(Interest2, ..count..)) p<-p+geom_bar((aes(weight=Interest.weight, fill=Interest1))) p<-p+coord_flip() p<-p+scale_y_continuous("", breaks=NA) p<-p+scale_fill_manual(value = rev(brewer.pal(5, "Purples"))) p update_labels(p, list(fill='', x='', y='')) I'd very much appreciate any tips, tricks or hints. Thanks.

    Read the article

  • Querying a Cassandra column family for rows that have not been updated in X days

    - by knorv
    I'm moving an existing MySQL based application over to Cassandra. So far finding the equivalent Cassandra data model has been quite easy, but I've stumbled on the following problem for which I'd appreciate some input: Consider a MySQL table holding millions of entities: CREATE TABLE entities ( id INT AUTO_INCREMENT NOT NULL, entity_information VARCHAR(...), entity_last_updated DATETIME, PRIMARY KEY (id), KEY (entity_last_updated) ); The table is regularly queried for entities that need to be updated: SELECT id FROM entities WHERE entity_last_updated IS NULL OR entity_last_updated < DATE_ADD(NOW(), INTERVAL -7*24 HOUR) ORDER BY entity_last_updated ASC; The entities returned by this queries are then updated using the following query: UPDATE entities SET entity_information = ?, entity_last_updated = NOW() WHERE id = ?; What would be the corresponding Cassandra data model that would allow me to store the given information and effectively query the entities table for entities that need to be updated (that is: entities that have not been updated in the last seven days)?

    Read the article

  • Best way to compare contents of two tables in Teradata?

    - by Cade Roux
    When you need to compare two tables to see what the differences are, are there any tools or shortcuts you use, or do you handcode the SQL to compare the two tables? Background: In my SQL Server environment, I created a stored procedure which inspects the metadata of the two tables/views, creates a query (as dynamic sql) which joins the two tables on the specified key columns, and compares data in the compare columns, reporting key differences and data differences. The query can either be printed and modified/copied or just excecuted as is. We are not allowed to create stored procedures in our Teradata environment, unfortunately.

    Read the article

  • Database structure - To join or not to join

    - by Industrial
    Hi! We're drawing up the database structure with the help of mySQL Workbench for a new app and the number of joins required to make a listing of the data is increasing drastically as the many-to-many relationships increases. The application will be quite read-heavy and have a couple of hundred thousand rows per table. The questions: Is it really that bad to merge tables where needed and thereby reducing joins? Should we start looking at horizontal partitioning? (in conjunction with merging tables) Is there a better way then pivot tables to take care of many-to-many relationships? We discussed about instead storing all data in serialized text columns and having the application make the sorting instead of the database, but this seems like a very bad idea, even though that the database will be heavily cached. What do you think? Thanks!

    Read the article

  • Having py2exe include my data files (like include_package_data)

    - by cool-RR
    I have a Python app which includes non-Python data files in some of its subpackages. I've been using the include_package_data option in my setup.py to include all these files automatically when making distributions. It works well. Now I'm starting to use py2exe. I expected it to see that I have include_package_data=True and to include all the files. But it doesn't. It puts only my Python files in the library.zip, so my app doesn't work. How do I make py2exe include my data files?

    Read the article

  • problem with sqldatasource and data binding

    - by Alexander
    I am trying to pull out data from the table I had from the database according to the id which is passed from the URL. However I always get data from id= 1? Why? FYI I took this code directly from the ClubWebsite starter kit and copy and paste it to my project to make several changes, the ClubWebsite one worked fine.. but this one doesn't and can't find any reason why because they both looked exactly the same. <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Events_View.aspx.cs" Inherits="Events_View" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="splash" Runat="Server"> <div id="splash4">&nbsp;</div> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div id="content"> <div class="post"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ClubDatabase %>" SelectCommand="SELECT dbo.Events.id, dbo.Events.starttime, dbo.events.endtime, dbo.Events.title, dbo.Events.description, dbo.Events.staticURL, dbo.Events.address FROM dbo.Events"> <SelectParameters> <asp:Parameter Type="Int32" DefaultValue="1" Name="id"></asp:Parameter> </SelectParameters> </asp:SqlDataSource> <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" DataKeyNames="id" AllowPaging="false" Width="100%"> <ItemTemplate> <h2> <asp:Label Text='<%# Eval("title") %>' runat="server" ID="titleLabel" /> </h2> <div> <br /> <p> <asp:Label Text='<%# Eval("address") %>' runat="server" ID="addressLabel" /> </p> <p> <asp:Label Text='<%# Eval("starttime","{0:D}") %>' runat="server" ID="itemdateLabel" /> <br /> <asp:Label Text='<%# ShowDuration(Eval("starttime"),Eval("endtime")) %>' runat="server" ID="Label1" /> </p> </div> <p> <asp:Label Text='<%# Eval("description") %>' runat="server" ID="descriptionLabel" /> </p> </ItemTemplate> </asp:FormView> <div class="dashedline"> </div> </div> </div> </asp:Content> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; using System.Data; public partial class Events_View : System.Web.UI.Page { const int INVALIDID = -1; protected void Page_Load(object sender, System.EventArgs e) { SqlDataSource1.SelectParameters["id"].DefaultValue = System.Convert.ToString(EventID); } public int EventID { get { int m_EventID; object id = ViewState["EventID"]; if (id != null) { m_EventID = (int)id; } else { id = Request.QueryString["EventID"]; if (id != null) { m_EventID = System.Convert.ToInt32(id); } else { m_EventID = 1; } ViewState["EventID"] = m_EventID; } return m_EventID; } set { ViewState["EventID"] = value; } } protected void FormView1_DataBound(object sender, System.EventArgs e) { DataRowView view = (DataRowView)(FormView1.DataItem); object o = view["staticURL"]; if (o != null && o != DBNull.Value) { string staticurl = (string)o; if (staticurl != "") { Response.Redirect(staticurl); } } } protected string ShowLocationLink(object locationname, object id) { if (id != null && id != DBNull.Value) { return "At <a href='Locations_view.aspx?LocationID=" + Convert.ToString(id) + "'>" + (string)locationname + "</a><br/>"; } else { return ""; } } protected string ShowDuration(object starttime, object endtime) { DateTime starttimeDT = (DateTime)starttime; if (endtime != null && endtime != DBNull.Value) { DateTime endtimeDT = (DateTime)endtime; if (starttimeDT.Date == endtimeDT.Date) { if (starttimeDT == endtimeDT) { return starttimeDT.ToString("h:mm tt"); } else { return starttimeDT.ToString("h:mm tt") + " - " + endtimeDT.ToString("h:mm tt"); } } else { return "thru " + endtimeDT.ToString("M/d/yy"); } } else { return starttimeDT.ToString("h:mm tt"); } } }

    Read the article

  • [Cocoa] CoreData bindings for NSPopupButton

    - by ndg
    I'm looking to use a dropdown menu (possibly an NSPopupButton object) to represent the hierarchical results of two Core Data entities (Genre and Movie) and their relationships. In my current data model, my Genre entity has a one-to-many relationship with my Movie entity. What I'm now looking to do is generate the contents of an NSPopupButton to show a hierarchical list of Genres and the Movies associated with them, like so: Genre 1 Film 1 Film 2 Genre 2 Film 3 Film 4 Note that, in the above example, only Movie objects are to be selectable by the user (Genre objects will appear, but be unselectable). Also, to complicate matters slightly, I have an additional NSPopupButton which lists Movie Rental locations. The location selected by the user ultimately impacts on the genres and films available in the second dropdown. I imagine that bindings will only take me so far with this problem and that, ultimately, I'll have to populate the contents of the dropdown menu myself. I'm posting here for thoughts and opinions on the best way to go about this.

    Read the article

  • t-sql i am transforming data

    - by João Pedro Portelinha
    I am transforming data from this legacy table: MovTime (IdMov INT, IdPerson NVARCHAR(20), Date1 datetime, Type1 nvarchar(30) ) IdMov IdPerson Date1 Type ----------- -------------------- ----------------------- ------------------------------ 1 David 2012-06-01 09:00:00.000 Entered 2 David 2012-06-01 12:30:00.000 Exit 3 David 2012-06-01 14:00:00.000 Entered 4 David 2012-06-01 18:30:00.000 Exit 5 Kim 2012-06-02 09:00:00.000 Entered 6 Kim 2012-06-02 12:00:00.000 Exit ... I want the result to be the following: IdPerson Data Total Time ---------- ---------- ---------- David 2012-06-01 08:00:00 Kim 2012-06-02 03:00:00 T-SQL declare @WK_TABLE TABLE (IdMov INT, IdPerson NVARCHAR(20), Date1 datetime, Type1 nvarchar(30)) Insert into @WK_TABLE values(1,'David', '2012-06-01 09:00', 'Entered') Insert into @WK_TABLE values(2,'David', '2012-06-01 12:30', 'Exit') Insert into @WK_TABLE values(3,'David', '2012-06-01 14:00', 'Entered') Insert into @WK_TABLE values(4,'David', '2012-06-01 18:30', 'Exit') Insert into @WK_TABLE values(5,'Kim', '2012-06-02 09:00', 'Entered') Insert into @WK_TABLE values(6,'Kim', '2012-06-02 12:00', 'Exit') select * from @WK_TABLE Can someone help me?

    Read the article

  • In separate data access & business logic layer, can I use Entity framework classes in business layer

    - by Greg
    In separate data access & business logic layer, can I use Entity framework classes in business layer? EDIT: I don't think I will need to swap out the data access layer from my business logic in the future (i.e. will be SQL Server), however I will for the UI layer. Therefore the question is more meant to be are there any major issues with using EF classes for me in the business layer? Seems like there would be less plumbing code.

    Read the article

  • DataSource Control for List<T>

    - by diamandiev
    I know all the data source controls like LinqDataSource, ObjectDataSource etc. They are cool but they are intended to be used in conjunction with a database. I actually need a simple data source control that can work with a plain old List (That supports delete, update, select, insert ofcourse). I was thinking of using the objectdatasource but the select, update... methods are not present in the List. So is there such a control or do i have to roll my own? Should i inherit from the objectdatasource?

    Read the article

  • May a NSManagedObjectContext re-fault objects automatically?

    - by frenetisch applaudierend
    I am trying to create an application which allows background threads to update core data objects while the user might be reading the same data. My approach to this would be to use multiple NSManagedObjectContexts and then before a background thread does a -save: operation, I fetch the object the user is currently working on and fire the fault for all its properties and relationships recursively. This way I have all objects the user could act with in my NSManagedObjectContext without seeing the already updated values. But this can only work if the NSManagedObjectContext cannot decide himself that e.g. memory usage is too high, and starts faulting objects which I do not explicitly reference (other than through the NSManagedObject relationship). So the question is, can the NSManagedObjectContext decide that an object needs to be re-faulted, without intervention from my side? Thanks for your effort, Markus

    Read the article

  • Silverlight 4 - encoding PCM data from the microphone

    - by Richard
    Hi I've written a basic SL4 application to capture audio data from the microphone using CaptureSource. The trouble is, it's raw PCM output - which means huge and uncompressed. Given that I need this application to run purely within a SL4 environment, how can I compress the PCM audio data into something that can be delivered to a remote server more easily? In conversation, people have suggested Speex and WMA for instance, but I haven't found any libraries or examples that work without requiring reference to DLL's that won't work in a SL4 project. Thanks, Richard.

    Read the article

  • Passing object from PHP to Mysql Stored procedure

    - by user268982
    Hi All, Scenario :- I have to call MYSQL stored procedure from PHP and do some operations ( around 15 commands ) on the database Problem :- I have to call stored procedure with 36 parameters. Lot of parameters . I don't think it is a good idea to pass these many individual parameters and even heard passing individul parameters increases network traffic. Looking for :- I created a Data Object at PHP side and is there any way I can create similar kind of Object in MYSQL and pass this object as a parameter and extract the data from the object in MYSQL stored procedure Thanks for your help Regards Kiran

    Read the article

  • SQL Server 2000 tables

    - by klork
    We currently have an SQL Server 2000 database with one table containing data for multiple users. The data is keyed by memberid which is an integer field. The table has a clustered index on memberid. The table is now about 200 million rows. Indexing and maintenance are becoming issues. We are debating splitting the table into one table per user model. This would imply that we would end up with a very large number of tables potentially upto the 2,147,483,647, considering just positive values. My questions: Does anyone have any experience with a SQL Server (2000/2005) installation with millions of tables? What are the implications of this architecture with regards to maintenance and access using Query Analyzer, Enterprise Manager etc. What are the implications to having such a large number of indexes in a database instance. All comments are appreciated. Thanks

    Read the article

  • Read and write from a byte stream if the endianess of the data is different from that of the current

    - by Sam Holder
    I have a stream of bytes which contains a flag which identifies the endianness of the data in the header. I want to read the doubles from the stream, which will presumably need to be different if the endianness of the data in the header is different? I am currently using a BinaryReader and calling ReadDouble to read the data from the stream, but if the endianness flag indicates that the data stream has a different endianness than the machine architecture then presumably this will not work? How should this be handled? Should I check the endianness of my data against that of the current machine then when I want to read a double instead read the bytes raw into a byte array and do array.Reverse to reverse the data before using BitConverter.ToDouble () with the reversed data and a zero offset? I could just test this but I do not have a source of data for both endianness so am a bit concerned about creating test data to test the parsing and this being different from what 'real' data might look like.

    Read the article

  • Get data to android app from mysql server

    - by Fabian
    Hi i have an mysql database with some sports results in it. I want to write an android application to display these data on mobile phones. I´ve searched on the internet for this issue and i think it is not possible to have a direct connection between the mysql database and the android application. (Is this right?) So my question is the following: How can i have access in the android application to the mysql database in order to display some of the data? Thank you for your answers! Fabian

    Read the article

< Previous Page | 244 245 246 247 248 249 250 251 252 253 254 255  | Next Page >