Search Results

Search found 747 results on 30 pages for 'kyle terry'.

Page 28/30 | < Previous Page | 24 25 26 27 28 29 30  | Next Page >

  • PHP coding - A class for each view or one class to rule them all?

    - by Kyle
    I am starting my first "programming" project in PHP making some sort of web application that give the linux program, Motion, a decent web interface. Anyways, I was curious as to how when real applications are programmed, do y'all go for a class for each view or one single class for the application altogether? I know this is more of a preference thing, I was just curious as to how it happens in real software.

    Read the article

  • jQuery change id!

    - by Kyle Sevenoaks
    I am a jQuery noobie, and have been trying to add a script to change the id of a div onClick. Here is a jsfiddle example. $(function accept() { $("div:scrollwrap").attr('scrollwrap','highlight'); });? Thanks :)

    Read the article

  • Why doesn't this work?

    - by Kyle W
    take = raw_input('Please enter the string of numbers that compose code\n\n\t') y = str(take) l = [] for i in xrange(0, len(y), 3):         l.append(str(y[i:i+3])) b = len(l) a = 0 while(a!=b):         c = l[a].replace('444', ' ')         c = l[a].replace('111', 'a')         c = l[a].replace('112', 'b')         c = l[a].replace('113', 'c')         c = l[a].replace('114', 'd')         c = l[a].replace('115', 'e')         etc...         a = a + 1 filename = 'decmes.txt' file = open(filename, 'w') file.write(c) file.close() I can enter anything, just 111 for example and it gives me back the same thing I put in. Maybe it's something dumb, but I can't figure it out.

    Read the article

  • Replacing characters in Ruby string according to some rule

    - by Kyle Kaitan
    In Ruby, I have a string of identical characters -- let's say they're all exclamation points, as in !!!!. I would like to replace the characters at certain indices with '*' if the integer corresponding to that index meets some criteria. For example, let's say I want to replace all the characters whose indices are even numbers and are greater than 3. In the string !!!!!!!! (8 characters long), that results in !!!!*!*! (indices 4 and 6 have been replaced). What's the most compact way to do this?

    Read the article

  • absolutely positioned divs that don't move when page is scrolled...

    - by Kyle
    I've done this in the past using a method similar to this: http://javascriptkit.com/javatutors/static3.shtml but I don't like the "flicker" effect as the page is scrolled and the div needs to move with the scrolling. Lately I've seen a lot of site that have an element (a div or the like I presume) that don't move when the page is scrolled but it's seemless...they're just there and it's a beautiful thing. Unfortunately I can't seem to recall where I've seen it lately to view the source and try to figure it out so I figured I'd turn here and see what all of you experts can provide as far as assistance / suggestions. TIA

    Read the article

  • Firefox running infinitely even after condition met in jquery function

    - by Kyle
    The following function is called with setTimeout(function () { get_progress(fileID,fileName)},8000); upon a form submit. The purpose of the function is to get read_file.php to read a txt file that stores the file upload status from a form (in percentage). Upon reaching 80%, my Firefox seems to run infinitely even when HEAD returns an error. Am I have too many recursions or have I used a wrong condition that's causing get_progress to run repeatedly even when filename does not exist in the folder ? function get_progress( fileID, filename) { $.ajax({ url: filename, type: 'HEAD', success: function() { $.ajax({ type: 'POST', url: 'read_file.php', data: 'filename=' +filename, success: function(html) { document.getElementById(fileID).innerHTML = html + ' <img src="images/loading.gif" />' setInterval(function() {get_progress(fileID,filename)},4000); } }); } });}

    Read the article

  • Change Default Winform Icon Across Entire App

    - by Kyle Gagnet
    Can I change the default icon used on a Winform? Most of my forms have their icon property set to a custom icon. For the few forms that slip through the cracks, I don't want the generic "hey look, he made this in visual studio" icon. One solution is to tediously check every one of my forms to make sure they either have a custom icon set or have ShowIcon set to False. Another solution is to have every one of my forms inherit from a base class that sets a custom icon in the constructor. Aside from those solutions, what other options do I have? EDIT: I was hoping there would be a way to replace the source of the stock icon with my own. Is it in a resource file somewhere? Or is it embedded in a .NET dll that I can't (or really, really shouldn't) modify? BOUNTY EDIT: Is there a way to accomplish this without editing or writing a single line of code? I don't care how impractical, complicated, waste-of-time the solution is... I just want to know if it's possible. I need to satisfy my curiosity.

    Read the article

  • jQuery .noconflict with prototype not working in (you guessed it) IE.

    - by Kyle Sevenoaks
    On my new customer page, I have successfully implemented a jQuery show/hide toggle alongside a Prototype script using jQuery's .noconflict. (Thanks to all for answers!) But as the world of the net is, IE's not playing ball. {literal} <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"> </script> <script type="text/javascript"> var $j = jQuery.noConflict(); $j(function() { $j("#button1").click(function() { $j("#show-hide").toggle("slow"); }); });? </script> {/literal} As you all must know by now, I'm just newly coming to all this jQuery stuff, so I have no idea what could cause it. Thanks for any help.

    Read the article

  • loading data into each textbox line by line

    - by Kyle
    private void sessionText() { try { System.IO.TextReader r = new System.IO.StreamReader("saved.txt"); this.textBox1.Text = r.ReadLine(); r.Close(); } catch (Exception x) { MessageBox.Show("Exception " +x); } } It reads the line into textBox1 but now I'm expanding my application. I added 5 more textBoxes and now I'm trying to load the data in each one saved line by line. How can I load each line into the next textbox? Line 0 -> textBox1 Line 1 -> textBox2 Line 2 -> textBox3

    Read the article

  • Scholarships for open-source code? [closed]

    - by Kyle
    So I'm attending college in the fall, thus my dad won't be quiet about the scholarship thing. I've wrote two wordpress plugin and a jQuery plugin, so I was wondering if there are any legit scholarships I could enter because of these? Thanks for any advice =D

    Read the article

  • how a thread can signal when it's finished?

    - by Kyle
    #include <iostream> #include <boost/thread.hpp> using std::endl; using std::cout; using namespace boost; mutex running_mutex; struct dostuff { volatile bool running; dostuff() : running(true) {} void operator()(int x) { cout << "dostuff beginning " << x << endl; this_thread::sleep(posix_time::seconds(2)); cout << "dostuff is done doing stuff" << endl; mutex::scoped_lock running_lock(running_mutex); running = false; } }; bool is_running(dostuff& doer) { mutex::scoped_lock running_lock(running_mutex); return doer.running; } int main() { cout << "Begin.." << endl; dostuff doer; thread t(doer, 4); if (is_running(doer)) cout << "Cool, it's running.\n"; this_thread::sleep(posix_time::seconds(3)); if (!is_running(doer)) cout << "Cool, it's done now.\n"; else cout << "still running? why\n"; // This happens! :( return 0; } Why is the output of the above program: Begin.. Cool, it's running. dostuff beginning 4 dostuff is done doing stuff still running? why How can dostuff correctly flag when it is done? I do not want to sit around waiting for it, I just want to be notified when it's done.

    Read the article

  • Why isn't Chrome displaying my div?

    - by Kyle Sevenoaks
    Click here to see a simple example of what I want. It's really easy, but for some reason Google won't display it. It's part of a foreach loop, if needed I can add other codes. There is nothing else in the rest of the css to mess with this, I have checked about 10 times. Thanks.

    Read the article

  • Create Rails model with argument of associated model?

    - by Kyle Carlson
    I have two models, User and PushupReminder, and a method create_a_reminder in my PushupReminder controller (is that the best place to put it?) that I want to have create a new instance of a PushupReminder for a given user when I pass it a user ID. I have the association via the user_id column working correctly in my PushupReminder table and I've tested that I can both create reminders & send the reminder email correctly via the Rails console. Here is a snippet of the model code: class User < ActiveRecord::Base has_many :pushup_reminders end class PushupReminder < ActiveRecord::Base belongs_to :user end And the create_a_reminder method: def create_a_reminder(user) @user = User.find(user) @reminder = PushupReminder.create(:user_id => @user.id, :completed => false, :num_pushups => @user.pushups_per_reminder, :when_sent => Time.now) PushupReminderMailer.reminder_email(@user).deliver end I'm at a loss for how to run that create_a_reminder method in my code for a given user (eventually will be in a cron job for all my users). If someone could help me get my thinking on the right track, I'd really appreciate it. Thanks!

    Read the article

  • PHP from database and query

    - by Kyle R
    I have a table: id, affiliate Each time somebody clicks a link, a new row is inserted, ID being the ID of the page, and affiliate being the ID of the affiliate. For example: Page ID: 9 Affiliate ID: 1 Page ID: 9 Affiliate ID: 2 Page ID: 9 Affiliate ID: 3 I only have 3 affiliates. I want to select this information, and group them by affiliate, for the ID. I have tried this query: SELECT COUNT(*) FROM table WHERE id = '9' GROUP BY affiliate It works fine when I do it in php my admin, how do I get the info in PHP? I have tried: $q = mysql_query("SELECT COUNT(*) FROM table WHERE id = '" . $id . "' GROUP BY affiliate"); $r = mysql_fetch_array($q); When trying to print the data onto the page, I am only getting one result. Do I need to use a foreach/while loop to get all 3? How would I go about doing this? Thank you!

    Read the article

  • Why don't paid for systems work properly? [closed]

    - by Kyle Sevenoaks
    Why when you buy a online store system that's advertised as Easy for you to manage and allows to change and tweak the look of store pages with unseen ease is it exactly the opposite? When you're offered six months free support do you never get an answer and finally when you make layout changes to one page, does a completely unrelated business logic completely break down? So really two questions: Why do authors of such systems put them up for sale before they're completed? How to exact revenge on said author? Thanks.

    Read the article

  • How to compare Rails ''executables" before and after refactor?

    - by Kyle Heironimus
    In C, I could generate an executable, do an extensive rename only refactor, then compare executables again to confirm that the executable did not change. This was very handy to ensure that the refactor did not break anything. Has anyone done anything similar with Ruby, particularly a Rails app? Strategies and methods would be appreciated. Ideally, I could run a script that output a single file of some sort that was purely bytecode and was not changed by naming changes. I'm guessing JRuby or Rubinus would be helpful here.

    Read the article

  • C: Comparing two long integers (very strange)

    - by Kyle
    Hi, I have following situation (unix) : x is a long and has value 300 y is a long and has value 50000 if (x <= y) printf("Correct."); if (x > y) printf("Ouch."); Now I always get "Ouch". That means the program keeps telling me that 300 is greater than 50000! It only works again when I do if ((int)x <=(int) y) printf("Correct."); if ((int)x > (int)y) printf("Ouch."); So what is wrong with the comparison operators?

    Read the article

  • SELECT Data from multiple tables?

    - by Kyle R
    I have 3 tables, with 3 fields all the same. I basically want to select information from each table For example: userid = 1 I want to select data from all 3 tables, where userid = 1 I am currently using: SELECT r.*, p.*, l.* FROM random r LEFT JOIN pandom p ON r.userid = p.userid LEFT JOIN landom l ON l.userid = r.userid WHERE r.userid = '1' LIMIT 0, 30 But it doesn't seem to work.

    Read the article

  • regex part of url

    - by kyle
    So I'm trying to get the id from a url for youtube.. here is the url http://gdata.youtube.com/feeds/api/videos/kffacxfA7G4/related?v=2 then there's also - in the url too. it wouldn't let me post another url but it's the same as above but with the id ucvkO0x-mL4 how can I grab between videos/ and /related (the id) with regex? I tried to use txt2re.com which is what I always use, but it's not working for this case.. thanks!

    Read the article

  • Serving wildcard subdomains from the mulitple servers.

    - by user489176
    I have a web application to which I want users to login only through their unique sub-domain (the sub-domain will be chosen at signup). So that I can scale the application across a number of servers, what would be the best way to set up Apache to always serve the same subdomains from the same server? For instance: matt.yyy.com, helen.yyy.com, terry.yyy.com are always served from server with ip of xxx.xxx.xxx.xxx suzi.yyy.com, fred.yyy.com, tom.yyy.com are always served from server with ip of xxx.xxx.xxx.xxx

    Read the article

< Previous Page | 24 25 26 27 28 29 30  | Next Page >