Search Results

Search found 2396 results on 96 pages for 'inner'.

Page 7/96 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • scrollTo inner div only

    - by Nik
    I have a page with two scroll bars. I am using the scrollTo jquery plugin to jump to other areas on the same page. The problem is I only want the inner div to scrollTo and the outer div to remain at the top of the screen. Development site link click here This is the script $(".jump > li").click(function() { var qu = $(this).attr("id"); var an = "#" + qu.replace("q","a"); // step 8 $.scrollTo(an, {duration: 800, axis:"y"}); }); Any ideas?

    Read the article

  • Objective C - RegexKitLite - Parsing inner contents of a string, ie: start(.*?)end

    - by Stu
    Please consider the following: NSString *myText = @"mary had a little lamb"; NSString *regexString = @"mary(.*?)little"; for)NSString *match in [myText captureComponentsMatchedByRegex:regexString]){ NSLog(@"%@",match); } This will output to the console two things: 1) "mary had a little" 2) "had a" What I want is just the 2nd bit of information "had a". Is there is a way of matching a string and returning just the inner part? I'm fairly new to Objective C, this feels a rather trivial question yet I can't find a less messy way of doing this than incrementing an integer in the for loop and on the second iteration storing the "had a" in an NSString.

    Read the article

  • Referring to a non-final variable data inside an inner class

    - by shoaibmohammed
    Im doing a program in GWT. Here is the snippet where Im having problem private String[] populateRSSData() { 1==>> String[] data = null; try { new RequestBuilder(RequestBuilder.GET, "../database.php?action=populaterss").sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { 2==>> data=response.getText().split("~"); } @Override public void onError(Request request, Throwable exception) { Window.alert(exception.getMessage()); } }); } catch (RequestException e) { Window.alert(e.getMessage()); } return data; } Now the problem arises that I get an error that the variable 1==>> data should be declared final. But if I declare it as final then i cannot store the datas in 2==>> The error i get Cannot refer to a non-final variable data inside an inner class defined in a different method RSS_Manager.java Please suggest

    Read the article

  • Passing arguments to anonymous inner classes

    - by synic
    I'm trying to make an API library for our web services, and I'm wondering if it's possible to do something like this: abstract class UserRequest(val userId: Int) { def success(message: String) def error(error: ApiError) } api.invokeRequest(new UserRequest(121) { override def success(message: String) = { // handle success } override def error(error: ApiError) = { // handle the error } } I'm talking about passing parameters to the anonymous inner class, and also overriding the two methods. I'm extremely new to Scala, and I realize my syntax might be completely wrong. I'm just trying to come up with a good design for this library before I start coding it. I'm willing to take suggestions for this, if I'm doing it the completely wrong way, or if there's a better way. The idea is that the API will take some sort of request object, use it to make a request in a thread via http, and when the response has been made, somehow signal back to the caller if the request was a success or an error. The request/error functions have to be executed on the main thread.

    Read the article

  • fixed position of inner div related to its container

    - by Lina
    Hi, if have the following code: <div id="container" style="position:relative; width:300px; height:300px; overflow:scroll;"> <div id="header"> </div> <div> a table of contents </div> </div> how do i make the inner div with the id "header" follows when i scroll down the outer div "container"? TIA Lina

    Read the article

  • Int PK inner join Vs Guid PK inner Join on SQL Server. Execution plan.

    - by bigb
    I just did some testing for Int PK join Vs Guid PK. Tables structure and number of records looking like that: Performance of CRUD operations using EF4 are pretty similar in both cases. As we know Int PK has better performance rather than strings. So SQL server execution plan with INNER JOINS are pretty different Here is an execution plan. As i understand according with execution plan from attached image Int join has better performance because it is taking less resources for Clustered index scan and it is go in two ways, am i right? May be some one may explain this execution plan in more details?

    Read the article

  • Access inner function variables in Javascript

    - by Elazar Leibovich
    In many frameworks, internal function variables are used as private variables, for example Raphael = (function(){ var private = function(a,b) {return a+b;}; var public = function(a) {return private(a,a);} var object = {mult2:public}; return object; })(); here, we cannot access from the global namespace the variable named private, as it is an inner variable of the anonymous function in the first line. Sometimes this function is contains a big Javascript framework, so that it wouldn't pollute the global namespace. I need to unit tests some object Raphael uses internally (in the above example, I wish to run unit tests on the object private). How can I test them?

    Read the article

  • Access asp:CheckBox inner input from jQuery

    - by abatishchev
    I have a jQuery array acting on each control having corresponding class: function Foobar() { $('.foo').each(function() { // do something with $(this) } } I can access client-side controls like <input class="foo"> and server-side controls like asp:TextBox CassClass="foo"> But setting CssClass for asp:RadioButton doesn't make a sense. Here is generated code: <span class="foo"> <input type="radio" /> </span> How to set class for inner input or another way gather it using jQuery?

    Read the article

  • How to create GUI as inner class with WindowBuilder

    - by Tim Kemp
    I would like to use WindowBuilder in Eclipse to construct Swing GUIs. The JPanels I need to build will be inner classes in a non-GUI wrapper, like so: public class MyWrapper extends MyBaseClass { ... class MyPanel extends JPanel { ... } } So my question is this: can I construct MyPanel using WindowBuilder? If so, how should I set it up? If anyone is interested, the wrapper is an abstract base class which the plug-ins I am developing for my app must extend; deployment concerns mean that it's not really practical to put the GUIs in a separate JAR either so I pretty much have to do it this way. My current workflow, which is awful, is to build the GUI in NetBeans and paste the entire generated class into Eclipse where I connect it up to the methods in my wrapper. I am very hopeful that WindowBuilder will let me work more reliably and efficiently if I can trick it into generating code in MyPanel, not MyWrapper. Thanks

    Read the article

  • Interface with inner implementation - good or bad

    - by dermoritz
    I am working on a project with many someInterface - someInterfaceImpl-pairs. Some days ago I got the idea (probably inspired by reading some objective c code) to include the default implementations as an inner class. Now some colleagues (all with much more java experience than me) saw this idea - feedback was between shocked and surprised ("this is working?"). I googled around a bit but didn't find much evidence of usefulness of this "pattern" (personal i like it): pdf-paper and a faq about code style What do you think - especially in those cases where an "default" implementation is tightly coupled to an interface. Update i just found this: Java Interface-Implementation Pair (see accepted answer)

    Read the article

  • <a> with an inner <span> not triggering :active state in IE 8

    - by Adam Singer
    I want to style the :active state of a button that is represented by an <a> tag. The <a> tag has an inner <span> (beacuse I want to add an icon to this button). I notice the :active state is triggered properly in everything but Internet Explorer 8. In IE 8, it appears that the area around the <span> (the <a>’s padding) triggers the :active state, but when clicking directly on the text within the <span>, the :active state is not triggered. Is there a way to fix this without resorting to Javascript? HTML <a class="button" href="#"> <span>Add a link</span> </a> CSS a.button { some styles } a.button:active { some other styles }

    Read the article

  • XSLT: add node inner text.

    - by nabo
    This is a slightly version of other question posted here: http://stackoverflow.com/questions/2888880/xslt-change-node-inner-text Imagine i use XSLT to transform the document: <a> <b/> <c/> </a> into this: <a> <b/> <c/> Hello world </a> In this case i can't use neither the <xsl:strip-space elements="*"/> element or the [normalize-space() != ''] predicate since there is no text in the place where i need to put new text. Any ideas? Thanks.

    Read the article

  • Call inner function of jQuery-Plugin-function?

    - by faileN
    Hello Everyone, I've written an jQuery-Plugin, which I want to use as Object. So I declared some functions within the plugin, which I want to call from any other location, just like an object with methods. Is that even possible? To keep it simple: (function( $ ){ $.fn.myPlugin = function(){ // Here I want methods... function foo() { // do something... } } })(jQuery); Then I want to call the inner function from outside the plugin like: $.myPlugin.foo(); But that doesn't seem to work. So is it even possible? Or are there any other solutions? I don't want to use an normal unrelated jQuery-Class for this purpose. Because this plugin should work together with some other jQuery-Plugins. Thank you

    Read the article

  • magento .htaccess password protect inner pages (not homepage)

    - by Angel Wong
    I would like to use .htaccess to password protect all inner pages of Magento, except the home page. e.g. http://www.example.com/abc (password protect) http://www.example.com (home page, no need to password protect) I tried to use the setifenv request_uri = "/" => allow, but didn't work. It still password protect all pages including the homepage. I also tried a few ways inside the Magento admin URL rewrite, but those won't work either. Any expert can help? thx E

    Read the article

  • How to get an element using inner text (Watir, Nokogir, Hpricot)

    - by Hpriguy
    I have been expeirmenting with Watir, Nokogir and Hpricot. All of these use top-down approach which is my problem. i.e. they use element type to search element. I want to find out the element using the text without knowing element type. e.g. <element1> <element2> Text2 </element2> <element3> Text3 </element3> text4 </element1> I want is to get element2 and element1 etc by searching for Text2 and Text3. Please note that I do not know if elements are divs or tr/tds or links etc. I just know the text. Algorithem should be something like : iterated through all the elements, match inner text, if match get me the element and the parent element. Let me kow if this is possible in any way?

    Read the article

  • optimizing an sql query using inner join and order by

    - by Sergio B
    I'm trying to optimize the following query without success. Any idea where it could be indexed to prevent the temporary table and the filesort? EXPLAIN SELECT SQL_NO_CACHE `groups`.* FROM `groups` INNER JOIN `memberships` ON `groups`.id = `memberships`.group_id WHERE ((`memberships`.user_id = 1) AND (`memberships`.`status_code` = 1 AND `memberships`.`manager` = 0)) ORDER BY groups.created_at DESC LIMIT 5;` +----+-------------+-------------+--------+--------------------------+---------+---------+---------------------------------------------+------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------------+--------+--------------------------+---------+---------+---------------------------------------------+------+----------------------------------------------+ | 1 | SIMPLE | memberships | ref | grp_usr,grp,usr,grp_mngr | usr | 5 | const | 5 | Using where; Using temporary; Using filesort | | 1 | SIMPLE | groups | eq_ref | PRIMARY | PRIMARY | 4 | sportspool_development.memberships.group_id | 1 | | +----+-------------+-------------+--------+--------------------------+---------+---------+---------------------------------------------+------+----------------------------------------------+ 2 rows in set (0.00 sec) +--------+------------+-----------------------------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | +--------+------------+-----------------------------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ | groups | 0 | PRIMARY | 1 | id | A | 6 | NULL | NULL | | BTREE | | | groups | 1 | index_groups_on_name | 1 | name | A | 6 | NULL | NULL | YES | BTREE | | | groups | 1 | index_groups_on_privacy_setting | 1 | privacy_setting | A | 6 | NULL | NULL | YES | BTREE | | | groups | 1 | index_groups_on_created_at | 1 | created_at | A | 6 | NULL | NULL | YES | BTREE | | | groups | 1 | index_groups_on_id_and_created_at | 1 | id | A | 6 | NULL | NULL | | BTREE | | | groups | 1 | index_groups_on_id_and_created_at | 2 | created_at | A | 6 | NULL | NULL | YES | BTREE | | +--------+------------+-----------------------------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ +-------------+------------+----------------------------------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | +-------------+------------+----------------------------------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | memberships | 0 | PRIMARY | 1 | id | A | 2 | NULL | NULL | | BTREE | | | memberships | 0 | grp_usr | 1 | group_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 0 | grp_usr | 2 | user_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | grp | 1 | group_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | usr | 1 | user_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | grp_mngr | 1 | group_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | grp_mngr | 2 | manager | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | complex_index | 1 | group_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | complex_index | 2 | user_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | complex_index | 3 | status_code | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | complex_index | 4 | manager | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | index_memberships_on_user_id_and_status_code_and_manager | 1 | user_id | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | index_memberships_on_user_id_and_status_code_and_manager | 2 | status_code | A | 2 | NULL | NULL | YES | BTREE | | | memberships | 1 | index_memberships_on_user_id_and_status_code_and_manager | 3 | manager | A | 2 | NULL | NULL | YES | BTREE | | +-------------+------------+----------------------------------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+

    Read the article

  • sort outer array based on values in inner array, javascript

    - by ptrn
    I have an array with arrays in it, where I want to sort the outer arrays based on values in a specific column in the inner. I bet that sounded more than a bit confusing, so I'll skip straight to an example. Initial data: var data = [ [ "row_1-col1", "2-row_1-col2", "c-row_1-coln" ], [ "row_2-col1", "1-row_2-col2", "b-row_2-coln" ], [ "row_m-col1", "3-row_m-col2", "a-row_m-coln" ] ]; Sort data, based on column with index 1 data.sortFuncOfSomeKind(1); where the object then would look like this; var data = [ [ "row_2-col1", "1-row_2-col2", "b-row_2-coln" ], [ "row_1-col1", "2-row_1-col2", "c-row_1-coln" ], [ "row_m-col1", "3-row_m-col2", "a-row_m-coln" ] ]; Sort data, based on column with index 2 data.sortFuncOfSomeKind(2); where the object then would look like this; var data = [ [ "row_m-col1", "3-row_m-col2", "a-row_m-coln" ], [ "row_2-col1", "1-row_2-col2", "b-row_2-coln" ], [ "row_1-col1", "2-row_1-col2", "c-row_1-coln" ] ]; The big Q Is there an existing solution to this that you know of, or would I have to write one myself? If so, which would be the easiest sort algorithm to use? QuickSort? _L

    Read the article

  • SQL Inner Join : DB stuck

    - by SurfingCat
    I postet this question a few days ago but I didn't explain exactly what I want. I ask the question better formulated again: To clarify my problem I added some new information: I got an MySQL DB with MyISAM tables. The two relevant tables are: * orders_products: orders_products_id, orders_id, product_id, product_name, product_price, product_name, product_model, final_price, ... * products: products_id, manufacturers_id, ... (for full information about the tables see screenshot products (Screenshot) and screenshot orders_products (Screenshot)) Now what I want is this: - Get all Orders who ordered products with manufacturers_id = 1. And the product name of the product of this order (with manufacturers_id = 1). Grouped by orders. What I did so far is this: SELECT op.orders_id, p.products_id, op.products_name, op.products_price, op.products_quantity FROM orders_products op , products p INNER JOIN products ON op.products_id = p.products_id WHERE p.manufacturers_id = 1 AND p.orders_id > 10000 p.orders_id 10000 for testing to get only a few order_id's. But thies query takes much time to get executed if it even works. Two times the sql server stucked. Where is the mistake?

    Read the article

  • Speeding up inner-joins and subqueries while restricting row size and table membership

    - by hiffy
    I'm developing an rss feed reader that uses a bayesian filter to filter out boring blog posts. The Stream table is meant to act as a FIFO buffer from which the webapp will consume 'entries'. I use it to store the temporary relationship between entries, users and bayesian filter classifications. After a user marks an entry as read, it will be added to the metadata table (so that a user isn't presented with material they have already read), and deleted from the stream table. Every three minutes, a background process will repopulate the Stream table with new entries (i.e. whenever the daemon adds new entries after the checks the rss feeds for updates). Problem: The query I came up with is hella slow. More importantly, the Stream table only needs to hold one hundred unread entries at a time; it'll reduce duplication, make processing faster and give me some flexibility with how I display the entries. The query (takes about 9 seconds on 3600 items with no indexes): insert into stream(entry_id, user_id) select entries.id, subscriptions_users.user_id from entries inner join subscriptions_users on subscriptions_users.subscription_id = entries.subscription_id where subscriptions_users.user_id = 1 and entries.id not in (select entry_id from metadata where metadata.user_id = 1) and entries.id not in (select entry_id from stream where user_id = 1); The query explained: insert into stream all of the entries from a user's subscription list (subscriptions_users) that the user has not read (i.e. do not exist in metadata) and which do not already exist in the stream. Attempted solution: adding limit 100 to the end speeds up the query considerably, but upon repeated executions will keep on adding a different set of 100 entries that do not already exist in the table (with each successful query taking longer and longer). This is close but not quite what I wanted to do. Does anyone have any advice (nosql?) or know a more efficient way of composing the query?

    Read the article

  • Mysql slow query: INNER JOIN + ORDER BY causes filesort

    - by Alexander
    Hello! I'm trying to optimize this query: SELECT `posts`.* FROM `posts` INNER JOIN `posts_tags` ON `posts`.id = `posts_tags`.post_id WHERE (((`posts_tags`.tag_id = 1))) ORDER BY posts.created_at DESC; The size of tables is 38k rows, and 31k and mysql uses "filesort" so it gets pretty slow. I tried to use different indexes, no luck. CREATE TABLE `posts` ( `id` int(11) NOT NULL auto_increment, `created_at` datetime default NULL, PRIMARY KEY (`id`), KEY `index_posts_on_created_at` (`created_at`), KEY `for_tags` (`trashed`,`published`,`clan_private`,`created_at`) ) ENGINE=InnoDB AUTO_INCREMENT=44390 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci CREATE TABLE `posts_tags` ( `id` int(11) NOT NULL auto_increment, `post_id` int(11) default NULL, `tag_id` int(11) default NULL, `created_at` datetime default NULL, `updated_at` datetime default NULL, PRIMARY KEY (`id`), KEY `index_posts_tags_on_post_id_and_tag_id` (`post_id`,`tag_id`) ) ENGINE=InnoDB AUTO_INCREMENT=63175 DEFAULT CHARSET=utf8 +----+-------------+------------+--------+--------------------------+--------------------------+---------+---------------------+-------+-----------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+--------+--------------------------+--------------------------+---------+---------------------+-------+-----------------------------------------------------------+ | 1 | SIMPLE | posts_tags | index | index_post_id_and_tag_id | index_post_id_and_tag_id | 10 | NULL | 24159 | Using where; Using index; Using temporary; Using filesort | | 1 | SIMPLE | posts | eq_ref | PRIMARY | PRIMARY | 4 | .posts_tags.post_id | 1 | | +----+-------------+------------+--------+--------------------------+--------------------------+---------+---------------------+-------+-----------------------------------------------------------+ 2 rows in set (0.00 sec) What kind of index I need to define to avoid mysql using filesort? Is it possible when order field is not in where clause?

    Read the article

  • Floating inner div in parent

    - by Ockonal
    Hello, I have two divs: <div id="modalBox" style="position: absolute; border: 1px solid #bababa; width: 400px; height: 180px; background-color: #e3e6ca; text-align: center; -moz-border-radius: 6px; -webkit-border-radius: 6px; display: none;"> <div style="background-color: #98002f; background-image: url(*/images/tab_background.gif); color: white; width: 400px; height: 25px; -moz-border-radius-topright: 6px; -moz-border-radius-topleft: 6px; -webkit-border-top-right-radius: 6px; -webkit-border-top-left-radius: 6px;"> <h3>Please, fill the form to confirm your identity:</h3> </div> ... </div> What I get: How can I make inner div floating top?

    Read the article

  • selecting text by ignoring inner Elements of div tag javascript

    - by sugar
    <html> <body> <script language="javascript"> function getSelectionHTML() { var div = document.getElementById("myDiv").childNodes; if (document.createRange) { var textNode=div.firstChild; var rangeObj=document.createRange(); rangeObj.setStart(textNode,0); rangeObj.setEnd(textNode,10); selRange.collapse(true); var elem = document.getElementById('myDiv') elem .innerHTML = elem .innerHTML.replace(rangeObj.toString(), '<span style="background-color: lime">'+rangeObj.toString()+'</span>') } } </script> <div id="myDiv"> asdf as<b>dfas df asf asdf sdfjk dvh a sjkh jhcdjkv</b> iof scjahjkv ahsjv hdjk biud fcsvjksdhf k </div> <form name="aform"> <input type="button" value="Get selection" onclick="getSelectionHTML()"> </body> </html> Ok. Let me explain - getSelectionHTML() method is for selection of characters from 0 to 10. I am getting the values by "myDiv" id. but inner bold, italic & other tags are putting me in trouble. In simple words, I just want to make selection of first ten characters (& apply them span tag) which are in "myDiv" tag. What exactly I am missing ? Can anyone help me ? Thanks in advance for sharing your knowledge. Sagar.

    Read the article

  • SQL inner join from field defined table?

    - by Wolftousen
    I have a, currently, a total of 6 tables that are part of this question. The primary table, tableA, contains columns that all the entries in the other 5 tables have in common. The other 5 tables have columns which define the entry in tableA in more detail. For example: TableA ID|Name|Volumn|Weight|Description 0 |T1 |0.4 |0.1 |Random text 1 |R1 |5.3 |25 |Random text TableB ID|Color|Shape 0 |Blue |Sphere TableC ID|Direction|Velocity 1 |North |3.4 (column names are just examples don't take them for what they mean...) The ID field in Table A is unique to all other tables (i.e. TableB will have 0, but TableC will not, nor any other Tables). What I would like to do is select all the fields from TableA and the corresponding (according to ID field) detail Table (TableB-F). What I have currently done and not tested is added a field to TableA so it looks like this: TableA ID|Name|Volumn|Weight|Description|Table 0 |T1 |0.4 |0.1 |Random text|TableB 1 |R1 |5.3 |25 |Random text|TableC I have a few questions about this: 1.Is it proper to do such a thing to TableA, as foreign keys wont work in this situation since they all need to link to different tables? 2.If this is proper, would the SQL query look like this (ID would be input by the user)? SELECT * FROM TableA AS a INNER JOIN a.Table AS t ON a.ID = ID; 3.Is there a better way to do this? Thanks for the help.

    Read the article

  • SQL: many-to-many relationship, IN condition

    - by Maarten
    I have a table called transactions with a many-to-many relationship to items through the items_transactions table. I want to do something like this: SELECT "transactions".* FROM "transactions" INNER JOIN "items_transactions" ON "items_transactions".transaction_id = "transactions".id INNER JOIN "items" ON "items".id = "items_transactions".item_id WHERE (items.id IN (<list of items>)) But this gives me all transactions that have one or more of the items in the list associated with it and I only want it to give me the transactions that are associated with all of those items. Any help would be appreciated.

    Read the article

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