w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
WPF Relative source- Cannot find source for binding with reference
context menu is not part of the visual tree, so you use PlacementTarget within your binding <ContextMenu DataContext="{Binding Path=PlacementTarget.DataContext, RelativeSource=Self}" /> this would use the DataContext of the DataGrid

Categories : Wpf

Excel: find matching text against reference and paste corresponding values from reference
Name A:D in Worksheet 2 (say array) and apply =VLOOKUP($N2,array,COLUMN()-13,FALSE) in O2 of Worksheet 1 (assuming the top e is in N2) and copy across and down as required.

Categories : Excel

Update reference without decompiling source?
You can disassemble your assembly to IL-code using ildasm. You can use the following command: ildasm.exe <YourAssembly> /output:YourAssemblyILCode.il Now your can change assembly reference (version and public key token) in IL-code. References to external assembly in IL code looks like this: .assembly extern System { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) .ver 2:0:0:0 } Then you can assemble corrected IL-file to .NET assembly using ilasm.exe

Categories : C#

Reference position in CollectionView IOS
First, you should not have your property names start with a capital letter. They are not classes. Better use collectionView. Second, make sure your collection view is wired up with the appropriate controller in storyboard. You need to connect it to the delegate and datasource properties. Make sure the view controller implements these protocols.

Categories : IOS

Which reference source does include Microsoft.VisualBasic?
I found this site a while ago, with the source code to nearly (if not all) classes in the .NET Framework including comments and everything. This site might also help, as it shows the classes and namespaces in a pretty easy to read format.

Categories : Dotnet

Position div with center as reference point?
How about this? Compare these two fiddles using the CSS below fiddle1 & fiddle2 HTML <div id="parent"> <div id="anchor"> <div id="child"> <h1>Some text</h1> </div> </div> </div> CSS #parent { position: relative; width: 100%; height: 100%; } #anchor { position: absolute; right: 33%; bottom: 33%; } #child { padding: 10px; margin-right: -50%; float: right; }

Categories : CSS

Change the reference point for CSS position
You need to put the point inside the square, then give the square position: relative. The position of the point will then be relative to the square (i.e. left will be the distance from the left edge of the square.) #point { position: absolute; top: 50%; left: 50%; } #square { position: relative; border: solid black 1px; height: 100px; width: 100px; position: absolute; top: 50%; left: 50%; } <div id="square"> <div id="point">+</div> </div> If you want to use a different corner for positioning, use the right or bottom properties instead of left or top. If you wish to position from the center, do what I suggested with the square, but give it a 0 width and height. The square will now be at the center and the point is positioned relative to it. Obviously you

Categories : HTML

How do you correctly reference a dynamic list for the source of an Excel ComboBox?
You need to get the range specified by the text in cell D10, not just get the range D10. change your code to: Supplier.RowSource = Range(Worksheets("Input").Range("D10").Value)

Categories : Excel

Dead code and/or how to generate a cross reference from Haskell source
I don’t know of such a tool, so in the past I have done a bit of a hack instead. If you have a comprehensive test suite, you can run it with GHC’s code coverage tracing enabled. Compile with -fhpc and use hpc markup to generate annotated source. This gives you the union of unused code and untested code, both of which you would probably like to address anyway. SourceGraph can give you a bunch of information which you may also find useful.

Categories : Haskell

System.Windows.Data Error: 4 : Cannot find source for binding with reference
Your code looks about right... have you tried the Binding expression without the optional AncestorLevel=1? I generally use this kind of Binding, but I never bother with the AncestorLevel property because it could cause an error if it is set wrong, or if the XAML was ever changed. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}}, Path=IsEnabled}" Value="False"> <Setter Property="UIElement.Opacity" Value="0.3" /> </DataTrigger>

Categories : C#

How should a library source file reference a string resource in its parent project?
This is exactly what I do for many of my projects. Just make sure your library project has all the default set of strings defined in it, otherwise you won't be able to reference them, since the library does not know about the "parent". Then override them in your "parent" projects. You only need to override the ones that are different from default, otherwise it will take the value from the library project. Hope that makes sense. Edit: By the way you can reference booleans like so: <bool name="allow_feature_x">true</bool> and then access getResources().getBoolean(R.bool.allow_feature_x);

Categories : Android

EM_EXGETSEL does not relate to text selection order. How do I do determine the caret position in a piece of selected text?
There's no easy way to do this. EM_GETSEL and EM_EXGETSEL return the range of the current selection. Only if there is no selection do they return the position of the caret. Note that the caret can't be in a block of selected text - it is always at the end or beginning. You could probably implement a solution fairly easily by sub-classing the control, and using EM_GETSEL to query and store the position of the caret after any key or mouse input. E.g. LRESULT WINAPI EditControlSubclassProc(...) { LRESULT lRes = CallWindowProc(...); // call original window procedure if ((uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST) || (uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST)) { DWORD dwStart, dwEnd; SendMessage(hWnd, EM_GETSEL, (WPARAM)&d

Categories : C++

Reference, Include, Library, Source paths based on active solution configuration
You must use project configurations for that purpose, not solution configurations. Every project configuration can have different project properties, either set via .props files or in the project file itself.

Categories : C#

How to find all reference of a Class/Method in all source code AND referenced dll in visual studio?
You can find this if you install Resharper: Expand the References and choose Find code Dependent on Module The results then appear like:

Categories : C#

Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='MahApps.Metro.Controls.Glow', AncestorLevel='1''
It sounds like a binding error related to your global styles, templates, or user-controls. I wrote up something about debugging binding errors here. To summarize, it's easiest if you add line-breaks at the semi-colons and commas, and read the error backwards Do that with your error, and you get this: target property is 'Color' (type 'Color') target element is 'SolidColorBrush' (HashCode=9047482); DataItem=null; Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='MahApps.Metro.Controls.Glow', AncestorLevel='1''. BindingExpression:Path=GlowColor; It tells you that: Somewhere you have a Color property causing a binding error. That property is on a SolidColorBrush object The DataContext of that item is null. And the binding it

Categories : C#

Alter Drupal 7 Text list values when you don't know position of text list in form array
For your use case, i suggest you try creating a field widget. Tutorial 1a also example modules for developers contains excellent code (with documentation) which you can modify to suit your need. You would have to look at field_example module. In many cases you may want to even provide a display formatter along with your field widget, so if you want to alter the output of a field without any prior knowledge of how and where its going to be used, then you need to create a custom field formatter. Tutorial 2a Tutorial 2b

Categories : Drupal

Grabbing text from html source
You could change ... tot=`wget -qO- $URL1 | grep -i PlayerCount | cut -d> -f4 | cut -d< -f1 | sed -e's/,//'` ... to ... tot=`wget -qO- $URL1 | grep -i playercount | cut -d> -f5 | cut -d< -f1 | sed -e's/,//'` ... that is if you are in a hurry. Otherwise you might want to follow tripleee's advice. Who knows you might get an award from the ACM :-)

Categories : Shell

Reformatting source code with Text I/O
If I read your question correctly, all you need is keeping track of previous line, and current line. Since you're learning, I'll just give you rough outline: If current line contains just brace and whitespace, then forget the current line, add space and brace to previous line, and keep it as previous line. Else write previous line to output, set current line to be the previous line. Read new current line and repeat above, until end of input file. Try changing your code to match that, reading line by line. You can detect if line is { either by trimming and comparing to "{", or with regexp like "^\s*\{\s*$" (untested). Note: this is the simplest possible version, which assumes the movable is brace alone on a line.

Categories : Java

How To Get Website Source As Raw Text Jquery
By using file_get_contents or Curl. <?php echo '<div id="divname">' . htmlspecialchars(file_get_contents('http://example.com')) . '</div>';

Categories : PHP

Position some text behind a div
Try with: .dropzone { background: silver; height: 300px; padding: 5px; border: 2px solid rgb(255, 165, 0); opacity: 0.8; } and $span.css('z-index', -1); Or add this CSS rule to bright: .bright{ z-index: -1; } DEMO

Categories : Javascript

regex for identifying asp.net (and others) controls in source text
What about <asp:(w+)s+.*?id="(w+)" Where the first group is the control type and the second one is its id. You can see a working example here (the page was taken from an example found on the msdn).

Categories : C#

How to set position of element with text
I think you need for your .starburst5: position: absolute; top: 0; right: 0; Dont forget to delete attribute with position: relative; from html-element and css.

Categories : HTML

Is there a way to download a PHP/ASP/whatever source code without processing it, as plain text?
There is a way to issue such request that downloads the source code of http://example.com/test.php if the server is configured to provide a URL to do so. Usually it isn't, so usually there is no way to issue such a request.

Categories : Http

Paste image into XML / Source code / plain text?
The most common way to handle images (or other large blocks of non-XML data) in XML is to use a URI to reference some location from which the application code can fetch the data as a separate document. The XHTML tag is a good example of this. XML editors don't generally support uuencoding images because that is a much less common solution. It can certainly be done, if your application code knows to expect data in that form, but there isn't a lot of demand for it. As far as maintaining the association between markup and external data... Generally, unless the tool has a move-external-data operation built into it, that's going to be your responsibility, just as it would be for HTML or other markup which references external data. I can't advise you regarding tools since (a) picking a tool

Categories : Xml

getting HTML source or markdown text from the KDE clipboard with PySide
This can be done via recent versions of xclip which support the -t text/html (target selection) and pandoc to convert html to markdown. See the details: Save HTML from clipboard as markdown text - Unix & Linux Stack Exchange Thanks to @mountainx for asking again on the Unix stackexchange, which provided this solution, as noted in a comment above.

Categories : Python

C# Reading text or source code from tab in a browser - need an idea
You could use Win32 API calls to do this. FindWindowEx, GetWindowText, etc. http://msdn.microsoft.com/en-us/library/windows/desktop/ff468919(v=vs.85).aspx

Categories : C#

Row text moves up when row is deselected in NSOutlineView source list
Are you using autolayout? I've seen this sort of thing happen when I forgot to constrain at least two of a table cell view subview's top, bottom, or height. Something about table and outline views tends to make ambiguous layouts act up.

Categories : Osx

Extract text/data from html source code
I'm going to assume you're doing it in Ruby or Javascript, because you didn't specify and those are the languages I know how to do it in best. In Ruby, you'd first install the Nokogiri gem via gem install nokogiri And your code would look something like this: require 'nokogiri' require 'open-uri' doc = Nokogiri::HTML(open('http://your-url.example.com/foo/bar)) value = doc.css('span.code'); p value For Javascript, you can use jQuery (not really sure how to do it without). var value = $('span.code').value;

Categories : HTML

Reference text location with css
You cannot position something in against the text inside an html element, only against the element itself. You could however (if you want to go this far) calculate the size of the element, find its positioning and its text alignment and do math to figure out where to put your newly inserted element. You could theoretically count the characters in the element, get their font size and calculate their length in pixels. I can't demonstrate the calculations because you haven't provided your business rules <div> <div style="text-align:right">Content</div> </div> <script> function insertNewElement(element, newElement){ //element is a jquery object referencing the element you're inserting against and newElement is the one you're inserting var offset =

Categories : Javascript

How to set listview button text according to the position?
Change the logic to this: if (position==2 || position==3) { text.setText("Invited"); } else if (position==5 || position==8) { text.setText("Sent"); } else { text.setText("Invite"); } Because of view recycling, without the fallback "else" you will get the wrong text in the wrong rows.

Categories : Android

Text squashed when using position: absolute;
This is a good question because it highlights an important aspect of absolutely positioned elements. If you don't specify the width of an absolutely positioned element, or if you don't specify the left and right offsets, then the width is computed to be a shrink-to-fit width similar to what is done for table cells. The details are given in the CSS specification, Chapter 10: http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width There are also some subtle consequences when you place an absolutely positioned element such that it triggers an overflow condition or when one of the edges if out of the view port. In these cases, a absolutely positioned block may have a computed width smaller than you specified. The key is to consider what type and how much content the block will hold

Categories : CSS

How can read text file from position
The read command lets you take in the next character. Use a loop to take in characters // reads and prints BufferedReader int Alength = 10; int array[] = new int [Alength]; int value = 0; int index = 0; while((value = br.read()) != -1 && index < Alength) { array[index++] = value; }

Categories : Java

Calculating xy-position of text selection
You can use getClientRnge: var element = document.getElementById('element') element.onmouseup = function(){ var selection = document.getSelection(), range = selection.getRangeAt(0), clientRects = range.getClientRects() console.log(clientRects) } http://jsfiddle.net/XjHtG/ This will return the left, right, top, bottom, width and height of all selections made.

Categories : Javascript

Position image properly with text
Try uploading a fiddle next time, I think this should fix it though: #profilebar { float: right; padding-right: 10px; display: table-cell; vertical-align: middle; }

Categories : HTML

How to position a block of text on the same line
Like this? <html> <head> <style type="text/css"> .qa b { font-size: 50px; } .qa .answer_box { margin-left: 90px; display: inline; } .qa p { font-size: 25px; display: block; } .answer_box p { margin-left: 50px; } </style> </head><body> <div class="qa"> <div class="question"> <b>Q</b> &nbsp; <p style="display: inline-block;"> Do you believe in SEO? </p> </div> <div class="answer"> <b>A</b> <div class="answer_box"> <p style="display: inline-block;"> Yes I Do

Categories : CSS

Getting pixel position of a text in an image
If I understood you right you want to move your mouse and click on the screen. That not that hard you could use the robot class from Java! For example: Robot rob = new Robot(); rob.keyPress( KeyEvent.VK_ENTER ); or what ever, there are so much bottons and movements you could with it. A list of all methods you find here. And your other question I can't answer. I think there is no API that is able to search a text and give you the position. But what I know is that the robot class is able to capture the screen and put it into a BufferedImage. With it you could compare two pictures. Maybe you could get use of this but I don't know if it is what you search.

Categories : Java

How to delete/replace a text[] value in any position
If you want delete element 'second tag' from array, you can do this: select page_id, array(select arr from unnest(tags) as arr where arr <> 'second tag') from test_page; May be there're more efficient ways to do this, don't know yet.

Categories : Arrays

Position text inside rectangle
I'm afraid the solution will require quite a bit more code, hopefully this is something you can adjust so that the code is formatted for you properly. I believe the best way will be to change your rectangles to be "text frames" so that they can contain text, and text within them can be aligned based on the rectangle/text-frame bounds. Define Paragraph Styles First, you'll have to declare a "Paragraph Style" (similar conceptually to CSS) for how you want the text within each of these boxes to be formatted (font, size, color, etc): <RootParagraphStyleGroup Self="myPara"> <ParagraphStyle Self="ParagraphStyle/myParaStyle" Name="myParaStyle" FillColor="Color/Paper" PointSize="14" Justification="CenterAlign"> <Properties> <AppliedFont type="string"

Categories : Xml

input type text not going in the same position?
You can give the proper styles to label: label { display: inline-block; width: 120px; text-align: right; } Here you make label display as a inline block element, give it exact width, and make text align to right. Hence, you get the inputs nicely aligned under each other. Btw, it's not good to style all labels like this. You'd better give some id to the form and use #myForm label as the selector. See in fiddle

Categories : CSS

how to set CATextLayer text vertical position?
As per CATextLayer's documentation, there is no option to vertically align a text. The only option is to reposition the text layer so as to align well with the label. Here's the code to achieve the same CGFloat offsetY = 0; UIFont *textFont = [UIFont systemFontOfSize:14.0f]; //if system version is grater than 6 if(([[[UIDevice currentDevice] systemVersion] compare:@"6" options:NSNumericSearch] == NSOrderedDescending)){ offsetY = (textFont.capHeight - textFont.xHeight); } self.textLayer = [CATextLayer layer]; self.textLayer.backgroundColor = [UIColor greenColor].CGColor; self.textLayer.frame = CGRectMake(70, 90+offsetY, 50, 20); [self.view.layer addSublayer:self.textLayer]; [self.textLayer setContentsScale:[UIScreen mainScreen].scale]; [self.textLayer setForegroundColor: [UIColor blac

Categories : IOS



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