w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Checkbox styling in HeaderTemplate
HTML: <div class="warpper"> <span class="span">Select All</span> <input id="Checkbox1" type="checkbox" /> </div> CSS: .span { display: block } .warpper { border: 1px dotted firebrick; text-align: center; width: 80px; } Demo

Categories : Asp Net

Set width through binding in HeaderTemplate of DataGridColumn
I suspect the reason that code isn't working is one of these: The DataGridColumnHeader is using Auto width, which is stored in the Width property as Double.NaN. You need to use the ActualWidth property to get the computed value. You might have set up a two-way binding, so that instead of the DockPanel inheriting the DataGridColumnHeader's width, it's working the other way around. Using ActualWidth should solve this as well since it's a read-only property. The binding should not be necessary, however. If you set HorizontalContentAlignment to Stretch on the DataGridColumnHeader, the header template should automatically fill the header: <DataGrid> <DataGrid.ColumnHeaderStyle> <Style TargetType="DataGridColumnHeader"> <Setter Property="Horizont

Categories : Wpf

Changing HeaderTemplate in a treeview on IsSelected with multiple hierarchicaldatatemplates for different types
Here's a way I got to work to get a custom style only on selected items XML: <Window x:Name="window" x:Class="stackoverflowTreeview.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:t="clr-namespace:System;assembly=mscorlib" xmlns:this="clr-namespace:stackoverflowTreeview" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <this:testConv x:Key="testConv"/> <Style TargetType="TreeView"> <Setter Property="ItemTemplate"> <Setter.Value> <HierarchicalDataTemplate ItemsSource="{Binding Children}"> <ContentControl> <ContentControl.S

Categories : C#

Why width CSS attribute of label doesn't work without float?
The Label element is defaulted to inline display mode. Inline elements don't accept a width property, they will be rendered in the width of their content. Floated elements on the other hand, are like inline-blocks. they will accept a width property. By applying a float property to an element you are essentially changing it's display property to something like (but not exactly) inline-block.

Categories : HTML

Label doesn't work between lines if line-height greater 1
I'm not sure how valid it is and in which versions of HTML, but you can wrap the whole paragraph with the label. <label for="xx"> <p style="line-height: 2em;"> <input type="checkbox" id="xx" /> ... </p> </label> Demo: http://jsfiddle.net/2nFdq/1/

Categories : CSS

Updating text or html for label doesn't work and throws no errors
The following works fine for me. I think it is because you are using .html instead of .text for the select. IE: var selectedtext = $("#contact_types option:selected").text(); instead of var selectedtext = $("#contact_types option:selected").html(); DEMO: http://jsfiddle.net/abc123/jSfgn/3/ JS: Change: //find element that has generic text and assign an id. $('body :contains("change me dynamically")').contents().each(function () { var exp = /change me dynamically/; if (this.nodeValue && exp.test(this.nodeValue)) { var $parent = $(this).parent().attr('id', 'contactTypeLabel'); $parent.text(function(_, text){ return text.replace(exp, "Phone Number"); }); } }); TO: //find element that has g

Categories : Jquery

Highcharts x axis label text wrapping lost on setting label step
It's a bit of a hack, but you could replace each space in the name with <br /> by using the formatter: labels: { step: 1, formatter: function () { return this.value.replace(/ /g, '<br />'); } } It's not exactly what you want as it doesn't split the name according to the space available between ticks, but maybe you can improve the formatter to better suit your needs (splitting by a given n characters for example instead of by space). See it running here.

Categories : Highcharts

css position label text in the true center (vertical and horizontal) without moving the label
You can use line-height: 30px; to center a single line of text instead. The 30px needs to be the same value as the height of the element you wish to vertically center text in. Note: The fiddle has height:40px whereas the code in question has height:30px. Just choose the line-height to match the height. vertical-align would actually moving the entire <label> (and text) down but only applies to inline-level and table-cell elements. It is not applying in your case as the <label> is floated.

Categories : HTML

Xcode Autolayout: Place a label next to a dynamic label at a constant distance
Make sure that the spacing between your two labels is set to auto and that your days remaining label is left aligned. I suggest keeping a constraint between the trailing edge of your days remaining and the superview, but lowering the priority a bit. The goal there is to ignore it when the label should be far away from the superview, but not clip or go outside of the visible area when the date is very long. You may also need to increase the content hugging priority of the date label and/or decrease the compression resistance of your days remaining label. You may get better insight into what your labels are doing by setting the background color on them temporarily. The goal is to see how large your labels are, where the text is in the label, and where the spaces are. If there are lar

