Search Results

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

Page 209/286 | < Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >

  • Program crash for array copy with ifort

    - by Stefano Borini
    This program crashes with Illegal instruction: 4 on MacOSX Lion and ifort (IFORT) 12.1.0 20111011 program foo real, pointer :: a(:,:), b(:,:) allocate(a(5400, 5400)) allocate(b(5400, 3600)) a=1.0 b(:, 1:3600) = a(:, 1:3600) print *, a print *, b deallocate(a) deallocate(b) end program The same program works with gfortran. I don't see any problem. Any ideas ? Unrolling the copy and performing the explicit loop over the columns works in both compilers. Note that with allocatable instead of pointer I have no problems. The behavior is the same if the statement is either inside a module or not. I confirm the same behavior on Linux using ifort (IFORT) 12.1.3 20120130.

    Read the article

  • How do I make Pseudo classes work with Internet Explorer 7/8?

    - by Mel
    I've written the following code to create a three-column layout where the first and last columns have no left and right margins respectively: #content { background-color:#edeff4; margin:0 auto 30px auto; padding:0 30px 30px 30px; width:900px; } .column { float:left; margin:0 20px; } #content .column:nth-child(1) { margin-left:0; } #content .column:nth-child(3) { margin-right:0; } The problem is that this code does not work in Internet Explorer 7 and 8? The only pseudo class I can use with IE (in this case) would be "first-child," but this does not eliminate the right margin on the third and last column. Does anyone know of a way I can make this code work on IE 7/8?

    Read the article

  • Use of mouselisteners in a jTable

    - by eli1987
    I have a jTable with columns 'Job_no' and 'Status'with values such as: Job_no Status 1 Active 2 Pending 3 Pending I would like it so that if a user clicks on a Status say in this case the first 'Pending'(where Job_no = 2) an inputDialog pops up allowing the user to change the status of the cell clicked-how can I do this? Bear in mind you will also have to retrieve the Job_no(that corresponds to that status) somehow, and that, though I'm OK with JOptionPane's, I'm new to JTables. I'm using JDBC(mySQL) and have a table 'Jobs' which amongst other things, has column Job_no and status. Thanks for your help.

    Read the article

  • Variable not accessible within an if statment

    - by Chris
    I have a variable which holds a score for a game. My variable is accessible and correct outside of an if statement but not inside as shown below score is declared at the top of the main.cpp and calculated in the display function which also contains the code below cout << score << endl; //works if(!justFinished){ cout << score << endl; // doesn't work prints a large negative number endTime = time(NULL); ifstream highscoreFile; highscoreFile.open("highscores.txt"); if(highscoreFile.good()){ highscoreFile.close(); }else{ std::ofstream outfile ("highscores.txt"); cout << score << endl; outfile << score << std::endl; outfile.close(); } justFinished = true; } cout << score << endl;//works

    Read the article

  • mysql database design: thread and reply of a reply?

    - by ajsie
    in my forum i have threads and replies. one thread has multiple replies. but then, a reply can be a reply of an reply (like google wave). because of that a reply has to have a column "reply_id" so it can point to the parent reply. but then, the "top-level" replies (the replies directly under the thread) will have no parent reply. so how can i fix this? how should the columns be in the reply table (and thread table). at the moment it looks like this: threads: id title body replies: id thread_id (all replies will belong to a thread) reply_id (here lies the problem. the top-level replies wont have a parent reply) body what could a smart design look like to enable reply a reply?

    Read the article

  • Placing error message for a checkbox array

    - by eddy
    Hello all. I am using the Validation Plugin for jQuery and it works wonders. Except when I have a group of checkboxes...the error messages will display right after the first checkbox...like so: <tbody> <c:forEach items="${list}" var="item"> <tr> <td align="center"> <input type="checkbox" name="selectItems" value="<c:out value="${item.numberPlate}"/>" /> </td> <!--some other columns--> </tr> </c:forEach> </tbody> I found that I can use a wrapper for these checkboxes ,then place the error message there, but I have no idea how to do it since I'm creating the rows dynamically. Hope you can help me out.

    Read the article

  • how to find datakeys in oncheckedchanged event ?

    - by subodh
    <asp:Panel ID="pnlFocusAreaPanel" runat="server" GroupingText="Focus Area" Width="800"> <table cellspacing="0" cellpadding="0" width="750"> <tr> <td> <asp:GridView ID="dgFocusAreaDetails" runat="server" Width="100%" CssClass="dgStyle" AutoGenerateColumns="False" BorderColor="Silver" BorderWidth="1px" CellPadding="0" ShowHeader="False" OnSelectedIndexChanged="dgFocusAreaDetails_SelectedIndexChanged" DataKeyNames="PK_ID"> <FooterStyle Font-Underline="True" HorizontalAlign="Center" VerticalAlign="Middle"> </FooterStyle> <Columns> <asp:TemplateField HeaderText="Focus Area" HeaderStyle-BackColor="Silver"> <ItemStyle Width="90%" /> <ItemTemplate> <asp:Label runat="server" ID="lblFocusArea" Text='<%# DataBinder.Eval(Container.DataItem, "FOCUS_AREA_NAME").ToString()%>'> </asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Is Current Valid" HeaderStyle-BackColor="Silver"> <ItemStyle Width="10%" HorizontalAlign="Center" /> <ItemTemplate> <asp:CheckBox ID="chkFocusArea" runat="server" OnCheckedChanged="OnCheckChangedEvent" AutoPostBack="true" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> <tr> <td align="left"> <asp:TextBox ID="txtFocusArea" runat="server" Width="300px" CausesValidation="true" CssClass="txtStyle" ValidationGroup="focusArea"> </asp:TextBox> <cc1:TextBoxWatermarkExtender ID="txtFocusAreaWaterMark" runat="server" TargetControlID="txtFocusArea" WatermarkText="Add Focus Area" WatermarkCssClass="WaterMarkStyle"> </cc1:TextBoxWatermarkExtender> <asp:Button ID="btnAddFocusArea" runat="server" Text="AddFocusArea" CssClass="btnStyle" OnClick="btnAddFocusArea_Click" CausesValidation="true" ValidationGroup="focusArea" /> <asp:RequiredFieldValidator ID="reqtxtFocusArea" runat="server" ControlToValidate="txtFocusArea" ErrorMessage="Please enter focus area" Display="Dynamic" ValidationGroup="focusArea"> </asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="regexFocusArea" runat="server" ErrorMessage="Invalid characters(<,>,#)" ControlToValidate="txtFocusArea" ValidationExpression="^([^&lt;#&gt;]*)$" ValidationGroup="focusArea" Display="Dynamic" SetFocusOnError="true"> </asp:RegularExpressionValidator> </td> </tr> </table> </asp:Panel> and in code behind protected void btnAddFocusArea_Click(object sender, EventArgs e) { string strFocusArea = txtFocusArea.Text; OleDbConnection myConnection = new OleDbConnection(ConfigurationSettings.AppSettings["SQLConnectionString"]); if (strFocusArea == string.Empty || strFocusArea == txtFocusAreaWaterMark.WatermarkText) { lblError.Text = "Focus area is not entered"; } else { string insertQuery = "INSERT INTO LK_CODECAT_FOCUS_AREA(FOCUS_AREA_NAME,FK_ADDED_BY,ADDED_ON) "+ " VALUES('" + strFocusArea + "', "+Session["UserID"] +", GETDATE())"; try { myConnection.Open(); OleDbCommand myCommandToInsert = new OleDbCommand(insertQuery, myConnection); myCommandToInsert.ExecuteNonQuery(); } catch(Exception exc) { ExceptionLogger.LogException(exc); } finally { if (myConnection != null) { myConnection.Close(); } } PopulateFocusArea(); } txtFocusArea.Text = txtFocusAreaWaterMark.WatermarkText; } private void PopulateFocusArea() { OleDbConnection myConnection = new OleDbConnection(ConfigurationSettings.AppSettings["SQLConnectionString"]); string selectQuery = "SELECT PK_ID, FOCUS_AREA_NAME, IS_CURRENT_FOCUS FROM LK_CODECAT_FOCUS_AREA LKCFA ORDER BY FOCUS_AREA_NAME"; if (Session["RoleID"].ToString() == "1" || ((Session["WorkID"].ToString() != "9") || (Session["WorkID2"].ToString() != "9") || (Session["WorkID3"].ToString() != "9"))) { try { myConnection.Open(); OleDbCommand myCommandFocusArea = new OleDbCommand(selectQuery, myConnection); OleDbDataAdapter myAdapter = new OleDbDataAdapter(myCommandFocusArea); DataSet ds = new DataSet(); myAdapter.Fill(ds); dgFocusAreaDetails.DataSource = ds; dgFocusAreaDetails.ShowHeader = true; dgFocusAreaDetails.DataBind(); } catch (Exception exc) { ExceptionLogger.LogException(exc); } finally { if (myConnection != null) { myConnection.Close(); } } } } protected void dgFocusAreaDetails_SelectedIndexChanged(object sender, EventArgs e) { string selectedCategory = dgFocusAreaDetails.SelectedRow.Cells[1].Text; int index = dgFocusAreaDetails.SelectedIndex; lblError.Text = dgFocusAreaDetails.DataKeys[index].Value.ToString(); } public void OnCheckChangedEvent(object sender, EventArgs e) { CheckBox chk = (CheckBox)sender; string chkfocusarea = ((Control)chk).ID; //string focusAreaDetails = dgFocusAreaDetails.SelectedRow.Cells[0].Text; int index =Convert.ToInt32(dgFocusAreaDetails.SelectedIndex); if (chk.Checked) { string updateQuery = "UPDATE [LK_CODECAT_FOCUS_AREA] SET [IS_CURRENT_FOCUS] = 1 WHERE PK_ID = " +Convert.ToInt32( dgFocusAreaDetails.DataKeys[index].Value)+" "; } else { lblError.Text = "unchecked"; } } i want to know how i find the datakeyvalue on checked event.

    Read the article

  • Using Linq on a Dataset

    - by JasonMHirst
    Can someone enlighthen me with regards to Linq please? I have a dataset that is populated via a SQL Stored Procedure, the format of which is below: Country | Brand | Variant | 2004 | 2005 | 2006 | 2007 | 2008 The number of rows varies between 50 and several thousand. What I'm trying to do is use Linq to interrogate the dataset (there will be several Linq queries based on user options), but a simple example would be to SUM the year columns based on Brand. I have the following that I believe creates a template for me to work with: But from here on I'm absolutely stuck! sqlDA.Fill(ds, "Profiler") Dim brandsQuery = From cust In ds.Tables(0).AsEnumerable() Select _BrandName = cust.Item("BrandName"), _y0 = cust.Item("1999"), _y1 = cust.Item("2004"), _y2 = cust.Item("2005"), _y3 = cust.Item("2006"), _y4 = cust.Item("2007"), _y5 = cust.Item("2008") I'm tried to look at examples, but can't see any that are VB.Net based and/or show me how to Sum/Group. Can someone please provide an example so I can perhaps learn from it. Thanks.

    Read the article

  • Force column order, Excel data table

    - by Chris
    I have a Excel Workbook that I use as a report template. I change the datasource on each pivot and datatable in a C# app. When I change the datatable datasource it tweeks the columns. Is there a way to force the column order? private void RefreshRawData(string dataSource, string connection) { xl._Worksheet ws = (xl._Worksheet)xlTemplate.Worksheets["Raw Data"]; xl.ListObject table = ws.ListObjects["Table_ExternalData_1"]; xl.QueryTable qt = table.QueryTable; qt.CommandText = dataSource; qt.Connection = GetExcelConnectionString((string)qt.Connection); qt.BackgroundQuery = false; qt.Refresh(m); Marshal.ReleaseComObject(ws); Marshal.ReleaseComObject(table); Marshal.ReleaseComObject(qt); ws = null; table = null; qt = null; }

    Read the article

  • 3-Way sorting in ultragrid

    - by M_Mogharrabi
    how can i have a ultragrid with 3-way sorting on every columns? I mean : a. Ascendiing -Indicated by default ascending SortIndicator. b. Descending- Indicated by default descending SortIndicator. c. No Sort- UnSort the column. Note: I have tried BeforeSortChanged Event but i had 2 problems: I could not get the previous column sort indicator to find out when should i disable sorting. I have got an Exception where it is saying that we can't change SortIndicator in BeforeSortChange Event

    Read the article

  • Excel Worksheet Index

    - by Ben
    I have the following code that works great but I am trying to modify it so that instead of replacing column 1 of the Index page with a new index I would rather start the range in Cell C11. Right now, the new Index starts in Cell A1 of the Index sheet. Here is the code: Private Sub Worksheet_Activate() Dim wSheet As Worksheet Dim l As Long l = 1 With Me .Columns(1).ClearContents .Cells(1, 1) = "INDEX" .Cells(1, 1).Name = "Index" End With For Each wSheet In Worksheets If wSheet.Name <> Me.Name Then l = l + 1 With wSheet .Range("A1").Name = "Start_" & wSheet.Index .Hyperlinks.Add Anchor:=.Range("A1"), Address:="", _ SubAddress:="Index", TextToDisplay:="Back to Index" End With Me.Hyperlinks.Add Anchor:=Me.Cells(l, 1), Address:="", _ SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name End If Next wSheet End Sub I have successfully modified the code so that the link back to the index on each sheet is in cell A4 without trouble, but I can't figure out how to have the index be replaced starting at Cell C11

    Read the article

  • Cocoa touch - creating view template for iPad

    - by teepusink
    Hi, This is kinda a hard question to describe. I'm just starting to make an iPad app. Now with the amount of real estate I have, I'm planning to have different but similar "views" to populate the space. (might be easier to think a newspaper site, where many of the columns are similar) I would like to create a "view template" so I can reuse the view in the different spots. Is it possible to design the view template in Interface Builder? (meaning I design the UIView in Interface Builder and then somehow I can just do [window addSubview:viewController.viewTemplate1]; multiple times? If so how would I load that view template in the different places? If you know of an example code / tutorial that does something similar, that would work too. Thanks, Tee

    Read the article

  • How to apply multiple filters to sharepoint list

    - by Juraj Hajek
    Hi all, I have sharepoint list with several columns - month, year and some custom data. I want to provide 2 dropdowns to allow user select month and year to filter rows. I added "Choice Filter" webpart for month and set connection to list (this works). I added second "Choice Filter" for year and I wanted to do the same. However, I cannot set connection to list, because mylist is disabled in webpart menu "Edit-Connections-Send filter values to". How can I apply 2 filtering criteria? Thanks, Juraj

    Read the article

  • How to create wordpress-like option table and get values for each row?

    - by Nacho
    Hi guys. I'm looking to create an options table in my db that makes every record a system option, so I can work with a little number of fields. My db has the following structure: 3 columns named id, name, and value The following data is inserted as an example: +--+-----------+--------------------------+ |id|name |value | +--+-----------+--------------------------+ | 1|uri |www.example.com | | 2|sitename |Working it out | | 3|base_folder|/folder1/folder2/ | | 4|slogan |Just a slogan for the site| +--+-----------+--------------------------+ That way I can include a large number of customizable system options very easily. The problem is that I don't know how to retrieve them. How do I get the value of uri and store it as a var? And better yet, how do I get, for exmaple, values of id 1 and 4 only without making a query each time? (I assume multiple queries are useless and a pretty ugly method.) I know the question is pretty basic but I'm lost here. I'd really appreciate your answer!

    Read the article

  • converting date data type into varchar

    - by Sheetal Inani
    I have some dates fields in table. These columns contain dates in the following format: mmddyy For example: 31/12/2010 00:00:00:0000 I need to import these values into a table which is set to varchar and numeric and formats dates like this: monthName varchar Year numeric(4,0) currently I'm using INSERT INTO [School].[dbo].[TeacherAttendenceDet] ([TeacherCode], [MonthName], [Year]) (SELECT MAX(employeecode), Datename(MONTH, dateofjoining) AS MONTH, Datepart(YEAR, dateofjoining) AS DATE FROM employeedet GROUP BY dateofjoining) but datename() gives result in date format.. I have to save it in varchar format How can I do this? this is employeemast table: EmployeeCode numeric(5, 0) PayScaleCode numeric(7, 0) DesignationCode varchar(50) CityCode numeric(5, 0) EmployeeName varchar(50) FatherName varchar(50) BirthDate varchar(50) DateOfJoining varchar(50) Address varchar(150) this is TeacherAttendenceDet table TeacherCode numeric(5, 0) Unchecked Year numeric(4, 0) Unchecked MonthName varchar(12) Unchecked i have to insert in teacherattendencedet table the monthname and year from employeemast

    Read the article

  • MATLAB: svds() not converging

    - by Paul
    So using MATLAB's svds() function on some input data as such: [U, S, V, flag] = svds(data, nSVDs, 'L') I noticed that from run to run with the same data, I'd get drastically different output SVD sizes from run to run. When I checked whether 'flag' was set, I found that it was, indicating that the SVDs had not converged. My normal system here would be that if it really needs to converge, I'd do something like this: flag = 1 svdOpts = struct('tol', 1e-10, 'maxit', 600, 'disp', 0); while flag: if svdOpts.maxit > 1e6 error('There''s a real problem here.') end [U, S, V, flag] = svds(data, nSVDs, 'L', svdOpts) svdOpts.maxit = svdOpts.maxit*2 end But from what I can tell, when you use 'L' as the third argument, the fourth argument is ignored, meaning I just have to deal with the fact that it's not converging? I'm not even really sure how to use the 'sigma' argument in place of the 'L' argument. I've also tried reducing the number of SVDs calculated to no avail. Any help on this matter would be much appreciated. EDIT While following up on the comments below, I found that the problem had to do with the way I was building my data matrices. Turned out I had accidentally inverted a matrix and had an input of size (4000x1) rather than (20x200), which was what was refusing to converge. I also did some more timing tets and found that the fourth argument was not, in fact, being ignored, so that's on me. Thanks for the help guys.

    Read the article

  • MySQL "NULL" questions

    - by Camran
    I have a table with several columns. Sometimes some of these column fields may be empty (ie. I won't use them in some cases). My questions: Would it be smart to set them to NULL in phpmyadmin? What does the "NULL" property actually do? Would I gain anything at all by setting them to NULL? Is it possible to use a NULL field the same way even though it is set to null?

    Read the article

  • Matlab time stamps reading

    - by Paul
    Any easy way to read all the columns in Matlab? my format is date time y1 y2 y3 y4 ......................... 4/27/2010 00:3:09 34 45 45 56 ................ so on currently i am reading these with the code [c,pathc]=uigetfile({'*.txt'},'Select the data','C:\Data'); file=[pathc c]; data= dlmread(file, ',', 1,3); so needless to say i am skipping the time stamps. Was wondering if there is aeasy way to read the time stamps and plot my other colums agianst the time in hours. my files are 43200 X 30 and some are 86400 X 90 Related question : is the format same for .csv and .xls files , i mean except ofcourse xlsread

    Read the article

  • Multiple sections on landing page only

    - by RDRAO
    Hi every one, I am very much new to Drupal but am loving it to start with. I got struck at a point with respect to theaming. I have a region called 'footer-teaser' just above footer. Its width is 800px. its been split into 3 equal size columns. Each column has the following. Image of size 120x120 Some teaser text Link to 'read more' The design requirement is all the above should be editable by the admin from the admin interface. If its static i would have hardcoded this but since the requirement is dynamic, i am not aware of how to achieve this. I have customised page.tpl for other sections of the page except this. I am sure someone else would have faced this issue before and was wondering if anyone can direct me in the right direction? Even better if an example is provided. Cheers RD

    Read the article

  • Pass data to text file and save it on database

    - by Kasun
    Hi, I need to Pass some data to text file. Then that text file should be save in Data Base(SQL 2005). Then i need to retrieve data from the database by reading the columns to my application. I use VS2005 and need C# solution. Ex: (1) After click "Load" button data should pass to textile. (2) Then Click "Save" button data need to pass to database. (3) After click "Retrive" button data should load to datagride view. Please Help.....

    Read the article

  • Visually Viewing and Editing a Two-Dimensional Array - VB/C#

    - by Jeffrey Kern
    I've never personally used any of the Data controls within Visual Studio. I need to view and edit a two-dimensional byte array, 16x15 objects. Is there any control capable of editing this information? I've tried to access data with the DataViewGrid, but am not sure how to use it. It would be great to edit this information via rows and columns, like how you can in Excel. Thank you! Times like this I wish I could just use multiple text boxes and assign them each an index value. Oh VB6 how I miss you :P

    Read the article

  • simple rank formula

    - by Graham
    I'm looking for a mathmatical ranking formula. Sample is 2008 2009 2010 A 5 6 4 B 6 7 5 C 7 8 2 I want to add a rank column for each period code field rank 2008 2009 2010 2008 2009 2010 B 6 7 5 2 1 1 A 5 6 4 3 2 2 C 7 2 2 1 3 3 please do not reply with methods that loop thru the rows and columns, incrementing the rank value as it goes, that's easy. I'm looking for a formula much like finding the percent total (item / total). I know i've seen this before but an havning a tough time locating it. Thanks in advance!

    Read the article

  • How to check a file saving is complete using Python?

    - by indrajithk
    I am trying to automate a downloading process. In this I want to know, whether a particular file's save is completed or not. The scenario is like this. Open a site address using either Chrome or Firefox (any browser) Save the page to disk using 'Crtl + S' (I work on windows) Now if the page is very big, then it takes few seconds to save. I want to parse the html once the save is complete. Since I don't have control on the browser save functionality, I don't know whether the save has completed or not. One idea I thought, is to get the md5sum of the file using a while loop, and check against the previous one calculated, and continue the while loop till the md5 sum from the previous and current one matches. This doesn't works I guess, as it seems browser first attempts to save the file in a tmp file and then copies the content to the specified file (or just renames the file). Any ideas? I use python for the automation, hence any idea which can be implemented using python is welcome. Thanks Indrajith

    Read the article

  • tsql sum data and include default values for missing data

    - by markpirvine
    Hi, I would like a query that will shouw a sum of columns with a default value for missing data. For example assume I have a table as follows: type_lookup: id name 1 self 2 manager 3 peer And a table as follows data: id type_lookup_id value 1 1 1 2 1 4 3 2 9 4 2 1 5 2 9 6 1 5 7 2 6 8 1 2 9 1 1 After running a query I would like a result set as follows: type_lookup_id value 1 13 2 25 3 0 I would like all rows in type_lookup table to be included in the result set - even if they don't appear in the data table. Any help would be greatly appreciated, Mark

    Read the article

  • Ruby/python Script to convert html text to plain text in csv file

    - by Miau
    Hi all: So i have a large(ish) file in a csv format, that contains a column that has html and i need to transform that to plain text (ie readable by people ,ie with no script tags) I dont have much experience with ruby, but it seems like the perfect language to do this The File should still be in a cv format after the parsing ( ie, other columns should nto be disturbed) Helpz? Fair enough, I thought there might be a library that does that as long as the html was valid. The file looks something liek this "xxxx-15454ss", "xome name", "<div class=""myClass""><strong>The Vintage Junior </strong>offers the same specs as the Vintage Series but only in 3/4 Size ideal for Kids. the 57 Model is great value for a good quality guitar. For more info go to <a href=""www.somehting.com"">something</a> </div> " I m trying to include the common html tags we would be using Thanks

    Read the article

< Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >