Search Results

Search found 8397 results on 336 pages for 'implementation'.

Page 192/336 | < Previous Page | 188 189 190 191 192 193 194 195 196 197 198 199  | Next Page >

  • Simple File-based Record Storage with Fast Text Searching for Compact Framework and Silverlight

    - by Eric Farr
    I have a single table with lots of records ( 100k) that I need to be able to index and search on several text fields. The easiest searches will have the first part of the string specified (eg, LIKE 'ABC%' in SQL). The tougher searches will need to search for any substring within the text fields (eg, LIKE '%ABC%' in SQL). I need to run on the Compact Framework. SQL Compact is a memory hog and overkill for my one table. Besides, I'd like to be able to run on Silverlight 4 eventually. The file and indexes can be generated on the full .NET Framework and I only need read capability on the Compact Framework. My records are not especially large and can be expressed in fix length format. I'm looking for some existing code or libraries to avoid having to write a file-based BTree implementation from scratch.

    Read the article

  • VS 11 with std::future - Is this a bug?

    - by cooky451
    I recently installed the Visual Studio 11 Developer Preview. While playing with threads and futures, I came around this setup: #include <future> #include <iostream> int foo(unsigned a, unsigned b) { return 5; } int main() { std::future<int> f = std::async(foo, 5, 7); std::cout << f.get(); } So, very simple. But since there are two arguments for "foo", VS 11 doesn't want to compile it. (However, g++ does: http://ideone.com/ANrPj) (The runtime error is no problem: std::future exception on gcc experimental implementation of C++0x) (VS 11 errormessage: http://pastebin.com/F9Xunh2s) I'm a little confused right now, since this error seems extremely obvious to me, even if it is a developer preview. So my questions are: Is this code correct according to the C++11 standard? Is this bug already known/reported?

    Read the article

  • Please suggest some alternative to Drupal

    - by abovesun
    Drupal propose completely different approach in web development (comparing with RoR like frameworks) and it is extremely good from development speed perspective. For example, it is quite easy to clone 90% of stackoverflow functionality using Drupal. But it has several big drawbacks: it is f''cking slow (100-400 requests per page) db structure very complicated, need at least 2 tables for easy content (entity) type, CCK fields very easy generate tons of new db tables anti-object oriented, rather aspect-oriented bad "view" layer implementation, no strange forward layouts and so on. After all this items I can say I like Drupal, but I would like something same, but more elegant and more object oriented. Probably something like http://drupy.net/ - drupal emulation on the top of django. P.S. I wrote this question not for new holy word flame, just write if you know alternative that uses something similar approach.

    Read the article

  • Streaming support for flex with Ruby On Rails (working with live data )

    - by Ashine
    Hi Freinds, I am working on flex dasboards and charting stuff. Till now I have build them for static data only now I want to upgrade them to work for real time data where new data is continuosly sent to client (swf file) from server and it updates the same. I am using Ruby On Rails (RoR) at server side. Is there some thing similar to 'Adbobe live cycle(Java-Flex)' applicable for RoR-Flex architecture that can be used here ? Please share the links for any similar implementation in RoR-Flex architecture. Or if you have some suggestions to share I will really appreciate. Thanks friends.

    Read the article

  • Objective-C: Protocols

    - by Stu
    I'd like an instance variable object to adopt a protocol. @interface GameScene : Scene <AVAudioPlayerDelegate> { @private Layer *content <CocosNodeOpacity>; } For example I'd like my Layer object to adopt the <CocosNodeOpacity> so that I can get the methods -(GLubyte) opacity; //and -(void) setOpacity: (GLubyte) opacity; for free. The syntax shown above is invalid. Is it possible to achieve this without creating a new implementation file and creating a custom object? Thanks.

    Read the article

  • Show last command with up arrow on a linux c shell

    - by nunos
    I have implemented a simple linux shell in c. Now, I am adding some features and one I immediately thought about was to be able to show the last commands with the up arrow. Question 1: However, I have no idea how to accomplish this. Do you? Question 2: Any comment on how to store the "history" commands are also appreciated. I suppose something like a queue which allows access to all elements would be a good idea. Am I wrong? Do I have to implement it or is there already some good implementation out there I should know about? Thanks.

    Read the article

  • Implementing IComparer<T> For IComparer<DictionaryEntry>

    - by Phil Sandler
    I am using the ObservableSortedDictionary from Dr. WPF. The constructor looks like this: public ObservableSortedDictionary(IComparer<DictionaryEntry> comparer) I am really struggling to create an implementation that satisfies the constructor and works. My current code (that won't compile) is: public class TimeCreatedComparer<T> : IComparer<T> { public int Compare(T x, T y) { var myclass1 = (IMyClass)((DictionaryEntry)x).Value; var myclass2 = (IMyClass)((DictionaryEntry)y).Value; return myclass1.TimeCreated.CompareTo(myclass2.TimeCreated); } } It says I can't cast from T to DictionaryEntry. If I cast directly to IMyClass, it compiles, but I get a runtime error saying I can't cast from DictionaryEntry to IMyClass. At runtime, x and y are instances of DictionaryEntry, which each have the correct IMyClass as their Value.

    Read the article

  • Pure Java open-source libraries for portfolio selection (= constrained, non-linear optimization)?

    - by __roland__
    Does anyone know or has experience with a pure Java library to select portfolios or do some similar kinds of quadratic programming with constraints? There seems to be a lot of tools, as already discussed elsewhere - but what I would like to use is a pure Java implementation. Since I want to call the library from within another open-source software with a BSD-ish license I would prefer LGPL over GPL. Any help is appreciated. If you don't know such libraries, which is the most simple algorithm you would suggest to implement? It has to cope with an inequality constraint (all x_i = 0) and an equality constraint (sum of all x_i = 1).

    Read the article

  • How to avoid having very large objects with Domain Driven Design

    - by Pablojim
    We are following Domain Driven Design for the implementation of a large website. However by putting the behaviour on the domain objects we are ending up with some very large classes. For example on our WebsiteUser object, we have many many methods - e.g. dealing with passwords, order history, refunds, customer segmentation. All of these methods are directly related to the user. Many of these methods delegate internally to other child object but this still results in some very large classes. I'm keen to avoid exposing lots of child objects e.g. user.getOrderHistory().getLatestOrder(). What other strategies can be used to avoid this problems?

    Read the article

  • Examining mmaped addresses using GDB

    - by Mikeage
    I'm using the driver I posted at http://stackoverflow.com/questions/647783/direct-memory-access-in-linux/ to mmap some physical ram into a userspace address. However, I can't use GDB to look at any of the address; i.e., x 0x12345678 (where 0x12345678 is the return value of mmap) fails with an error "Cannot access memory at address 0x12345678". Is there any way to tell GDB that this memory can be viewed? Alternatively, is there something different I can do in the mmap (either the call or the implementation of foo_mmap there) that will allow it to access this memory? Note that I'm not asking about /dev/mem (as in the first snippet there) but amount a mmap to memory acquired via ioremap(), virt_to_phys() and remap_pfn_range()

    Read the article

  • Mathematica Plot3D does not produce a plot when graphing a user-defined function?

    - by pythonscript
    I'm writing a simple Mathematica implementation of the black-scholes model and using Plot3D to plot the pricing surface. However, when I run this code, no plot is produced. My call and put functions to produce correct values when run separately, but no plot is produced. Code: Clear[d1, d2, call, put, stockPrice, strikePrice, riskFreeRate, timeToExp, volatility] d1[stockPrice_, strikePrice_, riskFreeRate_, timeToExp_, volatility_] := (Log[stockPrice / strikePrice] + (riskFreeRate + 0.5*volatility^2)*timeToExp) / (volatility * Sqrt[timeToExp]) d2[stockPrice_, strikePrice_, riskFreeRate_, timeToExp_, volatility_] := d1[stockPrice, strikePrice, riskFreeRate, timeToExp, volatility] - volatility*Sqrt[timeToExp] call[stockPrice_, strikePrice_, riskFreeRate_, timeToExp_, volatility_] := stockPrice * CDF[NormalDistribution[0, 1], d1[stockPrice, strikePrice, riskFreeRate, timeToExp, volatility]] - strikePrice * Exp[-riskFreeRate*timeToExp] *CDF[NormalDistribution[0, 1], d2[stockPrice, strikePrice, riskFreeRate, timeToExp, volatility]] Plot3D[call[stockPrice, 500, 0.0030, timeToExp, 0.39], {stockPrice, 10, 1000}, {timetoExp, 0.0833333, 5}] Other plots, like this sample from the reference, do work. Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -2, 2}, {y, -2, 2}, RegionFunction -> Function[{x, y, z}, x^2 + y^2 <= 4], BoxRatios -> Automatic]

    Read the article

  • viewDidLoad never called in Sub-classed UIViewController

    - by Steve
    I've run into some trouble with loading a sub-classed UIViewController from a nib. My viewDidLoad function is never called. The super-class has no nib, but the sub-classes each have their own. i.e. @interface SuperClass : UIViewController { } @end @interface SubClass : SuperClass{ } @end @implementation SubClass - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad{ // Never called } The view is loaded from a nib as follows: SubClass *scvc = [[SubClass alloc] initWithNibName:@"SubClass" bundle:nil]; [self.navigationController pushViewController:scvc animated:YES]; [scvc release]; There is a nib file with this name and it has it's file owner's class set properly. viewDidLoad is not called in the child or super. Any ideas?

    Read the article

  • how start implement MVVM pattern

    - by netmajor
    Hello, So i decide to to develop my asp.net site into Silverlight. I today start to search articles about MVVM pattern which i want use in my Silverlight app, and i am confused :/ It's hart to me understand how works this pattern. I am find 3 frameworks which supports MVVM pattern in Silverlight - Caliburn, MVVM Light Toolkit and GoodLight. Should i start from own implementation of pattern or use framework? Is this frameworks only a project solutions in which i can insert my code? Which framework is the best for novice and which for professional? I ask for this, cause i must start to rewrite my app from asp.net to Silverlight and i don't know that i can do it first and later (when i understand MVVM pattern and framework) implement this pattern in finished app ? Or from begining rewrite project to MVVM framework?

    Read the article

  • Programmatically allow write access for a Registry key

    - by Kerido
    Hi everybody, I need to programmatically modify the Access Descriptors on a known Registry key during product installation. The way I want it to work is: The installer is run in Administrative mode. A Registry key is created. A function (the one I need) queries the ACL from the key. If this function finds that the group 'Users' already has write access, nothing should be done. If not, it should add a new permission allowing write access to the 'Users' group. The permissions are saved for the Registry key. This question is similar to Setting Registry key write permissions using .NET, however, I need a C++/Win32 implementation. Thanks in advance

    Read the article

  • Implementing an interface using an asynchronous WCF service?

    - by John K.
    Hello, I am trying to figure out if it is possible to implement a .NET interface, where the interface method has to return something and you are implementing that particular interface method with an asynchronous WCF service? Hopefully you should already see the issue I am encountering. Here is the interface: public interface IDataService { IDataServiceResponse SendDataRequest(); } IDataServiceResponse is supposed to represent a simple container that holds the result of my asynchronous WCF callback. Here is the code snippet where I am implementing the interface method, SendDataRequest() public IDataServiceResponse SendDataRequest() { InitializeDataServiceParameters(); // Call the web service asynchronously, here.... _client.BeginQueryJobs(_parameters, DataServiceQueryCallBack, _client); // How do I return _dataServiceResponse, if I am calling the WCF service // asynchronously?? return _dataServiceResponse; } And the callback method signature: void DataServiceQueryCallBack(IAsyncResult result) { // ... implementation code } Thanks in advance, John

    Read the article

  • Grand Central Strategy for Opening Multiple Files

    - by user276632
    I have a working implementation using Grand Central dispatch queues that (1) opens a file and computes an OpenSSL DSA hash on "queue1", (2) writing out the hash to a new "side car" file for later verification on "queue2". I would like to open multiple files at the same time, but based on some logic that doesn't "choke" the OS by having 100s of files open and exceeding the hard drive's sustainable output. Photo browsing applications such as iPhoto or Aperture seem to open multiple files and display them, so I'm assuming this can be done. I'm assuming the biggest limitation will be disk I/O, as the application can (in theory) read and write multiple files simultaneously. Any suggestions? TIA

    Read the article

  • WCF Business logic handling

    - by Raj
    I have a WCF service that supports about 10 contracts, we have been supporting a client with all the business rules specific to this client now we have another client who will be using the exact same contracts (so we cannot change that) they will be calling the service exactly the same way the previous client called now the only way we can differentiate between the two clients is by one of the input parameters. Based on this input parameter we have to use a slightly different business logic – the logic for both the Client will be same 50% of the time the remainder will have different logic (across Business / DAL layers) . I don’t want to use if else statement in each of contract implementation to differentiate and reroute the logic also what if another client comes in. Is there a clean way of handling a situation like this. I am using framework 3.5. Like I said I cannot change any of the contracts (service / data contract ) or the current service calling infrastructure for the new client. Thanks

    Read the article

  • Naming convention in Objective C /C , start with "_"?

    - by Tattat
    Something I see ppl define the variable like this: b2World *_world; b2Body *_body; CCSprite *_ball; instead of b2World *world; b2Body *body; CCSprite *ball; I familiar with the second one, but not the first one. So, I checked the Wikipedia about naming convention: Names beginning with double underscore or an underscore and a capital letter are reserved for implementation (compiler, standard library) and should not be used (e.g. __reserved or _Reserved). So, is that any special meaning which is start with "_"? The wiki page.

    Read the article

  • Refactor/rewrite code or continue?

    - by Dan
    I just completed a complex piece of code. It works to spec, it meets performance requirements etc etc but I feel a bit anxious about it and am considering rewriting and/or refactoring it. Should I do this (spending time that could otherwise be spent on features that users will actually notice)? The reasons I feel anxious about the code are: The class hierarchy is complex and not obvious Some classes don't have a well defined purpose (they do a number of unrelated things) Some classes use others internals (they're declared as friend classes) to bypass the layers of abstraction for performance, but I feel they break encapsulation by doing this Some classes leak implementation details (eg, I changed a map to a hash map earlier and found myself having to modify code in other source files to make the change work) My memory management/pooling system is kinda clunky and less-than transparent They look like excellent reasons to refactor and clean code, aiding future maintenance and extension, but could be quite time consuming. Also, I'll never be perfectly happy with any code I write anyway... So, what does stackoverflow think? Clean code or work on features?

    Read the article

  • How to best deal with photos passed to IFilter?

    - by sharptooth
    I'm implementing an IFilter for indexing image formats. One problem is photos - many users have tons of photos, photos are huge and loading and searching for text on them is time consuming. Yes, sometimes people use cameras instead of scanners for digitizing documents, but the potential problems IMO far outweight the possibility of encountering a document digitized with a photo camera. So my implementation will not extract text from photos at all. What should the IFilter do once it detects that a given file is a photo image - indicate an error or return empty text?

    Read the article

  • XSLT good choice for web framework?

    - by Xepoch
    I've always thought of XML (and SGML before that) data as the devil's format. I'm of the old database and flat files school. Nonetheless, we are developing a commercially-available web product who's framework is based off of translating/transforming XML data in chains. As we're interviewing for positions as well talking to potential customers, they love the concept of what it will do but are weary of supporting XSLT long-term. One person even called it the proverbial "dead." Dead like COBOL, Unix, and C or dead like Apple Business BASIC? Anyway, I'm curious if building a web framework on XSLT is really not cutting edge enough (oddly) for companies. Are there inherent XSLT implementation problems that make this venture something worth reconsidering?

    Read the article

  • ICalendar parser in PHP that supports timezones

    - by Vincent Robert
    I am looking for a PHP class that can parse an ICalendar (ICS) file and correctly handle timezones. I already created an ICS parser myself but it can only handle timezones known to PHP (like 'Europe/Paris'). Unfortunately, ICS file generated by Evolution (default calendar software of Ubuntu) does not use default timezone IDs. It exports events with its a specific timezone ID exporting also the full definition of the timezone: daylight saving dates, recurrence rule and all the hard stuff to understand about timezones. This is too much for me. Since it was only a small utility for my girlfriend, I won't have time to investigate further the ICalendar specification and create a full blown ICalendar parser myself. So is there any known implementation in PHP of ICalendar file format that can parse timezones definitions?

    Read the article

  • JavaFX Threading issue - GUI freezing while method call ran.

    - by David Meadows
    Hi everyone, I hoped someone might be able to help as I'm a little stumped. I have a javafx class which runs a user interface, which includes a button to read some text out loud. When you press it, it invokes a Java object which uses the FreeTTS java speech synth to read out loud a String, which all works fine. The problem is, when the speech is being read out, the program stops completely until its completed. I'm not an expert on threaded applications, but I understand that usually if I extend the Thread class, and provided my implementation of the speech synth code inside an overridden run method, when I call start on the class it "should" create a new Thread, and run this code there, allowing the main thread which has the JavaFX GUI on to continue as normal. Any idea why this isn't the case? Thanks a lot in advance!

    Read the article

  • NHibernate session management in ASP.NET MVC

    - by Kevin Pang
    I am currently playing around with the HybridSessionBuilder class found on Jeffrey Palermo's blog post: http://jeffreypalermo.com/blog/use-this-nhibernate-wrapper-to-keep-your-repository-classes-simple/ Using this class, my repository looks like this: public class UserRepository : IUserRepository { private readonly ISessionBuilder _sessionBuilder; public UserRepository(ISessionBuilder sessionBuilder) { _sessionBuilder = sessionBuilder; } public User GetByID(string userID) { using (ISession session = _sessionBuilder.GetSession()) { return session.Get<User>(userID); } } } Is this the best way to go about managing the NHibernate session / factory? I've heard things about Unit of Work and creating a session per web request and flushing it at the end. From what I can tell, my current implementation isn't doing any of this. It is basically relying on the Repository to grab the session from the session factory and use it to run the queries. Are there any pitfalls to doing database access this way?

    Read the article

  • Weird ViewControllers - iPhone SDK

    - by Kevin
    Hello everyone, I have a Tab-Bar Application for this iPhone application I am making. I make a simple button on the 3rd view (3rd tab), and give it an IBAction to give an alert view. When I press build and go, everything works out fine. I go onto the 3rd tab, and I press my button. It simply crashes... Why is this happening? Everything I put in this 3rd tab crashes. I create a simple view controller, and write the class files to start over, but I keep getting the same errors.. Everything works fine on my first tab, where I originally got the first view controller.. P.S It also says Incomplete Implementation of Class 'ThirdViewController'. I don't know why its there.. If anyone can help me out here, i would greatly appreciate it. Kevin

    Read the article

< Previous Page | 188 189 190 191 192 193 194 195 196 197 198 199  | Next Page >