Categories : IOS

IOS Label Animation will not draw inside of label if changing the frame size
Ended up animating the image of the label / view. Here is the code, maybe will help someone. Assuming ARC and Quartz include. - (void) animateFromFrame:(CGRect)fromFrame toFrame:(CGRect)toFrame andView:(UIView*)view { UIGraphicsBeginImageContext(view.bounds.size); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageView* imageView = [[UIImageView alloc] initWithImage:image]; imageView.frame = fromFrame; imageView.layer.cornerRadius = 10; imageView.layer.borderWidth = 4; [self.view addSubview:imageView]; [UIView animateWithDuration:1.0 delay:0.25 options:nil animations: ^{ imageView.frame = toFrame; } completion:^ (BOOL finished) { [imageView

Categories : IOS

If input box is empty show label, if there is text, hide label
yes there is, use keyup() function.. $('#name').keyup(function(){ if($(this).val() == ''){ $(this).prev().show(); }else{ $(this).prev().hide(); } }); this is considering your label is always the previous element of textbox else you can use.. $('#name').keyup(function(){ if($(this).val() == ''){ $('label[for="name"]').show(); }else{ $('label[for="name"]').hide(); } }); this gets that particular label whose attribute for is name.

Categories : Jquery

How to show label with line and display label outside in piechart in extjs4.1
You've got the display option of the label config, that you can set to 'outside'. As for the lines, you'll have to draw them yourself... Which would be a quite involved hack IMO. If you're interested in trying, that takes place in Ext.chart.Label#renderLabels(), and uses Ext.chart.series.Pie's onCreateLabel() and onPlaceLabel() methods. Don't forget to take your trigonometry with you before diving in there!

Categories : Extjs

How can you drag and drop a list item to a label so it's the label's text in C#?
Test for correct type and then grab it: private void posLB_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.Text)) { String s = e.Data.GetData(DataFormats.Text) as String; if (!String.IsNullOrEmpty(s)) posLB.Text = s; } }

Categories : C#

Matlab label names won't work when decimals are in the names
The problem: You are building a 2D char matrix using ['0';' ';'0.5';' ';'1';' ';'1.5';' ';'2';' ';'2.5';' ';'3';' ';'3.5';' ';'4'] You are trying to define rows with 1 char (e.g., '0') and rows with 3 chars (e.g., '1.5'). Solution 1: Convert all rows to thress chars: [' 0 ';' ';'0.5';' ';' 1 ';' ';'1.5';' ';' 2 ';' ';'2.5';' ';' 3 ';' ';'3.5';' ';' 4 '] Solution 2: Use cell array instead of 2D char matrix (Note the curly braces): {'0';' ';'0.5';' ';'1';' ';'1.5';' ';'2';' ';'2.5';' ';'3';' ';'3.5';' ';'4'} This solution is better in terms of generalization and good practice.

Categories : Matlab

Click on Label and show Div (Label name change dynamically)
Try this HTML <label id="search">Advanced Search</label> <div id="searchContent" style="display:none;">Something</div> JavaScript $(function () { $("#search").click(function () { var text = $(this).text(); if (text === "Advanced Search") { $(this).text("Basic Search"); $("#searchContent").show(); } else { $(this).text("Advanced Search"); $("#searchContent").hide(); } }); }); Demo: http://jsfiddle.net/AM6Wz/

Categories : Jquery

UIButton title label transform cuts off label
The titleLabel property is primarily used to configure the text of the button, not its bounds. I don't think you can achieve what you want to achieve. If I understand you correctly, you make a button with a small width and big height in interface builder, then set the transformation on the label of the button to 90º, and then expect the button to behave as if the width became the height and vice versa. I suppose you could still set the button in interface builder, but make it horizontal, as if it's rotated -90º, and then set the transformation on the UIButton in viewDidLoad

Categories : Iphone

allow user to tap label and then tap buttons to edit label.text?
To know which UILabel has been touched add a tap gesture to each label which triggers an action. In that actions store which label has been touched in e.g. a property. For the buttons, just connect them to action methods (could also be a single one), inside these methods do your calculation and updated the label indicated by the property described above.

Categories : IOS

Labelling a grid using n labels, where every label neighbours every other label
You can experiment with a simple greedy algorithm. I don't think that I'm able to give you a strict mathematical prove, at least because the question is not strictly defined, but the algorithm is quite intuitive. First, if you have 1...K numbers (K labels) then you need at least K*(K-1)/2 adjacent cells (connections) for full coverage. A matrix of size NxM generates (N-1)*M+(M-1)*N=2*N*M-(N+M) connections. Since you didn't mention what you understand under 'smallest matrix', let's assume that you meant the area. In that case it is obvious that for the given area the square matrix will generate bigger number of connections because it has more 'inner' cells adjacent to 4 others. For example, for area 16 the matrix 4x4 is better than 2x8. 'Better' is intuitive - more connections and more c

Categories : Algorithm

Should i use Associatedcontrolid in label control to render label HTML tag?
The <label> element in html is a label for an <input> element. So the TextBox that is made as an <input> tag if it is associated with a asp:Label or ASPxLabel which is just an extention of the asp:Label will indicate to the .Net framework to translate it as a html <label> tag. In essence if you don't have a TextBox there is no point to translate the asp:Label to html tag. You had better add a new CSS class and format the span as you please if you don't want the TextBox. If you do want a TextBox, then you should add it to your ASPX file and assign to id the same ID attribute value with the AssociatedControlId value at your label.

Categories : C#

iOS 7: Misplaced View Frame for "Label - Label" will be different at run time
I had the same issue and I get below response form Apple: You need to update the constraints to match the frames of these views. I did the following: Editor -> Resolve Auto-Layout Issues -> Clear all constraints in ** view controller then I reordered my objects again in the view. PS: Try Enrico's solution first.

Categories : IOS

why is it not assigning the string to the label? or how do i get the value out of the array into the label?
cowid is clearly null here so has not been initialized. stringWithFormat shows this with the (null). You can have the confirmation by if (detalles.Cowid == nil) { NSLog(@"The Cow has no id"); }

Categories : IOS

Align Label and value like Label and Input with BootStrap
Bootstrap seems to expect form controls within class="controls" elements. It's a bit hacky but adding the following css rule should work div.controls p { margin-top:5px; }

Categories : CSS

Separate CSS for label checkbox to label input
You could write your css selector like this: label[for=Username] label[for=Live] You may also have a look at this thread: CSS Selector for selecting an element that comes BEFORE another element?

Categories : HTML

What is the difference between =label and [label] in ARMv6 assembly?
ldr r0,=something ... something: means load the address of the label something into the register r0. The assembler then adds a word somewhere in reach of the ldr instruction and replaces it with a ldr r0,[pc,#offset] instruction So this shortcut ldr r0,=0x12345678 means load 0x12345678 into r0. being mostly fixed length instructions, you cant load a full 32 bit immediate into a register in one instruction, it can take a number of instructions to completely load a register with a 32 bit number. Depends heavily on the number. For example ldr r0,=0x00010000 will get replaced by the gnu assembler with a single instruction mov r0,#0x00010000 if it is an ARM instruction, for a thumb instruction though it may still have to be ldr r0,[pc,#offset] These ldr rd,=things are a shortc

Categories : Assembly

Align 6 elements at 1 line (Label+Input, Label+Input, Label+Input)
If this is your raw HTML: <form action=""> <p>First Name</p> <input type="text" name="fname" /> <p>Middle Name</p> <input type="text" name="mname" /> <p>Last Name</p> <input type="text" name="lname" /> <p>Age</p> <input type="text" name="age" /> <p>Gender</p> <select name="gender"> <option value="male">Male</option> <option value="female">Female</option> </select> <p>Phone Number</p> <input type="text" name="fname" /> </form> You can use CSS to style the page. Check out this link. It utilizes CSS to create 2 rows ('walls') with 6 columns ('panels') in each row. http://jsfiddle.net/chiperific/kFr4h/ If y

Categories : HTML

How to grow label into scrollable label?
Without seeing your code, I can only speculate. But a common omission is failing to set the contentSize property of your UIScrollView after its content have changed or moved.

Categories : IOS

ios: fit cell with label in it to the size of the label
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; { NSString * datum = [[json_Array objectAtIndex:indexPath.row] objectForKey:@"datum"]; CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 20000.0f); CGSize size = [datum sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; CGFloat height = MAX(size.height, 77.0f); return height + (CELL_CONTENT_MARGIN * 2); } Consider a string wich is having max height then fit height for the cell .I considered datum string you implement according to your requirement

Categories : IOS

Put datatip stack on top of axis label and update axes label after a change was done on axes position
How about explicitly setting the z-position of the y-label via it's handle? If I put this after your loop it seems to work in R2012b: ylh = get(gca,'Ylabel') ylpos = get(ylh,'Position'); set(ylh,'Position',[ylpos(1:2) 0]); If I adjust the z-position I can get the y-label to pop up and even interleave between the datatips. I'm not completely sure if this is a bug or a feature, but sometimes there are workarounds to rendering issues that involve tweaking the position of an element slightly to get Matlab to recalculate and redraw the figure.

Categories : Matlab

How to make a text in a label as url, to move to webpage / make a call by click on a text in a label
It's pretty much all the same idea, all applications in iOS can be opened with using the format appShortName://whatyouwantToHandle, for websites its just http://myurl To make a call, it's tel: NSURL *phoneURL = [NSURL URLWithString:@"tel:+123456789"]; [[UIApplication sharedApplication] openURL:phoneURL]; To start composing an email, it's mailto:, and it supports GET parameters to fill-out the email. const NSString* mailFormat = @"mailto:%@?subject=%@&body=%@"; const NSString* mailEmails = @"person1@gmail.com,person2@gmail.com"; const NSString* mailBody = @"This is the mail body Hi!"); const NSString* mailSubject = @"This is the mail Subject!"; NSString *urlString = [NSString stringWithFormat:(NSString*)mailFormat,[mailEmails stringByAddingPercentEscapesUsingEncoding:NSUTF8S

Categories : Iphone

The object 'Label' already has a child and cannot add ''. 'Label' can accept only one child
Without having tested i, I suppose there's a bug in the definition of the attached property, because it is attached to the Helper class itself and not to Label. That way you just create a new instance of Helper in your labels content. When you then add the binding to the content as well, you get the exception, because there already is a content. I don't actually see a reason to make it an attached property anyway and binding to the attached property of self seems clumsy to me. Try the following; Make Helper.Text a normal dependency property by replacing RegisterAttached(...) with Register(...). (Rename helper to something like CompositeString.) Then define a CompositeString as a resource of the label and bind the content of the label to this resource: <Label> <Label.Resourc

Categories : Wpf

Javascript - How do I get a statement to work once, not work if it did it 1 time already, then work again?
You could use an auxiliary array with gets emptied from time to time, and refilled then. Leaving hp and stuff aside, it's something like: player.TALK=['you pwn the dragon','you kick the dragon','you eviscerate the dragon']; player.AUXTALK=player.TALK.slice(0); function killdragon(player) { var talkindex = Math.floor(Math.random() * player.AUXTALK.length); console.log(player.AUXTALK[talkindex]); delete player.AUXTALK[talkindex]; if (player.AUXTALK.length==0) player.AUXTALK=player.TALK.slice(0); }

Categories : Javascript

Node categories as label, as node or as label and node?
My two cents. For your kind of categories, I would go with a node per category and create a BELONGS_TO relationship from nodes belonging to that category. There are a number of reasons for this preference of mine. One of the reasons labels were added is that many people were putting a "type" property on nodes. Another way to talk about labels is that they add a little bit of a "schema" to your graph - in the sense that you can categorise nodes. With the introduction of labels, there's always the risk that they will be abused. It is just an extra tool in a database that is primarily designed for storing graphs. In an extreme case, you could use labels for almost everything, ending up with a store of "tagged" nodes. Finally, traversing relationships is the fastest thing Neo4j does. We're

Categories : Neo4j

Dynamically generated html links work in Firefox but does not work in Chrome
Have you ever tried the preventDefault ? You should use preventDefault which is the default behaviour when you click the link. Besides the links should not be inside the div #rContent ? You are using .on so the links should be inside the parent.

Categories : Jquery

Why does ssh connection to gitlab not work (while http push and clone work fine)?
Check the permissions on the .ssh folder. Login as the git user and set with sudo su - git chmod 700 ~/.ssh chmod 600 ~/authorized_keys If still having issues use the verbose output from ssh to gain more info ssh -v ssh -T git@my-server.com (Also it could be a selinux context issue if selinux is enabled and enforcing, see this blog)

Categories : Ubuntu

After switching from jquery-ui 1.8.x to 1.10.3, "tabs()" do not work as expected....--Is there a workaround to enable the "tab key" work again?
You need to use the full URL of the site in the hash links. Here's an example: <div id="loginTabs"> <ul class="nav nav-tabs"> <li><a href="<?php echo $_SERVER["REQUEST_URI"]; ?>#parent-login">Parent Login</a></li> <li><a href="<?php echo $_SERVER["REQUEST_URI"]; ?>#staff-login">Staff Login</a></li> <li><a href="<?php echo $_SERVER["REQUEST_URI"]; ?>#student-login">Student Login</a></li> </ul> <div id="parent-login"> <?php $this->showLoginForm("parent"); ?> </div> <div id="student-login"> <?php $this->showLoginForm("student"); ?> </div> <div id="staff-login">

Categories : Jquery

Why shellcodes with jmp instruction work, and why doesn't the labels work inside a C wrapper?
The address of mesg can vary depending on how your program is laid out in memory. The following will hard-code a specific address and will not work reliably (or at all): mov ecx, mesg For reference, the first approach hard-codes the following address: mov ecx, 0x804807d The second approach does work because it figures out the address of mesg at runtime, using the return address of a call instruction. Put another way, the first version only works if loaded at a specific address whereas the second is position-independent. It is worth noting that the jmp and the call instructions that appear in the second version use relative addressing, meaning that the opcodes specify the distance to the target rather than the address of the target. This makes these instructions work regard

Categories : Assembly

main program work good , but when put it into a function doesn't work pyQt
You aren't seeing any windows in the class based version because the function calls finalise and your PyQt objects are being garbage collected. In the simple first case you have, the variables containing your PyQt objects remain in scope for the duration. In this simple case, the easiest way to see this in action is store your PyQt objects in instance variables, ie. self.Frame and self.MainWindow to retain references to the object so that Python doesn't garbage collect them. Generally you would not work with PyQt in this fashion. You subclass the relevant object and do setup in the initialiser.

Categories : Python

Why doesn't a DOM2"click" event work, when it does work for "mouseover"?
As far as i can tell the link <a id="workID" href="#">WORK</a> is not bound to a click event handler. In the screenshot you can see that you have set several events, but on click is not set. In your main.js you are calling the function showWorkPane() but in this function you define no event handler for onClick: function showWorkPane() { var workID = document.getElementById("workID"); workID.addEventListener("mouseover", showWorkPaneHandler, false); // add an event handler for click } To address your question: Why doesn't a DOM2“click” event work, when it does work for “mouseover”? Well you have to bind both events (click and mouseover). And currently i am looking into your code and it looks like that the eventhandler onmouseout which fires hideWorkP

Categories : Javascript

Same url, work like reference to style, but doesn't work like AJAX call
The simplest answer will be to use a local web server like WAMP(or IIS) if you are not already. the second answer is Chrome and Safari has a restriction on using ajax with local resources. That's why it's throwing an error like Origin null is not allowed by Access-Control-Allow-Origin. Solution: Use firefox or upload your data to a temporary server. If you still want to use Chrome, start it with the below option; --allow-file-access-from-files More info how to add the above parameter to your Chrome: Right click the Chrome icon on your task bar, right click the Google Chrome on the pop-up window and click properties and add the above parameter inside the Target textbox under Shortcut tab. It will like as below; C:UsersXXX_USERAppDataLocalGoogleChromeApplicationchrome.exe --al

Categories : CSS

IIS php Mysql - databse insert value work on XAMPP & WAMP but does not work on IIS
The MySQL user being used to interact with the database may not have the INSERT Grant for that database. WAMP and XAMPP are both using a mysql user with defined privileges. Have you created the same user with the same privileges on the newly created MySQL instance on your Windows 2008 server? You may consider reading over the MySQL Grant syntax. Utilizing mysql_error() for error trapping could prove useful for troubleshooting as well.

Categories : PHP



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