Search Results

Search found 1303 results on 53 pages for 'dr hydralisk'.

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

  • Extend and Overload MS and Point Types

    - by dr d b karron
    Do I have make my own Point and Vector types to overload them ? Why does this not work ? namespace System . windows { public partial struct Point : IFormattable { public static Point operator * ( Point P , double D ) { Point Po = new Point ( ); return Po; } } } namespace SilverlightApplication36 { public partial class MainPage : UserControl { public static void ShrinkingRectangle ( WriteableBitmap wBM , int x1 , int y1 , int x2 , int y2 , Color C ) { wBM . DrawRectangle ( x1 , y1 , x2 , y2 , Colors . Red ); Point Center = Mean ( x1 , y1 , x2 , y2 ); wBM . SetPixel ( Center , Colors.Blue , 3 ); Point P1 = new Point ( x1 , y1 ); Point P2 = new Point ( x1 , y2 ); Point P3 = new Point ( x1 , y2 ); Point P4 = new Point ( x2 , y1 ); const int Steps = 10; for ( int i = 0 ; i < Steps ; i++ ) { double iF = (double)(i+1) / (double)Steps; double jF = ( 1.0 - iF ); Point P11 = **P1 * jF;** } }

    Read the article

  • Scrape zipcode table for different urls based on county

    - by Dr.Venkman
    I used lxml and ran into a wall as my new computer wont install lxml and the code doesnt work. I know this is simple - maybe some one can help with a beautiful soup script. this is my code: import codecs import lxml as lh from selenium import webdriver import time import re results = [] city = [ 'amador'] state = [ 'CA'] for state in states: for city in citys: browser = webdriver.Firefox() link2 = 'http://www.getzips.com/cgi-bin/ziplook.exe?What=3&County='+ city +'&State=' + state + '&Submit=Look+It+Up' browser.get(link2) bcontent = browser.page_source zipcode = bcontent[bcontent.find('<td width="15%"'):bcontent.find('<p>')+0] if len(zipcode) > 0: print zipcode else: print 'none' browser.quit() Thanks for the help

    Read the article

  • Using Tortoise SVN with C++ in Visual Studio 2008

    - by Dr. Monkey
    I have an online repository with some .h and .cpp files that make up part of a project. I'm trying to check these out and use them in a new project, but am getting errors (C4627 and C1010). All the files have been added to the project (with AddExisting Item...), and the subdirectories that contain these files have been added to the "Additional include directories" of the project. Would I be better off having the entire project tree in the repository? My reason for not doing so is that my colleague and I are working on different parts of the code and so want to use different main methods to test things as we go, and I didn't see any need to be passing around any compiled code etc. since I assumed that given the .h and .cpp files (with the correct settings), visual studio would be able to compile the project. What's the best way to make Visual Studio 2008 and TortoiseSVN work well together (without spending any money)?

    Read the article

  • DDD: Trying to code sorting and filtering as it pertains to Poco, Repository, DTO, and DAO using C#?

    - by Dr. Zim
    I get a list of items from my Repository. Now I need to sort and filter them, which I believe would be done in the Repository for efficiency. I think there would be two ways of doing this in a DDD way: Send a filter and a sort object full of conditions to the Repository (What is this called)? Repository result would produce an object with .filter and .sort methods? (This wouldn't be a POJO/POCO because it contains more than one object?). So is the answer 1, 2, or other? Could you explain why? I am leaning toward #1 because the Repository would be able to only send the data I want (or will #2 be able to delay accessing data like a LazyList?) A code example (or website link) would be very helpful. Example: Product product = repo.GetProducts(mySortObject, myFilterObject); // List of Poco product.AddFilter("price", "lessThan", "3.99"); product.AddSort("price", "descending");

    Read the article

  • Encapsulating user input of data for a class (C++)

    - by Dr. Monkey
    For an assignment I've made a simple C++ program that uses a superclass (Student) and two subclasses (CourseStudent and ResearchStudent) to store a list of students and print out their details, with different details shown for the two different types of students (using overriding of the display() method from Student). My question is about how the program collects input from the user of things like the student name, ID number, unit and fee information (for a course student) and research information (for research students): My implementation has the prompting for user input and the collecting of that input handled within the classes themselves. The reasoning behind this was that each class knows what kind of input it needs, so it makes sense to me to have it know how to ask for it (given an ostream through which to ask and an istream to collect the input from). My lecturer says that the prompting and input should all be handled in the main program, which seems to me somewhat messier, and would make it trickier to extend the program to handle different types of students. I am considering, as a compromise, to make a helper class that handles the prompting and collection of user input for each type of Student, which could then be called on by the main program. The advantage of this would be that the student classes don't have as much in them (so they're cleaner), but also they can be bundled with the helper classes if the input functionality is required. This also means more classes of Student could be added without having to make major changes to the main program, as long as helper classes are provided for these new classes. Also the helper class could be swapped for an alternative language version without having to make any changes to the class itself. What are the major advantages and disadvantages of the three different options for user input (fully encapsulated, helper class or in the main program)?

    Read the article

  • How to save svg canvas to local filesystem

    - by dr jerry
    Is there a way to allow a user, after he has created a vector graph on a javascript svg canvas using a browser, to download this file to their local filesystem? SVG is a total new field for me so please be patient if my wording is not accurate. kind regards, Jeroen.

    Read the article

  • How can I prevent application domain stealing?

    - by dr jerry
    I'm in the process of making a javascript application and I want to bring that online, lets call it mydesign. I'm living in the Netherlands so mydesign.nl can be mine. Now is mydesign.com available for sale by some domain broker sales bastards. And those bastards don't accept a first bid lower than 1000$ which is a about ten times of the budget I'm willing to pay. So far so good, it's a sick business model but it's there. Now lets imagine that mydesign.nl is a huge success in the Netherlands and I'm makin tons of profits out of advertisements and other things I'm not yet aware of (I know entering the lotery gives a better chance of earning money, but lets just imagine). Is there a way (licence, legal or otherwise) to prevent the sick owners of mydesign.com to download and steal my javascript app and deploy it on their own site and take the profits of my app?

    Read the article

  • Help with a MySQL SELECT WHERE Clause

    - by Dr. DOT
    A column in my table contains email addresses. I have a text string that contains the a few usernames of email addresses separated by commas. I can make text sting into an array if necessary to get my SELECT WHERE clause to work correctly. Text string search argument is 'bob,sally,steve' I want to produce a WHERE clause that only returns rows where the username portion of the email address in the table matches one of the usernames in my text string search argument. Thus a row with [email protected] would not be returned but [email protected] would be. Does anyone have a WHERE clause sample that produces this result? Thanks.

    Read the article

  • How to implement an ID field on a POCO representing an Identity field in SQL Server?

    - by Dr. Zim
    If I have a Domain Model that has an ID that maps to a SQL Server identity column, what does the POCO look like that contains that field? Candidate 1: Allows anyone to set and get the ID. I don't think we want anyone setting the ID except the Repository, from the SQL table. public class Thing { public int ID {get;set;} } Candidate 2: Allows someone to set the ID upon creation, but we won't know the ID until after we create the object (factory creates a blank Thing object where ID = 0 until we persist it). How would we set the ID after persisting? public class Thing { public Thing () : This (ID: 0) {} public Thing (int ID) { this.ID = ID } private int _ID; public int ID { get { return this.ID;}; } Candidate 3: Methods to set ID? Somehow we would need to allow the Repository to set the ID without allowing the consumer to change it. Any ideas? Is this barking up the wrong tree? Do we send the object to the Repository, save it, throw it away, then create a new object from the loaded version and return that as a new object?

    Read the article

  • Can I destroy a class instance even if there are still references?

    - by DR
    For debugging reasons I want to destroy a class instance which still as references. Is that possible? It doesn't have to be elegant or stable, because this'll never end up in production code. To clarify: Public Sub Main Dim o as MyClass Set o = New MyClass //o is created, one reference DestroyObject o //Class_Terminate is called and the object destroyed //Further code, not using o End Sub //Possible runtime error here (don't care) Is that possible? One way would be to call IUnknown::Release to manually decrease the reference count, but how do I now how often I must call it?

    Read the article

  • Is there a standard format string in ASP.NET to convert 1/2/3/... to 1st/2nd/3rd...?

    - by Dr. Monkey
    I have an integer in an Access database, which is being displayed in ASP.NET. The integer represents the position achieved by a competitor in a sporting event (1st, 2nd, 3rd, etc.), and I'd like to display it with a standard suffix like 'st', 'nd', 'rd' as appropriate, rather than just a naked number. An important limitation is that this is for an assignment which specifies that no VB or C# code be written (in fact it instructs code behind files to be deleted entirely). Ideally I'd like to use a standard format string if available, otherwise perhaps a custom string (I haven't worked with format strings much, and this isn't high enough priority to dedicate significant time to*, but I am very curious about whether there's a standard string for this). (* The assignment is due tonight, and I've learned the hard way that I can't afford to spend time on things that don't get the marks, even if they irk me significantly.)

    Read the article

  • SQL: without a cursor, how to select records making a unique integer id (identity like) for dups?

    - by Dr. Zim
    If you have the select statement below where the PK is the primary key: select distinct dbo.DateAsInt( dateEntered) * 100 as PK, recordDescription as Data from MyTable and the output is something like this (the first numbers are spaced for clarity): PK Data 2010 01 01 00 New Years Day 2010 01 01 00 Make Resolutions 2010 01 01 00 Return Gifts 2010 02 14 00 Valentines day 2010 02 14 00 Buy flowers and you want to output something like this: PK Data 2010 01 01 01 New Years Day 2010 01 01 02 Make Resolutions 2010 01 01 03 Return Gifts 2010 02 14 01 Valentines day 2010 02 14 02 Buy flowers Is it possible to make the "00" in the PK have an "identity" number effect within a single select? Otherwise, how could you increment the number by 1 for each found activity for that date? I am already thinking as I type to try something like Sum(case when ?? then 1 end) with a group by.

    Read the article

  • DDD and MVC Models hold ID of separate entity or the entity itself?

    - by Dr. Zim
    If you have an Order that references a customer, does the model include the ID of the customer or a copy of the customer object like a value object (thinking DDD)? I would like to do ths: public class Order { public int ID {get;set;} public Customer customer {get;set;} ... } right now I do this: public class Order { public int ID {get;set;} public int customerID {get;set;} ... } It would be more convenient to include the complete customer object rather than an ID to the View Model passed to the form. Otherwise, I need to figure out how to get the vendor information to the view that the order references by ID. This also implies that the repository understand how to deal with the customer object that it finds within the order object when they call save (if we select the first option). If we select the second option, we will need to know where in the view model to put it. It is certain they will select an existing customer. However, it is also certain they may want to change the information in-place on the display form. One could argue to have the controller extract the customer object, submit customer changes separately to the repository, then submit changes to the order, keeping the customerID in the order.

    Read the article

  • dropdownlist binding from function in code behind aspx vb

    - by Dr.H
    so I have this working in C# , why it is not working in VB public string[] CustomizedRoles() { int length = Roles.GetAllRoles().Length; string[] arrRoles=Roles.GetAllRoles(); string[] customizedRoles= new string[length+1]; customizedRoles[0] = ""; for (int i = 1; i < length+1; i++) { customizedRoles[i] = arrRoles[i-1]; } return customizedRoles; } asp:GridView.... asp:DropDownList ID="ddlOwnerRolesUpdate" runat="server" DataSource="<%# CustomizedRoles() %" Height="25px" Width="177px" SelectedValue='<%# Bind("Owner") %' where is "Owner" is a data value come from a datasource for the grid it is working fine in C# . in Vb with the same aspx and this code behind it is not working. Public Function CustomizedRoles() As String() Dim length As Integer = Roles.GetAllRoles().Length Dim arrRoles As String() = Roles.GetAllRoles() Dim _customizedRoles As String() = New String(length + 1) {} _customizedRoles(0) = " " For index As Integer = 1 To length _customizedRoles(index) = arrRoles(index - 1) Next Return _customizedRoles End Function can anyone show me how to bind array of string to a dropdownlist from aspx to code behind in VB

    Read the article

  • Templating Engine to Generate Simple Reports in .NET

    - by dr. evil
    I'm looking for a free templating engine to generate simple reports. I want some basic features such as : Ability to Write Loops (with any IEnumerable) Passing Variables Passing Templates Files (main template, footer, header) I'll use this to generate reports in HTML and XML. I'm not looking for a ASP.NET Template Engine. This is for a WinForms applications. I've seen this question http://stackoverflow.com/questions/340095/can-you-recommend-a-net-template-engine, however all of those template engines are total overkill for me and focused for ASP.NET. Please only recommend free libraries. // I'm still looking an NVelocity but it doesn't look any promising for .NET, overly complicated, when you download it's bunch of files not clear what to do, no tutorial, startup document etc.

    Read the article

  • using win32 api in linux ?

    - by Dr Deo
    I have heard of WINE but I don't like it because it's slow on the computers I have tested and almost always crashes. It also has some unpleasant looking gui. I am wondering if there is a "win32" library in c/c++ for linux that produces native linux code so that if I have my source code for windows, I can just recompile and produce a working linux application. Is this possible?

    Read the article

  • Script to sell php script?

    - by DR.GEWA
    Hi ppl. I am to finish my social network web-script which should be sold license based. I wonder such thing. There is a lot of shopping carts there. Is there a one, which is specialized on selling scripts and supportings them? Or should I part by part put a forum, make an order system, wiki, and so on?

    Read the article

  • Zsh command substitution

    - by Dr. Watson
    I usually work with BASH, but I'm trying to setup a cronjob from a machine and user account that is configured with zsh. When the cronjob runs, the date variable does not contain the date, just the string for the command to return the date. DATE=$(date +%Y%m%d) 55 15 * * 1-5 scp user@host:/path/to/some/file/$DATE.log /tmp I've tried using backticks rather than $() around the command, but that did not work either. Is there a special way to do command substitution in zsh?

    Read the article

  • WPF texbox focus when render to offscreen buffer

    - by dr.mo
    i am rendering a textbox to an offscreen buffer using RenderTargetBitmap and i want to enter text into this textbox, however, i can't set the textbox focus (using Focus() has no effect - presumably because the canvas is not attached to a real window?) this has two consequenes: 1 the keyboard input doesn't get captured 2. even if i set the text manually using TextBox text and CaretIndex = index i dont get a caret because of the lack of focus. is there a way to make this focus somehow? and if not, i'd like to at least have the caret visible even if there is no focus, but can't see a way of doing this.

    Read the article

  • DotNetNuke adds wrong module to page

    - by Dr Tom
    I've deployed DotNetNuke 07.03.02 to Azure using Azure's own wizard - worked fine. Been using DNN for years on personal server without issues. However, when I try to add a module to a page (i.e regular editing) DNN adds the wrong module to the page; seemingly FirstOrDefault from the list of installed modules. I.E, I want to add the "HTML" module (or any other) to a page but instead I get the "Banners" module. If I then uninstall the the Banners module it now adds the "Modules list" module. See below example, where I'm editing the "About" page of my site and have tried to add the HTML module. I hope anyone with insight into DNN (on Azure) can provide info. I am a .Net developer, but have so far had no reason to dig into DNN's inner workings.

    Read the article

  • Best way to display a background with a pattern in an iPhone/iPad app

    - by Dr Dork
    Here's an example of the type of background image I'm talking about... Clearly, there's a pattern in it. My question is, if this were an iPad app and the background image was twice the size, would there be any significant benefits to taking advantage of this pattern by tiling the image? Or would it really make no difference in terms of performance and just be easier to load the entire image into a UIImageView? Thanks in advance for all your wisdom!

    Read the article

  • How can I replace a UITableViewController with a UIViewController that contains a UITableView?

    - by Dr Dork
    I created a new SplitView iPad project in Xcode and setup the code to populate the TableView (in the RootView on the left) with data. Now I'd like to customize the RootView to contain a DatePicker view along with the TableView, but I'm unsure how to accomplish this. Since the default RootViewController is a subclass of a UITableViewController, I couldn't add a DatePicker view to it in IB (since you can't add a DatePicker to a UITableView). The only way I understand to accomplish my goal of adding a DatePicker to the "Left" RootView is to change the RootViewController from a subclass of a UITableViewController to a subclass of a UIViewController, then I'll be able to add a view to it that contains a DatePicker view and a TableView using IB. Questions... Is this the correct approach to add a DatePicker to the "Left" RootView? If so and I change the RootViewController to a subclass of a UIViewController (instead of a UITableViewController) and add to it a TableView (along with the DatePicker), how will that affect the code I currently have in place for populating my current TableView? Thanks so much for all your help! Below is my current interface code for my RootViewController, if it'll help any. @interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate> { DetailViewController *detailViewController; NSFetchedResultsController *fetchedResultsController; NSManagedObjectContext *managedObjectContext; } @property (nonatomic, retain) IBOutlet DetailViewController *detailViewController; @property (nonatomic, retain) NSFetchedResultsController *fetchedResultsController; @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; - (void)insertNewObject:(id)sender; @end

    Read the article

  • How to cleanup old Failed Builds in TeamCity?

    - by dr. evil
    We do have hundreds of failed builds in TeamCity (number is especially high because of old retry on fail settings) and now it's a pain to browse history. I want to clean up only old failed builds, is there anyway to do that in TeamCity? Normal clean-up policy only allows X days before the last successful build sort of clean ups.

    Read the article

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