Search Results

Search found 349 results on 14 pages for 'keith myers'.

Page 5/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Changing folder names in Visual Studio when using SVN

    - by Piers Myers
    I am using VS2008/VS2010 with Resharper 5, TortoiseSVN 1.6.8.19260-x64, and AnkhSVN 2.1.8420.8. Most operations I do in Visual Studio are reflected fine in SVN, however, renaming folders in a project can cause problems when I try to submit my changes. Also all the namespaces in the C# source files under the renamed folder need to be updated to reflect the name change. What is the best way to rename the main project folder or any sub folders and ensure there are no issues with SVN? Should it be done outside Visual Studio? What is the best way to update all the namespace changes? Is search/replace the only way? Are there any best practices regarding folder names and their contents?

    Read the article

  • Generic TryParse

    - by Piers Myers
    I am trying to create a generic extension that uses 'TryParse' to check if a string is a given type: public static bool Is<T>(this string input) { T notUsed; return T.TryParse(input, out notUsed); } this won't compile as it cannot resolve symbol 'TryParse' As I understand, 'TryParse' is not part of any interface. Is this possible to do at all?

    Read the article

  • Table Disobeys W3C Box Model, Ie8 Ignores Fixed Table Width !

    - by Axel Myers
    Hi, I'm having hard time with tables and column widths. Update: I'm using XHTML Strict 1.0. The page is: http://www.pro-turk.net/try The first problem I have is, I have a column with a fixed width of 100px and 4px padding, but it disobeys my padding depending on the value. The column width (as the distance between two borders according to W3C Box Model) is 156 px even if padding is 0 or 4. Only the position of the text changes. According to W3C Box Model ( available at www.pro-turk.net/box_model.png ), borders and paddings aren't included in WIDTH attribute, so why does it render wrongly ? The second problem is, when you look the page I gave with IE8, the first cell in the second row has 150px fixed width, but ie shows it about 50% of the total table width regardless of what i say.

    Read the article

  • Haskell Cons Operator (:)

    - by Carson Myers
    I am really new to Haskell (Actually I saw "Real World Haskell" from O'Reilly and thought "hmm, I think I'll learn functional programming" yesterday) and I am wondering: I can use the construct operator to add an item to the beginning of a list: 1 : [2,3] [1,2,3] I tried making an example data type I found in the book and then playing with it: --in a file data BillingInfo = CreditCard Int String String | CashOnDelivery | Invoice Int deriving (Show) --in ghci $ let order_list = [Invoice 2345] $ order_list [Invoice 2345] $ let order_list = CashOnDelivery : order_list $ order_list [CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, CashOnDelivery, ...- etc... it just repeats forever, is this because it uses lazy evaluation? -- EDIT -- okay, so it is being pounded into my head that let order_list = CashOnDelivery:order_list doesn't add CashOnDelivery to the original order_list and then set the result to order_list, but instead is recursive and creates an infinite list, forever adding CashOnDelivery to the beginning of itself. Of course now I remember that Haskell is a functional language and I can't change the value of the original order_list, so what should I do for a simple "tack this on to the end (or beginning, whatever) of this list?" Make a function which takes a list and BillingInfo as arguments, and then return a list? -- EDIT 2 -- well, based on all the answers I'm getting and the lack of being able to pass an object by reference and mutate variables (such as I'm used to)... I think that I have just asked this question prematurely and that I really need to delve further into the functional paradigm before I can expect to really understand the answers to my questions... I guess what i was looking for was how to write a function or something, taking a list and an item, and returning a list under the same name so the function could be called more than once, without changing the name every time (as if it was actually a program which would add actual orders to an order list, and the user wouldn't have to think of a new name for the list each time, but rather append an item to the same list).

    Read the article

  • Changing an Action Type="click" to an auto action in SVG

    - by Dustin Myers
    I have a SVG document that I exported from Visio 2003 that would like to edit. This file has an action where you click a button it will navigate to a new screen. What I would like to do is have the navigation be based off of a data point rather than having to click the button. As an example I have a dynamic point data being brought into the SVG file and when that value changes from 0 to 1, I want this screen to automatically navigate to another screen. Below is the code I for clicking the button. <title content="structured text">Sheet.1107</title> <desc content="structured text">Button 1</desc> <v:custProps> <v:cp v:ask="false" v:langID="1033" v:invis="false" v:cal="0" v:val="VT4(Test Graphic 2)" v:type="0" v:prompt="" v:nameU="ObjRef" v:sortKey="" v:lbl="" v:format=""/> <v:cp v:ask="false" v:langID="1033" v:invis="false" v:cal="0" v:val="VT4(SF-S)" v:type="0" v:prompt="" v:nameU="DataPt" v:sortKey="" v:lbl="" v:format=""/> </v:custProps> <v:userDefs> <v:ud v:prompt="" v:nameU="NAVIGATE" v:val="VT4(NAVIGATE Test Graphic 2,&apos;&apos;,)"/> </v:userDefs> <v:textBlock v:margins="rect(4,4,4,4)"/> <v:textRect width="125.01" height="35" cx="62.5" cy="517.5"/> <rect x="0" width="125" y="500" height="35" class="st3"/> <text x="40.15" y="521.1" v:langID="1033" class="st4"><v:paragraph v:horizAlign="1"/><v:tabList/>Button 1</text> <jci:action type="click" count="1">if(evt.button == 0) nav(&apos;Test Graphic 2&apos;,&apos;&apos;,&apos;&apos;);</jci:action></g></a> In the above code I am bringing in the data value from SF-S. Once that value is equal to 1 I want this screen to automatically navigate to Test Graphic 2. I don't have any experience with coding so I am hoping someone here will be able to help me. Thanks, DMyers

    Read the article

  • How can I create a simple message box in Python?

    - by Carson Myers
    I'm looking for the same effect as alert() in JavaScript. I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the client comes and grabs it and executes it. I want to be able to make a simple popup message, without having to re-write a whole bunch of boilerplate wxPython or TkInter code every time (since the code gets submitted through a form and then disappears). I've tried tkMessageBox: import tkMessageBox tkMessageBox.showinfo(title="Greetings", message="Hello World!") but this opens another window in the background with a tk icon. I don't want this. I was looking for some simple wxPython code but it always required setting up a class and entering an app loop etc. Is there no simple, catch-free way of making a message box in Python?

    Read the article

  • Shortcut to create automatic properties using Visual Studio 2008/2010 or Resharper 5

    - by Piers Myers
    I have a class that contains a load of properties that contain results of some calculations e.g: public class Results { public double Result1 { get; set; } public double Result2 { get; set; } } In a different class I am doing calculations to populate the above properties, e.g: public class Calc { private Results Calc() { Results res = new Results(); res.Result1 = ... some calculation res.Result2 = ... some other calculation res.Result3 = ... // not yet defined in 'Results' class return res; } } When I am writing the Calc class, 'Result3' will be highlighted in red as it is not yet defined in the 'Results' class. Currently I am using the Resharper ALT-Enter shortcut, selecting "Create Property 'Result3'" which will create the following code int the 'Results' class: public double Result3 { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } } Which I need to manually change to: public double Result3 { get; set; } Then I use the CTRL-Shift-Backspace shortcut to take me back to the 'Calc' class. How can I easily create automatic properties in the 'Results' class if they are not yet defined directly from the 'Calc' class?

    Read the article

  • Floating Tables Problem Unwanted Space XHTML Strict

    - by Axel Myers
    Hi I have two floating tables side by side. One is set to float left, the other one is set to float right. The problem is when two table are floating, they both are out of flow so next table comes without any spacing. So I add a width attribute clear:both. But now it gave me a lot of unwanted space! it's height set to:0 (the div's) and nothing has changed. So what's the problem ? Website url: http://www.animetr.com/prv/

    Read the article

  • How do I handle the messages for a simple web-based live chat, on the server side?

    - by Carson Myers
    I'm building a simple live chat into a web application running on Django, but one thing I'm confused about is how I should store the messages between users. The chat will support multiple users, and a chat "session" is composed of users connected to one user that is the "host." The application is a sort of online document collaboration thing, so user X has a document, and users Y and Z would connect to user X to talk about the document, and that would be one chat session. If user Y disconnected for five minutes, and then signed back in and reconnected to user X, he should not get any of the messages shared between users X and Z while he was away. if users X, Y, and Z can have a chat session about user X's document, then users X and Y can connect to a simultaneous, but separate discussion about user Z's document. How should I handle this? Should I keep each message in the database? Each message would have an owner user and a target user (the host), and a separate table would be used to connect users with messages (which messages are visible to what users). Or should I store each session as an HTML file on the server, which messages get appended to? The problem is, I can't just send messages directly between clients. They have to be sent to the server in a POST request, and then each client has to periodically check for the messages in a GET request. Except I can't just have each message cleared after a client fetches it, because there could be multiple clients. How should I set this up? Any suggestions?

    Read the article

  • accessing private variable from member function in PHP

    - by Carson Myers
    I have derived a class from Exception, basically like so: class MyException extends Exception { private $_type; public function type() { return $this->_type; //line 74 } public function __toString() { include "sometemplate.php"; return ""; } } Then, I derived from MyException like so: class SpecialException extends MyException { private $_type = "superspecial"; } If I throw new SpecialException("bla") from a function, catch it, and go echo $e, then the __toString function should load a template, display that, and then not actually return anything to echo. This is basically what's in the template file <div class="<?php echo $this->type(); ?>class"> <p> <?php echo $this->message; ?> </p> </div> in my mind, this should definitely work. However, I get the following error when an exception is thrown and I try to display it: Fatal error: Cannot access private property SpecialException::$_type in C:\path\to\exceptions.php on line 74 Can anyone explain why I am breaking the rules here? Am I doing something horribly witty with this code? Is there a much more idiomatic way to handle this situation? The point of the $_type variable is (as shown) that I want a different div class to be used depending on the type of exception caught.

    Read the article

  • associating a filetype with a batch script, and getting parameters passed to file of that type.

    - by Carson Myers
    Sorry for the cryptic title. I have associated python scripts with a batch file that looks like this: python %* I did this because on my machine, python is installed at C:\python26 and I prefer not to reinstall it (for some reason, it won't let me add a file association to the python interpreter. I can copy the executable to Program Files and it works -- but nothing out of Program Files seems to work). Anyways, I can do this, so far: C:\py django-admin C:\py python "C:\python26\Lib\site-packages\django\bin\django-admin.py" Type 'django-admin.py help' for usage. C:\py django-admin startproject myProj C:\py python "C:\python26\Lib\site-packages\django\bin\django-admin.py" Type 'django-admin.py help' for usage. but the additional parameters don't get passed along to the batch script. This is getting very annoying, all I want to do is run python scripts :) How can I grab the rest of the parameters in this situation?

    Read the article

  • Is it acceptable to wrap PHP library functions solely to change the names?

    - by Carson Myers
    I'm going to be starting a fairly large PHP application this summer, on which I'll be the sole developer (so I don't have any coding conventions to conform to aside from my own). PHP 5.3 is a decent language IMO, despite the stupid namespace token. But one thing that has always bothered me about it is the standard library and its lack of a naming convention. So I'm curious, would it be seriously bad practice to wrap some of the most common standard library functions in my own functions/classes to make the names a little better? I suppose it could also add or modify some functionality in some cases, although at the moment I don't have any examples (I figure I will find ways to make them OO or make them work a little differently while I am working). If you saw a PHP developer do this, would you think "Man, this is one shoddy developer?" Additionally, I don't know much (or anything) about if/how PHP is optimized, and I know that usually PHP performace doesn't matter. But would doing something like this have a noticeable impact on the performance of my application?

    Read the article

  • How should I build a simple database package for my python application?

    - by Carson Myers
    I'm building a database library for my application using sqlite3 as the base. I want to structure it like so: db/ __init__.py users.py blah.py etc.py So I would do this in Python: import db db.users.create('username', 'password') I'm suffering analysis paralysis (oh no!) about how to handle the database connection. I don't really want to use classes in these modules, it doesn't really seem appropriate to be able to create a bunch of "users" objects that can all manipulate the same database in the same ways -- so inheriting a connection is a no-go. Should I have one global connection to the database that all the modules use, and then put this in each module: #users.py from db_stuff import connection Or should I create a new connection for each module and keep that alive? Or should I create a new connection for every transaction? How are these database connections supposed to be used? The same goes for cursor objects: Do I create a new cursor for each transaction? Create just one for each database connection?

    Read the article

  • Adding variably named fields to Python classes

    - by Carson Myers
    I have a python class, and I need to add an arbitrary number of arbitrarily long lists to it. The names of the lists I need to add are also arbitrary. For example, in PHP, I would do this: class MyClass { } $c = new MyClass(); $n = "hello" $c.$n = array(1, 2, 3); How do I do this in Python? I'm also wondering if this is a reasonable thing to do. The alternative would be to create a dict of lists in the class, but since the number and size of the lists is arbitrary, I was worried there might be a performance hit from this. If you are wondering what I'm trying to accomplish, I'm writing a super-lightweight script interpreter. The interpreter walks through a human-written list and creates some kind of byte-code. The byte-code of each function will be stored as a list named after the function in an "app" class. I'm curious to hear any other suggestions on how to do this as well.

    Read the article

  • Overloading assignment operator in C#

    - by Carson Myers
    I know the = operator can't be overloaded, but there must be a way to do what I want here: I'm just creating classes to represent quantitative units, since I'm doing a bit of physics. Apparently I can't just inherit from a primitive, but I want my classes to behave exactly like primitives -- I just want them typed differently. So I'd be able to go, Velocity ms = 0; ms = 17.4; ms += 9.8; etc. I'm not sure how to do this. I figured I'd just write some classes like so: class Power { private Double Value { get; set; } //operator overloads for +, -, /, *, =, etc } But apparently I can't overload the assignment operator. Is there any way I can get this behavior?

    Read the article

  • Operator overloading in generic struct: can I create overloads for specific kinds(?) of generic?

    - by Carson Myers
    I'm defining physical units in C#, using generic structs, and it was going okay until I got the error: One of the parameters of a binary operator must be the containing type when trying to overload the mathematical operators so that they convert between different units. So, I have something like this: public interface ScalarUnit { } public class Duration : ScalarUnit { } public struct Scalar<T> where T : ScalarUnit { public readonly double Value; public Scalar(double Value) { this.Value = Value; } public static implicit operator double(Scalar<T> Value) { return Value.Value; } } public interface VectorUnit { } public class Displacement : VectorUnit { } public class Velocity : VectorUnit { } public struct Vector<T> where T : VectorUnit { #... public static Vector<Velocity> operator /(Vector<Displacement> v1, Scalar<Duration> v2) { return new Vector<Velocity>(v1.Magnitude / v2, v1.Direction); } } There aren't any errors for the + and - operators, where I'm just working on a Vector<T>, but when I substitute a unit for T, suddenly it doesn't like it. Is there a way to make this work? I figured it would work, since Displacement implements the VectorUnit interface, and I have where T : VectorUnit in the struct header. Am I at least on the right track here? I'm new to C# so I have difficulty understanding what's going on sometimes.

    Read the article

  • Adding a method to a function object at runtime

    - by Carson Myers
    I read a question earlier asking if there was a times method in Python, that would allow a function to be called n times in a row. Everyone suggested for _ in range(n): foo() but I wanted to try and code a different solution using a function decorator. Here's what I have: def times(self, n, *args, **kwargs): for _ in range(n): self.__call__(*args, **kwargs) import new def repeatable(func): func.times = new.instancemethod(times, func, func.__class__) @repeatable def threeArgs(one, two, three): print one, two, three threeArgs.times(7, "one", two="rawr", three="foo") When I run the program, I get the following exception: Traceback (most recent call last): File "", line 244, in run_nodebug File "C:\py\repeatable.py", line 24, in threeArgs.times(7, "one", two="rawr", three="foo") AttributeError: 'NoneType' object has no attribute 'times' So I suppose the decorator didn't work? How can I fix this?

    Read the article

  • Installing Windows 7 on an Asus EeePC 1008HA

    - by Keith
    I'm planning to install Windows 7 on my Asus EeePC 1008HA netbook. I heard that there were some issues with RC1, but other than that have not had much luck finding help with this specific hardware. The closest I've found is this article for the similar 1005HA. I can find XP drivers and have them downloaded just in case. Also (obviously) I've backed up everything on the machine. Anyone on here got any experience with Windows 7 on an Asus EeePC 1008HA? Anyone know whether the reported issues with RC1 have been fixed by the RTM and driver updates?

    Read the article

  • Can VMWare Server 2.0 be useful in Production for easing backups?

    - by Keith Sirmons
    Howdy, Let's run this idea by the group here. I am thinking about using VMWare Server in production to host a 2008 Domain Controller with DHCP and DNS, a 2008 member server with WSUS, some virus software, and other "management" utilities a second 2008 member server with SQL, IIS, and File Shares for a medium business of 50-100 desktops. The reason I am leaning toward Server vs ESXi is for backup purposes. Using ESXi, if I want to backup the VM's, I would need a second server in the office with enough storage availability to hold a copy of the vmdks. I am wondering if putting this virtual environment on top of a basic 2008 server install will allow for easier backups to both tape and/or to offsite storage using JungleDisk. Can a snapshot be triggered easily via a scheduled job? I know this doesn't necessarily handle file level restores, but I want to make sure in a DR situation, we can restore production servers quickly. Does this concept hold water? Would a very minimum install of the 2008 Host remove too many resources from the actual production machines? This would be a new Dell 410 server with 12 GB ram and (6) 600 GB 15K in a RAID 6, Dual Intel Xeon 2.26GHz procs.

    Read the article

  • Multiple contacts with shared information

    - by Keith Thompson
    Background: I currently have several hundred contacts, synchronized between a Microsoft Exchange server and several mobile devices. I also save exported copies of the contacts in .vcf format. Is there a good way (application, file format, whatever) to maintain contacts with shared information? A very common scenario is that I have contacts for two or more people who live in the same house, for example: John Doe 123 Main Street, Anytown USA Home: 555-555-1111 Work: 555-555-2222 Mobile: 555-555-3333 E-mail: [email protected] Jane Doe 123 Main Street, Anytown USA Home: 555-555-1111 Work: 555-555-4444 Mobile: 555-555-5555 E-mail: [email protected] As you can see, both contacts have the same home address and phone number, but distinct names and work and mobile phone numbers. (Other information might also be either shared or distinct.) The applications and file formats I'm familiar with don't seem to have a good way to deal with this. If I use a single "John & Jane Doe" contact for both, it's difficult to distinguish the distinct information (if I want to call Jane's mobile phone rather than John's). If I use a separate contact for each, I have to remember to update both of them (or all of them for N 2) when they move or change their home phone number. An ideal solution would let me create a record containing information for their household, and have each of their contact records contain a reference to the household record, so that when I view John's contact record I see both shared and distinct information. Is there anything out there that has good support this kind of thing? (I would think there would be, since it's a very common scenario.) (I suppose I could roll my own system that generates merged .vcf files from some extended format, but that wouldn't play well with synchronizing across multiple devices.)

    Read the article

  • Exchange 2007 to 2010 public folder replication error 1129

    - by Keith
    I currently upgrading from an Exchange server 2007 to 2010. I have moved all mailboxes and OAB. I am having issues replicating the public folders. This is the error I'm getting in the event log on the 2007 box: Error 1129 occurred while processing a replication event. Folder: (6-11ED8367F0C) IPM_SUBTREE\Marketing\Marketing I have looked online and everything about these errors seems to relate from an old 2003 server. Well, we never had a 2003 server. I'm really not sure what to do at this point. Any help?

    Read the article

  • PDO - WHat is it? How do I enable it on shared hosting.

    - by Keith Groben
    I have a shared hosting account and PHP5 is installed and running. When I view phpinfo, I can see that mysql pdo is running. I think I need to "link" to it from the php.ini file. But I dont know for sure. I read that I needed to type "extension=pdo.so". I did that, and it did nothing. I contacted my hosting support, they said I need to rename php.ini to php5.ini. Did that and nothing. I am stuck and trying to install Kimai, but cannot without fixing this pdo problem. I have searched for a good hour and can find nothing to help me.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >