Search Results

Search found 5749 results on 230 pages for 'miles away'.

Page 138/230 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • jquery navigate in code

    - by galilee
    Hi trying to fade out elements on the page when a navigation link is clicked, then go to the clicked link: $("#navigation a").click(function() { var $clickobj = $this; $("div#content").animate({opacity: 'toggle', paddingTop: '0px'}, 'slow',function(){ $("div#navigation").animate({opacity: 'toggle', paddingTop: '0px'}, 'slow', function(){ $("div#logo").animate({opacity: 'toggle', paddingTop: '0px'}, 900, function(){ $clickobj.click(); }); }); }); return false; }); but this just navigates straight away with the fade out...any ideas?

    Read the article

  • Convert sets to frozensets as values of a dictionary

    - by Space_C0wb0y
    I have dictionary that is built as part of the initialization of my object. I know that it will not change during the lifetime of the object. The dictionary maps keys to sets. I want to convert all the values from sets to frozensets, to make sure they do not get changed. Currently I do that like this: for key in self.my_dict.iterkeys(): self.my_dict[key] = frozenset(self.my_dict[key]) Is there a simpler way to achieve this? I cannot build frozenset right away, because I do not how much items will be in each set until i have built the complete dictionary.

    Read the article

  • PHP --> MSSQL + Excel file upload from a specific row

    - by lucky
    Hello, I have a requirement in which, i need to upload an excel file into MSSQL database. It is working well till this point. But sometimes i am getting excel file in such a way, that the first 2 rows and columns are empty rows. That is not even fixed everytime. so the format of the table after upload is not as expected. It is assigning F1, F2 as column names for the table in mssql. It varies from file to file. I want to program it in such away so that the user can enter the row number and the column number from where the actual data is starting. So that while upload it should from line 3 and column 2. I dont know how to specify that row and column while uploading. Please help me to solve the same.

    Read the article

  • Jquery show div on hover then when user hovers out of div hide it help?

    - by user342391
    I have a menu and when I hover one of the links a div shows. I want the user to be able to hover over this div but when the user hovers out of the div (mouseout i think its called) I want it to hide. Imagine a dropdown menu in css, the user hovers over the link and the sub nav is shown, when the user hovers out or away from the link and sub nav the sub nav dissapears. How can this be done with jquery??? this is what I have: $(document).ready(function(){ //when user hovers over plans the mainnavbottom is shown $(".plans").hover( function() { $(".mainnavbottom").show("fast"); }, function(){ $(".mainnavbottom").mouseout.hide("slow"); }); });

    Read the article

  • jQuery/CSS related problem

    - by MrAwesome
    Hi I am new to jQuery, and this is the page I'm currently developing. http://90.230.237.71/gandhi.html (Hope that works now :P) When I hit "Show/hide gallery" all the images are first opened vertically, and later they are corrected to their horizontal placement, that's the problem. They should be horizontal right away! I don't know if this is due to jQuerys slideDown or entirely CSS-related, but the code is all there for you. Initally, the images are set to display: none, perhaps they then are invisibly stored vertically. Then slideDown is performed and last, the CSS-attributes are changed to "display: inline". Perhaps I need to change execution order of slideDown and setting the CSS-attributes... but how? I NEED HELP... for many reasons, but I only want you to help me with this one ;) And also, please actually look at the code before making any assumptions. It's all there in the code.

    Read the article

  • How do you manually insert options into boost.Program_options?

    - by windfinder
    I have an application that uses Boost.Program_options to store and manage its configuration options. We are currently moving away from configuration files and using database loaded configuration instead. I've written an API that reads configuration options from the database by hostname and instance name. (cool!) However, as far as I can see there is no way to manually insert these options into the boost Program_options. Has anyone used this before, any ideas? The docs from boost seem to indicate the only way to get stuff in that map is by the store function, which either reads from the command line or config file (not what I want). Basically looking for a way to manually insert the DB read values in to the map.

    Read the article

  • Javascript Pointers question with Dates

    - by Mega Matt
    I noticed this situation in my code (unfortunately), and was able to duplicate it in my own JS file. So I have this code: var date1 = new Date(); // today var date2 = date1; date2 = date2.setDate(date2.getDate() + 1); // what is date1? After this code executes, date1 is today's date + 1! This harkens back to my undergrad days when I learned about pointers, and I guess I'm a little rusty. Is that what's happening here? Obviously I've moved the assignment away from date1, and am only modifying date2, but date1 is being changed. Why is this the case? Incidentally, after this code executes date2 is a long number like 1272123603911. I assume this is the number of seconds in the date, but shouldn't date2 still be a Date object? setDate() should return a Date object... Thanks for the help.

    Read the article

  • C++ std::equal -- rationale behind not testing for the 2 ranges having equal size?

    - by ShaChris23
    I just wrote some code to test the behavior of std::equal, and came away surprised: int main() { try { std::list<int> lst1; std::list<int> lst2; if(!std::equal(lst1.begin(), lst1.end(), lst2.begin())) throw std::logic_error("Error: 2 empty lists should always be equal"); lst2.push_back(5); if(std::equal(lst1.begin(), lst1.end(), lst2.begin())) throw std::logic_error("Error: comparing 2 lists where one is not empty should not be equal"); } catch(std::exception& e) { std::cerr << e.what(); } } The output (a surprise to me): Error: comparing 2 lists where one is not empty should not be equal Observation: why is it the std::equal does not first check if the 2 containers have the same size() ? Was there a legitimate reason?

    Read the article

  • Can I modify an ASP.NET AJAX History Point?

    - by Nick
    I'm using ASP.NET 3.5 with AJAX and have enabled history on the Script Manager. I have 2 pages, Default.aspx and Default2.aspx. I'm using the AJAX History on the Default.aspx page and saving history points on the server-side. There are some dropdowns on Default.aspx that I don't want to save a history point for each change but would like to save the latest state so that when I click on a link on Default.aspx that navigates to Default2.aspx, when I click the back button on Default2.aspx to return I want the dropdowns to reflect what they were prior to clicking on the hyperlink. So what I'd like to do is modify the history point that I originally set on one of my ajax async postbacks on the client-side before the page navigates away to Default2.aspx. There is a location.hash javascript property that looks like it may do what I want but when I modify the value the Script Manager Navigate event is firing. Is there a way to prevent this event from firing? And would this then do the job?

    Read the article

  • Is there a way to pass a regex capture to a block in Ruby?

    - by Gordon Fontenot
    I have a hash with a regex for the key and a block for the value. Something like the following: { 'test (.+?)' => { puts $1 } } Not exactly like that, obviously, since the block is being stored as a Proc, but that's the idea. I then have a regex match later on that looks a lot like this hash.each do |pattern, action| if /#{pattern}/i.match(string) action.call end end The idea was to store the block away in the hash to make it a bit easier for me to expand upon in the future, but now the regex capture doesn't get passed to the block. Is there a way to do this cleanly that would support any number of captures I put in the regex (as in, some regex patterns may have 1 capture, others may have 3)?

    Read the article

  • Proper chart scaling in Reporting Services 2005

    - by lastas
    I'm developing a simple bar-chart in Reporting Services 2005 with a stored procedure as data-source. The values in this graph can be both positive and negative, and can span a very big range, and hence I cannot specify any non-dynamic scale that will work for all scenarios. The problem I'm facing is that the automatic scaling pretty much sucks. I get no line to show where the zero-point is, and the y-scale labels are from top to bottom: 8818 -191181 -391181 etc etc... So my question is, what is the best approach to make the scale more adapted to human reading? Is there any guide out there? Does reporting services 2008 handle this better? Also, moving away from Reporting Services is not really an option. I realize how to put values and expression in the max, min, and the gridline interval fields, although its more of a question what expressions I should put there.

    Read the article

  • returning values from function or method multiple times by only calling the class once

    - by Sokhrat Sikar
    I have a members.php file that shows my websites members. I echo members name by using foreach method. A method of Members class returns an array, then I use foreach loop in the members.php file to echo the members. I am trying to aovid writing php code in my members.php file. Is there a way to avoid using foreach inside members.php file? For example, is it possible to return value from a method couple of times? (by only calling the object once). Just like how we normally call the functions? This question doesn't make sense, but I am just trying to see if there is a away around this issue?

    Read the article

  • PHP/MySQL - an array filter for bots

    - by Mike
    Hello, I'm making a hit counter. I have a database and I store the IP and $_SERVER['HTTP_USER_AGENT']; of the visitors. Now I need to add a filter, so I can put away the hits, that are made by bots. I found out, that many bots usually keep some common words in the $_SERVER['HTTP_USER_AGENT']; , so I's like to make and array of words, that would keep the bot from displaying in the results. Here is what I have now: while($row = mysql_fetch_array($yesterday, MYSQL_ASSOC)) { <-- Here I need a code, that would run through an array and check, if it containts the keywords and if it doesn't ... just count++; -- } Also if you know any other way of detecting and removing the bots from the results, I'd be verry thankful. Cheers

    Read the article

  • When using out parameters in a function, is it good practice to initialize them in the function?

    - by adambox
    I have a function that uses out parameters to return multiple values to the caller. I would like to initialize them in the function, but I wasn't sure if that's a bad idea since you don't know when you call the function that it's going to change the values right away. The caller might assume that after the function returns, if whatever it was doing didn't work, the values would be whatever they were initialized to in the caller. Is it ok / good for me to initialize in the function? Example: public static void SomeFunction(int ixID, out string sSomething) { sSomething = ""; sSomething = something(ixID); if (sSomething = "") { somethingelse(); sSomething = "bar" } }

    Read the article

  • How can I make a boring project (another WordPress site) interesting?

    - by Christopher Altman
    WordPress is my example, but the question can be generalized to any technology that is not particularly interesting. To me, WordPress takes away the intellectually gratifying pieces of coding. I would rather write a new version of WordPress than write a WordPress theme and glue together some plugins. I am using WP because my company dictates the platform for some of our clients (I do not disagree with the choice from a business perspective, WP is quick and cheap to implement). My question is, how can I make my next WordPress project interesting? I want to advance my understanding of the fundamentals of programming (aka data structures, algorithms, and caching) but do not see how I can achieve this when coding another WP site. I have a fairly tight understanding of front-end technologies and believe I have made WP do things it was never intended to do. Examples are here and here. Solving front-end related problems is not as interesting as coding a full stack application. Any advice will help.

    Read the article

  • PHP memcached: getDelayed & getMulti - how to use?

    - by Industrial
    Hi everybody, I have thought a bit recently about how to use getDelayed and getMulti in a PHP application, and their difference. From reading the documentation about getDelayed: "The method does not wait for response and returns right away. When you are ready to collect the items, call either Memcached::fetch or Memcached::fetchAll." So obviously there's a need to call fetchAll before having the keys available, unlike getMulti. But when is the actual memcached call being done? At fetchAll or when getDelayed is run?

    Read the article

  • .NET CF 2.0: Stream implements IDisposable ... kind of?

    - by mvanbem
    I've run into something odd in a .NET CF 2.0 project for Pocket PC 2003 (Visual Studio 2005). I was dealing with a System.IO.Stream object and found that the IDE wouldn't auto-complete the Dispose() method. I typed it in manually and received: 'System.IO.Stream.Dispose(bool)' is inaccessible due to its protection level The error is referring to the protected Dispose(bool) method. Dispose() is either private or not present. Question 1: How is this possible? Stream implements IDisposable: public abstract class Stream : MarshalByRefObject, IDisposable ... and IDisposable requires a Dispose() method: public interface IDisposable { void Dispose(); } I know the compiler won't let me get away with that in my code. Question 2: Will I cause problems by working around and disposing my streams directly? IDisposable idisp = someStream; idisp.Dispose(); The implicit cast is accepted by the compiler.

    Read the article

  • Why isn't this button firing the anchor tag?

    - by Noor
    My idea is to press a button that takes me to a web page. I've created a thing that dynamically creates a button and an anchor tag. When the button is clicked, I want it to "click"/fire up the anchor tag.. I've uploaded a demo to my site, when you try it out just leave everything as it is. Click the first button then the add button right away.. then try to click the dynamically created button. Nothing happens, but if you watch the source you can find an anchor tag with the ID FL1000, I've set it up so that the anchor tag gets the ID from the value of the created button + 1000 just incase I need to use that ID.. Thanks guys... edit: this is optimized for google chrome, haven't tried it out with other browser.

    Read the article

  • Location inheritInChildApplications kill debugger?

    - by chobo2
    Hi I am wondering is this normal when you add this into your web.config <location path="." inheritInChildApplications="false"> </location> The debugger should stop working. Like when I add this to my site and try to run in debug mode it won't activate any of my debug points nor will it lock up Visual studios 2008. I can have it running and still make edits to my C# code. I take the line away and I get the debug mode back and it locks up VS2008.

    Read the article

  • How to calculate the state of a graph?

    - by zcb
    Given a graph G=(V,E), each node i is associated with 'Ci' number of objects. At each step, for every node i, the Ci objects will be taken away by the neighbors of i equally. After K steps, output the number of objects of the top five nodes which has the most objects. Some Constrains: |V|<10^5, |E|<2*10^5, K<10^7, Ci<1000 My current idea is: represent the transformation in each step with a matrix. This problem is converted to the calculation of the power of matrix. But this solution is much too slow considering |V| can be 10^5. Is there any faster way to do it?

    Read the article

  • Visual Studio scratch disk behavior

    - by bobobobo
    I don't know if this feature exists, but I'd like a way to control Visual Studio 2010's scratch disk behavior (other than completely turning off intellisense). Right now it creates a massive .sdf file in the project folder (50MB+), and then it goes and creates an IPCH folder with 60MB+ of precompiled headers. All that's well and good while VS is running, but after it exits, I really would like the disk back. Is there a way to configure vs 2010 to Use the same location (%AppData%\VSScratch) for scratch disk files (so its easier to blow it away?) Automatically delete .sdf /ipch on exit? I know they don't delete them because its faster to startup.. but if you delete them yourself, startup time isn't that much increased..

    Read the article

  • How should nested components interact with model in a GUI application?

    - by fig-gnuton
    Broad design/architecture question. If you have nested components in a GUI, what's the most common way for those components to interact with data? For example, let's say a component receives a click on one of its buttons to save data. Should the save request be delegated up that component's ancestors, with the uppermost ancestor ultimately passing the request to a controller? Or are models/datastores in a GUI application typically singletons, so that a component at any level of a hierarchy can directly get/set data? Or is a controller injected as a dependency down the hierarchy of components, so that any given component is only one intermediary away from the datastore/model?

    Read the article

  • What do I need to know before working on an IM application?

    - by John
    I'm looking into building an IM-type application using Java stack (for the server at least). I'd be interested to see any information/advice on how applications like Skype/AIM/MSN work, as well as know any technologies/APIs that might be relevant. Without giving away the idea itself, it's perhaps more akin to Google Wave than Skype, but information useful for either is very welcome. Specific points I have already thought of include: Server Vs P2P... for reasons of logging my system will require all communication to go through a central server. Is this how other IM tools work... especially when audio/video comes into the equation? Cross-communication with other systems. Are there APIs for this or do all IM providers work hard to keep their protocol secret? The nature of what I'm designing means integration could probably only be limited, but it definitely seems worthwhile from a business perspective

    Read the article

  • Bash file descriptor leak

    - by Charles Duffy
    I get a file descriptor leak when running the following code: function get_fd_count() { local fds cd /proc/$$/fd; fds=( * ) # avoid a StackOverflow source colorizer bug echo "${#fds[@]}" } function fd_leak_func() { echo ">> Current FDs: $(get_fd_count)" read retval new_state < <(set +e; new_state=$(echo foo); retval=$?; printf "%d %s\n" $retval $new_state) } function parent_func() { while fd_leak_func; do :; done } parent_func Tested on both 3.2.25 and 4.0.28. Taking the while loop out of parent_func and running it at top level makes the problem go away. What's going on here? More to the point, are workarounds available?

    Read the article

  • What is the best instance type to use for hosting a website on ec2?

    - by Josh
    Amazon offers two instance types on EC2: 1) On-Demand and 2) Reserved. After reading the docs on these, I don't really understand the difference from an end-user perspective. More specifically, I'd like to know the answer to this question: is one or the other better for web applications? Based on their names and descriptions, it seems as though on-demand instances may get wiped away from the server altogether if they're not in use which means that they need to be restarted when a request finally does come in. That seems like a pretty bad thing for a website. Am I just misinterpreting the docs? Thanks!

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >