Search Results

Search found 349 results on 14 pages for 'jake petroules'.

Page 11/14 | < Previous Page | 7 8 9 10 11 12 13 14  | Next Page >

  • Can I stop the page from 'scrolling' back to the top when a user clicks on a tab (with Rails not Jav

    - by Jake
    Ive built a webpage with 'tabs' using rails. When a user clicks a tab, a new page loads. I want to format it so the tabs are always in the same place on the page as a user clicks them. This happens as long as the user has not scrolled down on the page. If a user has scrolled down, clicking on the tab will refresh the page and it is no longer scrolled down - which make clicking the tabs look bad. Is there a way to keep the spot on the page where the user has scrolled down, without using Javascript? If it must be done with Javascript, any suggestions? T

    Read the article

  • Tips for learning MUMPS (M) / Cache?

    - by Jake
    I'm interested in getting involved/up to speed on VistA, the Veterans' Administrations open source medical records system. To that effect, I understand I should learn the MUMPS (M) language upon which the software is based. Does anyone have any getting started tips or book recommendations on this language and environment? Any tips on getting up to speed on VistA is appreciated as well. Audience: experienced developer/consultant. Thanx in adv.

    Read the article

  • Mercurial Remove History

    - by Jake Pearson
    Is there a way in mercurial to remove old changesets from a database? I have a repository that is 60GB and that makes it pretty painful to do a clone. I would like to trim off everything before a certain date and put the huge database away to collect dust.

    Read the article

  • Need serious assembly help

    - by Jake
    I have been trying to learn assembly for a few years now. I get to do a "Hello, World" program but never further. I find it so hard. Is anyone able to point me to a place or maybe even themselves, teach me some? I have prior programming experice mainly in python. So i am not completely unfamiliar with programming.

    Read the article

  • Threading is slow and unpredictable?

    - by Jake
    I've created the basis of a ray tracer, here's my testing function for drawing the scene: public void Trace(int start, int jump, Sphere testSphere) { for (int x = start; x < scene.SceneWidth; x += jump) { for (int y = 0; y < scene.SceneHeight; y++) { Ray fired = Ray.FireThroughPixel(scene, x, y); if (testSphere.Intersects(fired)) sceneRenderer.SetPixel(x, y, Color.Red); else sceneRenderer.SetPixel(x, y, Color.Black); } } } SetPixel simply sets a value in a single dimensional array of colours. If I call the function normally by just directly calling it it runs at a constant 55fps. If I do: Thread t1 = new Thread(() => Trace(0, 1, testSphere)); t1.Start(); t1.Join(); It runs at a constant 50fps which is fine and understandable, but when I do: Thread t1 = new Thread(() => Trace(0, 2, testSphere)); Thread t2 = new Thread(() => Trace(1, 2, testSphere)); t1.Start(); t2.Start(); t1.Join(); t2.Join(); It runs all over the place, rapidly moving between 30-40 fps and sometimes going out of that range up to 50 or down to 20, it's not constant at all. Why is it running slower than it would if I ran the whole thing on a single thread? I'm running on a quad core i5 2500k.

    Read the article

  • Switching/Linking to another external stylesheet in a .js file using Ruby on Rails

    - by Jake
    Im learning JQuery from a Sitepoint Book but Im trying to apply all the lessons to a Rails App. In one lesson, we are taught how to switch to a different stylesheet if the browser window is resized beyond a certain point. Here's the javascript code: if ($('body').width() > 900) { $('<link rel="stylesheet" href="wide.css" type="text/css" />') .appendTo('head'); } else { $('link[href=wide.css]').remove(); } Rails doesn't seem to want to link to the new stylesheet using 'link rel'. I've tried using the Rails helper: <%= stylesheet_link_tag 'base', :media => 'screen' %> but that doesn't work in a .js file. How do I link to an external stylesheet in a .js file using Ruby? Can I use Ruby on Rails code in a .js file? Thanks.

    Read the article

  • Where the hell is shared_ptr!?!

    - by Jake
    I am so frustrated right now after several hours trying to find where the hell is shared_ptr located at. None of the examples i see show complete code to include the headers for shared_ptr (and working). simply stating "std" "tr1" and "" is not helping at all! I have downloaded boosts and all but still it doesn't show up! Can someone help me by telling exactly where to find it? Thanks for letting me vent my frustrations!

    Read the article

  • How do I connect to MySQL 5.1 in Visual Studio 2010?

    - by jake
    Does any one know how to connect to MySQL 5.1 with Visual Studio 2010? I have already tried the MySQL Connector/ODBC route and it got me really nasty results. The table rows were all listed as a view in the views section and nothing at all was listed in the tables or procedures folder.

    Read the article

  • How can I get the text that was clicked on in Javascript?

    - by Jake
    Does anyone know if it is possible with javascript to to tell the position of a mouse click in some text? I know it's easy to get the x,y coordinates, but I'm wanting the position in the text. For example if I clicked inside <p>foo bar</p> I want to be able to tell that the click was on/after the 5th character. Or that foo b is before the click and ar is after it. By the way, I'm using jQuery too, I'm happy with pure JS and solutions that use jQ. Thanks in advance.

    Read the article

  • Getting past Salesforce trigger governors

    - by Jake
    I'm trying to write an "after update" trigger that does a batch update on all child records of the record that has just been updated. This needs to be able to handle 15k+ child records at a time. Unfortunately, the limit appears to be 100, which is so far below my needs it's not even close to acceptable. I haven't tried splitting the records into batches of 100 each, since this will still put me at a cap of 10k updates per trigger execution. (Maybe I could just daisy-chain triggers together? ugh.) Does anyone know what series of hoops I can jump through to overcome yet another ridiculously short-sighted limitation by this awful development "platform"?

    Read the article

  • iPhone question: How can I add a button to a tableview cell?

    - by Jake
    Hi guys, Little background, the table view is filled by a fetchedResultsController which fills the table view with Strings. Now I'm trying to add a button next to each String in each tableview cell. So far, I've been trying to create a button in my configureCell:atIndexPath method and then add that button as a subview to the table cell's content view, but for some reason the buttons do not show up. Below is the relevant code. If anyone wants more code posted, just ask and I'll put up whatever you want. Any help is greatly appreciated. - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath { // get object that has the string that will be put in the table cell Task *task = [fetchedResultsController objectAtIndexPath:indexPath]; //make button UIButton *button = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; [button setTitle:@"Check" forState:UIControlStateNormal]; [button setTitle:@"Checked" forState:UIControlStateHighlighted]; //set the table cell text equal to the object's property cell.textLabel.text = [task taskName]; //addbutton as a subview [cell.contentView addSubview:button]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Configure the cell. [self configureCell:cell atIndexPath:indexPath]; return cell; }

    Read the article

  • What is this XML Parse Error?

    - by Jake
    I am using the following script to generate a RSS feed for my site: <?php class RSS { public function RSS() { $root = $_SERVER['DOCUMENT_ROOT']; require_once ("../connect.php"); } public function GetFeed() { return $this->getDetails() . $this->getItems(); } private function dbConnect() { DEFINE ('LINK', mysql_connect (DB_HOST, DB_USER, DB_PASSWORD)); } private function getDetails() { $detailsTable = "rss_feed_details"; $this->dbConnect($detailsTable); $query = "SELECT * FROM ". $detailsTable ." WHERE feed_category = ''"; $result = mysql_db_query (DB_NAME, $query, LINK); while($row = mysql_fetch_array($result)) { $details = '<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0"> <channel> <title>'. $row['title'] .'</title> <link>'. $row['link'] .'</link> <description>'. $row['description'] .'</description> <language>'. $row['language'] .'</language> <image> <title>'. $row['image_title'] .'</title> <url>'. $row['image_url'] .'</url> <link>'. $row['image_link'] .'</link> <width>'. $row['image_width'] .'</width> <height>'. $row['image_height'] .'</height> </image>'; } return $details; } private function getItems() { $itemsTable = "rss_posts"; $this->dbConnect($itemsTable); $query = "SELECT * FROM ". $itemsTable ." ORDER BY id DESC"; $result = mysql_db_query (DB_NAME, $query, LINK); $items = ''; while($row = mysql_fetch_array($result)) { $items .= '<item> <title>'. $row["title"] .'</title> <link>'. $row["link"] .'</link> <description><![CDATA['.$row["readable_date"]."<br /><br />".$row["description"]."<br /><br />".']]></description> </item>'; } $items .= '</channel> </rss>'; return $items; } } ?> The baffling thing is, the script works perfectly fine on my localhost but gives the following error on my remote server: XML Parsing Error: junk after document element Location: http://mysite.com/rss/main/ Line Number 2, Column 1:<b>Parse error</b>: syntax error, unexpected T_STRING in <b>/home/studentw/public_html/rss/global-reach/rssClass.php</b> on line <b>1</b><br /> ^

    Read the article

  • Apply CSS style to anchor problem

    - by Jake
    Using jquery I have a clicking tab mechanism that are nothing but anchor tags that return false but call javascript functions to run some events on the page. The problem is I am using jquery to apply an opacity style to the active anchor. and the other sibling anchor get a lesser opacity view. My code looks like this $("#menutab li a").click(function(){ $(this).animate({opacity:'1'},1000); $(this).siblings().animate({opacity:'.25'},1000); } I would think this code would act only on the clicked element and apply that css style to that element and the other style to the other anchor tags except the clicked one. It kind of does that, but also what it does is leave the earlier clicked element to opacity =1, so if I click an element it sets it opacity to 1 and then if I click another one it sets it opacity to 1 while leave the earlier clicked one to 1 also instead of setting it to .25 like the others. Edit: I changed the above code to: $("#menutab ul li").click(function(){ $(this).children().animate({opacity:'1'},1000); $(this).siblings().children().animate({opacity:'.25'},1000); }); and now I get the desired effect, except that when the first anchor in the list is clicked doesn't follow the event rules, When the first one is clicked its as if, the click event is not triggered, because no opacity style changes. which I don't understand.

    Read the article

  • How do i program a simple IRC bot in python?

    - by Jake
    Hi every one. I need help writing a basic IRC bot that just connects to a channel.. is anyone able to explain me this? I have managed to get it to connect to the IRC server but i am unable to join a channel and log on. The code i have thus far is: import sockethost = 'irc.freenode.org' port = 6667 join_sock = socket.socket() join_sock.connect((host, port)) <code here> Any help would be greatly appreciated.

    Read the article

  • Technique to remove common words(and their plural versions) from a string

    - by Jake M
    I am attempting to find tags(keywords) for a recipe by parsing a long string of text. The text contains the recipe ingredients, directions and a short blurb. What do you think would be the most efficient way to remove common words from the tag list? By common words, I mean words like: 'the', 'at', 'there', 'their' etc. I have 2 methodologies I can use, which do you think is more efficient in terms of speed and do you know of a more efficient way I could do this? Methodology 1: - Determine the number of times each word occurs(using the library Collections) - Have a list of common words and remove all 'Common Words' from the Collection object by attempting to delete that key from the Collection object if it exists. - Therefore the speed will be determined by the length of the variable delims import collections from Counter delim = ['there','there\'s','theres','they','they\'re'] # the above will end up being a really long list! word_freq = Counter(recipe_str.lower().split()) for delim in set(delims): del word_freq[delim] return freq.most_common() Methodology 2: - For common words that can be plural, look at each word in the recipe string, and check if it partially contains the non-plural version of a common word. Eg; For the string "There's a test" check each word to see if it contains "there" and delete it if it does. delim = ['this','at','them'] # words that cant be plural partial_delim = ['there','they',] # words that could occur in many forms word_freq = Counter(recipe_str.lower().split()) for delim in set(delims): del word_freq[delim] # really slow for delim in set(partial_delims): for word in word_freq: if word.find(delim) != -1: del word_freq[delim] return freq.most_common()

    Read the article

  • Why isn't this simple PHP Forloop working?

    - by Jake
    First here's the code: <?php $qty = $_GET['qty']; for($i=0; $i < $qty; $i++) { setcookie('animals', $_COOKIE['animals'].'(lion)', time()+3600); } ?> Here's what I'm trying to do: I want to set the value of the "animals" cookie to "(lion)". The number of instances of "(lion)" that should be in the cookie is determined by the "qty" GET parameter's value. So for example if the pages url is: http://site.com/script.php?qty=10 then the value of the cookie should be: (lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion) but now it just sets the value once despite the setcookie function being inside the loop, why isn't it working?

    Read the article

  • Database Design: A proper table design for large number of column values.

    - by Jake
    I wish to perform an experiment many different times. After every trial, I am left with a "large" set of output statistics -- let's say, 1000. I would like to store the outputs of my experiments in a table, but what's the best way...? Option 1 Have a table with 1000 columns. Seems like a bad idea. What if the number of statistics one day exceeds the maximum number of columns? Option 2 Have a table with three columns. Let's say, ID, StatisticType, and StatisticValue. That way, you can have as many statistics as you want. However, reading a single experiments statistics becomes more complicated. Moreover, what if different statistics are different data types?? Any suggestions?

    Read the article

  • Trouble defining a variable in PHP?

    - by Jake
    Alright, so a content page uses this: $tab = "Friends"; $title = "User Profile"; include '(the header file, with nav)'; And the header page has the code: if ($tab == "Friends") { echo '<li id="current">'; } else { echo '<li>'; } The problem is, that the if $tab == Friends condition is never activated, and no other variables are carried from the the content page, to the header page. Does anyone know what I'm doing wrong? Update: Alright, the problem seemed to disappear when I used ../scripts/filename.php, and only occurred when I used a full URL? Any ideas why?

    Read the article

  • rename an html page according to an image within it

    - by Jake
    Hi, firstly I'll give some background regarding the situation. I have a website containing approximately 56k pages each page contain a mapped sketch of a machine part. this machine part is made out of smaller parts which are outlined in the image and hold a certain number. when you hover over the numbers a box with the part item code shows up. I order parts according to this item codes but recently a lot of the items codes have changed, therefore I am looking for a solution. now I own a database with data on all the 56k parts and I want to link the relevant webpage to each record according to the name of the part(a column in my database), the problem is that the webpages names has no logic name that could connect with the part name in any way but the image that is displayed in the page has the exact name of the part. I want to rename all the html files I has according to the Images displayed within them. how can I achieve that without renaming all the 56k pages manually? additionally how can I add the links to all the 56k pages automatically to my database after all the above is done? Thank you for your patience I know it was long.

    Read the article

  • How can I move the clear button in a UITextField?

    - by Jake
    For some reason, when I add a UITextfield as a subview of the contentview of a tablecell, the clearbutton does not align with the text typed in the field, and appears a bit underneath it. Is there any way I can move the text of the clearbutton to stop this from happening? Thanks for any help,

    Read the article

  • What type of web service should I put together?

    - by Jake
    I want to write a web service using Visual Studio. The service needs to support some type of authentication, and should be able to receive commands via simple HTTP GET requests. The input would only be a method call with some parameters, and the responses will be simple status/error codes. My instinct would be to go with an ASP.NET Web Service, but this isn't an option in C# 4.0 and it makes me wonder if I should be using something that's more up-to-date. I've looked into WCF, but it seems like this requires a running application on the client-side - is there a way to query a WCF host by just accessing a URL? The authentication is also an important piece. Developing my own little authentication system seems like a bad idea - I've read that it's too easy to mess up. What would be the standard way of authenticating with a web service like this? I'd love to look up all of the specifics on this and learn it myself, but I really don't even know where to begin. Some direction would be greatly appreciated!

    Read the article

  • access JRUN jndi environment vaiables from coldfusion (java)

    - by jake
    I want to put some instance specific configuration information in JNDI. I looked at the information here: http://www.adobe.com/support/jrun/working_jrun/jrun4_jndi_and_j2ee_enc/jrun4_jndi_and_j2ee_enc03.html I have added this node to the web.xml: <env-entry> <description>Administrator e-mail address</description> <env-entry-name>adminemail</env-entry-name> <env-entry-value>[email protected]</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> In coldfusion I have tried several different approaches to querying the data: <cfset ctx = createobject("java","javax.naming.InitialContext") > <cfset val = ctx.lookup("java:comp/env") > That lookup returns a jrun.naming.JRunNamingContext. If i preform a lookup on ctx for the specific binding I am adding I get an error. <cfset val = ctx.lookup("java:comp/env/adminemail") > No such binding: adminemail Preforming a listBindings returns an empty jrun.naming.JRunNamingEnumeration. <cfset val = ctx.listBindings("java:comp/env") > I only want to put a string value (probably several) into the ENC (or any JNDI directory at this point).

    Read the article

  • Java. Best procedure to de-serialize a Java generic object?

    - by Jake
    What is the best procedure for storing and retrieving, using native Java serialization, generic objects like ArrayList<String>? Edit: To clarify. When I serialize an object of type ArrayList<String> I'd like to de-serialize to the same type of object. However, I know of no way to cast back to this generic object without causing warnings.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14  | Next Page >