Search Results

Search found 1520 results on 61 pages for 'ben noland'.

Page 36/61 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • Best practice for copying private instance vars with NSCopying

    - by Ben
    I might be missing something obvious here, but I'm implementing NSCopying on one of my objects. That object has private instance variables that are not exposed via getters, as they shouldn't be used outside the object. In my implementation of copyWithZone:, I need alloc/init the new instance, but also set up its state to match the current instance. I can obviously access current private state from inside copyWithZone:, but I can't set it into the new object, because there are no accessors for that state. Is there a standard way around this while still keeping data privacy intact? Thanks.

    Read the article

  • Change sort arrow position in flex grid

    - by Ben
    Currently when sorting in a flex grid, the sort arrow that shows whether the column is sorted ascending or descending is right aligned to the column. Is there anyway to change the position of the sort arrow, such as applying padding?

    Read the article

  • Good source for studying professional software development with Visual Studio 2010?

    - by Ben
    I spent a lot of time reading blogs and tutorials on the Net regarding how to do this and that with VS2010, but I thought it would be better to learn it in a more systematic way. Do you know of a good website/book that will teach me how to use Visual Studio 2010/2008 Team System + Microsoft Project to perform various tasks from Project Management to code development and testing in the way the software was designed for? Thank you.

    Read the article

  • N-Tiered application design tool

    - by Ben V
    I'm beginning the design of a medium-sized web application. I usually like to design from the top down, i.e., start at the highest level and design my way down. I am planning to have the following layers: Presentation (PHP/Ajax) Business Logic Data Access Database Now I'd like to start sketching out the major objects in each layer and the interaction between layers. Is there a tool more specific to this purpose than just using a graphics/diagramming tool like Visio?

    Read the article

  • Regex for multi-line HTML comments (preg_match_all)

    - by Ben
    I have an html document with multiple commented-out PHP arrays, e.g.: <!-- Array ( [key] => 0 ) --> Using PHP, I need to somehow parse the HTML for only these comments (there are other comments that will need to be ignored) and extract the contents. I've been trying to use preg_match_all but my regex skills aren't up to much. Could anyone point me in the right direction? Any help is much appreciated!

    Read the article

  • How do I retrieve the zero-based index of the selected option in a select box?

    - by Ben McCormack
    Let's say I have the following in my HTML code: <select name="Currency" id="Currency"> <option value="0.85">Euro</option> <option value="110.33">Japanese Yen</option> <option value="1.2">Canadian Dollars</option> </select> Using jQuery, I can use $("#Currency").val() to give me the selectd value, and I can use $("#Currency :selected").text() to get the selected text. What do I need to do to get the zero-based index (in this case, 0, 1, or 2) of the current selection?

    Read the article

  • Crashing the OS X Pasteboard

    - by Ben Packard
    I have an application that reads in text by emulating CMD-C copy commands and reading the pasteboard - unfortunately this the only way to achieve what I need. Occasionally, something goes wrong in execution (not sure yet if it's related to the copy command or not) and the app crashes. Once in a while, this has a knock on effect on the system-wide pasteboard - any other application that is running will crash if I attempt a copy, cut, or paste. Is there a robust way to handle this - something I should be doing with the NSPasteboard before exiting? Any information on what might be happening is appreciated. For completeness, here are the only snippets of code that access the pasteboard: Reading from the pasteboard: NSString *pBoardText = [[NSPasteboard generalPasteboard]stringForType:NSStringPboardType]; Initially clearing the pasteboard (I run this only once, at launch): [[NSPasteboard generalPasteboard] declareTypes: [NSArray arrayWithObject:NSStringPboardType] owner: self]; [[NSPasteboard generalPasteboard] setString: @"" forType: NSStringPboardType];

    Read the article

  • CURL on PHP 5.2 works in CLI but not in IIS

    - by Ben Reisner
    I have a Windows 2003 Server running IIS with php 5.2.8, I'm trying to use CURL, and it works in CLI mode (if i execute php.exe) but it does not seem to be registered when running under IIS. The output of PHP info in both CLI and IIS show the same 'Loaded Configuration File', but under IIS it does not give the CURL info box. c:\program files\php\php.exe -i shows ... Loaded Configuration File => C:\Program Files\PHP\php.ini ... curl cURL support => enabled cURL Information => libcurl/7.16.0 OpenSSL/0.9.8i zlib/1.2.3 phpinfo() ... Loaded Configuration File => C:\Program Files\PHP\php.ini ... NOTE: This server also runs php 5.3 in c:\program files\php-5.3.0 and CURL does properly work with that installation.

    Read the article

  • Please help me work out this error, regarding the use of a HTTPService to connect Flex4 & Ruby on Ra

    - by ben
    I have a HTTPService in Flash Builder 4, that is defined as follows: <s:HTTPService id="getUserDetails" url="http://localhost:3000/users/getDetails" method="GET"/> It gets called as follows: getUserDetails.send({'user[username]': calleeInput.text}); Here is a screenshot of the network monitor, showing that the parameter is being sent correctly (it is 'kirsty'): Here is the Ruby on Rails method that it's connected to: def getDetails @user = User.find_by_username(:username) render :xml => @user end When I run it, I get the following error output in the console: Processing UsersController#list (for 127.0.0.1 at 2010-04-30 17:48:03) [GET] User Load (1.1ms) SELECT * FROM "users" Completed in 30ms (View: 16, DB: 1) | 200 OK [http://localhost/users/list] Processing UsersController#getDetails (for 127.0.0.1 at 2010-04-30 17:48:13) [GET] Parameters: {"user"={"username"="kirsty"}} User Load (0.3ms) SELECT * FROM "users" WHERE ("users"."username" = '--- :username ') LIMIT 1 ActionView::MissingTemplate (Missing template users/getDetails.erb in view path app/views): app/controllers/users_controller.rb:36:in getDetails' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' Rendering rescues/layout (internal_server_error) I'm not sure if the error is being caused by bad code in the getDetails Ruby on Rails method? I'm new to RoR, and I think I remember reading somewhere that every method should have a view. I'm just using this method to get info into the Flex 4 app, do I still need to make a view for it? Is that what's causing the error? Any help would be GREATLY appreciated, I've been stuck on this for a few days now! Thanks.

    Read the article

  • Login and register page PHP

    - by Ben
    How do I make a log in (as one document) and register (as another document) page for my site using PHPMyAdmin? So that people can register and log into my site. Thanks! Benjamin

    Read the article

  • How do I specify MSBuild to execute command-line calls in ascii not unicode

    - by Ben L
    I'm attempting to target VC7.1 (visual studio 2003 sp1) from Visual Studio 2010. I'm so close to setting it to work. But when I build, I get this error. 1------ Build started: Project: AnExample, Configuration: Release Win32 ------ 1 Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.6030 for 80x86 1 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. 1 1 cl ÿ_/ 1 1cl : Command line warning D4024: unrecognized source file type 'ÿ_/', object file assumed 1 Microsoft (R) Incremental Linker Version 7.10.6030 1 Copyright (C) Microsoft Corporation. All rights reserved. 1 1 /out:.exe 1 ¦/ 1LINK : fatal error LNK1181: cannot open input file ' ¦/.obj' I know this is unsupported but I thought I'd give it a go. Does anyone know how to force the output from msbuild to be ascii or if this is the problem? There were some errors like this years ago related to the DDK acorrding to some other forums. Thanks.

    Read the article

  • Checking if MySQL Database data does not exist

    - by Ben Sinclair
    I have my songs set-up in my MySQL database. Each song is is either assigned multiple locations or has no locations at all. Only the songs that either have no locations assigned in the database or have the location assigned to the ones specified below should be pulled from the database. Hopefully when you understand my query below it will make sense SELECT s.* FROM roster_songs AS s LEFT JOIN roster_songs_locations AS sl ON sl.song_id = s.id WHERE EXISTS ( SELECT sl2.* FROM roster_songs_locations AS sl2 WHERE s.id != sl2.song_id ) OR ( sl.location_id = '88fb5f94-aaa6-102c-a4fa-1f05bca0eec6' OR sl.location_id = '930555b0-a251-102c-a245-1559817ce81a' ) GROUP BY s.id The query almost works except it pulls out of the database songs that are assigned to sl.location_id's that aren't specified in the above query. I think it has something to do with my EXISTS code picking them up... Any ideas how I can get this to work?

    Read the article

  • mySQL ORDER BY ASC works, DESC does not...

    - by Ben
    I've "integrated" SMF into Wordpress by querying the forum for a list of the most recent videos from a specific forum board and displaying them on the Wordpress homepage. However when I add the ORDER BY clause, the query (which I tested on other parts of the same page successfully), breaks. To add to the mix, I am using the Auto Embed plugin to allow the videos to be played on the homepage, as well as using a jCarousel feature to rotate them. People were kind enough to help me here last time with the regexp to filter the video urls, I'm hoping for the same luck this time! Here is the entire function (remove the DESC and it works...): function SMF_getRecentVids($limit=10){ global $smf_settingsphp_d; if(file_exists($smf_settingsphp_d)) include($smf_settingsphp_d); include "AutoEmbed-1.4/AutoEmbed.class.php"; $AE = new AutoEmbed(); $connect = new wpdb($db_user,$db_passwd,$db_name,$db_server); $connect->query("SET NAMES 'UTF8'"); $sql = SELECT m.subject, m.ID_MSG, m.body, m.ID_TOPIC, m.ID_BOARD, t.ID_FIRST_MSG FROM {$db_prefix}messages AS m LEFT JOIN {$db_prefix}topics AS t ON (m.ID_TOPIC = t.ID_TOPIC) WHERE (m.ID_BOARD = 8) ORDER BY t.ID_FIRST_MSG DESC"; $vids = $connect->get_results($sql); $c = 0; $content = "imageCarousel_itemList = ["; foreach ($vids as $vid) { if ($c > $limit) continue; //extract video code from body $input = $vid->body; $regexp = "/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i"; if(preg_match_all($regexp, $input, $matches)) { $AE->parseUrl($matches[0][0]); $imageURL = $AE->getImageURL(); $AE->setWidth(290); $AE->setHeight(240); $content .= "{url: '".$AE->getEmbedCode()."', title: '".$vid->subject."', caption: '', description: ''},"; } $c++; } $content .= "]"; echo $content; $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); }

    Read the article

  • Will the following NHibernate interface mapping work?

    - by Ben Aston
    I'd like to program against interfaces when working with NHibernate due to type dependency issues within the solution I am working with. SO questions such as this indicate it is possible. I have an ILocation interface and a concrete Location type. Will the following work? HBM mapping: <class name="ILocation" abstract="true" table="ILocation"> <id name="Id" type="System.Guid" unsaved-value="00000000-0000-0000-0000-000000000000"> <column name="LocationId" /> <generator class="guid" /> </id> <union-subclass table="Location" name="Location"> <property name="Name" type="System.String"/> </union-subclass> </class> Detached criteria usage using the interface: var criteria = DetachedCriteria.For<ILocation>().Add(Restrictions.Eq("Name", "blah")); var locations = criteria.GetExecutableCriteria(UoW.Session).List<ILocation>(); Are there any issues with not using the hilo ID generator and/or with this approach in general?

    Read the article

  • How can I stop SQL Server Management Studio replacing 'SELECT *' with the column list ?

    - by Ben McIntyre
    SQL Server Mgmt Studio is driving me crazy. If I create a view and SELECT '*' from a table, it's all OK and I can save the view. Looking at the SQL for the view (eg.by scripting a CREATE) reveals that the 'SELECT *' really is saved to the view's SQL. But as soon as I reopen the view using the GUI (right click modify), SELECT * is replaced with a column list of all the columns in the table. How can I stop Management Studio from doing this ? I want my 'SELECT *' to remain just that. Perhaps it's just the difficulty of googling 'SELECT *' that prevented me from finding anything remotely relevant to this (i did put it in double quotes). Please, I am highly experienced in Transact-SQL, so please DON'T give me a lecture on why I shouldn't be using SELECT *. I know all the pros and cons and I do use it at times. It's a language feature, and like all language features can be used for good or evil (I emphatically do NOT agree that it is never appropriate to use it). Edit: I'm giving Marc the answer, since it seems it is not possible to turn this behaviour off. Problem is considered closed. I note that Enterprise Manager did no similar thing. The workaround is to either edit SQL as text, or go to a product other than Managment Studio. Or constantly edit out the column list and replace the * every time you edit a view. Sigh.

    Read the article

  • Factory Girl: Automatically assigning parent objects

    - by Ben Scheirman
    I'm just getting into Factory Girl and I am running into a difficulty that I'm sure should be much easier. I just couldn't twist the documentation into a working example. Assume I have the following models: class League < ActiveRecord::Base has_many :teams end class Team < ActiveRecord::Base belongs_to :league has_many :players end class Player < ActiveRecord::Base belongs_to :team end What I want to do is this: team = Factory.build(:team_with_players) and have it build up a bunch of players for me. I tried this: Factory.define :team_with_players, :class => :team do |t| t.sequence {|n| "team-#{n}" } t.players {|p| 25.times {Factory.build(:player, :team => t)} } end But this fails on the :team=>t section, because t isn't really a Team, it's a Factory::Proxy::Builder. I have to have a team assigned to a player. In some cases I want to build up a League and have it do a similar thing, creating multiple teams with multiple players. What am I missing?

    Read the article

  • Why does the jQuery on this page work for Internet Explorer 8, but nothing else?

    - by Ben McCormack
    I made a web page that uses jQuery: http://benmccormack.com/demo/MichaelMassPsalm/Psalm16Mode5.html When you change the selection in the combo box from Higher Key to Lower Key, all of the music images are supposed to change their source to be images that represent the lower key signature. This works great in IE8, but it won't work in Safari, Firefox, or Chrome. Why not? Here's the jQuery code that I'm using: $(document).ready(function () { $("#musicKey").change(function (event) { if ($("#musicKey").val() * 1) { $("img[src*='Low'").each(function (index) { $(this).attr("src", $(this).attr("src").replace("Low", "High")); }); } else { $("img[src*='High'").each(function (index) { $(this).attr("src", $(this).attr("src").replace("High", "Low")); }); } }); });

    Read the article

  • Loop Control within a DataflowTask in ETL

    - by Ben
    Hi, Being fairly new to SSIS and the ETL process, I was wondering if there is anyway to loop though a record set within a DataFlowTask and pass each row (deriving parameters from the row) into a Stored Procedure (the next step in the ETL phase). Once i have passed the row into the stored procedure, I want the results from each iteration to be written to a Table. Does anyone know how to do this? Thanks.

    Read the article

  • How do I make a SignalR client something when it receives a message?

    - by Ben
    I want to do something when a client receives a message via a SignalR hub. I've put together a basic chat app, but want people to be able to "like" a chat comment. I'm thinking the way to do this is to find the chat message on the client's page and update it using javascript. In the meantime to "prove the concept" I just want to make an alert popup on the client machine to say another user likes the comment. Trouble is, I'm not sure where to put it. (Am struggling to find SignalR documentation to be honest.) can't get my head round what is calling what here. My ChatHub class is as follows: public class ChatHub : Hub { public void Send(string name, string message) { // Call the broadcastMessage method to update clients. Clients.All.broadcastMessage(name, message); } } And my JavaScript is: $(function () { // Declare a proxy to reference the hub. var chat = $.connection.chatHub; // Create a function that the hub can call to broadcast messages. chat.client.broadcastMessage = function (name, message) { // Html encode display name and message. var encodedName = $('<div />').text(name).html(); var encodedMsg = $('<div />').text(message).html(); // Add the message to the page. var divContent = $('#discussion').html(); $('#discussion').html('<div class="container">' + '<div class="content">' + '<p class="username">' + encodedName + '</p>' + '<p class="message">' + encodedMsg + '</p>' + '</div>' + '<div class="slideout">' + '<div class="clickme" onclick="slideMenu(this)"></div>' + '<div class="slidebutton"><img id="imgid" onclick="likeButtonClick(this)" src="Images/like.png" /></div>' + '<div class="slidebutton"><img onclick="commentButtonClick(this)" src="Images/comment.png" /></div>' + '<div class="slidebutton" style="margin-right:0px"><img onclick="redcardButtonClick(this)" src="Images/redcard.png" /></div>' + '</div>' + '</div>' + divContent); }; // Set initial focus to message input box. $('#message').focus(); // Start the connection. $.connection.hub.start().done(function () { $('#sendmessage').click(function () { // Call the Send method on the hub. chat.server.send($('#lblUser').html(), $('#message').val()); // Clear text box and reset focus for next comment. $('#message').val('').focus(); }); });

    Read the article

  • iPod touch debugging: Error on install/run only if app exists on device already?

    - by Ben
    Hi all, I am using an iPod to test an app. The device is all set up with the right provisioning profiles, etc-- that's not really the issue. But every time I start the app from Xcode on the device, I get the "A signed resource has been added, modified, or deleted." error from the Organizer window. Wait, I know, you think it's a provisioning profile problem. But here's the kicker: if I just delete the app from the iPod (using the main screen) and try again, it works fine. I only get this error when the app is already installed. The other kicker is that this behavior doesn't happen on an iPhone that I have for occasional testing-- on that device, I can start/restart/restart indefinitely. But using the iPod, my compile-run-test cycle is annoyingly slow since I have to manually delete the app each time. Any ideas? I'm using Xcode 3.2.2 (prerelease) FWIW. The iPod has stock OS 3.1.2 on it. Thanks!

    Read the article

  • Git pack file entry format

    - by Ben Collins
    My understanding of the Git pack file format is something like: Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive bytes with the MSB set, followed by compressed data. In the first byte whose MSB is not set, is the MSB part of the compressed data, or is it a gap? If it's part of the compressed data, how can you guarantee that when the data is compressed that bit won't be set?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >