Search Results

Search found 1666 results on 67 pages for 'andrew findlay'.

Page 50/67 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Re-execute target when specified as dependency to multiple rules

    - by andrew
    I have the following GNU makefile: .PHONY a b c d a: b c b: d c: d d: echo HI I would like the target 'd' to be run twice -- since it is specified as a dependency by both b & c. Unfortunately, the target 'd' will be executed only once. The output of running make will simply be 'HI', instead of 'HI HI'. How can I fix this? Thanks! To Clarify, the goal is something like this: subdirs = a b c build: x y x: target=build x: $(subdirs) y: target=prepare y: $(subdirs) $(subdirs): $(make) -f $@/makefile $(target)

    Read the article

  • Managing several custom content types from one module(drupal)

    - by Andrew
    Is it possible to declare and manage several custom content types inside one module? I'm creating a site that needs four custom content types and I'd like to manage them from one module instead of creating module for every content type. After some testing, I found out that it seems impossible. Because, unless hook_form and content type share the same name of module, drupal doesn't call hook_form. Here's how I'd like to do - function mycontent_node_info(){ return array( 'mycontent1' => array( 'name' => t('....'), 'module' => 'mycontent', 'description' => t('...), 'has_title' => TRUE, 'title_label' => t('Title'), 'has_body' => TRUE, 'body_label' => t('content body'), ), 'mycontent2' => array( ....... ), 'mycontent3' => array( ...... ), 'mycontent4' => array( ...... ), ); } function mycontent1_form(&$node){ $form['control1'] = array( '#type' => 'select', '#options' => array( '0' => t('selection 1'), '1' => t('selection 2'), ), '#attributes' => array('id'=>'control1'), ); $form['control2'] = array( '#type' => 'select', '#options' => array( '0' => t('1'), '1' => t('2'), '2' => t('3'), '3' => t('4'), ), '#attributes' => array('id'=>'control2'), ); return $form; } function mycontent2_form(&$node){ .... } function mycontent3_form(&$node){ .... } function mycontent4_form(&$node){ .... } Am I doing something wrong here or is not possible and there's no alternative other than creating module for every content types. I appreciate much your help.

    Read the article

  • NHibernate. Initiate save collection at saving parent

    - by Andrew Kalashnikov
    Hello, colleagues. I've got a problem at saving my entity. MApping: ?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Clients.Core" namespace="Clients.Core.Domains"> <class name="Sales, Clients.Core" table='sales'> <id name="Id" unsaved-value="0"> <column name="id" not-null="true"/> <generator class="native"/> </id> <property name="Guid"> <column name="guid"/> </property> <set name="Accounts" table="sales_users" lazy="false"> <key column="sales_id" /> <element column="user_id" type="Int32" /> </set> Domain: public class Sales : BaseDomain { ICollection<int> accounts = new List<int>(); public virtual ICollection<int> Accounts { get { return accounts; } set { accounts = value; } } public Sales() { } } When I save Sales object Account collection don't save at sales_users table. What should I do for saving it? Please don't advice me use classes inside List Thanks a lot.

    Read the article

  • GUI style question: Icons in context menus?

    - by Andrew White
    Hi, It seems like not so long ago that it was standard to have icons/images in context menus and Microsoft seems to keep this up. But nowadays it seems to have disappeared in other apps: Chrome, iTunes etc. Anyone have an opinion / idea why this has happened or is it just completely personal taste (I for one like the images). A.

    Read the article

  • What are the primary advantages of Visual Studio Team Foundation Server over the other versions?

    - by Andrew Dunaway
    We are looking into the possibility of upgrading to Team Foundation Server 2008 for our development team. One of our primary reasons is some of the deployment capabilities surrounding BizTalk 2009, but I am curious what other benefits there are for other projects outside of BizTalk. Some of our interests so far are moving to a one click build and deploy process, the addition of unit tests, and continuous integration. Some definite steps forward for the company I work for. What other benefits or information should I look at as I pitch this to upper management? I am looking for technical reasons, money is a not really a concern for this discussion.

    Read the article

  • HTML dynamic tags insert looks different compared to static layout

    - by Andrew Florko
    I program HTML interface with jquery. There is editable list of publications on the page and user can click any publication to edit details. Popup window appears with data and there is list of authors embedded into details form. There are edit/delete buttons against every of them + "add new author" button. User manipulates authors without page reload. When I insert a new author there are new edit/delete buttons created dynamically & embedded into page. I insert tags like this: <td class="author-actions"> <img onclick='edit(id)' .../> <img onclick='delete(id)' .../> </td> Just the same html-layout that is sent from web-server when popup window appears. But somehow it looks different. There is extraspace between images though firebug demonstrates the same css attributes applied. If I select with mouse inserted layout with IE, somehow it can reorder and become the same-looklike as the those, send by web-server. What can it be?

    Read the article

  • Powershell Select-Object from array not working

    - by Andrew
    I am trying to seperate values in an array so i can pass them to another function. Am using the select-Object function within a for loop to go through each line and separate the timestamp and value fields. However, it doesn't matter what i do the below code only displays the first select-object variable for each line. The second select-object command doesn't seem to work as my output is a blank line for each of the 6 rows. Any ideas on how to get both values $ReportData = $SystemStats.get_performance_graph_csv_statistics( (,$Query) ) ### Allocate a new encoder and turn the byte array into a string $ASCII = New-Object -TypeName System.Text.ASCIIEncoding $csvdata = $ASCII.GetString($ReportData[0].statistic_data) $csv2 = convertFrom-CSV $csvdata $newarray = $csv2 | Where-Object {$_.utilization -ne "0.0000000000e+00" -and $_.utilization -ne "nan" } for ( $n = 0; $n -lt $newarray.Length; $n++) { $nTime = $newarray[$n] $nUtil = $newarray[$n] $util = $nUtil | select-object Utilization $util $tstamp = $nTime | select-object timestamp $tstamp }

    Read the article

  • Batch file writing to log then ending process

    - by Andrew Service
    I have a batch file that calls a process and in that process I have: IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% Now I wanted to upgrade this a bit and give some meaningful message to an output log when if the process fails, also I do not want the main batch to continue processing because the next processes are dependent on data from previous calls; I wonder if this would be correct but not sure: CALL Process 1 IF %ERRORLEVEL% NEQ 0 GOTO ErrorInfirstProcess /B %ERRORLEVEL% :ErrorInfirstProcess ECHO Process 1 Failed on %Date% at %Time%. >>C:\Log.txt" CALL Process 2 IF %ERRORLEVEL% NEQ 0 GOTO ErrorInSecondProcess /B %ERRORLEVEL% :ErrorInSecondProcess ECHO Process 2 Failed on %Date% at %Time%. >>C:\Log.txt" I also want to know if I still need the /B or do I need to put an EXIT command after the echo? Thanks A

    Read the article

  • sharpsvn search repository commits

    - by Andrew Day
    Using sharpsvn I want to search all of the comments on the commited files in our svn server for specific strings. but i cannot get this to work. I have tried the following but it does not like my target path. Error: Revision type requires a working copy path, not a URL SvnRevisionRange range = new SvnRevisionRange(SvnRevision.Working, SvnRevision.Zero); string targetPath = "http://********:81/svn/"; Collection<SvnLogEventArgs> items; SvnLogArgs args = new SvnLogArgs { Range = range }; client.GetLog(new Uri(targetPath), args, out items); any ideas would be great

    Read the article

  • asp.net mvc route clashing with physical path in IIS7

    - by Andrew Bullock
    I'm messing about with controller organisation and I've hit a problem. If I have the following physical structure /Home/HomeController.cs /Home/Index.aspx /Home/About.aspx and I request the URI: /Home/Index I get a 403 Directory Listing Denied :( (im using a custom IControllerFactory and IViewEngine to look in this non-default path) Why is this happening? (I know the 403 is because its hitting the /Home folder, but why is it hitting the folder?) Why doesn't the UrlRoutingModule rewrite the route and let the controller pick up the request? Application_BeginRequest fires, but then it seems to pass control back to IIS to try and serve from the filesystem. Is it the UrlRoutingModule that defaults to a physical path if it exists before rewriting? Is there a way to make this work? N.B. Please don't suggest relocating my controllers etc. I know this is an obvious option, but that isn't the question ;) Using IIS7 In Integrated Mode Thanks

    Read the article

  • Using javascript to print images

    - by andrew
    Hi all, I would like to know if it's possible to use javascript to open a popup window containing an image, and at the same time have the print dialog show. Once someone clicks on print, the popup closes. Is this easily attainable?

    Read the article

  • Really basic Django E-commerce? Where do I start

    - by Andrew
    I'm trying to set up a really basic e-commerce site with Django, and am trying to figure out the best place to start. I am relatively comfortable with the framework itself, but have never done any sort of e-commerce development in any language, so I want to learn about some best practices so I don't make any huge or obvious mistakes. I've looked at Satchmo, and even went as far as installing and playing around with it, but it looks like way more than I want. I basically want to show users a list of things, and let them click a button to buy one. No cart, no shipping, just click a button, connect with Authorize.net (or something similar) to do the transaction, and then display a confirmation page. Any suggestions or online tutorials people have found helpful? Even perhaps a tutorial in another language. Or maybe a really lightweight Django plugin that doesn't try to do everything like Satchmo? I've been coming up with very little so far. Thanks!

    Read the article

  • Selenium: How to click an HTML button element?

    - by Andrew
    I have button on the page that being used as a link to another page. So when the user clicks the button they are redirected to the right page. I am using the Selenium extension for PHPUnit and I would like to test that the button is correctly redirecting the user. Here is the HTML that I am trying to test: <button onclick="window.location='/sponsor';" value="Continue" type="button" id="sponsorContinue" name="sponsorContinue">Continue</button> I have tried a lot of different approaches to click the button, but I can't seem to get any of them to work: $this->click("//button[@id='sponsorContinue']"); This command executes and does not throw any errors, but the page isn't redirected. It works fine when I manually click the button. What should I do?

    Read the article

  • Why does Google append while(1); in front of their JSON responses?

    - by Andrew Koester
    This is something I've always been curious about, is exactly why Google appends while(1); in front of their (private) JSON responses. For example, here's a response while turning a calendar on and off in Google Calendar: while(1);[['u',[['smsSentFlag','false'],['hideInvitations','false'],['remindOnRespondedEventsOnly','true'],['hideInvitations_remindOnRespondedEventsOnly','false_true'],['Calendar ID stripped for privacy','false'],['smsVerifiedFlag','true']]]] I would assume this is to prevent people from doing an eval() on it, but all you'd really have to do is replace the while and then you'd be set. I would assume eval prevention is to make sure people write safe JSON parsing code. I've seen this used in a couple other places, too, but a lot more so with Google (Mail, Calendar, Contacts, etc.) Strangely enough, Google Docs starts with &&&START&&& instead, and Google Contacts seems to start with while(1); &&&START&&&. Does anyone know what's going on here?

    Read the article

  • jQuery doesn't fire some events while I'm not logged in (Joomla)

    - by Andrew Sekaev
    So basically, .resize function fails until I log in. What does that mean? And how that can be fixed? Almost all other functions work fine. The site is still in developement, so no live version sadly. UPDATE: jQuery(window).resize(function() { var windowSize = jQuery(window).width() var windowWidth = (jQuery(window).width()-60)/6; var windowHeight = windowWidth/1.6; /*grid resize*/ jQuery('.xc-block').css({'width':windowWidth, 'height':windowHeight}); }); This is very simple script, cant really tell what can be wrong... Any thoughts guys? P.S:also no errors in FireBug...

    Read the article

  • Logging a certain event only once in ruby

    - by Andrew Grimm
    Are there any logging frameworks in ruby that allow you to log a specific event type only once? logger = IdealLogger.new logger.log(:happy_path, "We reached the happy path") # => logs this message logger.log(:happy_path, "We reached the happy path yet again") # => Doesn't log this logger.log(:sad_path, "We've encountered a sad path!") # => logs this message Also, is there a term for the concept of logging a certain event type only once?

    Read the article

  • Setting many key/value pairs

    - by Andrew
    Hi, I'm working on a rake task which imports from a JSON feed into an ActiveRecord called Person. Person has quite a few attributes and rather than write lines of code for setting each attribute I'm trying different methods. The closest I've got is shown below. This works nicely as far as outputing to screen but when I check the values have actually been set on the ActiveRecord itself it's always nil. So it looks like I can't use .to_sym to solve my problem? Any suggestions? I should also mention that I'm just starting out with Ruby, have been doing quite a bit of Objective-c and now need to embrace the Interwebs :) http = Net::HTTP.new(url.host, url.port) http.read_timeout = 30 json = http.get(url.to_s).body parsed = JSON.parse(json) if parsed.has_key? 'code' updatePerson = Person.find_or_initialize_by_code(parsed['code']) puts updatePerson.code parsed.each do |key, value| puts "#{key} is #{value}" symkey = key.to_sym updatePerson[:symkey] = value.to_s updatePerson.save puts "#{key}....." # shows the current key puts updatePerson[:symkey] # shows the correct value puts updatePerson.first_name # a sample key, it's returning nil end

    Read the article

  • Integration tests - "no exceptions are thrown" approach. Does it make sense?

    - by Andrew Florko
    Sometimes integration tests are rather complex to write or developers have no enough time to check output - does it make sense to write tests that make sure "no exceptions are thrown" only? Such tests provide some input parameters set(s) and doesn't check the result, but only make sure code not failed with exception? May be such tests are not very useful but appropriate in situations when you have no time?

    Read the article

  • Why can't you return a List from a Compiled Query?

    - by Andrew
    I was speeding up my app by using compiled queries for queries which were getting hit over and over. I tried to implement it like this: Function Select(ByVal fk_id As Integer) As List(SomeEntity) Using db As New DataContext() db.ObjectTrackingEnabled = False Return CompiledSelect(db, fk_id) End Using End Function Shared CompiledSelect As Func(Of DataContext, Integer, List(Of SomeEntity)) = _ CompiledQuery.Compile(Function(db As DataContext, fk_id As Integer) _ (From u In db.SomeEntities _ Where u.SomeLinkedEntity.ID = fk_id _ Select u).ToList()) This did not work and I got this error message: Type : System.ArgumentNullException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Value cannot be null. Parameter name: value However, when I changed my compiled query to return IQueryable instead of List like so: Function Select(ByVal fk_id As Integer) As List(SomeEntity) Using db As New DataContext() db.ObjectTrackingEnabled = False Return CompiledSelect(db, fk_id).ToList() End Using End Function Shared CompiledSelect As Func(Of DataContext, Integer, IQueryable(Of SomeEntity)) = _ CompiledQuery.Compile(Function(db As DataContext, fk_id As Integer) _ From u In db.SomeEntities _ Where u.SomeLinkedEntity.ID = fk_id _ Select u) It worked fine. Can anyone shed any light as to why this is? BTW, compiled queries rock! They sped up my app by a factor of 2.

    Read the article

  • getting userbase vote average and individual user's vote in the same query?

    - by Andrew Heath
    Here goes: T1 [id] [desc] 1 lovely 2 ugly 3 slender T2 [id] [userid] [vote] 1 1 3 1 2 5 1 3 2 2 1 1 2 2 4 2 3 4 In one query (if possible) I'd like to return: T1.id, T1.desc, AVG(T2.vote), T2.vote (for user viewing the page) I can get the first 3 items with: SELECT T1.id, T1.desc, AVG(T2.vote) FROM T1 LEFT JOIN T2 ON T1.id=T2.id GROUP BY T1.id and I can get the first, second, and fourth items with: SELECT T1.id, T1.desc, T2.vote FROM T1 LEFT JOIN T2 ON T1.id=T2.id WHERE T2.userid='1' GROUP BY T1.id but I'm at a loss as to how to get all four items in one query. I tried inserting a select as the fourth term: SELECT T1.id, T1.desc, AVG(T2.vote), (SELECT T2.vote FROM T2 WHERE T2.userid='1') AS userVote etc etc but I get an error that the select returns more than one row... Help? My reason for wanting to do this in one query instead of two is that I want to be able to sort the data within MySQL rather than one it's been split into a number of arrays.

    Read the article

  • Help with create action in a different show page

    - by Andrew
    Hi, I'm a Rails newbie and want to do something but keep messing something up. I'd love some help. I have a simple app that has three tables. Users, Robots, and Recipients. Robots belong_to users and Recipients belong_to robots. On the robot show page, I want to be able to create recipients for that robot right within the robot show page. I have the following code in the robot show page which lists current recipients: <table> <% @robot.recipients.each do |recipient| %> <tr> <td><b><%=h recipient.chat_screen_name %></b> via <%=h recipient.protocol_name</td> <td><%= link_to 'Edit', edit_recipient_path(recipient) %>&nbsp;</td> <td><%= link_to 'Delete', recipient, :confirm => 'Are you sure?', :method => :delete %></td> </tr> <% end %> </table> What I'd like to do is have an empty field in which the user can add a new recipient, and have tried the following: I added this to the Robots Show view: <% form_for(@robot.recipient) do |f| %> Enter the screen name<br> <%= f.text_field :chat_screen_name %> <p> <%= f.submit 'Update' %> </p> <% end %> and then this to the Robot controller in the show action: @recipient = Recipient.new @recipients = Recipient.all Alas, I'm still getting a NoMethod error that says: "undefined method `recipient' for #" I'm not sure what I'm missing. Any help would be greatly appreciated. Thank you.

    Read the article

  • Embed Git Commit Log in Rails App?

    - by Andrew
    So, I have a 'development blog' in a rails app I'm working on right now. I'm using Git for version control and deployment (although right now I'm the only person working on it). Now, when I make changes in Git I put a pretty decent log entry about what I've done. I'd love to have the Git commit log automatically posted to the development blog -- or otherwise available for others to read within the deployed site. Is there an automated way to pull the Git Commit Log into a view in a rails app?

    Read the article

  • Windows Forms application C# | Sending Tweet

    - by Andrew Craswell
    I've been able to get my Twitter web app working just fine, but I've recently decided to add Tweeting functionality from a Windows Form, but I'm having no luck sending tweets. No errors are thrown or anything. Mind looking over my code? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using TweetSharp; namespace TwitterAdvirtiser { public partial class Form1 : Form { private string cKey = "xxx"; private string cSecret = "xxx"; private string oToken = "xxx"; private string aToken = "xxx"; public Form1() { InitializeComponent(); OnStart(); } private void OnStart() { //Authenticate with Twitter TwitterService service = new TwitterService(cKey, cSecret); service.AuthenticateWith(oToken, aToken); service.SendTweet("testing"); } } } It seems like I'm authenticating just fine, I can walk through debug mode and see all my details in the TwitterUser structure, and yet my tweets never show up on my feed. Whats up? By the way, I'm using Visual Studios 2010, and .NET 4.0. I have verified that the oToken and aToken strings have my developer tokens.

    Read the article

  • Best way to remove from NSMutableArray while iterating?

    - by Andrew Grant
    In Cocoa, if I want to loop through an NSMutableArray and remove multiple objects that fit a certain criteria, what's the best way to do this without restarting the loop each time I remove an object? Thanks, Edit: Just to clarify - I was looking for the best way, e.g. something more elegant than manually updating the index I'm at. For example in C++ I can do; iterator it = someList.begin(); while (it != someList.end()) { if (shouldRemove(it)) it = someList.erase(it); }

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >