w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
HTML outer and inner table with different border color using CSS
The selector table.CommonTableStyle1 table, th, td doesn't work properly, because there is no table in the table with class "CommonTableStyle1". I think you meant to do this: table.CommonTableStyle1 th, table.CommonTableStyle1 td See fiddle Also, the bottommost selector did work, but not in the way you may think. The th, td part had the same specificity as the one above, so it would take this style for all ths and tds, because this one came later. But it's OK now, since we've made the specificity of the above one larger.

Categories : HTML

Gradient Border on Outer Edges of DataGridHeader
I would suggest using a Tool like Snoop to inspect the XAML-Tree at runtime. It seems to me that there is an additional item rendered somewhere in the tree having its default template applied. Since you don't seem to overwrite all default templates in the tree I guess you'll find the right element this way (just gotta look for an item with background or border being black). You can find the tool here: http://snoopwpf.codeplex.com/

Categories : Wpf

GridView rows outer margin
You can use android:clipToPadding=false to add padding that doesn't stay when the items are scrolled. Like this <GridView android:id="@+id/grid" android:layout_width="match_parent" android:layout_height="match_parent" android:horizontalSpacing="16dp" android:verticalSpacing="16dp" android:padding="16dp" android:clipToPadding="false" /> And if you want the scrollbar on the outside of the padding area, set android:scrollbarStyle="outsideOverlay" thanks @Karl!

Categories : Android

Hot to get unmatched rows in the end of result while doing outer join?
Use a case. Generally you can do SELECT records.some_id FROM forms LEFT OUTER JOIN records ON forms.form_id = records.form_id ORDER BY case when records.some_id is not null then 1 else 2 end, records.some_id and specifically in MySQL you can also do SELECT records.some_id FROM forms LEFT OUTER JOIN records ON forms.form_id = records.form_id ORDER BY records.some_id is not null, records.some_id

Categories : Mysql

LEFT OUTER JOIN not showing all rows?
I don't think this should be done with a JOIN but rather with a correlated subquery. SELECT SQL_CALC_FOUND_ROWS `p`.`id`, `p`.`title`, `p`.`live`, `p`.`startDate`, `p`.`endDate`, (SELECT COUNT(`part`.`id`) FROM `participants` `part` WHERE `part`.`projectid` = `p`.`id`) AS `participants` FROM `projects` `p` ORDER BY `p`.`live` DESC, `p`.`startDate` DESC LIMIT 0,10

Categories : Mysql

Returning Unique rows from Left Outer Join
Not tested, It's a SQL server version. select rrn(A), F1,F2,F3,F4 from ( select rrn(A), F1,F2,F3,F4,row_number() over(partition by RRN order by RRN) as rn from rush2hem1.T1 A left outer join rush2hem1.T2 B on A.F1=B.F3 ) as dt where dt.rn = 1

Categories : SQL

Removing rows on outer query when subquery returns null
The problem is that you can't use SELECT aliases in the WHERE clause, they have to be in HAVING. But if you use an inner join, you won't get any null rows in the first place. SELECT s.student_name_first, s.student_name_last, SUM(i.points) AS points FROM students s JOIN incidents i ON i.student = s.id GROUP BY s.id

Categories : Mysql

Find and insert dummy rows - possible scenario for OUTER APPLY
insert into People(Name, Category, Id) ( select distinct p.Name, c.Category, p.Id from people p cross join category c where Concat(p.id, c.Category) not in (select Concat(id, Category) from people) ); http://www.sqlfiddle.com/#!6/92cd5/14

Categories : SQL

MySQL left outer join with where clause - return unmatched rows
Yes. The where clause is turning the left outer join into an inner join. Why? The value of pe.pqid is NULL (as is pe.uid) when there is no match. So the comparison in the where clause fails (almost all comparisons to NULL return NULL which is considered false). The solution is to move the comparison to the on clause: SELECT pq.id, pq.data, pe.data FROM pq LEFT OUTER JOIN pe ON pq.id = pe.pqid and pe.uid='12345' ORDER BY pq.id LIMIT 2

Categories : Mysql

Can I sort groups of rows in Excel so that the rows remained grouped after being sorted?
use custom sort by two columns - for each transaction add one column with unique number (maybe you already has one) and then sort first by that column and second by your desired column with date

Categories : Excel

How to perform 'insert rows' instead of 'copy rows' using CopyFromRecordset(excel vba)
You could insert the row before copying the rs? Worksheets("Sheet1").Rows(Worksheets("Sheet1").Range("A2:D2").Row).Insert _ Shift:=xlDown, _ CopyOrigin:=xlFormatFromLeftOrAbove

Categories : Excel

Excel Insert Rows - Using Named Ranges To Hide Rows
Edit Use 'Named Ranges' instead of hard coding the range. The named range will automatically update when you insert a new row. For example: I selected rows 9 thru 13 and named them 'RowsABC' as shown here: I also named my checkbox cell as 'CheckABC' so that it is no longer dependent on what row it's in. Your code now looks like this: If Range("CheckABC").Value = True Then Range("RowsABC").EntireRow.Hidden = False Else Range("RowsABC").EntireRow.Hidden = True End If Now you can select a row such as row 10 and right click -> insert, and your macro will hide rows 9:14 instead of 9:13 because the named range will update automatically when you insert.

Categories : Excel

Hibernate Critria to return rows even if record does not exist LEFT OUTER JOIN
First let me correct your POJOs. public class ItemInfo { private long id; private Item item_id; private long info_id; private String item_info; //getter-setter of all } Look for the change in datatype of item_id. Change the annotation/ mapping file accordingly. Then try executing the following criteria. Criteria crit = session.createCriteria(Item.class); crit.setFetchMode("item_id", FetchMode.JOIN); List<Item> itemList = criteria.list();

Categories : Hibernate

Getting Excel Border Styles in C#
I will completely redo my answer based on the new information as I misunderstood the question earlier: Although I do not understand the actual problem as to why you need to convert the styles to strings, still you can make multiple methods that each take in an Excel.Border and then return the corresponding string values you desire For getting the color you can have something like public static String getBorderColor(Excel.Border border) { String retval = ""; retval += " rgb("; System.Drawing.Color color = Color.FromArgb((int)border.Color); retval += color.R + ","; retval += color.G + ","; retval += color.B + ")"; return retval; } For getting the weight since all line styles and weight styles are just basically intege

Categories : C#

Is there a quicker way to Emulate Full Outer Join of two Large Tables with 40 million rows using mySQL
I recently came up with the same problem, check this related question which proposes a solution that worked well for me

Categories : Mysql

How to wrap the border of a table around rows that are not full?
you cannot do that by table but can achieve it via div and css still i have shown what td with little style can do please check <html> <head> <style> td{border:2px solid black;} </style> </head> <body> <table border = "2px"> <tr><td>1</td><td>2</td></tr><tr><td>3</td></tr> </table> <br/> <table cellspacing="0" cellpadding="1"> <tr><td>1</td><td>2</td></tr><tr><td>3</td></tr> </table> </body> </html>

Categories : HTML

Visual basic - Excel cell's border property
All the constants like xlEdgeRight, xlContinuous, xlEdgeRight, xlThin etc are just long integers. You need to lookup their values and use them in your application. Ideally you'd create a bunch of constants in your application so you can continue to use the named versions so its easier to understand your code. The following page lists all the excel constants and their values. http://www.smarterdatacollection.com/Blog/?p=374 I assume there not tied to a specific excel version, but if they are you just need to lookup the ones for your version.

Categories : Visual Studio

making a cell border exactly like Excel's fill handle?
I was able to hack that up with the combination of black box with white borders along with absolute positioning after relative outer div. Looks like this: Full demo: http://jsfiddle.net/68KAZ/1/ HTML (for the cursor cell) <td style="border: 3px solid black;"> <div id="ExcelCursorOuter"><div id="ExcelCursor"></div></div> </td> CSS: #ExcelCursorOuter { position: relative; } #ExcelCursor { position: absolute; top: 8px; right: -5px; background: #000; width: 5px; height: 5px; border: 1px solid #fff; border-right: 0px; border-bottom: 0px; }

Categories : HTML

Spacing/padding from table border and narrower rows
Is this what you want? HTML: <table> <tr> <th>No.</th> <th>Name</th> <th>Family</th> <th>Email Address</th> </tr> <tr> <td>1</td> <td>John</td> <td>Doe</td> <td>john@doe.com</td> </tr> <!-- So on --> </table> CSS: table { padding: 48px; /* 48 + 2 = 50px */ border-collapse: separate; /* | */ border-spacing: 2px; /* <----------- */ } table, th, td { border: 1px solid black; } You could use border-spacing property to specify the distance between the borders of adjacent cells, and padding property to create space between borders of the table and its content. JSB

Categories : HTML

Bottom border lines add if table has multiple rows
The easiest way is to select the tr:last-child that is a sibling of a previous tr: tr + tr:last-child td { border-bottom-width: 0; } The above assumes (from the look of your picture) that the border-bottom is on the td, if it's on the tr itself, though: tr + tr:last-child { border-bottom-width: 0; } If the border-bottom is on the table itself, then JavaScript will be necessary (since CSS has no parent-selector), since you offer jQuery as a tag to your question: $('table').filter(function(){ return $(this).find('tr').length < 2; }).addClass('singleOrNoRows'); With the CSS: .singleOrNoRows { border-bottom-width: 0; }

Categories : Jquery

Microsoft.Office.Interop.Excel: How to Apply a border to ONE CELL
Microsoft.Office.Interop.Excel.Range range = sheet.UsedRange; Microsoft.Office.Interop.Excel.Range cell = range.Cells[1][1]; Microsoft.Office.Interop.Excel.Borders border = cell.Borders; border[XlBordersIndex.xlEdgeLeft].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; border[XlBordersIndex.xlEdgeTop].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; border[XlBordersIndex.xlEdgeBottom].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; border[XlBordersIndex.xlEdgeRight].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; See this answer for more details.

Categories : C#

SSRS 2005 - Border issue exporting to Microsoft Excel 2003
I am afraid I don't know the answer to that particular question, but SSRS are known for having problems with Excel (and Word) rendering. In our case we decided to go with OfficeWriter

Categories : Excel

Use column from outer sql statement in function call without OUTER APPLY
SELECT * , ( SELECT MAX (pj.Val) FROM [dbo].[parseJSON](t.[Parameters]) AS pj WHERE pj.Name='A' ) FROM @task AS t BTW, could you show what is inside parseJSON function? Just interesting.

Categories : Sql Server

ios custom tableViewCell height changes trailing unused rows and removes cell border
1) Use this method to set height of rows - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { int heightRow; if(indexPath.row==1) heightRow = 132; else heightRow = 44; return heightRow; } 2) For Border - Check autoresizing of tablecells. Have you implemented default separator or showing it with some image? If you are using an image Try checking it's frame.

Categories : IOS

Criteria qyery for below SQL query? Both inner and outer query are for same table but for different rows
You can use Hibernate DetachedCriteria to express a subquery. This Hibernate doc will give you a good idea about the topic. Here is how you can write your SQL query by using Hibernate Criteria/DetachedCriteria: //creates a DetachedCriteria DetachedCriteria dc = DetachedCriteria.forClass(Details.class); //restrictions for the sub query dc.add(Restrictions.like("question", "childgender")); dc.add(Restrictions.eq("answer", "M")); dc.add(Restrictions.eq("test", "1")); //this is what your sub query will return dc.setProjection(Projections.property("subject")); //Criteria for Details.class Criteria criteria = sessionFactory.getCurrentSession().createCriteria( Details.class); //restriction on your Criteria criteria.add(Restrictions.like("question", "childimmunization")); //you

Categories : Misc

Matching number of rows in one excel table with the number of rows in another
It sounds like you can possibly do this manually with autofill, but if you wish to use a macro something like this could get you started: Sub Macro1() ' put your function here Range("B1").FormulaR1C1 = "=RC[-1]*2" Dim dest As Integer dest = Range("A1").End(xlDown).Row Range("B1").AutoFill Destination:=Range("B1:B" & dest), Type:= _ xlFillDefault End Sub This will autofill a function in column B to as much data is contained in column A. Now you stated that you need to "expand or compress the rows to match the imported data." You can do this by clearing the B column at the beginning of the macro. Hopefully this helps, if this is confusing or does not help your problem let me know.

Categories : Excel

Using .Rows In Excel VBA
Your copy range (if you copy the entire row) will be larger then your paste range if you offset by a column. You can't paste 16384 columns into 16383, not enough room. If you do not wish to use the range function, you will have to copy the entire rows then add a column to the front. Or you could add the column to the source data before the copy paste, removing the columns when finished if needed. Sub Sample() Dim sh2 As Worksheet, sh3 As Worksheet Set sh2 = Worksheets("Sheet1") Set sh3 = Worksheets("Sheet2") If distanceValue <= distanceParameter Then sh2.Rows(i).Copy _ sh3.Rows(i) End If sh3.Columns("A").insert End Sub OR Sub Sample() Dim sh2 As Worksheet, sh3 As Worksheet Set sh2 = Worksheets("Sheet1") Set sh3 = Worksheets("Sheet2") sh2.Columns("A").insert If di

Categories : Excel

Sort Rows in Excel?
With a PivotTable it seems fairly easy to 'automate' as far as Sheet 2 as below: but from there to the result requested is relatively 'manual' without VBA, so may not suit. For my convenience I have changed the date formats. The PivotTable is constructed as usual/indicated without showing grand totals for rows or for columns (PivotTable Options, Totals & Filters). The Column Labels are Date with Grouping By Quarters with appropriate Starting at: and Ending at: (Group) and Collapse Entire Field (Expand/Collapse). The formula in I6 is to convert the document count (always 1) to document name: =IF(F6=1,$E6,"") However, to allow room for additional quarters in the PivotTable the formula should be moved to the right. The formula would need to be copied across and down as

Categories : Excel

Merge rows by ID in excel
If you pivot on this data range and apply the ID field to 'Row Labels' and the sizeAndColourAndSku_Value field to both 'Column Labels' and 'Values' you will get something similar, except it will give you a count of the occurrences rather than the values themselves.

Categories : Excel

Counting rows in VBA excel
Your problem is with: rates = Application.WorksheetFunction.Index(z, 1, 0) Index only accepts a single row or column, otherwise you get a VALUE error.

Categories : Excel

Excel: sum odd/even rows only in R1C1
If you enter it as an array formula with Ctrl-Shift-Enter, it will produce the desired result.

Categories : Excel

Unhide rows in Excel with VBA
Paste this code into module of the sheet where your data are, e.g. you have data in 'Sheet1', then paste it to 'Sheet1' class module. HTH Private Sub Worksheet_Change(ByVal Target As Range) ' AE25 If (Not Intersect(Target, Range("AE25")) Is Nothing) Then Select Case Target.Value Case 1 Range("A26:A28").EntireRow.Hidden = False Case 2 Range("A26:A29").EntireRow.Hidden = False Case 3 Range("A26:A30").EntireRow.Hidden = False Case 4 Range("A26:A31").EntireRow.Hidden = False Case 5 Range("A26:A32").EntireRow.Hidden = False Case 6 Range("A26:A33").EntireRow.Hidden = False Case 7 Range(

Categories : Excel

VBA: How to delete filtered rows in Excel?
Use SpecialCells to delete only the rows that are visible after autofiltering: ActiveSheet.Range("$A$1:$I$" & lines).SpecialCells _ (xlCellTypeVisible).EntireRow.Delete If you have a header row in your range that you don't want to delete, add an offset to the range to exclude it: ActiveSheet.Range("$A$1:$I$" & lines).Offset(1, 0).SpecialCells _ (xlCellTypeVisible).EntireRow.Delete

Categories : Vba

Delete all duplicate rows Excel vba
There's a RemoveDuplicates method that you could use: Sub DeleteRows() With ActiveSheet Set Rng = Range("A1", Range("B1").End(xlDown)) Rng.RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes End With End Sub

Categories : Excel

How to export only selected rows from dgv into excel?
for (int i = 0; i < dataGridView1.SelectedRows.Count - 1; i++) { for (int j = 0; j < dataGridView1.Columns.Count; j++) { worksheet.Cells[i + 2, j + 1] = dataGridView1.Rows[i].Cells[j].Value.ToString(); } } Your loop is intended to enumerate selected rows, but you take values from all the rows. Change .Rows[i] to .SelectedRows[i].

Categories : C#

Excel formula for merging rows
If your data is in A:C starting in Row2 with labels in Row1, enter =C2 in E2 and: in D2: =IF(A2=A3,"",COUNTIF(A:A,A2)) and copy down in E3: =IF(A2=A3,E2&", "&C3,C3) and copy down then copy A:E to a new sheet and Paste Special Values there. Filter and select Blanks in ColumnD. Delete these and ColumnsC&D.

Categories : Excel

Getting the number of rows PER PAGE in Excel using C#
I don't think you have a way to calculate that on your own... It is very complicated, because the number of rows on each page depends on many variables (Printer page size, orientation, zoom level, etc.). You can try to use this: Repeat specific rows or columns on every printed page

Categories : C#

Excel CSV. file with more than 1,048,576 rows of data
Excel 2007+ is limited to somewhat over 1 million rows ( 2^20 to be precise), so it will never load your 2M line file. I think that the technique you refer to as splitting is the built-in thing Excel has, but afaik that only works for width problems, not for length problems. The really easiest way I see right away is to use some file splitting tool - there's tons of 'em and use that to load the resulting partial csv files into multiple worksheets. ps: "excel csv files" don't exist, there are only files produced by Excel that use one of the formats commonly referred to as csv files...

Categories : Excel

How to consolidate rows in excel in this scenario
Assuming your source is in ColumnsA & B, with a header row in Row1, then copy B2 into D2 and: in C2: =IF(A2=A3,"",A2) copied down to suit, in D3: =IF(A3=A2,D2&", "&B3,B3) copied down to suit. Then copy ColumnsC&D and Paste Special Values into a new sheet. Filter there to select blanks in the PART NUMBER column and delete selected rows. Unfilter.

Categories : Excel

Excel Macros to hide rows
You need to put the "nil = true" on a separate line; if you have the statement to be executed on the same line as the "if", Excel VBA considers this to be the end of the "if" statement. So you'd need to do: Sub HIDE() If Range(K23) = Range(T20) Then nil = True Else If Range(K23) = Range("T21:T23") Then Rows("25:65").EntireRow.Hidden = True End If End If End Sub It's also a little easier to read this way. As commented on your question, you'll need to provide a bit more detail in order for us to help you get your function actually doing exactly what you need it to do.

Categories : Excel



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.