What NEW features has WCF in .NET Framework 4 vs .NET Framework 3.5? What Is new, what was fixed (in general - I do not want to get into bug fixed numbers=)?
I have a fixedwidth datagrid being built programatically, and am trying to put a header over top of it that will scroll with it. I can't do it as part of the grid as that destroys the fixedwidth of the cells.
I would like to be able to scroll the top div as the scrollbar for the DataGrid scrolls. This seems how the header works already, so it should be possible. I just can't figure out how to link/attach it.
We currently use a GridView to display 1000+ rows of data. Minimum requirement for replacement is a fixed header row, fixed footer and columns would be a plus.
This would have to work across IE 6 and greater.
I've heard good things about Infragistics, but the demo on their page is slow.
So what are my best options? jQuery? YUI? other 3rd party?
My HTML page contains many tables,with numerous tr and td. While rendering in IE8/IE9 the
its very slow but in Firefox its fast. I had read somewhere while drawing tables if the tables are not of fixedwidth, IE calculates the width every time and renders so usually slow.
Right now i am adding Table style="table-layout:fixed" which made me feel its faster.
Are there any similar styles that can be added to tr and td as well.Also
suggest if there any other attribtes that can be added to a table
I know little of optimization problems, so hopefully this will be didactic for me:
rotors = [1, 2, 3, 4...]
widgets = ['a', 'b', 'c', 'd' ...]
assert len(rotors) == len(widgets)
part_values = [
(1, 'a', 34),
(1, 'b', 26),
(1, 'c', 11),
(1, 'd', 8),
(2, 'a', 5),
(2, 'b', 17),
....
]
Given a fixed number of widgets and a fixed number of rotors, how can you get a series of widget-rotor pairs that maximizes the total value where each widget and rotor can only be used once?
[Edited at the resquest of admins] The best way I can explain my problem is showning an example. I have the table that you can see on the link below (since I can't post images...), that ha a table head (blue) and four rows, whose cells are green and white in color. I just want the white cells to hide/show alternately by clicking on green cells, which would remain always visible as parent cells. After hiding white cells, the green ones should be aligned into the same row, as they would fit like tetris bricks. That's all, I think more clear is impossible.
http://i.stack.imgur.com/3n3In.jpg (follow the link to see the image explanation)
The table code:
<table class="columns" cellspacing="0" border="0">
<tr>
<td class="left" rowspan="2">
<div style="text-align:center;"></div> </td>
</tr><tr><td class="middle">
<div id="detail_table_source" style="display:none"></div>
<br>
<table id="detail_table" class="detail">
<colgroup>
<col style="width:20px;">
<col style="width:40px;">
<col style="width:70px;">
<col style="width:20px;">
</colgroup>
<thead>
<tr>
<th width="88">Blahhh</th>
<th width="211">BLAHH</th>
<th width="229">BLAHH</th>
</tr>
</thead>
<tbody>
<tr class="parent" id="row123" style="cursor: pointer; " title="Click to expand/collapse">
<td bgcolor="#A6A4CC">Blahhh</td>
<td bgcolor="#A6A4CC">blah blah </td>
<td bgcolor="#A6A4CC">Blahh</td>
</tr>
<tr class="child-row123" style="display: none; ">
<td rowspan="3" bgcolor="#5B5B5B"> </td>
<td>blah blah </td>
<td>blah blah</td>
</tr>
<tr class="child-row123" style="display: none; ">
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr class="child-row123" style="display: none; ">
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td bgcolor="#6B7A94" class="parent" id="row456" style="cursor: pointer; " title="Click to expand/collapse"><strong>Blahh</strong></td>
<td bgcolor="#FFFFFF" class="child-cell456" style="display: none; ">blah blah</td>
<td bgcolor="#FFFFFF" class="child-cell456" style="display: none; ">blah blah</td>
</tr>
<tr>
<td rowspan="4" valign="top" bgcolor="#5B5B5B" class="child-row456" style="display: none; "> </td>
<td bgcolor="#6B7A94" class="parent" id="cell456" style="cursor: pointer; " title="Click to expand/collapse">blah blah</td>
<td bgcolor="#6B7A94" class="parent" id="cell456" style="cursor: pointer; " title="Click to expand/collapse">blah blah</td>
</tr>
<tr>
<td class="child-cell456" style="display: none; ">blah blah</td>
<td class="child-cell456" style="display: none; ">blah blah</td>
</tr>
<tr>
<td class="child-cell456" style="display: none; ">blah blah</td>
<td class="child-cell456" style="display: none; ">blah blah</td>
</tr>
</tbody>
</table>
The script to hide/show whole rows (this works because it is copied from another example):
<script language="javascript">
$(function() {
$('tr.parent')
.css("cursor","pointer")
.attr("title","Click to expand/collapse")
.click(function(){
$(this).siblings('.child-'+this.id).toggle();
});
$('tr[@class^=child-]').hide().children('td');
});
</script>
And the failed attempt at expanding/hiding individual cells:
<script language="javascript">
$(function() {
$('td.parent')
.css("cursor","pointer")
.attr("title","Click to expand/collapse")
.click(function(){
$(this).siblings('.child-'+this.id).toggle();
});
$('td[@class^=child-]').hide().children('td');
});
</script>
I need to implement a list control using MFC with the number of lines being fixed. It should Use FIFO with the number of lines being a fixed number. Is there an inbuilt option to this? Or a programmable method.
Hi all
I have a text file like below
2 1 2
5 10 13 11 12 14
2 0 1
2 99 2
200 2
1 5
5 1 2 3 4 5
1 0
0 0
I want to read file line by line, and read the umbers from each line. I know how to use the stream to read a fixed field line, but what about the non-fixed line?
Best Regards,
The constant 0 is used as the null pointer in C and C++. But as in http://stackoverflow.com/questions/2389251/pointer-to-a-specific-fixed-address there seems to be some possible use of assigning fixed addresses. Is there ever any conceivable need, in any system, for whatever low level task, for accessing the address 0?
If there is, how is that solved with 0 being the null pointer and all?
If not, what makes it certain that there is not such a need?
I have a few columns in a dataGridView want them to fill the space. column A has a fixedwidth column B can be long and scrolling should be possible column C is fixed- unresizeable, and minimum width is set.
what is the way to use these property for achieving the desired behavior
var str = 'single words "fixed string of words"';
var astr = str.split(" "); // need fix
i want the array to be like: single, words, fixed string of words.
Hi all
I have a text file like below
2 1 2
5 10 13 11 12 14
2 0 1
2 99 2
200 2
1 5
5 1 2 3 4 5
1 0
0 0
I want to read file line by line, and read the umbers from each line. I know how to use the stream to read a fixed field line, but what about the non-fixed line?
Best Regards,
What's the best way to make an element of 100% minimum height across a wide range of browsers ? In particular if you have a layout with a header and footer of fixed height how do you make the middle content part fill 100% of the space in between with the footer fixed to the bottom ?
How do I call the xrandr command? I want to rotate my screen 90 deg. clockwise. Here is the usage:
% xrandr -help
usage: xrandr [options]
where options are:
-display <display> or -d <display>
-help
-o <normal,inverted,left,right,0,1,2,3>
or --orientation <normal,inverted,left,right,0,1,2,3>
-q or --query
-s <size>/<width>x<height> or --size <size>/<width>x<height>
-r <rate> or --rate <rate> or --refresh <rate>
-v or --version
-x (reflect in x)
-y (reflect in y)
--screen <screen>
--verbose
--dryrun
--prop or --properties
--fb <width>x<height>
--fbmm <width>x<height>
--dpi <dpi>/<output>
--output <output>
--auto
--mode <mode>
--preferred
--pos <x>x<y>
--rate <rate> or --refresh <rate>
--reflect normal,x,y,xy
--rotate normal,inverted,left,right
--left-of <output>
--right-of <output>
--above <output>
--below <output>
--same-as <output>
--set <property> <value>
--off
--crtc <crtc>
--newmode <name> <clock MHz>
<hdisp> <hsync-start> <hsync-end> <htotal>
<vdisp> <vsync-start> <vsync-end> <vtotal>
[+HSync] [-HSync] [+VSync] [-VSync]
--rmmode <name>
--addmode <output> <name>
--delmode <output> <name>
This is what I tried:
% xrandr -o left
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 159 (RANDR)
Minor opcode of failed request: 2 ()
Serial number of failed request: 16
Current serial number in output stream: 16
I am running Solaris 10.
i am shifting my webapp to nginx and i have problems to get my htaccess working
In Apache I have this :
RewriteRule images/([0-9]+)x([0-9]+)/([0-9]+)x([0-9]+)/(.+)$ images/image.php?width=$1&height=$2&cropratio=$3:$4&image=/$5 [L,QSA]
I already tried this from a converter but with no success :
rewrite /images/([0-9]+)x([0-9]+)/([0-9]+)x([0-9]+)/(.+)$ /images/image.php?width=$1&height=$2&cropratio=$3:$4&image=/$5 break;
Would be nice if somebody could point me in the right direction.
Thank you :)
I've been trying to determine what the correct stripe width for a RAID-50 volume is but haven't been successful in google searches or empirical tests. The volume is built off of 4 disk spans that contain 6 disks each. If I understand it correctly, each individual span is a RAID-5 volume and the 4 spans are combined using RAID-0. However, I'm not seeing any noticable effect when I vary the stripe-width from 2-20. Suggestions?
Hi,
I'm trying to Convert a Bitmap (SystemIcons.Question) to a BitmapImage so I can use it in a WPF Image control.
I have the following method to convert it to a BitmapSource, but it returns an InteropBitmapImage, now the problem is how to convert it to a BitmapImage. A direct cast does not seem to work.
Does anybody know how to do it?
CODE:
public BitmapSource ConvertToBitmapSource()
{
int width = SystemIcons.Question.Width;
int height = SystemIcons.Question.Height;
object a = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(SystemIcons.Question.ToBitmap().GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight(width, height));
return (BitmapSource)a;
}
property to return BitmapImage: (Bound to my Image Control)
public BitmapImage QuestionIcon
{
get
{
return (BitmapImage)ConvertToBitmapSource();
}
}
in inno setup i hav created a custom page with following code and has 3 text boxes
now i want to validate that text box on custom form next button click
if in text.text='2121212' something text is entered by user then only next button enabled pls help any one its urgent
[CustomMessages]
CustomForm_Caption=CustomForm Caption
CustomForm_Description=CustomForm Description
CustomForm_Label1_Caption0=College Name:
CustomForm_Label2_Caption0=Product Type:
CustomForm_Label3_Caption0=Product ID:
[Code]
var
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
{ CustomForm_Activate }
procedure CustomForm_Activate(Page: TWizardPage);
begin
// enter code here...
end;
{ CustomForm_ShouldSkipPage }
function CustomForm_ShouldSkipPage(Page: TWizardPage): Boolean;
begin
Result := False;
end;
{ CustomForm_BackButtonClick }
function CustomForm_BackButtonClick(Page: TWizardPage): Boolean;
begin
Result := True;
end;
{ CustomForm_NextkButtonClick }
function CustomForm_NextButtonClick(Page: TWizardPage): Boolean;
begin
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\SGS2.2\CS',
'College Name', Edit1.Text);
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\SGS2.2\CS',
'Product Type', Edit2.Text);
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\SGS2.2\CS',
'Product ID', Edit3.Text);
Result := True;
end;
{ CustomForm_CancelButtonClick }
procedure CustomForm_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
begin
// enter code here...
end;
{ CustomForm_CreatePage }
function CustomForm_CreatePage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
begin
Page := CreateCustomPage(
PreviousPageId,
ExpandConstant('{cm:CustomForm_Caption}'),
ExpandConstant('{cm:CustomForm_Description}')
);
{ Label1 }
Label1 := TLabel.Create(Page);
with Label1 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:CustomForm_Label1_Caption0}');
Left := ScaleX(16);
Top := ScaleY(24);
Width := ScaleX(70);
Height := ScaleY(13);
end;
{ Label2 }
Label2 := TLabel.Create(Page);
with Label2 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:CustomForm_Label2_Caption0}');
Left := ScaleX(17);
Top := ScaleY(56);
Width := ScaleX(70);
Height := ScaleY(13);
end;
{ Label3 }
Label3 := TLabel.Create(Page);
with Label3 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:CustomForm_Label3_Caption0}');
Left := ScaleX(17);
Top := ScaleY(88);
Width := ScaleX(70);
Height := ScaleY(13);
end;
{ Edit1 }
Edit1 := TEdit.Create(Page);
with Edit1 do
begin
Parent := Page.Surface;
Left := ScaleX(115);
Top := ScaleY(24);
Width := ScaleX(273);
Height := ScaleY(21);
TabOrder := 0;
end;
{ Edit2 }
Edit2 := TEdit.Create(Page);
with Edit2 do
begin
Parent := Page.Surface;
Left := ScaleX(115);
Top := ScaleY(56);
Width := ScaleX(273);
Height := ScaleY(21);
TabOrder := 1;
end;
{ Edit3 }
Edit3 := TEdit.Create(Page);
with Edit3 do
begin
Parent := Page.Surface;
Left := ScaleX(115);
Top := ScaleY(88);
Width := ScaleX(273);
Height := ScaleY(21);
TabOrder := 2;
end;
with Page do
begin
OnActivate := @CustomForm_Activate;
OnShouldSkipPage := @CustomForm_ShouldSkipPage;
OnBackButtonClick := @CustomForm_BackButtonClick;
OnNextButtonClick := @CustomForm_NextButtonClick;
OnCancelButtonClick := @CustomForm_CancelButtonClick;
end;
Result := Page.ID;
end;
{ CustomForm_InitializeWizard }
procedure InitializeWizard();
begin
CustomForm_CreatePage(wpWelcome);
end;
I use the following DataGrid
<DataGrid Grid.Row="1" Grid.Column="1" Name="Grid" ItemsSource="{Binding}" AutoGenerateColumns="False" >
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="OldValue" Width="100" Binding="{Binding Path=OldValue}"></DataGridTextColumn>
<DataGridTextColumn Header="NewValue" Width="100*" Binding="{Binding Path=NewValue}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
How can I make the cells readonly?
Hi everyone,
I have some problems with sizing row's height in QTreeWidget. I use QStyledItemDelegate with QPlainTextEdit. During editing text in QPlainTextEdit i check for changes with a help of:
rect = self.blockBoundingRect(self.firstVisibleBlock())
and if text it's height changes i need row in QTreeWidget also resizing. But i don't know how to inform TreeWidget or a Delegate about changes, i even tried to initialize editor with index, that i could use in a future, but it suddenly changes:
class MyEditor(QPlainTextEdit):
def __init__(self, index = None, parent=None):
super(MyEditor, self).__init__(parent)
self.index = index
self.connect(self, SIGNAL("textChanged()"), self.setHeight)
def setHeight(self):
if self.index:
rect = self.blockBoundingRect(self.firstVisibleBlock())
self.resize(rect.width(), rect.height())
self.emit(SIGNAL("set_height"), QSize(rect.width(), rect.height()), self.index)
How can i bound editor's size changes with TreeWidget?
And one more thing, by default all items (cells) in TreeWidget have -1 or some big value as default width. I need whole text in cell to be visible, so how can i limit it only by visible range and expand it in height?
Thank you in advance,
Serge