Search Results

Search found 1517 results on 61 pages for 'ben tew'.

Page 47/61 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • Querying Active Directory in ruby app on Windows box

    - by Ben
    I have a small ruby app in which I'm trying to query some information from Active Directory. The app will be run by a Windows user who is already logged in. It looks like the ruby-net-ldap gem wants me to connect to an LDAP server using an IP address, port and then pass my username and password. Is there a way to achieve this (with a different gem, say) so that I don't have to pass this information (I don't have the current user's password for example, so that's not going to work)? I'm also hosting a Trac website on our intranet (which is written in Python if I remember correctly and that seems to know the current Windows username and domain. If it can do it, surely my little ruby app can access this information too?

    Read the article

  • Accessing an RSS feed in Flex, works when run from Flash Builder 4, but not when the project is onli

    - by ben
    Hey guys, In my Flex 4 app, I access an RSS feed (I'm using http://news.ycombinator.com/rss as a dummy). It works okay when I run it from Flash Builder 4, but if I export the project and upload it, I get the following error when it tries to load the RSS feed: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: my_website_url cannot load data from http://news.ycombinator.com/rss. What could be causing this error? Shouldn't RSS be able to be accessed from anywhere? Thanks for reading.

    Read the article

  • Any way to animate new elements in a GridView being added?

    - by Ben L.
    My app polls a server every 15 seconds to see if there are any new items to display, then downloads the new items and disposes of the old items so that there are always exactly 100 items in the GridView. Unfortunately, this process can be confusing to the user if they see a page of images change without knowing where the items went. My idea is that there could be some kind of animation (such as the new items being inserted at the top and pushing the older ones down the list) to show what action is happening. Unfortunately, I have no clue how to make this animation happen. Is my idea even possible? How would I accomplish this?

    Read the article

  • Seamlessly use large background images on webpages

    - by Ben Shelock
    I want to have huge background images on my site but without giving the user a hard time downloading them and the site looking ugly as the background loads. They would be no bigger than 1920 X 1080 in size, however it's hard to say in terms of kilobytes/megabytes. What are my options here and which are most effective? I'm not too bothered about bandwidth, just want to user to think everything looks nice ;)

    Read the article

  • django url matching

    - by ben
    can anyone see why this wouldn't be working. Fairly new to django so any help would be much appreciated actual url: http://127.0.0.1:8000/2010/may/12/my-second-blog-post/ urls.py: (r'(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[-w]+)/$', 'object_detail', dict(info_dict, slug_field='slug',template_name='blog/detail.html')),

    Read the article

  • Calculate angle of moving ball after collision with angled or sloped wall that is a 2D line segment

    - by Ben Mc
    If you have a "ball" inside a 2D polygon, made up of say, 4 line segments that act as bounding walls, how do you calculate the angle of the ball after the collision with the irregularly sloped wall? I know how to make the ball bounce if the wall is horizontal, vertical, or at a 45 degree angle. I also have my code setup to detect a collision with the wall. I've read about dot products and normals, but I cannot figure out how to implement these in Java / Android. I'm completely stumped and feel like I've looked up everything 10 pages deep in Google 10 times now. I'm burned out trying to figure this out, I hope someone can help.

    Read the article

  • page sends file to curl i want to get download link insted

    - by Ben
    there is a page that i need to post a password to it and then i get a file to download. the post goes to the same page address its loads again and pop up the download manager. now i want to do the same but in curl, i posted the data to the url and then its sends me the file back but i dont want my script to download the whole file i want only to get a link to download it by myself. how can i do that?

    Read the article

  • Removing object from NSMutableArray

    - by Ben Packard
    Just a small query... I stumbled across the following shortcut in setting up a for loop (shortcut compared to the textbook examples I have been using): for (Item *i in items){ ... } As opposed to the longer format: for (NSInteger i = 0; i < [items count]; i++){ ... } //think that's right If I'm using the shorter version, is there a way to remove the item currently being iterated over (ie 'i')? Or do I need to use the longer format?

    Read the article

  • Creating a unique URL safe hash

    - by Ben Foster
    I want to hash/encode a unique integer (database ID) to create a similarly unique string. It needs to meet the following requirements: Must start with a letter or number, and can contain only letters and numbers. All letters in a container name must be lowercase. Must be from 3 through 63 characters long (although the shorter the better) The result does not need to be reversible, just repeatable - so a 1-way hash would be fine.

    Read the article

  • C# Linq: Restructuring object

    - by Ben
    I'd like to take an object like this: SortedList<string, SortedList<int, SortedList<DateTime, double>>> Data and, for a given 'int' value (key of first nested sorted list), restructure it like this: SortedList<DateTime, SortedList<string, double>> or, better yet, this: SortedList<DateTime, double[]> where each 'double[]' has as many elements as there are KeyValue pairs in the SortedList. I'm guessing Linq is the way to go, but can't figure it out. Thanks for any suggestions.

    Read the article

  • Addding Custom Controls to Toolbox in visual studio

    - by Ben
    Hi, I am trying to add a dll that contains some custom 3rd party conrtols and some in house user controls and am getting the following error - "The Assembly "MyASsembly.dll" could not be loaded. Check that any dependencies the file requires are installed" I am using Visual Studio 2003 and the 3rd part controls are C1. Does anyone know what is wrong? Thanks

    Read the article

  • Why doesn't this external JavaScript load?

    - by Ben Herila
    I've been futzing with this for hours trying to figure out why codemirror.js won't load in any browser other than Firefox. Any ideas? index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title></title> <script src="CodeMirror/js/codemirror.js"></script> <link href="Styles/Style.css" rel="stylesheet" type="text/css" /> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#container-1').tabs(); }); </script> <style type="text/css"> /* (some css) */ </style> </head><body> <!-- (some stuff) --> </body></html> CodeMirror/js/codemirror.js alert("LOL");

    Read the article

  • How can I stop the browser viewport moving to the top of the page when the user clicks on a jQueryUI radio button?

    - by ben
    I have got some radio buttons setup like this: <div id="typeRadios"> <input id="note_notetype_note1" name="note[notetype]" type="radio" value="note1" /><label for="note_notetype_note1">note1</label> <input id="note_notetype_note2" name="note[notetype]" type="radio" value="note2" /><label for="note_notetype_note2">note2</label> </div> That I turn into jQueryUI buttons like this: $("#typeRadios").buttonset(); This is the resulting HTML: <input type="radio" value="note1" name="note[notetype]" id="note_notetype_note1" class="ui-helper-hidden-accessible"> <label for="note_notetype_note1" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" role="button" aria-disabled="false"><span class="ui-button-text">note1</span></label> <input type="radio" value="note2" name="note[notetype]" id="note_notetype_note2" class="ui-helper-hidden-accessible"> <label for="note_notetype_note2" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" role="button" aria-disabled="false"><span class="ui-button-text">note2</span></label> The buttons work, but whenever I click one, the browser view-port gets returned to the top of the page, the same way it happens when you click on a <a href="#">link</a> link. I am using jQuery 1.4.2 and jQueryUI 1.8.7. How can I prevent this behaviour? Thanks for reading. EDIT: The <a href="#">link</a> part was missing.

    Read the article

  • How do I add a WSDL to a Visual Studio 2005 project?

    - by Ben McCormack
    One of our vendors provides a web service API to allow their customers to validate data in a database. As part of their SDK, they provide a WSDL (Web Service Definition Language) file that, according to their documentation, can "be read by software applications and application development tools. An application tool such as Microsoft's Visual Studio can import a WSDL document and automatically generate software classes that access the Web Services the WSDL defines." I'm currently using Visual Studio 2005. What do I need to do to get Visual Studio to do the magic code generation for me?

    Read the article

  • Is there a tool to build and test a local change on multiple platforms

    - by Ben
    A company I used to work for was plagued with build breakages. So they made a tool that would zip up a developers local changes (which it detected from SCM) and send them to a remote server for a test build. The remote server would update its copy of the source with the repository and then apply the changes it received from the developer. It would then build and test the changes. We actually targeted multiple platforms so it would do the above for each of those platforms. When it was done, if everything was green, the developer was reasonable confident they could submit the change without breaking the "real" build. Are there any tools out there that do something similar?

    Read the article

  • Setting default values for inherited property without using accessor in Objective-C?

    - by Ben Stock
    I always see people debating whether or not to use a property's setter in the -init method. I don't know enough about the Objective-C language yet to have an opinion one way or the other. With that said, lately I've been sticking to ivars exclusively. It seems cleaner in a way. I don't know. I digress. Anyway, here's my problem … Say we have a class called Dude with an interface that looks like this: @interface Dude : NSObject { @private NSUInteger _numberOfGirlfriends; } @property (nonatomic, assign) NSUInteger numberOfGirlfriends; @end And an implementation that looks like this: @implementation Dude - (instancetype)init { self = [super init]; if (self) { _numberOfGirlfriends = 0; } } @end Now let's say I want to extend Dude. My subclass will be called Playa. And since a playa should have mad girlfriends, when Playa gets initialized, I don't want him to start with 0; I want him to have 10. Here's Playa.m: @implementation Playa - (instancetype)init { self = [super init]; if (self) { // Attempting to set the ivar directly will result in the compiler saying, // "Instance variable `_numberOfGirlfriends` is private." // _numberOfGirlfriends = 10; <- Can't do this. // Thus, the only way to set it is with the mutator: self.numberOfGirlfriends = 10; // Or: [self setNumberOfGirlfriends:10]; } } @end So what's a Objective-C newcomer to do? Well, I mean, there's only one thing I can do, and that's set the property. Unless there's something I'm missing. Any ideas, suggestions, tips, or tricks? Sidenote: The other thing that bugs me about setting the ivar directly — and what a lot of ivar-proponents say is a "plus" — is that there are no KVC notifications. A lot of times, I want the KVC magic to happen. 50% of my setters end in [self setNeedsDisplay:YES], so without the notification, my UI doesn't update unless I remember to manually add -setNeedsDisplay. That's a bad example, but the point stands. I utilize KVC all over the place, so without notifications, things can act wonky. Anyway, any info is much appreciated. Thanks!

    Read the article

  • ASP.NET profile deletion

    - by Ben Aston
    We use the ASP.NET profile subsystem to associate key-value pairs of information with users. I am implementing functionality for the deletion of users. I have been using the ProfileManager.DeleteProfile(string userName) method, but I have noticed that this leaves a row in the aspnet_Users table in the aspnetdb database we use to store the profile information. Clearly, I could manipulate the database directly, but I am reluctant to do so. What is the best way to ensure all information assocaited with a user is deleted from the aspnetdb? PS: there is a tantalising Membership.DeleteUser(string userName, bool deleteEverything) method, but this returns a database connection error. A web.config issue?

    Read the article

  • Draw 2 parallel lines

    - by Ben Martin
    How can I calculate the points to draw 2 parallel lines. I know the start and end points for the centre of the parallel lines. To makes thing a little bit harder, it needs to support straight and Bezier curved lines.

    Read the article

  • LINQ .Cast() extension method fails but (type)object works.

    - by Ben Robinson
    To convert between some LINQ to SQL objects and DTOs we have created explicit cast operators on the DTOs. That way we can do the following: DTOType MyDTO = (LinqToSQLType)MyLinq2SQLObj; This works well. However when you try to cast using the LINQ .Cast() extension method it trows an invalid cast exception saying cannot cast type Linq2SQLType to type DTOType. i.e. the below does not work List<DTO.Name> Names = dbContact.tNames.Cast<DTO.Name>() .ToList(); But the below works fine: DAL.tName MyDalName = new DAL.tName(); DTO.Name MyDTOName = (DTO.Name)MyDalName; and the below also works fine List<DTO.Name> Names = dbContact.tNames.Select(name => (DTO.Name)name) .ToList(); Why does the .Cast() extension method throw an invalid cast exception? I have used the .Cast() extension method in this way many times in the past and when you are casting something like a base type to a derived type it works fine, but falls over when the object has an explicit cast operator.

    Read the article

  • Sending a 'copy' command in cocoa

    - by Ben Packard
    Is there any way to send a copy (command-c) instruction without using a cgEvent to mimic the keystrokes? I don't have access to the text field in the application I want to take text from, so need to replicate manually copying to the clipboard, and there seemss to be a bug with cgevent posting. According the Quartz documentation, to type a capital Z I should use: CGEventRef event1, event2, event3, event4; event1 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)56, true); event2 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)6, true); event3 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)6, false); event4 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)56, false); However, if I attach this set of instuctions to an NSTimer, it only works the first time it is fired. example output: ZzzZzzzzZZzzZ (vs expected ZZZZZZZZZ). How else might I send a copy command to the active window?

    Read the article

  • Multithreading A Function in VB.Net

    - by Ben
    I am trying to multi thread my application so as it is visible while it is executing the process, this is what I have so far: Private Sub SendPOST(ByVal URL As String) Try Dim DataBytes As Byte() = Encoding.ASCII.GetBytes("") Dim Request As HttpWebRequest = TryCast(WebRequest.Create(URL.Trim & "/webdav/"), HttpWebRequest) Request.Method = "POST" Request.ContentType = "application/x-www-form-urlencoded" Request.ContentLength = DataBytes.Length Request.Timeout = 1000 Request.ReadWriteTimeout = 1000 Dim PostData As Stream = Request.GetRequestStream() PostData.Write(DataBytes, 0, DataBytes.Length) Dim Response As WebResponse = Request.GetResponse() Dim ResponseStream As Stream = Response.GetResponseStream() Dim StreamReader As New IO.StreamReader(ResponseStream) Dim Text As String = StreamReader.ReadToEnd() PostData.Close() Catch ex As Exception If ex.ToString.Contains("401") Then TextBox2.Text = TextBox2.Text & URL & "/webdav/" & vbNewLine End If End Try End Sub Public Sub G0() Dim siteSplit() As String = TextBox1.Text.Split(vbNewLine) For i = 0 To siteSplit.Count - 1 Try If siteSplit(i).Contains("http://") Then SendPOST(siteSplit(i).Trim) Else SendPOST("http://" & siteSplit(i).Trim) End If Catch ex As Exception End Try Next End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim t As Thread t = New Thread(AddressOf Me.G0) t.Start() End Sub However, the 'G0' sub code is not being executed at all, and I need to multi thread the 'SendPOST' as that is what slows the application.

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >