Search Results

Search found 4513 results on 181 pages for 'james michael hare'.

Page 155/181 | < Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >

  • Rails 2.3.8 Compound condition

    - by Michael Guantonio
    I have a rails query that I would like to run. The only problem that I am having is the query structure. Essentially the query looks like this queryList = model.find(:all, :conditions => [id = "id"]) #returns a query list #here is the issue compound = otherModel.find(:first, :select => "an_id", :conditions => ["some_other_id=? and an_id=?, some_other_id, an_id]) Where an_id is actually a list of ids in the query list. How can I write that in rails to basically associate a single id to a list that may contain ids...

    Read the article

  • SHTML - Testing

    - by Michael
    I am creating an shtml website and I am wondering how can you test the webiste in dreamweaver. Do you simply change the extentions back to html?

    Read the article

  • Downside to including headers in every source file (Objective-C)

    - by Michael Waterfall
    I'm currently including my AppDelegate.h and all of my category headers into every one of my source files using the MyApp_Prefix.pch prefix header, instead of manually #importing them only where they are used. The category methods and lots of compiler #define's in my app delegate are used in lots of places in my code. Is there any down side to this? Is it just that compilation will take longer?

    Read the article

  • SSH copying folders

    - by Michael
    I have a folder on my server that I'd like to copy to another directory. However, after I copy it and navigate to the new folder, some of the directories are RED and I can't navigate into them. I think this has something to do with them creating links instead of actually copying the folders. cp -a site2.com/httpdocs site1.com/httpdocs But then some of the sub folders from site2.com/httpdocs are setup as invalid links into site1.com/httpdocs and I cannot navigate to them nor can the webserver display them. Additionally, I have a permissions error where the copied files have their user set to site2.com but even after CHOWN I cannot get site1.com to display them.

    Read the article

  • Cygwin make always processing target

    - by Michael
    However it happens only on Windows 7. On Windows XP once it built and intact, no more builds. I narrowed down the issue to one prerequisite - $(jar_target_dir). Here is part of the code # The location where the JAR file will be created. jar_target_dir := $(build_dir)/chrome # The main chrome JAR file. chrome_jar_file := $(jar_target_dir)/$(extension_name).jar # The root of the JAR sources. jar_source_root := chrome # The sources for the JAR file. jar_sources := bla #... some files, doesn't matter jar_sources_no_dir := $(subst $(jar_source_root)/,,$(jar_sources)) $(chrome_jar_file): $(jar_sources) $(jar_target_dir) @echo "Creating chrome JAR file." @cd $(jar_source_root); $(ZIP) ../$(chrome_jar_file) $(jar_sources_no_dir) @echo "Creating chrome JAR file. Done!" $(jar_target_dir): $(build_dir) echo "Creating jar target dir..." if [ ! -x $(jar_target_dir) ]; \ then \ mkdir $(jar_target_dir); \ fi $(build_dir): @if [ ! -x $(build_dir) ]; \ then \ mkdir $(build_dir); \ fi so if I just remove $(jar_target_dir) from $(chrome_jar_file) rule, it works fine.

    Read the article

  • How do I select a class element based on its id in jQuery?

    - by Michael
    I have multiple dynamically generated buttons with a class name of ".button". Each of these are given an unknown ID value used to uniquely identify them. In jQuery I must select one and alert the values. <div class="button" id="3"></div> The ID value is dynamically generated, therefore I do not know it. I'm new to jQuery but am basically looking for something like this: $(".button").attr("id").val(); How do I target one button when there are many? Thanks!

    Read the article

  • Continously scrolling views

    - by Michael
    How to create continuously scrolling view (by quick scroll) like in camera roll? Instead of images there should be text in the view generated dynamically. Which views/controllers I have to use? The scrolling itself can be either originated by user or each designated period of time.

    Read the article

  • Sidescrolling UI on iPhone

    - by Michael
    Please lead me in the right direction. I need to provide user with small text centered on the iPhone screen. User can make quick scroll left or right in order to get the next or previous text. There can be hundreds of such text pieces. The process itself is similar to Photo application sidescrolling but much simple, no zoom. As far as I can understand I need to use UIScrollView class, then call hundreds of addSubviews? Is it the optimal way or I should always keep 3 subviews and replace them on the fly? What kind of tricks should be used to achieve the "scroll and center" effect? Thanks

    Read the article

  • .NET DB Query Without Allocations?

    - by Michael Covelli
    I have been given the task of re-writing some libraries written in C# so that there are no allocations once startup is completed. I just got to one project that does some DB queries over an OdbcConnection every 30 seconds. I've always just used .ExecuteReader() which creates an OdbcDataReader. Is there any pattern (like the SocketAsyncEventArgs socket pattern) that lets you re-use your own OdbcDataReader? Or some other clever way to avoid allocations? I haven't bothered to learn LINQ since all the dbs at work are Oracle based and the last I checked, there was no official Linq To Oracle provider. But if there's a way to do this in Linq, I could use one of the third-party ones.

    Read the article

  • Rails: How to preload a message to user

    - by Michael
    I have a Rails based prelaunch site that has some rotating background images (which are important for selling the idea of the site) that are taking too long to load, such that the users are leaving the site before they load. The only thing they're seeing is the email submission box. What's a good way to show a message to the users that the site will take some time to load but then have that message disappear after a reasonable period of time. I'm guessing a jQuery fadeOut() with a timer, but I'm not sure how long to set the timer for, because I'm not sure at what time it would start counting. Any suggestions?

    Read the article

  • Create rails record from two ids

    - by Michael Luby
    The functionality I'm trying to build allows Users to Visit a Restaurant. I have Users, Locations, and Restaurants models. Locations have many Restaurants. I've created a Visits model with user_id and restaurant_id attributes, and a visits_controller with create and destroy methods. Thing is, I can't create an actual Visit record. Any thoughts on how I can accomplish this? Or am I going about it the wrong way. Here's the code: Model: class Visit < ActiveRecord::Base attr_accessible :restaurant_id, :user_id belongs_to :user belongs_to :restaurant end View: <% @restaurants.each do |restaurant| %> <%= link_to 'Visit', location_restaurant_visits_path(current_user.id, restaurant.id), method: :create %> <% @visit = Visit.find_by_user_id_and_restaurant_id(current_user.id, restaurant.id) %> <%= @visit != nil ? "true" : "false" %> <% end %> Controller: class VisitsController < ApplicationController before_filter :find_restaurant before_filter :find_user def create @visit = Visit.create(params[:user_id => @user.id, :restaurant_id => @restaurant.id]) respond_to do |format| if @visit.save format.html { redirect_to location_restaurants_path(@location), notice: 'Visit created.' } format.json { render json: @visit, status: :created, location: @visit } else format.html { render action: "new" } format.json { render json: @visit.errors, status: :unprocessable_entity } end end end def destroy @visit = Visit.find(params[:user_id => @user.id, :restaurant_id => @restaurant.id]) @restaurant.destroy respond_to do |format| format.html { redirect_to location_restaurants_path(@restaurant.location_id), notice: 'Unvisited.' } format.json { head :no_content } end end private def find_restaurant @restaurant = Restaurant.find(params[:restaurant_id]) end def find_user @user = current_user end end

    Read the article

  • Byte manipulation in PHP

    - by Michael Angstadt
    In PHP, if you have a variable with binary data, how do you get specific bytes from the data? For example, if I have some data that is 30 bytes long, how do I get the first 8 bytes? Right now, I'm treating it like a string, using the substr() function: $data = //... $first8Bytes = substr($data, 0, 8); Is it safe to use substr with binary data? Or are there other functions that I should be using? Thanks.

    Read the article

  • Script to check a shared Exchange calendar and tehn email detial

    - by SJN
    Hi, We're running Server and Exchange 2003 here. There's a shared calendar which HR keep up-to-date detailing staff who are on leave. I'm looking for a VB Script (or alternate) which will extract the "appointment" titles of each item for the current day and then email the detail to a mail group, in doing so notifying the group with regard to which staff are on leave for the day. The resulting email body should be: Staff on leave today: Mike Davis James Stead Any ideas?

    Read the article

  • How can I view locking on a file on a file?

    - by JamesP
    Hi all, We have a database file (foxpro) on a Windows share (2003 server), we're having some problems where the program that writes to this file has to retry as the file is locked, this all happens very quickly and within a few seconds the file is available but the problem is it shouldn't be locked. Does anyone know how we can view what's locking it? Any tools available? Thanks James

    Read the article

  • Refreshing and alerting only when a keyword appears?

    - by Straightfw
    I know of the addons which reload the page and inform about any change on the website like Check4Change and Reload Every for Firefox. However, I'd love to have something which not only looks for any change but for a particular keyword or a list of keywords. I mean: something that I can configure to look for, say, "Jesse James" and it reloads every n seconds but gives me an alert/sound only when this keyword appears on the site, ignoring any other content chagne. Is there anything like this for any browser?

    Read the article

  • linux worker script/queue (php) [closed]

    - by xetrill
    Hi, I need a binary/script (php) that does the following. Start n process of X in the background and maintain the number processes. An example: - n = 50 - initially 50 processes are started - a process exits - 49 are still running - so 1 should be started again. Please, this is urgent. Thanks! Michael

    Read the article

  • excel - generate a username from a full name field

    - by mheavers
    I'm trying to generate a username using a single name field in excel which has the person's first name and last name. I'm open to what the username would be, as long as its intuitive for the user. The name fields can be tricky, as the data looks like this: Albert Abongo (2 names) Stephen Michael Essuah Ackah (4 names) Alhaji Iddrisu Abdul-KArim (3 names) I guess my ideal usernames for these people would be aabongo sackah aabdul-karim

    Read the article

  • iCal and Windows 7: Do they work together?

    - by Mike
    I'm about to buy an iTouch, mainly because of the iCal. I'm a Windows user, so does anyone know if these two play well together? I'd prefer to be able to update my calendar from either the computer or iTouch and sync. I've searched Google, but I'm sceptic so far. Any experiences, knowledge you can send my way would be appreciated (and possibly save me money). Thanks Michael

    Read the article

  • Generic sql query email alert program

    - by mellerbeck
    Has anyone ever ran across a program that in a generic manner will execute a sql query and then based on criteria email out alerts. Going to create such a framework but don't want to re create the wheel if I don't have to. It could be used to check various things like if things are setup correctly inside our ERP etc... Thanks for any thoughts. Michael

    Read the article

  • Get filename for puppet template

    - by Noodles
    I have a file that I'd like to reuse for a few different purposes. The file is 90% the same across uses, just slight differences. I'd rather not replicate the content across multiple files in puppet, so is there a way to do something like file { "/tmp/file1" : content => template("module/template.erb") } file { "/tmp/file2" : content => template("module/template.erb") } And in the template: Jack John James <% if file == "/tmp/file2" %> Jim <% end %>

    Read the article

  • CDN recommendation

    - by michaeld79
    Hey all, I am looking for a CDN service that is able to update the end point files on demand via API in max time of 10 min. or an expiration time for the files that is 10 min or less. In addition the CDN must have an option to upload files via API (working with PHP in my project). thanks in advance michael D

    Read the article

  • Securing debain with fail2ban or iptables

    - by Jimmy
    I'm looking to secure my server. Initially my first thought was to use iptables but then I also learnt about Fail2ban. I understand that Fail2ban is based on iptables, but it has the advantages of being able to ban IP's after a number of attempts. Let's say I want to block FTP completely: Should I write a separate IPtable rule to block FTP, and use Fail2ban just for SSH Or instead simply put all rules, even the FTP blocking rule within the Fail2Ban config Any help on this would be appreciated. James

    Read the article

< Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >