Search Results

Search found 1668 results on 67 pages for 'ben ward'.

Page 9/67 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • iphone Three20 TTMessageController Address Book

    - by Ward
    Hey there, I'm trying to use the TTMessageController from Three20 to send messages through a custom web service. I'm not clear on how I can incorporate contacts from the user's address book. I see the model mock address book in the sample app, but the sample only contains names. Is there a way to set the datasource of TTMessageController to be the address book? Thanks, Howie

    Read the article

  • Create a SSL certificate on Windows

    - by Ben Fransen
    Hi all, Since I'm very new to SSL certificates, and the creation and usage of them I figured maybe StackOverflow members can help me out. I'm from Holland, the common way of online payments is by implementing iDEAL. An online payment protocol supported by the major banks. I have to implement a 'professional' version. This includes creating a RSA private key. Based on that key I have to create a certificate and upload it to the webserver. I'm on a Windows machine and completely confused what to do. I took a look at the OpenSSL website, because the manual forwarded me to that website to get a SSL Toolkit. The manual provides two commands which have to be executed in order to create a RSA key and a certificate. The commands are: openssl genrsa -des3 –out priv.pem -passout pass:myPassword 1024 and openssl req -x509 -new -key priv.pem -passin pass:myPassword -days 3650 -out cert.cer Is there a way I can do this by a utility on a windows machine? I've downloaded PuTTy KeyGenerator. But I'm not sure what to do, I've created a key (SSH-2 RSA, whatever that is..) but how do I create a certificate with that key? Any help is much appreciated! Ben

    Read the article

  • I need git-svn to act as a Subversion v1.5+ client

    - by Ben Ward
    I'm running git 1.7 on Mac OSX, installed via Homebrew. I'm trying to use git svn to work with a Subversion server that requires Subversion 1.5 clients (a restriction enforced via a pre-commit hook.) Running git svn --version reveals that as far as git is concerned, git svn is equivalent to svn v1.4.4. I can't establish whether git svn is a total clone of subversion, and thus needs to be updated to meet subversion v1.5 functionality, or if git is compiled against or just points to some version of subversion under the hood. I've struggled finding anyone else trying to upgrade the version of git-svn, and I'm guessing this client version restriction is unusual, but I'm stuck with it (corporate environment.) Is it possible to have git operate as svn 1.5?

    Read the article

  • Problem parsing an atom feed using simplexml_load_file(), can't get an attribute.

    - by Craig Ward
    Hi, I am trying to create a social timeline. I pull in feeds form certain places so I have a timeline of thing I have done. The problem I am having is with Google reader Shared Items. I want to get the time at which I shared the item which is contained in <entry gr:crawl-timestamp-msec="1269088723811"> Trying to get the element using $date = $xml->entry[$i]->link->attributes()->gr:crawl-timestamp-msec; fails because of the : after gr which causes a PHP error. I could figure out how to get the element, so thought I would change the name using the code below but it throws the following error Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "<?xml version="1.0"?><feed xmlns:idx="urn:atom-extension:indexing" xmlns:media="http://search.yahoo.com/mrss/" xmlns <?php $get_feed = file_get_contents('http://www.google.com/reader/public/atom/user/03120403612393553979/state/com.google/broadcast'); $old = "gr:crawl-timestamp-msec"; $new = "timestamp"; $xml_file = str_replace($old, $new, $get_feed); $xml = simplexml_load_file($xml_file); $i = 0; foreach ($xml->entry as $value) { $id = $xml->entry[$i]->id; $date = date('Y-m-d H:i:s', strtotime($xml->entry[$i]->attributes()->timestamp )); $text = $xml->entry[$i]->title; $link = $xml->entry[$i]->link->attributes()->href; $source = "googleshared"; echo "date = $date<br />"; $sql="INSERT IGNORE INTO timeline (id,date,text,link, source) VALUES ('$id', '$date', '$text', '$link', '$source')"; mysql_query($sql); $i++; }` Could someone point me in the right direction please. Cheers Craig

    Read the article

  • Is Structuremap singleton thread safe?

    - by Ben
    Hi, Currently I have the following class: public class PluginManager { private static bool s_initialized; private static object s_lock = new object(); public static void Initialize() { if (!s_initialized) { lock (s_lock) { if (!s_initialized) { // initialize s_initialized = true; } } } } } The important thing here is that Initialize() should only be executed once whilst the application is running. I thought that I would refactor this into a singleton class since this would be more thread safe?: public sealed class PluginService { static PluginService() { } private static PluginService _instance = new PluginService(); public static PluginService Instance { get { return _instance; } } private bool s_initialized; public void Initialize() { if (!s_initialized) { // initialize s_initialized = true; } } } Question one, is it still necessary to have the lock here (I have removed it) since we will only ever be working on the same instance? Finally, I want to use DI and structure map to initialize my servcices so I have refactored as below: public interface IPluginService { void Initialize(); } public class NewPluginService : IPluginService { private bool s_initialized; public void Initialize() { if (!s_initialized) { // initialize s_initialized = true; } } } And in my registry: ForRequestedType<IPluginService>() .TheDefaultIsConcreteType<NewPluginService>().AsSingletons(); This works as expected (singleton returning true in the following code): var instance1 = ObjectFactory.GetInstance<IPluginService>(); var instance2 = ObjectFactory.GetInstance<IPluginService>(); bool singleton = (instance1 == instance2); So my next question, is the structure map solution as thread safe as the singleton class (second example). The only downside is that this would still allow NewPluginService to be instantiated directly (if not using structure map). Many thanks, Ben

    Read the article

  • WPF DataTemplate - Overlay

    - by David Ward
    I have a class that I need to provide the datatemplate for. Currently I have two datatemplates, one for when Enabled == true and one for when Enabled == false. The datatemplate for the class is actually the one below which changes the template used based on a trigger: <DataTemplate x:Key="ActionNodeTemplateSelector"> <ContentPresenter Content="{Binding}" Name="cp" /> <DataTemplate.Triggers> <DataTrigger Binding="{Binding Enabled}" Value="True"> <Setter TargetName="cp" Property="ContentTemplate" Value="{StaticResource ActionNodeTemplate}" /> </DataTrigger> <DataTrigger Binding="{Binding Enabled}" Value="False"> <Setter TargetName="cp" Property="ContentTemplate" Value="{StaticResource ActionNodeDisabledTemplate}" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> This all works well. However, now I want to also display an image overlay if the "Completed" property is true and a different image if it is incomplete. I could easily carry on using my approach to trigger on the Completed property as well but this would double the number of templates and feels wrong. Is there a way that I could have a trigger on my DataTemplate that will allow me to overlay the correct image over the existing template which is based on the Enabled property?

    Read the article

  • WPF Statusbar Updates - help, I seem to be going round in circles

    - by David Ward
    I seem to be going round in circles. I have a WPF application that has a main ribbon window with a status bar. When you navigate to a "view" a user control is displayed as the content of the main window. The view has a ViewModel which handles retrieving data from the database and the View's datacontext is set to the ViewModel. What I want is to have the lengthy operation (data retrieval) run on a background thread and whilst it is running the status in the main window to report appropriately. When the background task is complete, the status should revert back to "Ready" (much the same as Visual Studio). How should I wire this together so that I can have the data access code separated out in the ViewModel whilst keeping a responsive UI? I have tried using the BackgroundWorker is various places in the code and I still end up with an unresponsive UI.

    Read the article

  • VS2010 Developer Image

    - by David Ward
    I am about to create a new developer PC image for developing WPF applications using VS2010, WCF, SQL2008 and SharePoint2010. What OS should I opt for? Windows 7? Windows Server 2008 R2? I'd have thought Windows 7 to make sure that I have a similar experience during development as an end user, however I can't install SharePoint on a client OS and so thought about Windows Server 2008 R2 to help with the SharePoint development process. Thoughts?

    Read the article

  • In C#, what thread will Events be handled in?

    - by Ben
    Hi, I have attempted to implement a producer/consumer pattern in c#. I have a consumer thread that monitors a shared queue, and a producer thread that places items onto the shared queue. The producer thread is subscribed to receive data...that is, it has an event handler, and just sits around and waits for an OnData event to fire (the data is being sent from a 3rd party api). When it gets the data, it sticks it on the queue so the consumer can handle it. When the OnData event does fire in the producer, I had expected it to be handled by my producer thread. But that doesn't seem to be what is happening. The OnData event seems as if it's being handled on a new thread instead! Is this how .net always works...events are handled on their own thread? Can I control what thread will handle events when they're raised? What if hundreds of events are raised near-simultaneously...would each have its own thread? Thank in advance! Ben

    Read the article

  • ASP.NET MVC Strongly Typed Widgets

    - by Ben
    I have developed a plugin system that makes it easy to plug in new logic to an application. Now I need to provide the ability to easily add UI widgets. There are already some good responses on how to create a portal system (like iGoogle) with ASP.NET MVC, and I'm fine about the overall concept. My question is really about how we make strongly typed widgets. Essentially when we set up a widget we define the controller and action names that are used to render that widget. We can use one controller action for widgets that are not strongly typed (since we just return PartialView(widgetControlName) without a model) For widgets that are strongly typed (for example to an IList) we would need to add a new controller action (since I believe it is not possible to use Generics with ActionResult e.g. ActionResult). The important thing is that the widget developers should not change the main application controllers. So my two thoughts are this: Create new controllers in a separate class library Create one partial WidgetController in the main web project and then extend this in other projects (is this even possible?) - not possible as per @mfeingold As far as the development of the widgets (user controls) go, we can just use post build events from our extension projects to copy these into the Views/Widgets directory. Is this a good approach. I am interested to here how others have handled this scenario. Thanks Ben P.S - in case it helps, an example of how we can render widgets - without using Javascript <%foreach (var widget in Model) {%> <%if (widget.IsStronglyTyped) { Html.RenderAction(widget.Action, widget.Controller); } else { Html.RenderPartial(widget.ControlName); } %> <%} %>

    Read the article

  • Active Directory - Query Group for all machines

    - by Ben Cawley
    Hi, I'm trying to obtain a list of all Machines that are members of a known group. I have the group GUID and am constructing a query using the "memberof=" format and filtering by ObjectClass. This works fine but doesn't return machines if the PrimaryGroup attribute of a machine is set to be the known group. In this case, that machine won't be returned. I've found the explanation of why this is in the following link (See Joe Kaplan's response) http://www.eggheadcafe.com/software/aspnet/29773581/active-directory-query-c.aspx Unfortunately the outlined answer is how to obtain the list of groups from a given user. I'd like to do the reverse and from a given group obtain the list of machines. It seems that the PrimaryGroup information is stored on the Machine/User side so I'm not sure if what I want to do is even possible. I had thought I would be able to query the TokenGroup attribute of the known group and then construct a query to return all machines that have the TokenGroup attribute set but it seems that not all groups have this attribute. Does anyone have any ideas or suggestions? If any clarification is needed let me know! Cheers, Ben

    Read the article

  • Setting up a multi-site CMS, collecting thoughts about the DB schema

    - by Ben Fransen
    Hello all, I'm collecting some thoughts about creating a multisite CMS. In my opinion there are two major approaches. All data is stored into 1 database, giving me the advantage of single point of updates; Seperated databases, so each client has its own database. Giving me the advantage to measure bandwith. Option 1 gives me the disadvantage of measuring bandwith while option is giving me the disadvantage of a single point of update structure. Are there any generic approaches for creating a sort of update system? So my clients can download a small package (maybe a zip with a conf file to tell the updatescript where to put all the files and how to extend the database??) Do you guys have some thougths about the best solution for a situation like this? I have my own webserver, full access to all resources and I'm developing in PHP with MySQL as DBMS. I hope to hear from you and I surely appreciate any effort you make to help me further! Greets from Holland, Ben Fransen

    Read the article

  • ASP.NET MVC and NHibernate coupling

    - by Ben
    I have just started learning NHibernate. Over the past few months I have been using IoC / DI (structuremap) and the repository pattern and it has made my applications much more loosely coupled and easier to test. When switching my persistence layer to NHibernate I decided to stick with my repositories. Currently I am creating a new session on each method call but of course this means that I can not benefit from lazy loading. Therefore I wish to implement session-per-request but in doing so this will make my web project dependent on NHibernate (perhaps this is not such a bad thing?). I was planning to inject ISession into my repositories and create and dispose sessions on beginrequest/endrequest events (see http://ayende.com/Blog/archive/2009/08/05/do-you-need-a-framework.aspx) Is this a good approach? Presumably I cannot use session-per-request without having a reference to NHibernate in my web project? Having the web project dependent on NHibernate prompts my next (few) questions - why even bother with the repository? Since my web app is calling services that talk to the repositories, why not ditch the repositories and just add my NHibernate persistance code inside the services? And finally, is there really any need to split out into so many projects. Is a web project and an infrastructure project sufficient? I realise that I have veered off a bit from my original question but it seems that everyone seems to have their own opinion on these topics. Some people use the repository pattern with NHibernate, some don't. Some people stick their mapping files with the related classes, others have a separate project for this. Many thanks, Ben

    Read the article

  • Bibtex with no references title

    - by Bryan Ward
    I am working on writing a scientific poster in LaTeX, and I want to include a few references for my work. Because this is a poster, I have my own customized headers for different sections, and don't want my related works to have a separate title. Essentially I have something like this: \begin{textblock}{5.5}(19.5,11) \CHead{Related Work} %a newcommand header I wrote \bibliographystyle{acm} \bibliography{mybib} \end{textblock} And it comes out with a header called "Related Work" like I want, but it also under that says "References", which I don't want. I found a few websites that said that I could override this with something like \renewcommand\refname{} But all this does is take the word "References" out, but the space allotted for the title is still there. Is there a way to completely eliminate the title and any space it may take up?

    Read the article

  • Codeigniter: Retrieving a variable from Model to use in a Controller

    - by Craig Ward
    Hi, I bet this is easy but been trying for a while and can't seem to get it to work. Basically I am setting up pagination and in the model below I want to pass $total_rows to my controller so I can add it to the config like so '$config['total_rows'] = $total_rows;'. function get_timeline_filter($per_page, $offset, $source) { $this->db->where('source', $source); $this->db->order_by("date", "desc"); $q = $this->db->get('timeline', $per_page, $offset); $total_rows = $this->db->count_all_results(); if($q->num_rows() >0) { foreach ($q->result() as $row) { $data[] = $row; } return $data; } } I understand how to pass things form the Controller to the model using $this->example_model->example($something); but not sure how to get a variable from the model?

    Read the article

  • iPhone - Reset UINavigation Controller

    - by Ward
    Hey there, I have a UINavigationController inside a UITabBarController. When a user presses the first tab, I want to reset the navigation controller back to the first screen instead of displaying whichever view they last selected in the navigation controller. Is there an easy way to reset the stack? Thanks, Howie

    Read the article

  • Rhino Mocks - Fluent Mocking - Expect.Call question

    - by Ben Cawley
    Hi, I'm trying to use the fluent mocking style of Rhino.Mocks and have the following code that works on a mock IDictionary object called 'factories': With.Mocks(_Repository).Expecting(() => { Expect.Call(() => factories.ContainsKey(Arg<String>.Is.Anything)); LastCall.Return(false); Expect.Call(() => factories.Add(Arg<String>.Is.Anything, Arg<Object>.Is.Anything)); }).Verify(() => { _Service = new ObjectRequestService(factories); _Service.RegisterObjectFactory(Valid_Factory_Key, factory); }); Now, the only way I have been able to set the return value of the ContainsKey call is to use LastCall.Return(true) on the following line. I'm sure I'm mixing styles here as Expect.Call() has a .Return(Expect.Action) method but I can't figure out how I am suppose to use it correctly to return a boolean value? Can anyone help out? Hope the question is clear enough - let me know if anyone needs more info! Cheers, Ben

    Read the article

  • how to use json_encode without PHP 5.2

    - by Ashley Ward
    I've written a CMS which uses the PHP function json_encode to send some data back via an Ajax Request. Unfortunately, I'm trying to load it onto a server which is running PHP version 5.1, the json_encode PHP function is not available on versions of PHP before 5.2.0. Does anyone know of a way to encode a PH array as JSON without using the inbuilt json_encode function?

    Read the article

  • I deleted a full set of columns in a save, but have the original larger sheet, Can I get that back?

    - by Ben Henley
    I have an original sheet that has over 39000 lines in it. I knocked it down to 1800 lines that I want to improt into my database, however. The Dumb#$$ that I am, I selected only the visible cells and killed like 10 columns that I need. Is there a way to compare to the original sheet using a specific column... i.e. SKU and pull the data from the origianal to put back in the missing columns or do I have to just re-edit the whole thing down again. Please help as this takes a good day or two to minimize. Any and all help is much appreciated. Below is the column list on the edited sheet vs. the original sheet. SKU DESCRIPTION VENDOR PART # RETAIL UNIT CONVERSION RETAIL U/M RETAIL DEPARTMENT VENDOR NAME SELL PACK QUANTITY BREAK SELL PACK FLAG BLISH VENDOR # FINE LINE CLASS ITEM ACTION FLAG PRIMARY UPC STOCK U/M WEIGHT LENGTH WIDTH HEIGHT SHIP-VIA EXCLUSION HAZARDOUS CODE PRICE SUGGESTED RETAIL SKU DESCRIPTION RETAIL UNIT CONVERSION RETAIL U/M RETAIL DEPARTMENT VENDOR NAME SELL PACK QUANTITY BREAK SELL PACK FLAG FINE LINE CLASS HAZARDOUS CODE PRICE SUGGESTED RETAIL RETAIL SENSITIVITY CODE 2ND UPC CODE 3RD UPC CODE 4TH UPC CODE HEADLINE BULLET #1 BULLET #2 BULLET #3 BULLET #4 BULLET #5 BULLET #6 BULLET #7 BULLET #8 BULLET #9 SIZE COLOR CASE QUANTITY PRODUCT LINE Thanks, Ben

    Read the article

  • Pulling a timestamp from an XML feed with PHP but seem to be to many digits

    - by Craig Ward
    I am pulling a timestamp from a feed and it gives 12 digits (1269088723811). When I convert it, it comes out as 1901-12-13 20:45:52, but if I put the timestamp into http://www.epochconverter.com/ it comes out as Sat, 20 Mar 2010 12:38:43 GMT, which is the correct time. epochconverter.com mentions that it maybe in milliseconds so I have amended the script to take care of it using $mil = $timestamp; $seconds = $mil / 1000; $date = date('Y-m-d H:i:s', date($seconds)); but it still converts the date wrong, 1970-01-25 20:31:23. What am I doing wrong?

    Read the article

  • Android: Hiding the keyboard in an overrided "Done" keypress of EditText

    - by Marshall Ward
    Hello, I have used a bit of Android code to override the "Done" button in my EditText field: myEditField.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { mySubroutine(); return true; } return false; } }); Activating the field calls up the keyboard, and pressing "Done" evaluates mySubroutine() successfully. However, the keyboard no longer goes away when I press "Done". How do I restore this default behaviour to the routine?

    Read the article

  • PHP 2D Array to MySQL Database

    - by Ashley Ward
    I have a PHP 2D array, many keys, each with one value, I need to put this into a MySQL database. The database has 8 fields. Eg. Field1, Field2, Field3, etc. I am trying to ensure value1 => field1, value2 =>field2, value3 => field3 and so on, when one record is full (i.e. after 8 values) a new record should be created for the next 8 values and so on. I am aware that the 1st, 9th, 17th, 26th values etc, will need an insert statement and the intermediate values will be an update statement. What is the best way of going about this?

    Read the article

  • Javascript : Submitting a form outside the actual form doesn't work

    - by Ben Fransen
    Hello all, I'm trying to achieve a fairly easy triggering mechanism for deleting multiple items from a tablegrid. If a user has enough access he/she is able to delete multiple users from a table. In the table I have set up checkboxes, one per row/user. The name of the checkboxes is UsersToDeletep[], and the value per row is the unique UserID. When a user clicks the button 'Delete selected users' a simple validation takes place to make sure at least one checkbox is selected. After that I call my simple function Submit(form). The function works perfectly when called within the form-tags, where I also use it to delete a single user. The function: function Submit(form) { document.forms[form].submit(); } I've also alerted document.forms[form]. The result is, as expected [object HTMLFormElement]. But for some reason the form just won't submit and a pagereload takes place. I'm a bit confused and can't seem to figure out what I'm doing wrong. Can anyone point me in the right direction? Thanks in advance! Ben

    Read the article

  • Need some help to determine the amount of recursive calls in PHP

    - by Ben Fransen
    Hi all, I've got a, I think fairly easy question, but this is bugging me for a while now. So I figured, maybe I can get some help here. Since recursive functions are always a bit tricky, and sometimes a bit unclear to me, I keep struggling to create a nice working solution to get my menudata. In one of my classes I have this function, which gives me all menu-items recursivly. The thing I want is to determine at which recursionlevel a certain object was retrieved so I can create a nicely looking HTML output with indents for the levels of nesting. public function GetObjectList($parentID = 0, $objectlist = null) { if(is_null($objectlist)) { $objectlist = new ObjectList("Model_Navigation"); } $query = MySQL::Query("SELECT * FROM `Navigation` WHERE `WebsiteID` = ".SITE_ID. " AND `LanguageID` = ".LANG_ID." AND `ParentID` = ".$parentID); while($result = MySQL::FetchAssoc($query)) { $object = new Model_Navigation(); $object->ID = $result["ID"]; $object->WebsiteID = $result["WebsiteID"]; $object->LanguageID = $result["LanguageID"]; $object->ParentID = $result["ParentID"]; $object->Name = $result["Name"]; $object->Page = Model_Page::GetObjectByID($result["PageID"]); $object->ExternalURL = $result["ExternalURL"]; $object->Index = $result["Index"]; $object->Level = [here lies my problem]; $objectlist->Add($object); self::GetObjectList($object->ID, $objectlist); } return $objectlist; } Hope to hear from you! Greetings from Holland, Ben Fransen

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >