Search Results

Search found 1823 results on 73 pages for 'eric brown'.

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

  • Reference non-GAC version of DLL in Visual Studio 2010

    - by Eric J.
    This is similar to Add Non-GAC reference to project but the solutions presented there don't seem to help. I have a WinForms UI Library (Krypton from ComponentFactory) installed in the GAC. There's a bug I want to track down in that library, so I added the source code to my solution, removed the old references from my WinForms project to Krypton DLLs, added them back as a project references, ensured Copy Local is set to true, double-checked that the path (on reference properties tab) points to my local project, and... ...the GAC version is still being used while debugging. I cannot set a breakpoint in the Krypton source, Debugger.Break() or other code changes to not execute, and when I start the Visual Studio 2010 debugger, I see a Loading from ... GAC_MISL message relating to the Krypton DLLs flash by in the VS 2010 status bar. The DLLs are not copied to the WinForm's Debug folder. How can I reference the "project" version of the files while debugging while leaving them registered in the GAC?

    Read the article

  • How can I write an XSLT that will recursively include other files?

    - by Eric
    Let's say I have a series of xml files in this format: A.xml: <page> <header>Page A</header> <content>blAh blAh blAh</content> </page> B.xml: <page also-include="A.xml"> <header>Page B</header> <content>Blah Blah Blah</content> </page> Using this XSLT: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/page"> <h1> <xsl:value-of select="header" /> </h1> <p> <xsl:value-of select="content" /> </p> </xsl:template> </xsl:stylesheet> I can turn A.xml into this: <h1> Page A </h1> <p> blAh blAh blAh </p> But how would I make it also turn B.xml into this? <h1> Page B </h1> <p> Blah Blah Blah </p> <p> blAh blAh blAh </p> I know that I need to use document(concat(@also-include,'.xml')) somewhere, but I'm not sure where. Oh, and the catch is, I need this to still work if B were to be included in a third file, C.xml. Any idea as to how to do this?

    Read the article

  • How can I make a read only version of a class?

    - by Eric
    I have a class with various public properties which I allow users to edit through a property grid. For persistence this class is also serialized/deserialized to/from an XML file through DataContractSerializer. Sometimes I want to user to be able to save (serialize) changes they've made to an instance of the class. Yet at other times I don't want to allow the user to save their changes, and should instead see all the properties in the property grid as read only. I don't want to allow users to make changes that they'll never be able to save later. Similar to how MS Word will allow users to open documents that are currently opened by someone else but only as read only. My class has a boolean property that determines if the class should be read-only, but is it possible to use this property to somehow dynamically add a read-only attributes to the class properties at run-time? If not what is an alternative solution? Should I wrap my class in a read-only wrapper class?

    Read the article

  • Setting the initial value of a property when using DataContractSerializer

    - by Eric
    If I am serializing and later deserializing a class using DataContractSerializer how can I control the initial values of properties that were not serialized? Consider the Person class below. Its data contract is set to serialize the FirstName and LastName properties but not the IsNew property. I want IsNew to initialize to TRUE whether a new Person is being instantiate as a new instance or being deserialized from a file. This is easy to do through the constructor, but as I understand it DataContractSerializer does not call the constructor as they could require parameters. [DataContract(Name="Person")] public class Person { [DataMember(Name="FirstName")] public string FirstName { get; set; } [DataMember(Name = "LastName")] public string LastName { get; set; } public bool IsNew { get; set; } public Person(string first, string last) { this.FirstName = first; this.LastName = last; this.IsNew = true; } }

    Read the article

  • Best practices for extending third party databases?

    - by Eric Watkins
    I have a situation where our developers extended a Third party database (MS SQL) by adding tables, views, stored procedures, and functions. Recently when the vender issued updates to the database they dropped all of our custom objects. The question now is what are some best practices that will allow us to extend the third party database but keep our objects safe from future updates? My first thought is to create a separate database but then I’m stuck with fully qualifying all the references back to the original database which may cause issues promoting database changes from test to production.

    Read the article

  • does the object creating a sub appdomain get instantiated in that sub appdomain?

    - by Eric
    does the object creating a sub appdomain get instantiated in that sub appdomain? I have an object that is in the main AppDomain and it is creating another AppDomain and it requires the calling class to be serializable and is creating an instance of the calling class in the new sub AppDomain. I'm wondering if that is how it is, or if there is a way that I can create the sub appDomain but still hold on to the original instantiation of the calling object in the main appDomain

    Read the article

  • Why does this attempt at preloading images with jQuery not work?

    - by Eric
    Current I have this code: var imgCount = 36; var container = $('#3D-spin'); var loaded = 0; function onLoad() { alert(loaded); loaded++; if(loaded >= imgCount) { alert('yay'); } } for(var i = imgCount-1; i >= 0; i--) { container.prepend( $('<img>') .one('load', onLoad) .attr('alt', 'View from '+(i*360/imgCount)+'\u00B0') .attr('src', '/images/3d-spin/robot ('+i+').jpg') ); } However, it's behaving VERY strangely. Normally, I get no alert boxes. However, if I open developer tools, and pause script execution, I get a single alert that says 0. There's nothign like a good old heisenbug! A live example can be found here. The script itself is called style.js, and it is clear that images have loaded. Am I doing something stupidly, or is jQuery playing up?

    Read the article

  • External resources in Flash

    - by Eric
    Hey all. I'm working on an application that was originally intended for HTML, but I've recently concluded that the best thing to do for my purposes is to do it in Flash instead. One of the big things I need is to be able to bring in movieclips from external files and add them to my main movie at runtime (dynamic number of elements, skinning, etc.) Don't need full-on code for this, but I could use some assistance in tracking down the resources to learn how to do these things successfully. Tutorials, best practices… The usual suspects. I've been using Flash for a while now, and used to do this pretty easily in AS2, but I've had some hiccups using classes and addchild in an earlier attempt, so any help would be much appreciated. Thanks!

    Read the article

  • How should the Version field be used in Trac?

    - by Eric
    I use Trac to track bugs, and future changes in my software projects. Tickets in Trac have a "Version" field and I'm trying to figure out the best way to use this field. Say I find a series of bugs in version 1.0 of my software. I create tickets in track for each and assign them to version 1.0. Now say I fix some of the bugs, and add some of the new features and release version 1.1. But some of the old 1.0 bugs are still in 1.1. Should I change their corresponding tickets to version 1.1 because they also now exist in 1.1? Or should I leave them set to version 1.0 as a way of tracking what version the bug was found in, and just assume that any open tickets in older versions still exist in newer versions?

    Read the article

  • Cascading S3 Sink Tap not being deleted with SinkMode.REPLACE

    - by Eric Charles
    We are running Cascading with a Sink Tap being configured to store in Amazon S3 and were facing some FileAlreadyExistsException (see [1]). This was only from time to time (1 time on around 100) and was not reproducable. Digging into the Cascading codem, we discovered the Hfs.deleteResource() is called (among others) by the BaseFlow.deleteSinksIfNotUpdate(). Btw, we were quite intrigued with the silent NPE (with comment "hack to get around npe thrown when fs reaches root directory"). From there, we extended the Hfs tap with our own Tap to add more action in the deleteResource() method (see [2]) with a retry mechanism calling directly the getFileSystem(conf).delete. The retry mechanism seemed to bring improvement, but we are still sometimes facing failures (see example in [3]): it sounds like HDFS returns isDeleted=true, but asking directly after if the folder exists, we receive exists=true, which should not happen. Logs also shows randomly isDeleted true or false when the flow succeeds, which sounds like the returned value is irrelevant or not to be trusted. Can anybody bring his own S3 experience with such a behavior: "folder should be deleted, but it is not"? We suspect a S3 issue, but could it also be in Cascading or HDFS? We run on Hadoop Cloudera-cdh3u5 and Cascading 2.0.1-wip-dev. [1] org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory s3n://... already exists at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:132) at com.twitter.elephantbird.mapred.output.DeprecatedOutputFormatWrapper.checkOutputSpecs(DeprecatedOutputFormatWrapper.java:75) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:923) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:882) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1278) at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:882) at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:856) at cascading.flow.hadoop.planner.HadoopFlowStepJob.internalNonBlockingStart(HadoopFlowStepJob.java:104) at cascading.flow.planner.FlowStepJob.blockOnJob(FlowStepJob.java:174) at cascading.flow.planner.FlowStepJob.start(FlowStepJob.java:137) at cascading.flow.planner.FlowStepJob.call(FlowStepJob.java:122) at cascading.flow.planner.FlowStepJob.call(FlowStepJob.java:42) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.j [2] @Override public boolean deleteResource(JobConf conf) throws IOException { LOGGER.info("Deleting resource {}", getIdentifier()); boolean isDeleted = super.deleteResource(conf); LOGGER.info("Hfs Sink Tap isDeleted is {} for {}", isDeleted, getIdentifier()); Path path = new Path(getIdentifier()); int retryCount = 0; int cumulativeSleepTime = 0; int sleepTime = 1000; while (getFileSystem(conf).exists(path)) { LOGGER .info( "Resource {} still exists, it should not... - I will continue to wait patiently...", getIdentifier()); try { LOGGER.info("Now I will sleep " + sleepTime / 1000 + " seconds while trying to delete {} - attempt: {}", getIdentifier(), retryCount + 1); Thread.sleep(sleepTime); cumulativeSleepTime += sleepTime; sleepTime *= 2; } catch (InterruptedException e) { e.printStackTrace(); LOGGER .error( "Interrupted while sleeping trying to delete {} with message {}...", getIdentifier(), e.getMessage()); throw new RuntimeException(e); } if (retryCount == 0) { getFileSystem(conf).delete(getPath(), true); } retryCount++; if (cumulativeSleepTime > MAXIMUM_TIME_TO_WAIT_TO_DELETE_MS) { break; } } if (getFileSystem(conf).exists(path)) { LOGGER .error( "We didn't succeed to delete the resource {}. Throwing now a runtime exception.", getIdentifier()); throw new RuntimeException( "Although we waited to delete the resource for " + getIdentifier() + ' ' + retryCount + " iterations, it still exists - This must be an issue in the underlying storage system."); } return isDeleted; } [3] INFO [pool-2-thread-15] (BaseFlow.java:1287) - [...] at least one sink is marked for delete INFO [pool-2-thread-15] (BaseFlow.java:1287) - [...] sink oldest modified date: Wed Dec 31 23:59:59 UTC 1969 INFO [pool-2-thread-15] (HiveSinkTap.java:148) - Now I will sleep 1 seconds while trying to delete s3n://... - attempt: 1 INFO [pool-2-thread-15] (HiveSinkTap.java:130) - Deleting resource s3n://... INFO [pool-2-thread-15] (HiveSinkTap.java:133) - Hfs Sink Tap isDeleted is true for s3n://... ERROR [pool-2-thread-15] (HiveSinkTap.java:175) - We didn't succeed to delete the resource s3n://... Throwing now a runtime exception. WARN [pool-2-thread-15] (Cascade.java:706) - [...] flow failed: ... java.lang.RuntimeException: Although we waited to delete the resource for s3n://... 0 iterations, it still exists - This must be an issue in the underlying storage system. at com.qubit.hive.tap.HiveSinkTap.deleteResource(HiveSinkTap.java:179) at com.qubit.hive.tap.HiveSinkTap.deleteResource(HiveSinkTap.java:40) at cascading.flow.BaseFlow.deleteSinksIfNotUpdate(BaseFlow.java:971) at cascading.flow.BaseFlow.prepare(BaseFlow.java:733) at cascading.cascade.Cascade$CascadeJob.call(Cascade.java:761) at cascading.cascade.Cascade$CascadeJob.call(Cascade.java:710) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    Read the article

  • Access Iphone Pim Data via web app

    - by Eric
    i think i know the answer to this question, but just want to make sure before i dismiss the possibility. is it possible with user permission for my web app to access pim data like the address book on a iphone, similar to how a web app can access the location service?

    Read the article

  • Problem compiling bison & flex program under vc++

    - by Eric
    I'm using bison & flex (downloaded via cygwin) with vc++. When I compile the program I got an error: ...: fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory The corresponding code in the flex-generated file is: #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ /* %if-c-only */ #include <unistd.h> /* %endif */ /* %if-c++-only */ /* %endif */ #endif If I define YY_NO_UNISTD_H in the flex file(.l) this error will disappear, but I get several other errors: ...: error C2447: '{' : missing function header (old-style formal list?) ...: warning C4018: '<' : signed/unsigned mismatch ...: error C3861: 'isatty': identifier not found How can I fix this problem?

    Read the article

  • Getting value from pointer

    - by Eric
    Hi, I'm having problem getting the value from a pointer. I have the following code in C++: void* Nodo::readArray(VarHash& var, string varName, int posicion, float& d) { //some code before... void* res; float num = bit.getFloatFromArray(arregloTemp); //THIS FUNCTION RETURN A FLOAT AND IT'S OK cout << "NUMBER " << num << endl; d = num; res = &num; return res } int main() { float d = 0.0; void* res = n.readArray(v, "c", 0, d); //THE VALUES OF THE ARRAY ARE: {65.5, 66.5}; float* car3 = (float*)res; cout << "RESULT_READARRAY " << *car3 << endl; cout << "FLOAT REFERENCE: " << d << endl; } The result of running this code is the following: NUMBER 65.5 RESULT_READARRAY -1.2001 //INCORRECT IT SHOULD BE LIKE NUMBER FLOAT REFERENCE: 65.5 //CORRECT NUMBER 66.5 RESULT_READARRAY -1.2001 //INCORRECT IT SHOULD BE LIKE NUMBER FLOAT REFERENCE: 66.5 //CORRECT For some reason, when I get the value of the pointer returned by the function called readArray is incorrect. I'm passing a float variable(d) as a reference in the same function just to verify that the value is ok, and as you can see, THE FLOAT REFERENCE matches the NUMBER. If I declare the variable num(read array) as a static float, the first RESULT_READARRAY will be 65.5, that is correct, however, the next value will be the same instead of 66.5. Let me show you the result of running the code using static float variable: NUMBER 65.5 RESULT_READARRAY 65.5 //PERFECT FLOAT REFERENCE: 65.5 //¨PERFECT NUMBER 65.5 //THIS IS INCORRECT, IT SHOULD BE 66.5 RESULT_READARRAY 65.5 FLOAT REFERENCE: 65.5 Do you know how can I get the correct value returned by the function called readArray()?

    Read the article

  • Can't Use Generic C# Class in Using Statement

    - by Eric J.
    I'm trying to use a generic class in a using statement but the compiler can't seem to treat it as implementing IDisposable. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Objects; namespace Sandbox { public sealed class UnitOfWorkScope<T> where T : ObjectContext, IDisposable, new() { public void Dispose() { } } public class MyObjectContext : ObjectContext, IDisposable { public MyObjectContext() : base("DummyConnectionString") { } #region IDisposable Members void IDisposable.Dispose() { throw new NotImplementedException(); } #endregion } public class Consumer { public void DoSomething() { using (new UnitOfWorkScope<MyObjectContext>()) { } } } } Compiler error is: Error 1 'Sandbox.UnitOfWorkScope<Sandbox.MyObjectContext>': type used in a using statement must be implicitly convertible to 'System.IDisposable' I implemented IDisposable on UnitOfWorkScope (and to see if that was the problem, also on MyObjectContext). What am I missing?

    Read the article

  • Is there a way to automaticly call all versions of an inherited method?

    - by Eric
    I'm writing a plug-in for a 3D modeling program. I have a custom class that wraps instances of elements in the 3D model, and in turn derives it's properties from the element it wraps. When the element in the model changes I want my class(es) to update their properties based on the new geometry. In the simplified example below. I have classes AbsCurveBasd, Extrusion, and Shell which are all derived from one another. Each of these classes implement a RefreshFromBaseShape() method which updates specific properties based on the current baseShape the class is wrapping. I can call base.RefreshFromBaseShape() in each implementation of RefreshFromBaseShape() to ensure that all the properties are updated. But I'm wondering if there is a better way where I don't have to remember to do this in every implementation of RefershFromBaseShape()? For example because AbsCurveBased does not have a parameterless constructor the code wont even compile unless the constructors call the base class constructors. public abstract class AbsCurveBased { internal Curve baseShape; double Area{get;set;} public AbsCurveBased(Curve baseShape) { this.baseShape = baseShape; RefreshFromBaseShape(); } public virtual void RefreshFromBaseShape() { //sets the Area property from the baseShape } } public class Extrusion : AbsCurveBased { double Volume{get;set;} double Height{get;set;} public Extrusion(Curve baseShape):base(baseShape) { this.baseShape = baseShape; RefreshFromBaseShape(); } public override void RefreshFromBaseShape() { base.RefreshFromBaseShape(); //sets the Volume property based on the area and the height } } public class Shell : Extrusion { double ShellVolume{get;set;} double ShellThickness{get;set;} public Shell(Curve baseShape): base(baseShape) { this.baseShape = baseShape; RefreshFromBaseShape(); } public void RefreshFromBaseShape() { base.RefreshFromBaseShape(); //sets this Shell Volume from the Extrusion properties and ShellThickness property } }

    Read the article

  • polymorphism pass instantiated base to deriver

    - by Eric
    I was wondering how to do this, consider the following classes public class Fruit { public string Name { get; set; } public Color Color { get; set; } } public class Apple : Fruit { public Apple() { } } How can I instantiate a new fruit but upcast to Apple, is there a way to instantiate a bunch of Fruit and make them apples with the name & color set. Do I need to manually deep copy? Of course this fails Fruit a = new Fruit(); a.Name = "FirstApple"; a.Color = Color.Red; Apple wa = a as Apple; System.Diagnostics.Debug.Print("Apple name: " + wa.Name); Do I need to pass in a Fruit to the AppleCTor and manually set the name and color( or 1-n properties) Is there an better design to do this?

    Read the article

  • Assemblies mysteriously loaded into new AppDomains

    - by Eric
    I'm testing some code that does work whenever assemblies are loaded into an appdomain. For unit testing (in VS2k8's built-in test host) I spin up a new, uniquely-named appdomain prior to each test with the idea that it should be "clean": [TestInitialize()] public void CalledBeforeEachTestMethod() { AppDomainSetup appSetup = new AppDomainSetup(); appSetup.ApplicationBase = @"G:\<ProjectDir>\bin\Debug"; Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; Evidence evidence = new Evidence( baseEvidence ); _testAppDomain = AppDomain.CreateDomain( "myAppDomain" + _appDomainCounter++, evidence, appSetup ); } [TestMethod] public void MissingFactoryCausesAppDomainUnload() { SupportingClass supportClassObj = (SupportingClass)_testAppDomain.CreateInstanceAndUnwrap( GetType().Assembly.GetName().Name, typeof( SupportingClass ).FullName ); try { supportClassObj.LoadMissingRegistrationAssembly(); Assert.Fail( "Should have nuked the app domain" ); } catch( AppDomainUnloadedException ) { } } [TestMethod] public void InvalidFactoryMethodCausesAppDomainUnload() { SupportingClass supportClassObj = (SupportingClass)_testAppDomain.CreateInstanceAndUnwrap( GetType().Assembly.GetName().Name, typeof( SupportingClass ).FullName ); try { supportClassObj.LoadInvalidFactoriesAssembly(); Assert.Fail( "Should have nuked the app domain" ); } catch( AppDomainUnloadedException ) { } } public class SupportingClass : MarshalByRefObject { public void LoadMissingRegistrationAssembly() { MissingRegistration.Main(); } public void LoadInvalidFactoriesAssembly() { InvalidFactories.Main(); } } If every test is run individually I find that it works correctly; the appdomain is created and has only the few intended assemblies loaded. However, if multiple tests are run in succession then each _testAppDomain already has assemblies loaded from all previous tests. Oddly enough, the two tests get appdomains with different names. The test assemblies that define MissingRegistration and InvalidFactories (two different assemblies) are never loaded into the unit test's default appdomain. Can anyone explain this behavior?

    Read the article

  • Load Balancing and Failover for Read-Only PostgreSQL Database

    - by Eric J.
    Scenario Multiple application servers host web services written in Java, running in SpringSource dm Server. To implement a new requirement, they will need to query a read-only PostgreSQL database. Issue To support redundancy, at least two PostgreSQL instances will be running. Access to PostgreSQL must be load balanced and must auto-fail over to currently running instances if an instance should go down. Auto-discovery of newly running instances is desirable but not required. Research I have reviewed the official PostgreSQL documentation on this issue. However, that focuses on the more general case of read/write access to the database. Top google results tend to lead to older newsgroup messages or dead projects such as Sequoia or DB Balancer, as well as one active project PG Pool II Question What are your real-world experiences with PG Pool II? What other simple and reliable alternatives are available?

    Read the article

  • Blackberry - Custom size EditField

    - by Eric
    I am trying to put together a dialog that should look like this: Fill in the below fields ___________ likes ________________ where the "_" lines are the EditFields. I am sticking all the fields in a HorizontalFieldManager, which I add to the dialog. Unfortunately, the first EditField consumes all the space on the first line. I have tried to override the getPreferredWidth() method of the EditField by creating my own class extending BasicEditField, but have had no success. Surely there must be a simple way to force a certain size for an edit field. What am I missing?

    Read the article

  • Inheriting the main method

    - by Eric
    I want to define a base class that defines a main method that instantiates the class, and runs a method. There are a couple of problems though. Here is the base class: public abstract class Strategy { abstract void execute(SoccerRobot robot); public static void main(String args) { Strategy s = new /*Not sure what to put here*/(); s.execute(new SoccerRobot()) } } And here is an example derived class: public class UselessStrategy { void execute(SoccerRobot robot) { System.out.println("I'm useless") } } It defines a simple execute method, which should be called in a main method upon usage as a the main application. However, in order to do so, I need to instantiate the derived class from within the base class's main method. Which doesn't seem to be possible. I'd rather not have to repeat the main method for every derived class, as it feels somewhat unnessary. Is there a right way of doing this?

    Read the article

  • Is there a way to set two C#.Net projects to trust one another?

    - by Eric
    I have two C#.NET projects in a single solution ModelProject and PluginProject. PlugInProject is a plug-in for another application, and consequently references its API. PlugInProject is used to extract data from the application it plugs into. ModelProject contains the data model of classes that are extracted by PlugInProject. The extracted data can be used independent of the application or the plug-in, which is why I am keeping PlugInProject separate from ModelProject. I want ModelProject to remain independent of PlugInProject, and the Applications API. Or in other words I want someone to be able to access the extracted data without needing access to PlugInProject, the application, or the application's API. The problem I'm running into though is PlugInProject needs to be able to create and modify classes in ModelProject. However, I'd prefer to not make these actions public to anyone using ModelProject. The extracted data should effectively be read-only, unless later modified by PlugInProject. How can I keep these projects separate but give PlugInProject exclusive access to ModelProject? Is this possible?

    Read the article

  • Group MySQL Data into Arbitrarily Sized Time Buckets

    - by Eric J.
    How do I count the number of records in a MySQL table based on a timestamp column per unit of time where the unit of time is arbitrary? Specifically, I want to count how many record's timestamps fell into 15 minute buckets during a given interval. I understand how to do this in buckets of 1 second, 1 minute, 1 hour, 1 day etc. using MySQL date functions, e.g. SELECT YEAR(datefield) Y, MONTH(datefield) M, DAY(datefield) D, COUNT(*) Cnt FROM mytable GROUP BY YEAR(datefield), MONTH(datefield), DAY(datefield) but how can I group by 15 minute buckets?

    Read the article

  • How to add sort function for the table via ajax in ASP.NET MVC?What is the best practice.

    - by Eric Wang
    How to add sort function for the table via ajax in ASP.NET MVC?What is the best practice. If not use Ajax, it maybe much easier, just return View, but if use AJAX, what data structure should return?I just use Json to return the data, but i found each JSON data model return to the client browser, the JS have to use different code to parse it, remove the originally table rows, add the new data rows(because the column is different) etc. It make me crazy, is there any better way to do that? Thank you for any advice.

    Read the article

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