Search Results

Search found 698 results on 28 pages for 'steven noble'.

Page 15/28 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • changing ASP.NET tag formatting

    - by Steven
    When I drag a Label control to my document, I get the following code : <asp:Label ID="Label1" runat="server" text="Label"></asp:Label> I prefer my code to look like the following instead : <asp:Label ID="Label1" runat="server" Text="Label" /> How can I get .NET to do this by default? I looked in Tools - Options - Text Editor, where you'd expect to find it, but I couldn't find anything relevant there.

    Read the article

  • PHP Loop Over ONLY Different Arrays

    - by Steven
    Hello, I have a single array with several of the same values. And I only want to loop over DIFFERENT values. How could I go about doing this? Example 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86_97 166-01 001;09;UO;_86_97 166-01 001;09;UO;_86_97 166-01 001;09;UO;_86_97_108 166-01 001;09;UO;_86_97_108 166-01 001;09;UO;_86_97_108_119 166-01 001;09;UO;_86_97_108_119 I have that in a single array, but I only want to loop for the different ones. So it would loop once for nothing, then once for _86, then once for _86_97, then once for _86_97_108, and then once for _86-97_108_119. So only loop for different key values, or would there be a way to count the number of different keys?

    Read the article

  • Radix Sort in Python [on hold]

    - by Steven Ramsey
    I could use some help. How would you write a program in python that implements a radix sort? Here is some info: A radix sort for base 10 integers is a based on sorting punch cards, but it turns out the sort is very ecient. The sort utilizes a main bin and 10 digit bins. Each bin acts like a queue and maintains its values in the order they arrive. The algorithm begins by placing each number in the main bin. Then it considers the ones digit for each value. The rst value is removed and placed in the digit bin corresponding to the ones digit. For example, 534 is placed in digit bin 4 and 662 is placed in the digit bin 2. Once all the values in the main bin are placed in the corresponding digit bin for ones, the values are collected from bin 0 to bin 9 (in that order) and placed back in the main bin. The process continues with the tens digit, the hundreds, and so on. After the last digit is processed, the main bin contains the values in order. Use randint, found in random, to create random integers from 1 to 100000. Use a list comphrension to create a list of varying sizes (10, 100, 1000, 10000, etc.). To use indexing to access the digits rst convert the integer to a string. For this sort to work, all numbers must have the same number of digits. To zero pad integers with leading zeros, use the string method str.zfill(). Once main bin is sorted, convert the strings back to integers. I'm not sure how to start this, Any help is appreciated. Thank you.

    Read the article

  • Rmagick on BitNami not working

    - by Steven
    I am running a rails app on BitNami rubystack, and try to upload picture using file_column i get this error, check below: LoadError (998: Invalid access to memory location. - C:/Program Files (x86)/BitNami RubyStack/ruby/lib/ruby/gems/1.8/gems/rmagick-2.9.0-x86-mswin32/ ext/RMagick2.so): C:/Program Files (x86)/BitNami RubyStack/ruby/lib/ruby/gems/1.8/gems/rmagick-2.9.0-x86-mswin32/ext/RMagick2.so C:/Program Files (x86)/BitNami RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in require' C:/Program Files (x86)/BitNami RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:innew_constants_in

    Read the article

  • URL load error during adding

    - by Steven
    hi, i have a string say Path ="C:\AAA\bin" which is a path to a project's bin folder. I used new URL(Path) during invocation of addURL method of URLClassLoader class. ex- addURL(sysLoader,new URL(Path)) ; its giving unknown protocol:c exception whats the problem?Help

    Read the article

  • Scrolling a canvas as a shape you're moving approaches its edges

    - by Steven Sproat
    Hi, I develop a Python-based drawing program, Whyteboard. I have tools that the user can create new shapes on the canvas, such as text/images/rectangles/circles/polygons. I also have a Select tool that allows the users to modify these shapes - for example, moving a shape's position, resizing, or editing polygon's points' positions. I'm adding in a new feature where moving or resizing a point near the canvas edge will automatically scroll the canvas. I think it's a good idea in terms of program usability, and annoys me when other program's don't have this feature. I've made some good progress on coding this; below is some Python code to demonstrate what I'm doing. These functions demonstrate how some shapes calculate their "edges": def find_edges(self): """A line.""" self.edges = {EDGE_TOP: min(self.y, self.y2), EDGE_RIGHT: max(self.x, self.x2), EDGE_BOTTOM: max(self.y, self.y2), EDGE_LEFT: min(self. x, self.x2)} def find_edges(self): """An image""" self.edges = {EDGE_TOP: self.y, EDGE_RIGHT: self.x + self.image.GetWidth(), EDGE_BOTTOM: self.y + self.image.GetWidth(), EDGE_LEFT: self.x} def find_edges(self): """Get the bounding rectangle for the polygon""" xmin = min(x for x, y in self.points) ymin = min(y for x, y in self.points) xmax = max(x for x, y in self.points) ymax = max(y for x, y in self.points) self.edges = {EDGE_TOP: ymin, EDGE_RIGHT: xmax, EDGE_BOTTOM: ymax, EDGE_LEFT: xmin} And here's the code I have so far to implement the scrolling when a shape nears the edge: def check_canvas_scroll(self, x, y, moving=False): """ We check that the x/y coords are within 50px from the edge of the canvas and scroll the canvas accordingly. If the shape is being moved, we need to check specific edges of the shape (e.g. left/right side of rectangle) """ size = self.board.GetClientSizeTuple() # visible area of the canvas if not self.board.area > size: # canvas is too small to need to scroll return start = self.board.GetViewStart() # user's starting "viewport" scroll = (-1, -1) # -1 means no change if moving: if self.shape.edges[EDGE_RIGHT] > start[0] + size[0] - 50: scroll = (start[0] + 5, -1) if self.shape.edges[EDGE_BOTTOM] > start[1] + size[1] - 50: scroll = (-1, start[1] + 5) # snip others else: if x > start[0] + size[0] - 50: scroll = (start[0] + 5, -1) if y > start[1] + size[1] - 50: scroll = (-1, start[1] + 5) # snip others self.board.Scroll(*scroll) This code actually works pretty well. If we're moving a shape, then we need to know its edges to calculate when they're coming close to the canvas edge. If we're resizing just a single point, then we just use the x/y coords of that point to see if it's close to the edge. The problem I'm having is a little tricky to describe - basically, if you move a shape to the left, and stop moving it, if you positioned the shape within the 50px from the canvas, then the next time you go to move the shape, the code that says "ok, is this shape close to the end?" gets triggered, and the canvas scrolls to the left, even if you're moving the shape to the right. Can anyone think on how to stop this? I created a youtube video to demonstrate the issue. At about 0:54, I move a polygon to the left of the canvas and position it there. The next time I move it, the canvas scrolls to the left even though I'm moving it right Another thing I'd like to add, but I'm stuck on is the scroll gaining momentum the longer a shape is scrolling? So, with a large canvas, you're not moving a shape for ages, moving 5px at a time, when you need to cover a 2000px distance. Any suggestions there? Thanks all - sorry for the super long question!

    Read the article

  • Is there a nice XSL stylesheet for client-side DocBook rendering?

    - by Steven Huwig
    I want the DocBook documents in my SVN repository to look nice if someone looks at them in a web browser. I've started to write a CSS stylesheet, but I think that it will have significant limitations -- particularly ones regarding hyperlinks. There is a large body of DocBook XSL stylesheets at the DocBook site , but they don't seem to be appropriate for browser rendering. I don't want to generate static documents and put them into SVN. I want them to be basically readable for other developers without much hassle. I could write my own browser-appropriate XSL stylesheet to convert DocBook to HTML, but it seems like someone else must have already done this. I just don't know where to find it.

    Read the article

  • Me As Child Type

    - by Steven
    I have a MustInherit Parent class with two Child classes which Inherit from the Parent. How can I use (or Cast) Me in a Parent function as the the child type of that instance? EDIT: My actual goal is to be able to serialize (BinaryFormatter.Serialize(Stream, Object)) either of my child classes. However, "repeating the code" in each child "seems" wrong.

    Read the article

  • PHP Associative Array Duplicate Key?

    - by Steven
    Hello, I have an associative array, however when I add values to it using the below function it seems to overwrite the same keys. Is there a way to have multiple of the same keys with different values? Or is there another form of array that has the same format? I want to have 42=56 42=86 42=97 51=64 51=52 etc etc function array_push_associative(&$arr) { $args = func_get_args(); foreach ($args as $arg) { if (is_array($arg)) { foreach ($arg as $key => $value) { $arr[$key] = $value; $ret++; } }else{ $arr[$arg] = ""; } } return $ret; }

    Read the article

  • CascadingDropDown ViewState Problem

    - by Steven
    I have two Ajax CascadingDropDown extenders on my page. After a postback, the value of the first dropdown is set (presumably) triggering an event for the second dropdown to refresh. Question: How do I maintain both the contents (from queries) and selected value of both dropdowns after postback? C# answers also welcome. Default.aspx Active States<br /><asp:DropDownList ID="StatesDrop" runat="server" /><br /> Active Cities<br /><asp:DropDownList ID="CitiesDrop" runat="server" /><br /> <ajax:CascadingDropDown ID="StatesCasc" TargetControlID="StatesDrop" ServicePath="WebService1.asmx" ServiceMethod="GetActiveStates" Category="States" runat="server" PromptText="Select a State" PromptValue="?" /> <ajax:CascadingDropDown ID="CitiesCasc" TargetControlID="CitiesDrop" ServicePath="WebService1.asmx" ServiceMethod="GetActiveCities" Category="Cities" runat="server" ParentControlID="StatesDrop" PromptText="Select a City" PromptValue="?" /> WebService1.asmx.vb Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Imports System.Web.Script.Services Imports AjaxControlToolkit <System.Web.Script.Services.ScriptService()> _ <System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _ <System.Web.Services.WebServiceBinding _ (ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <ToolboxItem(False)> _ Public Class WebService1: Inherits System.Web.Services.WebService <WebMethod()> _ Public Function GetActiveStates (ByVal knownCategoryValues As String, _ ByVal category As String) As CascadingDropDownNameValue() Dim values As New List(Of CascadingDropDownNameValue)() 'Populate values with query' Return values.ToArray() End Function <WebMethod()> _ Public Function GetActiveCities (ByVal knownCategoryValues As String, _ ByVal category As String) As CascadingDropDownNameValue() Dim kv As StringDictionary = _ CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues) Dim SelState As String = "" If kv.ContainsKey("State") Then SelState = kv("State") Dim values As New List(Of CascadingDropDownNameValue)() ' Populate values with query.' Return values.ToArray() End Function End Class

    Read the article

  • Real-time data on webpage with Django and jQuery

    - by Steven Hepting
    I would like a webpage that constantly updates a graph with new data as it arrives. Regularly, all the data you have is passed to a Django view at the beginning of the request. However, I need the page to be able to update itself with fresh information every few seconds to redraw the graph. Background The webpage will be similar to this http://www.panic.com/blog/2010/03/the-panic-status-board/. The data coming in will temperature values to be graphed measured by an Arduino and saved to the Django database (I've already done this part).

    Read the article

  • Are Blogengine.net support posts in other language like Hindi when they written through unicode font

    - by steven spielberg
    when i test a post written in Hindi that i got the error that "Url : http://localhost:50263/BlogEngine.Web/admin/Pages/Add_entry.aspx?id=c3b7497c-60e7-41c7-ac10-36f21999f82f Raw Url : /BlogEngine.Web/admin/Pages/Add_entry.aspx?id=c3b7497c-60e7-41c7-ac10-36f21999f82f Message : A potentially dangerous Request.Form value was detected from the client (ctl00$cphAdmin$txtContent$TinyMCE1$txtContent=" ..."). Source : System.Web StackTrace : at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) at System.Web.HttpRequest.get_Form() at System.Web.HttpRequest.get_Item(String key) at BlogEngine.Core.Web.HttpModules.CompressionModule.context_PostReleaseRequestState(Object sender, EventArgs e) in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Web\HttpModules\CompressionModule.cs:line 62 at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) " what is meaning of this error. are this support unicode ?

    Read the article

  • Simple ASP.NET Database Query

    - by Steven
    I have loaded my database with one table under "Data Connections" in the "Server Explorer" pane. What is the standard / best-practices way to handle a simple query in a VB ASPX page? My left <div> would be a set of form elements to filter rows, and when the button is clicked, the main <div> would show the columns I want for the rows returned. Note: Answers in C# are okay too, I'll just translate.

    Read the article

  • How to disable horizontal scrolling within virtualbox on Ubuntu guest, Windows 7 host?

    - by Steven Rosato
    This post is a duplicate from superuser.com, but since I had no answers, I started to doubt it was a user question and maybe more of a programming question (because of the configuration files), so here it is: I am using Windows 7 as Host, Ubuntu Karmic as guest OS with guest tools installed and I get an annoying glitch when switching from host to the guest machine: vertical scrolling switches to horizontal! (using the mouse wheel). Since I don't really care about horizontal scrolling, how can I disable this? I have checked the web and the only thing I found was to play in the xorg.conf file and adding in the section "InputDevice" Option "ZAxisMapping" "4 5" which would enable vertical scrolling only. The thing is, I don't have that section in my config file so I guessed that I would need to add Section "InputDevice" Identifier "VBoxMouse" Driver "vboxmouse" Option "ZAxisMapping" "4 5" EndSection But that does not seem to work after restarting xserver. Any workaround for this?

    Read the article

  • Call WCF service host directly

    - by Steven
    I'm hosting a WCF service inside a winform app. I want to monitor when somebody calls the service to a textbox on the form like: 2:23 Method X called params(x, y) 2:24 Method Y called params(z) I am using a service host for WCF and inside my concrete class I have created some delegates and events. I just cant seem to wire the events up because my object is of type ServiceHost not my object. Any help

    Read the article

  • Add remove class?

    - by Steven
    Okay I have two classes for two links and two divs with different information. What I am trying to do is have it so when you click on one link it adds a 2 to both of the classes and makes the second div visable. When you click on the other link it takes off a 2 and makes the first div visable. Here is what I currently got $("#posts").click(function () { $("#sideboxtopleft").toggleClass("2"); $("#arrow").toggleClass("2"); }); Pretty much posts is the link, when when you click on it. It would make sideboxtopleft and arrow, sideboxtopleft2 and arrow2 and when you clicked on comments it would take off the 2 of both of those. Then there are two divs, one is set to hidden and I want to make it visable and set the other to hidden. Pretty much creating a tab system with changing tab classes.

    Read the article

  • jquery Add and Remove Classes?

    - by Steven
    Hello, I need a script that adds a 2 to the end of a class in a div with the id .sideboxtopleft on clicking of a link with the id of posts. <script> $(".posts").click(function () { if ($('.sideboxtopleft').is('#sideboxtopleft2')) { $('.sideboxtopleft').removeClass('2'); } else{ $('.sideboxtopleft').addClass('2'); } }); </script> <div id="sideboxtopleft" class="sideboxtopleft"> <a href="#post" id="posts"><h3>RECENT POSTS <div id="arrow" class="arrow"></div></h3></a> </div> <div id="sideboxtopright" class="sideboxtopright"> <a href="#comments" id="comments"><h3>RECENT COMMENTS <div id="arrow" class="arrow2"></div></h3></a> </div> However it doesn't seem to want to work properly. Any help?

    Read the article

  • php - preg_replace not working when string contains a hashtag

    - by Steven
    I found a function online for turning a url within a string into a clickable link. However, when the url contains a hashtag it doesn't work. eg. http://www.bbc.co.uk/radio1/photos/fearnecotton/5759/1#gallery5759 Here's the part of the function concerned: $ret = preg_replace( "#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret ); $ret = preg_replace( "#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret ); Any ideas? thanks

    Read the article

  • New NCover 3.4.2 makes all my MSTest unit tests fail

    - by Steven
    Yesterday, I decided to install the newest NCover version (3.4.2). However, when I ran it on my existing .ncover configuration file, the NCover output suddenly reported that all my MSTest tests failed. Of course those tests succeed when ran within Visual Studio. Because of this, NCover isn't able to determine any coverage. Somehow the old configuration doesn't seem to work with the new version. Does anyone have any idea what the problem could be or how to solve it? Btw. Here is my ncover configuration. Project settings: Path to application to profile: c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe Arguments for the application to profile: /testcontainer:D:\dev\MyApp\MyApp.Services.Tests.Unit\bin\Debug\MyApp.Services.Tests.Unit.dll /testcontainer:D:\dev\MyApp\MyApp.WS.Tests.Unit\bin\Debug\MyApp.WS.Tests.Unit.dll Working folder: D:\dev\MyApp

    Read the article

  • SSH into Ubuntu Linux on a box without a static IP address

    - by Steven Xu
    Basically, how do I do it? I'd like to connect to my home computer from work, but my internet is routed through my apartment building's network, so I don't have the static IP address I'm accustomed to having. How do I go about accessing my home computer through SSH (I'll be using Putty at work if it matters) if my home computer doesn't have a static IP address?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >