Search Results

Search found 5942 results on 238 pages for 'named anchor'.

Page 3/238 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Javascript to handle manipulating url anchor for bookmarking

    - by ajma
    Hello, I'd like to use the anchor part of the url (after the #) so that my page can have ajax/dhtml but still be able to have bookmarks work properly. I'm wondering is someone can help me get started on writing some javascript code for this. I'm using jQuery, but if the solution's a generic one, that's fine too. For my page, I could have settings like: "a" could be a number from 10-50 "b" is a 0 or 1 "c" is a 0 or 1 etc... I'd like some tips on writing optimized javascript code which could both parse and set something like #a=23&b=0&c=1 Also, I'd like to keep my url as short as possible, so if the default of "a" was 23, in the example above, the a=23 would be omitted. Is there a library that does all this stuff already?

    Read the article

  • Universal control - simple question about dock and anchor

    - by Vytas999
    I use Visual Studio .NET to develop internal applications. I create a Windows control that will display custom status bar information. Different developers will use the control to display the same information in many different applications. The control must always be displayed at the bottom of the parent form in every application. It must always be as wide as the form. When the form is resized, the control should be resized and repositioned accordingly. How should I do that in the best way and why? A)Create a property to allow the developers to set the Dock property of the control. Set the default value of the property to AnchorStyle.Bottom. B) Create a property to allow the developer to set the Anchor property of the control. Set the default value of the property to AnchorStyle.Bottom.

    Read the article

  • Programmatically scroll to an Anchor Tag

    - by Anders
    Consider the following code: <a href="#label2">GoTo Label2</a> ... [content here] ... <a name="label0"></a>More content <a name="label1"></a>More content <a name="label2"></a>More content <a name="label3"></a>More content <a name="label4"></a>More content Is there a way to emulate clicking on the "GoTo Label2" link to scroll to the appropriate region on the page through code? EDIT: An acceptable alternative would be to scroll to an element with a unique-id, which already exists on my page. I would be adding the anchor tags if this is a viable solution.

    Read the article

  • Get list of named queries in NHibernate

    - by Dan
    I have a dozen or so named queries in my NHibernate project and I want to execute them against a test database in unit tests to make sure the syntax still matches the changing domain/database model. Currently I have a unit test for each named query where I get and execute the query, for example: IQuery query = session.GetNamedQuery("GetPersonSummaries"); var personSummaryArray = query.List(); Assert.That(personSummaryArray, Is.Not.Null); This works fine, but I would like to have one unit test that loops thru all of the named queries and executes them. Is there a way to discover all of the available named queries? Thanks Dan

    Read the article

  • Named arguments in Mathematica.

    - by dreeves
    What's the best/canonical way to define a function with optional named arguments? To make it concrete, let's create a function foo with named arguments a, b, and c, which default to 1, 2, and 3, respectively. For comparison, here's a version of foo with positional arguments: foo[a_:1, b_:2, c_:3] := bar[a,b,c] Here is sample input and output for the named-arguments version of foo: foo[] --> bar[1,2,3] foo[b->7] --> bar[1,7,3] foo[a->6, b->7, c->8] --> bar[6,7,8] It should of course also be easy to have positional arguments before the named arguments.

    Read the article

  • Beware when using .NET's named pipes in a windows forms application

    - by FransBouma
    Yesterday a user of our .net ORM Profiler tool reported that he couldn't get the snapshot recording from code feature working in a windows forms application. Snapshot recording in code means you start recording profile data from within the profiled application, and after you're done you save the snapshot as a file which you can open in the profiler UI. When using a console application it worked, but when a windows forms application was used, the snapshot was always empty: nothing was recorded. Obviously, I wondered why that was, and debugged a little. Here's an example piece of code to record the snapshot. This piece of code works OK in a console application, but results in an empty snapshot in a windows forms application: var snapshot = new Snapshot(); snapshot.Record(); using(var ctx = new ORMProfilerTestDataContext()) { var customers = ctx.Customers.Where(c => c.Country == "USA").ToList(); } InterceptorCore.Flush(); snapshot.Stop(); string error=string.Empty; if(!snapshot.IsEmpty) { snapshot.SaveToFile(@"c:\temp\generatortest\test2\blaat.opsnapshot", out error); } if(!string.IsNullOrEmpty(error)) { Console.WriteLine("Save error: {0}", error); } (the Console.WriteLine doesn't do anything in a windows forms application, but you get the idea). ORM Profiler uses named pipes: the interceptor (referenced and initialized in your application, the application to profile) sends data over the named pipe to a listener, which when receiving a piece of data begins reading it, asynchronically, and when properly read, it will signal observers that new data has arrived so they can store it in a repository. In this case, the snapshot will be the observer and will store the data in its own repository. The reason the above code doesn't work in windows forms is because windows forms is a wrapper around Win32 and its WM_* message based system. Named pipes in .NET are wrappers around Windows named pipes which also work with WM_* messages. Even though we use BeginRead() on the named pipe (which spawns a thread to read the data from the named pipe), nothing is received by the named pipe in the windows forms application, because it doesn't handle the WM_* messages in its message queue till after the method is over, as the message pump of a windows forms application is handled by the only thread of the windows forms application, so it will handle WM_* messages when the application idles. The fix is easy though: add Application.DoEvents(); right before snapshot.Stop(). Application.DoEvents() forces the windows forms application to process all WM_* messages in its message queue at that moment: all messages for the named pipe are then handled, the .NET code of the named pipe wrapper will react on that and the whole process will complete as if nothing happened. It's not that simple to just say 'why didn't you use a worker thread to create the snapshot here?', because a thread doesn't get its own message pump: the messages would still be posted to the window's message pump. A hidden form would create its own message pump, so the additional thread should also create a window to get the WM_* messages of the named pipe posted to a different message pump than the one of the main window. This WM_* messages pain is not something you want to be confronted with when using .NET and its libraries. Unfortunately, the way they're implemented, a lot of APIs are leaky abstractions, they bleed the characteristics of the OS objects they hide away through to the .NET code. Be aware of that fact when using them :)

    Read the article

  • Achieve Named Criteria with multiple tables in EJB Data control

    - by Deepak Siddappa
    In EJB create a named criteria using sparse xml and in named criteria wizard, only attributes related to the that particular entities will be displayed.  So here we can filter results only on particular entity bean. Take a scenario where we need to create Named Criteria based on multiple tables using EJB. In BC4J we can achieve this by creating view object based on multiple tables. So in this article, we will try to achieve named criteria based on multiple tables using EJB.Implementation StepsCreate Java EE Web Application with entity based on Departments and Employees, then create a session bean and data control for the session bean.Create a Java Bean, name as CustomBean and add below code to the file. Here in java bean from both Departments and Employees tables three fields are taken. public class CustomBean { private BigDecimal departmentId; private String departmentName; private BigDecimal locationId; private BigDecimal employeeId; private String firstName; private String lastName; public CustomBean() { super(); } public void setDepartmentId(BigDecimal departmentId) { this.departmentId = departmentId; } public BigDecimal getDepartmentId() { return departmentId; } public void setDepartmentName(String departmentName) { this.departmentName = departmentName; } public String getDepartmentName() { return departmentName; } public void setLocationId(BigDecimal locationId) { this.locationId = locationId; } public BigDecimal getLocationId() { return locationId; } public void setEmployeeId(BigDecimal employeeId) { this.employeeId = employeeId; } public BigDecimal getEmployeeId() { return employeeId; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getFirstName() { return firstName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getLastName() { return lastName; } } Open the sessionEJb file and add the below code to the session bean and expose the method in local/remote interface and generate a data control for that. Note:- Here in the below code "em" is a EntityManager. public List<CustomBean> getCustomBeanFindAll() { String queryString = "select d.department_id, d.department_name, d.location_id, e.employee_id, e.first_name, e.last_name from departments d, employees e\n" + "where e.department_id = d.department_id"; Query genericSearchQuery = em.createNativeQuery(queryString, "CustomQuery"); List resultList = genericSearchQuery.getResultList(); Iterator resultListIterator = resultList.iterator(); List<CustomBean> customList = new ArrayList(); while (resultListIterator.hasNext()) { Object col[] = (Object[])resultListIterator.next(); CustomBean custom = new CustomBean(); custom.setDepartmentId((BigDecimal)col[0]); custom.setDepartmentName((String)col[1]); custom.setLocationId((BigDecimal)col[2]); custom.setEmployeeId((BigDecimal)col[3]); custom.setFirstName((String)col[4]); custom.setLastName((String)col[5]); customList.add(custom); } return customList; } Open the DataControls.dcx file and create sparse xml for customBean. In sparse xml navigate to Named criteria tab -> Bind Variable section, create two binding variables deptId,fName. In sparse xml navigate to Named criteria tab ->Named criteria, create a named criteria and map the query attributes to the bind variables. In the ViewController create a file jspx page, from data control palette drop customBeanFindAll->Named Criteria->CustomBeanCriteria->Query as ADF Query Panel with Table. Run the jspx page and enter values in search form with departmentId as 50 and firstName as "M". Named criteria will filter the query of a data source and display the result like below.

    Read the article

  • Named pipe is not flushing in Python

    - by BrainCore
    I have a named pipe created via the os.mkfifo() command. I have two different Python processes accessing this named pipe, process A is reading, and process B is writing. Process A uses the select function to determine when there is data available in the fifo/pipe. Despite the fact that process B flushes after each write call, process A's select function does not always return (it keeps blocking as if there is no new data). After looking into this issue extensively, I finally just programmed process B to add 5KB of garbage writes before and after my real call, and likewise process A is programmed to ignore those 5KB. Now everything works fine, and select is always returning appropriately. I came to this hack-ish solution by noticing that process A's select would return if process B were to be killed (after it was writing and flushing, it would sleep on a read pipe). Is there a problem with flush in Python for named pipes?

    Read the article

  • Whats the significance of named scope in rails?

    - by piemesons
    Before going for details. Question 1:-- Whats the meaning of scope here (ie named scope)? whats the benefits of using named scope? Now:- from agile development with rails book:-- class Order < ActiveRecord::Base named_scope :last_n_days, lambda { |days| {:conditions => ['updated < ?' , days] } } named_scope :checks, :conditions => {:pay_type => :check} end Such a named scope would make finding the last weeks worth of orders a snap. orders = Orders.last_n_days(7) Scopes can also be combined orders = Orders.checks.last_n_days(7) why we are using named_scope here. We can do the same using methods. Whats special thing we got using named_scope.

    Read the article

  • Anchor tags and target behaviour? - HTML

    - by RadiantHex
    Hi folks, I must say that despite this being a newb question, I don't think I have totally mastered HTML a tags. Whenever I want to open a link in a new tab I add target="_blank", works fine in chrome and firefox. Not in IE7-8. I think the behaviour might have something to do with the DOCTYPE, but I'm not entirely sure. I'm currently using HTML 4.01 Strict. Right now what I am trying to understand is: How to open links in new tabs in IE7-8 How to open links within small windows Help would be very much appreciated! :)

    Read the article

  • HTML Option Tag with Value set as an Anchor

    - by Craig
    Hello, I am updating some super legacy code and I am unsure how to make this HTML5 compatible. <option value='<a href='http://localhost:8080/dm?id=&#037;&#037;SUBSCRIBER_ID_TAG&#037;&#037;'>View in a browser window</a>'>Display Message(HTML Version)</option> I personally have never run across something like that so any help would be great.

    Read the article

  • jquery anchor click doesn't seem to work....

    - by Pandiya Chendur
    Here is function , <script type="text/javascript"> $(document).ready(function() { getRecordspage(1, 5); $("a.page-numbers").click(function() { alert(1); getRecordspage($(this).text(), 5); return false; }); }); And in my page i am appending anchors dynamically to this div, <div id="pager" class="pager"> //my anchors will be present here... </div> i am appending anchors dynamically... All anchors will have class="page-numbers"... How it can be done... When inspected through firebug my pager div had this when i clicked 3, <div class="pager" id="pager"> <a class="page-numbers prev" href="#">Prev</a> <a class="page-numbers" href="#">1</a> <a class="page-numbers" href="#">2</a> <span class="page-numbers current">3</span> <a class="page-numbers" href="#">4</a> <a class="page-numbers next" href="#">Next</a></div>

    Read the article

  • disable .click function on an anchor in jquery

    - by user554014
    This is written in an external .js with jquery... I have two windows that slide in and out of view like: $(document).ready(function() { // hides gallery1 as soon as the DOM is ready $('#gallery1').hide(); // shows the menu on click $('#showgal1').click(function() { $('#gallery1').delay(490).show('slide', {direction:'left'}); $('#gallery2').hide('slide', {direction:'right'}); //need code to disable showgal1 and enable showgal2 }); $('#showgal2').click(function() { $('#gallery2').delay(490).show('slide', {direction:'right'}); $('#gallery1').hide('slide', {direction:'left'}); //need code to disable showgal2 and enable showgal1 }); }); 'gallery1' and 'gallery2' are DIV's with flash image galleries and 'showgal1' and 'showgal2' are id's of anchors... looks like <a href="#" id="showgal1">gallery 1</a> I cannot find a way to disable the .click function when one is clicked and re-enable the other... i want to disable 'showgal1' by default and when 'showgal2' event takes place it removes the attribute and makes 'showgal2' disabled until 'showgal1' is clicked... the .attr('disabled','disabled') hasn't worked yet...

    Read the article

  • Optional parameters with named query in Hibernate?

    - by Ickster
    Is there any way to specify optional parameters (such as when search parameters are provided from a form and not all parameters are required) in a named query when using Hibernate? I'm using a native SQL query, but the question is probably applicable to named HQL queries as well. I'm pretty sure the answer to this is 'no', but I haven't find the definitive answer in the documentation yet.

    Read the article

  • Python Wildcard Import Vs Named Import

    - by Dan
    Ok, I have some rather odd behavior in one of my Projects and I'm hoping someone can tell me why. My file structure looks like this: MainApp.py res/ __init__.py elements/ __init__.py MainFrame.py Inside of MainFrame.py I've defined a class named RPMWindow which extends wx.Frame. In MainApp.py this works: from res.elements.MainFrame import * And this does not: from res.elements.MainFrame import RPMWindow I realize that the wild card import won't hurt anything, but I'm more interested in understanding why the named import is failing when the wild card succeeds.

    Read the article

  • Reading/writing from named pipes under mono/Linux

    - by weismat
    I would like to read/write from a named pipe/FIFo queue under Linux. I have tried the standard classes StreamWriter and other classes from System.IO, but it fails because it is using seek. Has anyone ever written/read from a named pipe using Mono?. I am managing to read and write - but not the same time...

    Read the article

  • How to call Named Query

    - by sandeep
    I wrote a named query in the entity class Voter NamedQuery(name = "Voter.findvoter", query = "SELECT count(*) FROM Voter v WHERE v.voterID = :voterID" and where v.password= : password), I want to call this named query and I also need to set voterID and password. Can you help me. Thank you

    Read the article

  • Error in Bind9 named.conf file. Bind won't start.

    - by tj111
    I'm trying to setup a DNS server on an Ubuntu Server machine (10.04). I configured an entry in named.conf.local to test it, but when trying to restart bind9 I get the following error: * Starting domain name service... bind9 [fail] So I checked the output of syslog and this is what I get. May 20 18:11:13 empression-server1 named[4700]: starting BIND 9.7.0-P1 -u bind May 20 18:11:13 empression-server1 named[4700]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS=' May 20 18:11:13 empression-server1 named[4700]: adjusted limit on open files from 1024 to 1048576 May 20 18:11:13 empression-server1 named[4700]: found 4 CPUs, using 4 worker threads May 20 18:11:13 empression-server1 named[4700]: using up to 4096 sockets May 20 18:11:13 empression-server1 named[4700]: loading configuration from '/etc/bind/named.conf' May 20 18:11:13 empression-server1 named[4700]: /etc/bind/named.conf:10: missing ';' before 'include' May 20 18:11:13 empression-server1 named[4700]: loading configuration: failure May 20 18:11:13 empression-server1 named[4700]: exiting (due to fatal error) So it thinks I have an error in the default named.conf file, which is pretty ridiculous. I went through it and deleted a blank line just for the hell of it, but I can't see how it figures there's an error in there. Note that before this I did have an error in named.conf.local, but it showed up properly in syslog and I fixed it, so it is reporting the correct file. Here is the contents of named.conf: // This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones";

    Read the article

  • Named Range Breaks Code

    - by Daniel
    I have one workbook with several sheets. I populate the listboxes (pulling static data from cells) on the 2nd sheet, click a button and it runs fine. When I populate the listboxes with a named range, the listbox populates the way I want, but I get an error because the code thinks that I didn't select anything in the listbox, even though I did. So it passes through "" instead of "title". Is this a common issue? The named range isn't a problem because it passes through the data to the listbox and I know it's selecting data because as soon as the listbox loses focus, it spits out the contents of the cell into cell A1. What's even stranger is that I have the contents of the listbox set to Msg1. So A1 gets populated with Msg1 (what I actually selected in the listbox). But when I try and use Msg1 in the code, it tells me that Msg1 is "". Again, this only happens when I use the dynamic named range, not with static data in cells K1:K9. Private Function strEndSQL1 As String Dim strSQL As String strSQL = "" 'Create SQL statement strSQL = "FROM (SELECT * FROM dbo.Filter WHERE ID = " & TextBox1.Text & " And Source IN (" & Msg1 & ")) a FULL OUTER JOIN " strSQL = strSQL & "(SELECT * FROM dbo.Filters WHERE ID = " & TextBox2.Text & " And Source IN (" & Msg1 & ")) b " strSQL = strSQL & "ON a.Group = b.Group strEndSQL = strSQL End Function

    Read the article

  • Problem with anchor tags in Django after using lighttpd + fastcgi

    - by Drew A
    I just started using lighttpd and fastcgi for my django site, but I've noticed my anchor links are no longer working. I used the anchor links for sorting links on the page, for example I use an anchor to sort links by the number of points (or votes) they have received. For example: the code in the html template: ... {% load sorting_tags %} ... {% ifequal sort_order "points" %} {% trans "total points" %} {% trans "or" %} {% anchor "date" "date posted" %} {% order_by_votes links request.direction %} {% else %} {% anchor "points" "total points" %} {% trans "or" %} {% trans "date posted" %} ... The anchor link on "www.mysite.com/my_app/" for total points will be directed to "my_app/?sort=points" But the correct URL should be "www.mysite.com/my_app/?sort=points" All my other links work, the problem is specific to anchor links. The {% anchor %} tag is taken from django-sorting, the code can be found at http://github.com/directeur/django-sorting Specifically in django-sorting/templatetags/sorting_tags.py Thanks in advance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >