Search Results

Search found 7127 results on 286 pages for 'calculated columns'.

Page 92/286 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • How to remove a string from Dictionary<>

    - by Ranjana
    i have used dictionary to collect the array of values i have value in DataTable . How to compare the values get from DataTable, whether dictionary key contains the name in DataTable. if DataTable has not that value,then remove that key name from dictionary. My code: DataTable dtcolumnsname = clsServiceManager.Instnce.Get_ColumnNames(ClsUserInfo.UserName, strTableName); Dictionary<string,string> FinalDicColumnVal = new Dictionary<string,string>(); foreach (KeyValuePair<string, string> item in ColumnValues) { if (dtcolumnsname.Columns.Contains(item.Key)) { FinalDicColumnVal.Add(item.Key, item.Value); } } but this if (dtcolumnsname.Columns.Contains(item.Key)) is not get values of each datarow items in datatable.how to compare the dt row values with dictionary key names

    Read the article

  • gnuplot - multiple lines with different x ranges

    - by Aly
    Hi, I am using gnuplot to try and plot several lines but each have different x ranges. I am running the following script: # gnuplot script for 'omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat' plot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:2 with lines title '1' replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:3 with lines title '2' replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:4 with lines title '3' replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:5 with lines title '4' replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:6 with lines title '5' replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:7 with lines title '6' replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:8 with lines title '7' set terminal png size 800,600 set output "omar_vs_everyone-EVONLY.png" replot and the .dat file is just a file with columns such as: 1 0.5 0.5 0.1 2 0.6 1.3 0.8 3 0.7 0.32 4 0.7 0.35 5 1.3 4.32 6 1.67 notice that the columns have different lengths as each line has different x ranges. The problem I have is that it plots funny as shown below:

    Read the article

  • how to write T-SQL to compare and copy data?

    - by George2
    Hello everyone, I have two SQL Server 2008 Enterprise databases (on two machines), and one of the databases is master database and another database is slave database. I want to transfer update from a table in source database to a table in destination database (two tables are of the same schema, both of them are using a single column as unique primary key). The transfer rule is (in short, the rule is keeping the destination database the same as source database because of the update of the source database), if there is a new row in source database but not in destination database, insert the row in destination database; if a row not exists in source database but exists in destination database, delete the row in destination database; if a row's content (i.e. columns other than primary key columns) changes in source database, update the new content into destination database. thanks in advance, George

    Read the article

  • 100+ tables to joined

    - by deian
    Hi guys, I was wondering if anyone ever had a change to measure how a would 100 joined tables perform? Each table would have an ID column with primary index and all table are 1:1 related. It is a common problem within many data entry applications where we need to collect 1000+ data points. One solution would be to have one big table with 1000+ columns and the alternative would be to split them into multiple tables and join them when it is necessary. So perhaps more real question would be how 30 tables (30 columns each) would behave with multitable join. 500K-1M rows should be the expected size of the tables. Cheers

    Read the article

  • Why has Foundation 4 made its grid classes less natural and readable?

    - by Brenden
    The Background I love responsive CSS grids. I hate Bootstrap's complex class names. I fell in love with Foundations human readable class names. The Problem With Foundation 4, they have changed four columns to large-4 small-4 columns and in my opinion this makes the HTML markup less clear. This style of CSS class names is exactly why I switched from Bootstrap to Foundation. The Question What advantage is gained by Foundation 4's Grid in making this change? It seems that you can have a different grid layout on smaller screens via media queries, but I can't think of a design that would require this. Note: I've been focused on native mobile development and therefore I may be missing out on recent best practices.

    Read the article

  • loading Data in VBA from a text file

    - by omegayen
    I am not very familiar with VBA but need to use it for a new software program I am using (not Microsoft related) I have a text file that has columns of data I would like to read into VBA. Specifically the text file has 4 entries per row. Thus I would like to load in the column vectors (N by 1). The text file is separated by a space between each entry. So for example I want to load in column one and save it as array A, then column two and save as array B, then column three and save as array C, and then column four and save as array D. This code snippet found below from http://www.tek-tips.com/faqs.cfm?fid=482 is something I found that can load in text to an array, but I need to adapt it to be able to save the columns as different arrays as specified above... Open "MyFile.txt" For Input As #1 ReDim Txt$(0) Do While Not EOF(1) ReDim Preserve Txt$(UBound(Txt$) + 1) Input #1, Txt$(UBound(Txt$)) Loop Close #1

    Read the article

  • How to pass record id into hyperlink in radgrid?

    - by mongoose_za
    I've a radgrid and rendering a hyperlink column. I want to pass the id of the record into the url for the hyperlink. How can I do this? I have this <Columns> <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Edit" UniqueName="Edit"> <ItemTemplate> <asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" NavigateUrl="~/Edit.aspx?Id=need_to_bind_id_here">Edit Details</asp:HyperLink> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> There is an ID column which is generated too.

    Read the article

  • What is the fastest way to compare 2 rows in SQL?

    - by Swoosh
    I have 2 different databases. Upon changing something in the big one (i don't have access to), i get some rows imported in my databases in a similar HUGE table. I have a job checking for records in this table, and if any, execute a stored procedure, process and delete from table. Performance. (Huge amount of data) I would like to know what is the fastest way to know if something has changed using let's say 2 imported rows with 100 columns each. Don't have FK-s, don't need. Chances are, that even though I have records in my table, nothing has actually changed. Also. Let's say there is actually changed something. Is it possible for example to check only for changes inside datetime columns? Thanks

    Read the article

  • How to insert null value for numeric field of a datatable in c#?

    - by Pandiya Chendur
    Consider My dynamically generated datatable contains the following fileds Id,Name,Mob1,Mob2 If my datatable has this it get inserted successfully, Id Name Mob1 Mob2 1 acp 9994564564 9568848526 But when it is like this it gets failed saying, Id Name Mob1 Mob2 1 acp 9994564564 The given value of type String from the data source cannot be converted to type decimal of the specified target column. I generating my datatable by readingt a csv file, CSVReader reader = new CSVReader(CSVFile.PostedFile.InputStream); string[] headers = reader.GetCSVLine(); DataTable dt = new DataTable(); foreach (string strHeader in headers) { dt.Columns.Add(strHeader); } string[] data; while ((data = reader.GetCSVLine()) != null) { dt.Rows.Add(data); } Any suggestion how to insert null value for numeric field during BulkCopy in c#... EDIT: I tried this dt.Columns["Mob2"].AllowDBNull = true; but it doesn't seem to work...

    Read the article

  • Creating a custom format string in a dataGridView

    - by Andy
    I have a dataGridView whose dataSource is a dataTable. My problem is that I want certain columns to be displayed in Hex. I can get that far with using something like this: foreach (DataGridViewColumn c in grid.Columns) { if (DISPLAYED_IN_HEX.Contains(c.Name)) { c.DefaultCellStyle.Format = "X"; } } My issue though is that I want this hex value prepended with 0x so as not to confuse anyone that they are in hexidecimal form. The values in the dataTable are various integral types. I looked into creating a custom IFormatProvider, but I don't think my coding skills are up to that par yet. Any other possible solutions?

    Read the article

  • do.call(rbind, list) for uneven number of column

    - by h.l.m
    I have a list, with each element being a character vector, of differing lengths I would like to bind the data as rows, so that the column names 'line up' and if there is extra data then create column and if there is missing data then create NAs Below is a mock example of the data I am working with x <- list() x[[1]] <- letters[seq(2,20,by=2)] names(x[[1]]) <- LETTERS[c(1:length(x[[1]]))] x[[2]] <- letters[seq(3,20, by=3)] names(x[[2]]) <- LETTERS[seq(3,20, by=3)] x[[3]] <- letters[seq(4,20, by=4)] names(x[[3]]) <- LETTERS[seq(4,20, by=4)] The below line would normally be what I would do if I was sure that the format for each element was the same... do.call(rbind,x) I was hoping that someone had come up with a nice little solution that matches up the column names and fills in blanks with NAs whilst adding new columns if in the binding process new columns are found...

    Read the article

  • replacing data.frame element-wise operations with data.table (that used rowname)

    - by Harold
    So lets say I have the following data.frames: df1 <- data.frame(y = 1:10, z = rnorm(10), row.names = letters[1:10]) df2 <- data.frame(y = c(rep(2, 5), rep(5, 5)), z = rnorm(10), row.names = letters[1:10]) And perhaps the "equivalent" data.tables: dt1 <- data.table(x = rownames(df1), df1, key = 'x') dt2 <- data.table(x = rownames(df2), df2, key = 'x') If I want to do element-wise operations between df1 and df2, they look something like dfRes <- df1 / df2 And rownames() is preserved: R> head(dfRes) y z a 0.5 3.1405463 b 1.0 1.2925200 c 1.5 1.4137930 d 2.0 -0.5532855 e 2.5 -0.0998303 f 1.2 -1.6236294 My poor understanding of data.table says the same operation should look like this: dtRes <- dt1[, !'x', with = F] / dt2[, !'x', with = F] dtRes[, x := dt1[,x,]] setkey(dtRes, x) (setkey optional) Is there a more data.table-esque way of doing this? As a slightly related aside, more generally, I would have other columns such as factors in each data.table and I would like to omit those columns while doing the element-wise operations, but still have them in the result. Does this make sense? Thanks!

    Read the article

  • What jquery based table plugin can hide sub rows?

    - by user1458290
    I'm in the need to convert excel macros into jquery code, the function is that you need to click on the plus sign to unfold and show the sub rows to modify column2 if you want to type values in column2, the other columns can't be modified. You can't straightly modify values of column2 until you unfold the parent row, because there are many sub rows belonging to parent row,say Car. The values of Name, Model, Code are existing, they are master data, no need to type or modify. please see the snapshot at folded and unfolded, besides modifying values in sub rows , I need to be able to know which sub rows are modified and values of those rows.Initially the editable columns are blank. And when you click on the minus sign, the sub rows can be folded again,but the modified values won't be lost,they are still there when unfolded again. One last requirement is it's cross devices, the code must run well on pc,mobile phone,pad. Is that possible? Many thanks.

    Read the article

  • Content alignment for Gridviewcolumn in the listview

    - by Pankaj Upadhyay
    Please see the picture below Following is the code for this :: <Grid> <ListView Style="{StaticResource listViewStyle}" Name="transactionListView" HorizontalAlignment="Stretch" VerticalAlignment="Top" ItemsSource="{Binding}" MouseDoubleClick="transactionListView_MouseDoubleClick" IsSynchronizedWithCurrentItem="True" > <ListView.View> <GridView ColumnHeaderContainerStyle="{StaticResource gridViewHeaderColumnStyle}"> <GridView.Columns> <GridViewColumn Width="70" Header="Serial" DisplayMemberBinding="{Binding Path=Serial}" /> <GridViewColumn Width="100" Header="Date" DisplayMemberBinding="{Binding Path=Date, StringFormat={}{0:dd-MM-yyyy}}" /> <GridViewColumn Width="200" Header="Seller" DisplayMemberBinding="{Binding Path=Seller}" /> <GridViewColumn Width="200" Header="Buyer" DisplayMemberBinding="{Binding Path=Buyer}" /> <GridViewColumn Width="70" Header="Bales" DisplayMemberBinding="{Binding Path=Bales}" /> </GridView.Columns> </GridView> </ListView.View> </ListView> </Grid>

    Read the article

  • designing database tables using JDBC

    - by Noona
    I am creating a users table using JDBC and mysql, each user has a permissions list that comprises Integer values, I am wondering if I should use an array for storing these values and then have only 1 record for this user in the table, or simply create a new table that comprises 2 columns: user ID and permissions, and then have multiple records for each user that specify the user name in one columns and one permission value in the second column, the second option seems to be redundant since a permission value is a simple object that isn't associated with any other objects (like a student and courses list for example, because the course is associated with many other objects, like grade, teacher, etc, so in this case it is natural to have multiple records), but the first one seems to be a bit unnatural to me, so if someone has experience with these things and direct me? thanks

    Read the article

  • Simplest way to create a wrapper class around some strings for a WPF DataGrid?

    - by Joel
    I'm building a simple hex editor in C#, and I've decided to use each cell in a DataGrid to display a byte*. I know that DataGrid will take a list and display each object in the list as a row, and each of that object's properties as columns. I want to display rows of 16 bytes each, which will require a wrapper with 16 string properties. While doable, it's not the most elegant solution. Is there an easier way? I've already tried creating a wrapper around a public string array of size 16, but that doesn't seem to work. Thanks *The rational for this is that I can have spaces between each byte without having to strip them all out when I want to save my edited file. Also it seems like it'll be easier to label the rows and columns.

    Read the article

  • How can i test my DB speed? (Learning)

    - by acidzombie24
    I have design a database. Theres no columns with indexing, nor any code for optimizing. I am positive i should index certain columns since i search them a lot. My question is HOW do i test if any part of my database will be slow? ATM I am using sqlite and i will be switching to either MS Sql or MySql based on my host provider. Will creating 100,000 records in each table be enough? Or will that always be fast in sqlite and i need to do 1mil? Do i need 10mil before a database will become slow? Also how do i time it? I am using C# so should i use StopWatch or is there a ADO.NET/Sqlite function i should use?

    Read the article

  • Null Value Statement

    - by Sam
    Hi All, I have created a table called table1 and it has 4 columns named Name,ID,Description and Date. I have created them like Name varchar(50) null, ID int null,Description varchar(50) null, Date datetime null I have inserted a record into the table1 having ID and Description values. So Now my table1 looks like this: Name ID Description Date Null 1 First Null One of them asked me to modify the table such a way that The columns Name and Date should have Null values instead of Text Null. I don't know what is the difference between those I mean can anyone explain me the difference between these select statements: SELECT * FROM TABLE1 WHERE NAME IS NULL SELECT * FROM TABLE1 WHERE NAME = 'NULL' SELECT * FROM TABLE1 WHERE NAME = ' ' Can anyone explain me?

    Read the article

  • How to limit select items with L2E/S?

    - by orlon
    This code is a no-go var errors = (from error in db.ELMAH_Error select new { error.Application, error.Host, error.Type, error.Source, error.Message, error.User, error.StatusCode, error.TimeUtc }).ToList(); return View(errors); as it results in a 'requires a model of type IEnumerable' error. The following code of course works fine, but selects all the columns, some of which I'm simply not interested in: var errors = (from error in db.ELMAH_Error select error).ToList(); return View(errors); I'm brand spanking new to MVC2 + L2E, so maybe I'm just not thinking in the right mindset yet, but this seems counter-intuitive. Is there an easy way to select a limited number of columns, or is this just part of using an ORM?

    Read the article

  • Clear sqlalchemy reflection cache

    - by OrganicPanda
    Hi all, I'm using sqlalchemy's reflection tools to get a Table object. I do this because these tables are dynamic and tables/columns can change. Here's the code I'm using: def getTableByReflection(self, tableName, metadata, engine): return Table(tableName, metadata, autoload = True, autoload_with = engine) The problem is that when the above code is run twice it seems to return the same results regardless of whether or not the columns have changed. I have tried refreshing using the mysession.refresh(mytable) but that fails because the table is not attached to any metadata - which makes sense but then why am I seeing cached results? Is there any way to tell the metadata/engine/session to forget about this table and let me load it cleanly?

    Read the article

  • How to merge existing row with new data in SQLite?

    - by CSharperWithJava
    I have a database full of simple note data, with columns for title, due date, priority, and details. There is also a _id column PRIMARY KEY int. Say I have a note in the table already with some data filled and the rest null. I also have a set of data that will fill all those fields. Is there a way that I can only write data to the fields that are NULL? I can't overwrite existing data, but I'd like to add data to NULL columns. I know the rowId of the target row. If my target row had rowId of 5, I could do something like this: UPDATE SET duedate='some date', priority='2', details='some text' WHERE _id=5 But that would overwrite all the data in that row, and I don't want to lose any data that might be there. How can I change this statement to avoid writing to non-null fields?

    Read the article

  • Equal height divs with footer always at bottom of tallest div

    - by nukegara
    I was wondering if this were possible, and if it is the best way to go about this: example image (since I'm not allowed to post pics yet ^^) So, not only does each column have to be of equal height, but each column also has its own individual footer. I saw this post httx://stackoverflow.com/questions/1347366/div-at-bottom-of-window-and-adaptable-height-div (I also can't post more than one link....) - how could I rework this technique to apply to the bottom of the divs and not the bottom of the window? *edit - each column will have content that will constantly change and be of variable height. I'm thinking I could just figure out the equal height columns first, then just absolute position a footer div within those columns. Does its parent div then have to be position: relative?

    Read the article

  • Shouldn’t GridView’s RowStyle-HorizontalAlign property overwrite CSS’s text-align property?

    - by AspOnMyNet
    a) As far as I know, GridView’s RowStyle-HorizontalAlign property should overwrite CSS’s text-align property, and thus text inside GridView's cells should be located on the left side of the cells, but is instead moved to the right side. Why is that? b) Similarly, RowStyle-Font-Bold should overwrite CSS’s font-weight property and thus fonts shouldn’t be in bold. But again, CSS’s property overwrites RowStyle’s Font-Bold property. Why? <div id="someClass"> <asp:GridView ID="gvwShowUsers" runat="server" > <RowStyle BackColor="#FFFBD6" ForeColor="#333333" Font-Bold="false" HorizontalAlign="Left" /> <Columns> <asp:BoundField DataField="UserName" HeaderText="UserName" /> </Columns> </asp:GridView> </div> CSS file: #someClass td { font-weight:bolder; text-align:right; } thanx

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >