Search Results

Search found 803 results on 33 pages for 'greg'.

Page 22/33 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Accessing the buffered request body in HttpWebRequest?

    - by Greg Beech
    By default HttpWebRequest has AllowWriteStreamBuffering set to true, which means that all data written to the request stream is buffered inside the object. I'd like to access this buffer of data after it has been written, but can't seem to find any way to do so. I'm happy for it to fail if AllowWriteStreamBuffering is false. Is there any way to do this, or is it not exposed anywhere?

    Read the article

  • Is it possible to share session state between asp.net aspx page making a call to an asp.net webservi

    - by Greg Balajewicz
    My Situation: I have 1 asp.net application with both aspx pages AND webservices I make calls (using ajax) to the webservice from an aspx page - all within the same asp.net application! Here is my problem/question Is there any way to share the session state? I.e. - the aspx page has a sessionID and the state is being maintained. When the call to the webservice is made, is there a way to automatically send the seesionID to the webservice and then be able to access the same session state from the webservice? -- That would greatly simplify my work! :) Many thanks for your ideas!!

    Read the article

  • Does VS2010 does not install SQL Server during installation

    - by Greg
    Hi, Just confirming -does VS2010 does not install SQL Server during installation? I'm assuming no. This being the case I therefore need to download a copy of SQL Express 2005 or something to develop against on my windows XP home PC? Is this correct? Or would the Dev edition of SQL Server 2005 run/install on Windows XP Home? thanks

    Read the article

  • default value support for Entity Framework object construction to avoid having to set this column pa

    - by Greg
    Hi, In entity framework is there a way to have a default value for a column such that Linq to Entity won't require this parameter when constructing a new object? For example I've marked on column in the EF designer with a default value (I typed in "All" as it was a string). But if I try to construct a new record and not specify this parameter I still get a FOREIGN KEY constraint exception. The INSERT statement conflicted with the FOREIGN KEY constraint "FK_FunctionalityTypeInterfaceRelationship"

    Read the article

  • Timer Service in ejb 3.1 - schedule calling timeout problem

    - by Greg
    Hi Guys, I have created simple example with @Singleton, @Schedule and @Timeout annotations to try if they would solve my problem. The scenario is this: EJB calls 'check' function every 5 secconds, and if certain conditions are met it will create single action timer that would invoke some long running process in asynchronous fashion. (it's sort of queue implementation type of thing). It then continues to check, but as long as long running process is there it won't start another one. Below is the code I came up with, but this solution does not work, because it looks like asynchronous call I'm making is in fact blocking my @Schedule method. @Singleton @Startup public class GenerationQueue { private Logger logger = Logger.getLogger(GenerationQueue.class.getName()); private List<String> queue = new ArrayList<String>(); private boolean available = true; @Resource TimerService timerService; @Schedule(persistent=true, minute="*", second="*/5", hour="*") public void checkQueueState() { logger.log(Level.INFO,"Queue state check: "+available+" size: "+queue.size()+", "+new Date()); if (available) { timerService.createSingleActionTimer(new Date(), new TimerConfig(null, false)); } } @Timeout private void generateReport(Timer timer) { logger.info("!!--timeout invoked here "+new Date()); available = false; try { Thread.sleep(1000*60*2); // something that lasts for a bit } catch (Exception e) {} available = true; logger.info("New report generation complete"); } What am I missing here or should I try different aproach? Any ideas most welcome :) Testing with Glassfish 3.0.1 latest build - forgot to mention

    Read the article

  • Which source control paradigm and solution to embed in a custom editor application?

    - by Greg Harman
    I am building an application that manages a number of custom objects, which may be edited concurrently by multiple users (using different instances of the application). These objects have an underlying serialized representation, and my plan is to persist them (through my application UI) in an external source control system. Of course this implies that my application can check the current version of an object for updates, a merging interface for each object, etc. My question is what source control paradigm(s) and specific solution(s) to support and why. The way I (perhaps naively) see the source control world is three general paradigms: Single-repository, locked access (MS SourceSafe) Single-repository, concurrent access (CVS/SVN) Distributed (Mercurial, Git) I haven't heard of anyone using #1 for quite a number of years, so I am planning to disregard this case altogether (unless I get a compelling argument otherwise). However, I'm at a loss as to whether to support #2 or #3, and which specific implementations. I'm concerned that the use paradigms are subtly different enough that I can't adequately capture basic operations in a single UI. The last bit of information I should convey is that this application is intended to be deployed in a commercial setting, where a source control system may already be in use. I would prefer not to support more than one solution unless it's really a deal-breaker, so wide adoption in a corporate setting is a plus.

    Read the article

  • ASP.NET UpdateProgress template does not disapper when panel in UpdatePanel has display set to none

    - by Greg Balajewicz
    I am using very simple code where I have a update panel with some panels inside and a submit button. On submit, i hide one of the panels using this code: panel.Style.Add("display", "none"); I am also using a UpdateProgress which works great in all but this case. When i set the display to none using this code, the UpdateProgress template does not disappear! remove the line, all is well .... No idea why...

    Read the article

  • What's happened to my directory on GitHub?

    - by Greg K
    I added a new subdir within my git respository: git add feeds Then commited this and pushed it up to GitHub but it seems as though I've commited a symlink / shortcut but not the actual directory and files within. See here: http://github.com/G4EGK/RSS-Reader Any idea what 'feeds' is? I'd like to remove that and correctly add my files. I tried the following but git status said nothing had changed: git rm feeds git add feeds/\*.php To remove feeds do I run the following? git filter-branch --tree-filter 'rm -f feeds' HEAD

    Read the article

  • IOC - Should util classes with static helper methods be wired up with IOC?

    - by Greg
    Hi, Just trying to still get my head around IOC principles. Q1: Static Methods - Should util classes with static helper methods be wired up with IOC? For example if I have a HttpUtils class with a number of static methods, should I be trying to pass it to other business logic classes via IOC? Follow on questions for this might be: Q2: Singletons - What about things like logging where you may typically get access to it via a Logger.getInstance() type call. Would you normally leave this as is, and NOT use IOC for injecting the logger into business classes that need it? Q3: Static Classes - I haven't really used this concept, but are there any guidelines for how you'd typically handle this if you were moving to an IOC based approach. Thanks in advance.

    Read the article

  • ASP.net page gets error on import statement, but I do have the reference in place?

    - by Greg
    Hi, Any ideas why I am getting the below error in my MVC2 project, even through in the project itself I definitely have a reference to "system.Web.Entity"? Compiler Error Message: CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) Source Error: Line 1: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<List<Node>>" %> Line 2: <%@ Import Namespace="TopologyDAL" %> Line 3: <%@ Import Namespace="System.Data.Entity" %> thanks

    Read the article

  • In an extension method how do a create an object based on the implementation class

    - by Greg
    Hi, In an extension method how do a create an object based on the implementation class. So in the code below I wanted to add an "AddRelationship" extension method, however I'm not sure how within the extension method I can create an Relationship object? i.e. don't want to tie the extension method to this particular implementation of relationship public static class TopologyExtns { public static void AddNode<T>(this ITopology<T> topIf, INode<T> node) { topIf.Nodes.Add(node.Key, node); } public static INode<T> FindNode<T>(this ITopology<T> topIf, T searchKey) { return topIf.Nodes[searchKey]; } public static bool AddRelationship<T>(this ITopology<T> topIf, INode<T> parentNode, INode<T> childNode) { var rel = new RelationshipImp(); // ** How do I create an object from teh implementation // Add nodes to Relationship // Add relationships to Nodes } } public interface ITopology<T> { //List<INode> Nodes { get; set; } Dictionary<T, INode<T> > Nodes { get; set; } } public interface INode<T> { // Properties List<IRelationship<T>> Relationships { get; set; } T Key { get; } } public interface IRelationship<T> { // Parameters INode<T> Parent { get; set; } INode<T> Child { get; set; } } namespace TopologyLibrary_Client { class RelationshipsImp : IRelationship<string> { public INode<string> Parent { get; set; } public INode<string> Child { get; set; } } } public class TopologyImp<T> : ITopology<T> { public Dictionary<T, INode<T>> Nodes { get; set; } public TopologyImp() { Nodes = new Dictionary<T, INode<T>>(); } } thanks

    Read the article

  • How do I save user specific data in an asp.net site?

    - by Greg McNulty
    I just set up user profiles using asp.net 3.5 using wvd. For each user I would like to store data that they will be updating every day. For example, every time they go for a run they will update time and distance. I intend to allow them to also look up their history of distance and time from any past date. My question is, what does the database schema usually look like for such a set up? Currently asp.net set up a db for me when I made user profiles. Do I just add an extra table for every user? Should there be one big table with all users data? How do I relate a user I'd to their specific data? Etc.... I have never done this before so any ideas on how this is usually done would be very helpful. Thank you.

    Read the article

  • How to bundle extension methods requiring configuration in a library

    - by Greg
    Hi, I would like to develop a library that I can re-use to add various methods involved in navigating/searching through a graph (nodes/relationships, or if you like vertexs/edges). The generic requirements would be: There are existing classes in the main project that already implement the equivalent of the graph class (which contains the lists of nodes / relationships), node class and relationship class (which links nodes together) - the main project likely already has persistence mechanisms for the info (e.g. these classes might be built using Entity Framework for persistance) Methods would need to be added to each of these 3 classes: (a) graph class - methods like "search all nodes", (b) node class - methods such as "find all children to depth i", c) relationship class - methods like "return relationship type", "get parent node", "get child node". I assume there would be a need to inform the library with the extending methods the class names for the graph/node/relationships table (as different project might use different names). To some extent it would need to be like how a generics collection works (where you pass the classes to the collection so it knows what they are). Need to be a way to inform the library of which node property to use for equality checks perhaps (e.g. if it were a graph of webpages the equality field to use might be the URI path) I'm assuming that using abstract base classes wouldn't really work as this would tie usage down to have to use the same persistence approach, and same class names etc. Whereas really I want to be able to, for a project that has "graph-like" characteristics, the ability to add graph searching/walking methods to it.

    Read the article

  • Why am I getting a ParseException when using SimpleDateFormat to format a date and then parse it?

    - by Greg
    I have been debugging some existing code for which unit tests are failing on my system, but not on colleagues' systems. The root cause is that SimpleDateFormat is throwing ParseExceptions when parsing dates that should be parseable. I created a unit test that demonstrates the code that is failing on my system: import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; import junit.framework.TestCase; public class FormatsTest extends TestCase { public void testParse() throws ParseException { DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSS Z"); formatter.setTimeZone(TimeZone.getDefault()); formatter.setLenient(false); formatter.parse(formatter.format(new Date())); } } This test throws a ParseException on my system, but runs successfully on other systems. java.text.ParseException: Unparseable date: "20100603100243.118 -0600" at java.text.DateFormat.parse(DateFormat.java:352) at FormatsTest.testParse(FormatsTest.java:16) I have found that I can setLenient(true) and the test will succeed. The setLenient(false) is what is used in the production code that this test mimics, so I don't want to change it.

    Read the article

  • Extending a jquery plugins event callback

    - by Greg J
    I'm extending the functionality of a jquery plugin (foo) with another jquery plugin (bar). Essentially, the first plugin specifies an onReady(): var foo = $.foo({ onReady: function() { alert('foo'); }}); Foo is sent to bar as a parameter to bar: var bar = $.bar(foo); I want bar to be able to hook into foo's onReady event: (function($) { $.extend({ bar: function(foo) { var foo = foo; // How to do alert('bar') when foo.onready is called? } }); })(jQuery); I can override foo's onready event: foo.onready = function() { alert('bar'); } But I don't want to override it, I want to extend it so that I'll see both alerts when foo is ready. Thanks in advance!

    Read the article

  • Should you declare methods using overloads or optional parameters in C# 4.0?

    - by Greg Beech
    I was watching Anders' talk about C# 4.0 and sneak preview of C# 5.0, and it got me thinking about when optional parameters are available in C# what is going to be the recommended way to declare methods that do not need all parameters specified? For example something like the FileStream class has about fifteen different constructors which can be divided into logical 'families' e.g. the ones below from a string, the ones from an IntPtr and the ones from a SafeFileHandle. FileStream(string,FileMode); FileStream(string,FileMode,FileAccess); FileStream(string,FileMode,FileAccess,FileShare); FileStream(string,FileMode,FileAccess,FileShare,int); FileStream(string,FileMode,FileAccess,FileShare,int,bool); It seems to me that this type of pattern could be simplified by having three constructors instead, and using optional parameters for the ones that can be defaulted, which would make the different families of constructors more distinct [note: I know this change will not be made in the BCL, I'm talking hypothetically for this type of situation]. What do you think? From C# 4.0 will it make more sense to make closely related groups of constructors and methods a single method with optional parameters, or is there a good reason to stick with the traditional many-overload mechanism?

    Read the article

  • Upload and parse csv file with "universal newline" in python on Google App Engine

    - by greg
    Hi, I'm uploading a csv/tsv file from a form in GAE, and I try to parse the file with python csv module. Like describe here, uploaded files in GAE are strings. So I treat my uploaded string a file-like object : file = self.request.get('catalog') catalog = csv.reader(StringIO.StringIO(file),dialect=csv.excel_tab) But new lines in my files are not necessarily '\n' (thanks to excel..), and it generated an error : Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode? Does anyone know how to use StringIO.StringIO to treat strings like files open in universal-newline?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >