Search Results

Search found 262 results on 11 pages for 'harry pham'.

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

  • .Net 4.0 Memory-Mapped Files verses RDMS Storage

    - by Harry
    I'm interested in people's thoughts comparing storing data in a traditional SQL based Database or utilising a Memory-Mapped File such as the one in the new .Net 4.0 runtime. The data in question would be arrays of simple structures. Obvious pros and cons: SQL Database Pros Adhoc query support SQL Management Tools Schema changes (adding more columns and setting default values) Memory-Mapped Pros Lighter overhead? (this is an assumption on my part) Shareable between process threads Any others? Is it worth it for performance gains?

    Read the article

  • Does to_json require parameters? what about within rails?

    - by Harry Wood
    Does to_json require parameters? what about within rails? I started getting the error "wrong number of arguments (0 for 1)" when doing myhash.to_json Unfortunately I'm not sure when this error started happening, but I guess it relates to some versions of either rails or the json gem. I suppose my code (in a rails controller) is using the ActiveSupport::JSON version of to_json, rather than the to_josn method supported by the json gem. ActiveSupport::JSON vs JSON In environment.rb I have RAILS_GEM_VERSION = '2.3.2' and also config.gem "json", :version=> '1.1.7' It's just a simple hash structure containing primitives which I want to convert in my controller, and it was working, but now I can't seem to run to_json without passing parameters.

    Read the article

  • Project generation problem using Spring Roo

    - by Harry
    Hi, I just downloaded SpringSource Tool Suite, and tried to generate a demo application using roo, but i'm getting error below Code: Created /home/dev/springsource/workspace/demo/pom.xml Undo create /home/dev/springsource/workspace/demo/pom.xml Invalid dependency scope: PROVIDED [Timer-0] NullPointerException at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:84) What is the problem? is this Maven issue? Using: Ubuntu 8.10, SpringSource Tool Suite Version: 2.3.3.M1, Roo 1.1.0.M1, Apache Maven Thanks

    Read the article

  • Linq To Sql Left outer join - filtering null results

    - by Harry
    I'd like to reproduce the following SQL into C# LinqToSql SELECT TOP(10) Keywords.* FROM Keywords LEFT OUTER JOIN IgnoreWords ON Keywords.WordID = IgnoreWords.ID WHERE (DomainID = 16673) AND (IgnoreWords.Name IS NULL) ORDER BY [Score] DESC The following C# Linq gives the right answer. But I can't help think I'm missing something (a better way of doing it?) var query = (from keyword in context.Keywords join ignore in context.IgnoreWords on keyword.WordID equals ignore.ID into ignored from i in ignored.DefaultIfEmpty() where i == null where keyword.DomainID == ID orderby keyword.Score descending select keyword).Take(10); the SQL produced looks something like this: SELECT TOP (10) [t0].[DomainID], [t0].[WordID], [t0].[Score], [t0].[Count] FROM [dbo].[Keywords] AS [t0] LEFT OUTER JOIN (SELECT 1 AS [test], [t1].[ID] FROM [dbo].[IgnoreWords] AS [t1]) AS [t2] ON [t0].[WordID] = [t2].[ID] WHERE ([t0].[DomainID] = 16673) AND ([t2].[test] IS NULL) ORDER BY [t0].[Score] DESC How can I get rid of this redundant inner selection? It's only slightly more expensive but every bit helps!

    Read the article

  • Getting RAW Soap Data from a Web Reference Client running in ASP.net

    - by Harry
    I'm trying to trouble shoot a web service client in my current project. I'm not sure of the platform of the Service Server (Most likely LAMP). I believe there is a fault on their side of the fence as i have eliminated the potential issues with my client. The client is a standard ASMX type web reference proxy auto generated from the service WSDL. What I need to get to is the RAW SOAP Messages (Request and Responses) What is the best way to go about this?

    Read the article

  • What should go in each MVVM triad?

    - by Harry
    OK, let's say I am creating a program that will list users contacts in a ListBox on the left side of the screen. When a user clicks on the contact, a bunch of messages or whatever appears in the main part of the window. Now my question is: how should the MVVM triads look? I have two models: Contact, and Message. The Contact model contains a list of Message models. Each ViewModel object will contain a single corresponding Model, right? And what about the Views? I have a "MainView" that is the main window, that will have things like the menu, toolbar etc. Do I put the ListBox in the MainView? My confusion is with what to put where; for example, what should the ContactView contain? Just a single instance of a contact? So the DataTemplate, ControlTemplate, context menus, styles etc for that single contact, and then just have a ListBox of them in the MainView...? Thanks.

    Read the article

  • Activation Function, Initializer function, etc, effects on neural networks for face detection

    - by harry
    There's various activation functions: sigmoid, tanh, etc. And there's also a few initializer functions: Nguyen and Widrow, random, normalized, constant, zero, etc. So do these have much effect on the outcome of a neural network specialising in face detection? Right now I'm using the Tanh activation function and just randomising all the weights from -0.5 to 0.5. I have no idea if this is the best approach though, and with 4 hours to train the network each time, I'd rather ask on here than experiment!

    Read the article

  • How do you determine when an object is drawn on-screen in OpenGL?

    - by Harry
    I'm extremely new to OpenGL. I'm writing a program that displays flying text on screen. I need to know when certain text string appears (drawn) onto the screen and are visible to the user. The program needs to identify which text strings are displayed. At first, I started to think that I could use OpenGL's picking mechanism, but so far I've only seen examples where the selection area is focused on some sort of user interaction. I want to know what objects are displayed on the entire window area. This leads me to think I'm on the wrong track... Am I missing something? Any suggestions are welcome.

    Read the article

  • ASP.net MVC: Getting a Partial View's HTML from inside of the controller

    - by Harry
    I have developed a simple mechanism for my mvc website to pull in html via jquery which then populates a specified div. All is well and it looks cool. My problem is that i'm now creating html markup inside of my controller (Which is very easy to do in VB.net btw) I'd rather not mix up the sepparation of concerns. Is it possible to use a custom 'MVC View User Control' to suit this need? Can I create an instance of a control, pass in the model data and render to html? It would then be a simple matter of rendering and passing back to the calling browser.

    Read the article

  • Ruby implementation of conversion between Latitude/Longitude and OS National Grid Reference point?

    - by Harry Wood
    For converting between Latitude/Longitude and UK's Ordnance Survey National Grid eastings and northings, this seems to be the most popular explanation and reference implementation in JavaScript: http://www.movable-type.co.uk/scripts/latlong-gridref.html The web is littered with other implementations in different languages. Making the conversion via PostGIS queries is another alternative. ...but did anyone implement this maths in ruby? OSGridToLatLong is the direction I'm looking for just at this moment, but I would have thought a library for converting in both directions must surely be available in a gem somewhere. I'm just not searching for the right thing.

    Read the article

  • Google Maps Api v2 error

    - by Harry
      var mymarkers= []; //array function createMarker(point,html,ref){ var marker = new GMarker(point); mymarkers[ref] = marker; GEvent.addListener(newmarker,'click',function(){newmarker.openInfoWindowHtml(html);}); map.addOverlay(newmarker); } This function works well, it adds a marker to the map no problem, but when trying to use mymarkers[] array of markers they have not been stored? Is there a validator to check the GMarker is nice and clean? google maps main.js throws a wobbly: Uncaught TypeError: Cannot read property '__e_' of undefined

    Read the article

  • Rails routes matching query parameters

    - by Harry Wood
    Rails routes are great for matching RESTful style '/' separated bits of a URL, but can I match query parameters in a map.connect config. I want different controllers/actions to be invoked depending on the presence of a parameter after the '?'. I was trying something like this... map.connect "api/my/path?apple=:applecode", :controller = 'apples_controller', :action = 'my_action' map.connect "api/my/path?banana=:bananacode", :controller = 'bananas_controller', :action = 'my_action' For routing purposes I don't care about the value of the parameter, as long as it is available to the controller in the 'params' hash

    Read the article

  • Doubt about constructor in JAVA

    - by Harry Joy
    I have few doubts regarding constructor in java Can a constructor be private? If yes then in which condition? Constructor is a method or not? If constructor does not return anything then why we are getting a new Object every time we call it. Whats the default access modifier of a constructor if we did not specify. Thanks & Regards Edit---------- Answer for 1 & 3 are very clear. But still doubt about 2&4 as i'm getting different answers for them.

    Read the article

  • How to extract the Sql Command from a Complied Linq Query

    - by Harry
    In normal (not compiled) Linq to Sql queries you can extract the SQLCommand from the IQueryable via the following code: SqlCommand cmd = (SqlCommand)table.Context.GetCommand(query); Is it possible to do the same for a compiled query? The following code provides me with a delegate to a compiled query: private static readonly Func<Data.DAL.Context, string, IQueryable<Word>> Query_Get = CompiledQuery.Compile<Data.DAL.Context, string, IQueryable<Word>>( (context, name) => from r in context.GetTable<Word>() where r.Name == name select r); When i use this to generate the IQueryable and attempt to extract the SqlCommand it doesn't seem to work. When debugging the code I can see that the SqlCommand returned has the 'very' useful CommandText of 'SELECT NULL AS [EMPTY]' using (var db = new Data.DAL.Context()) { IQueryable<Word> query = Query_Get(db, "word"); SqlCommand cmd = (SqlCommand)db.GetCommand(query); Console.WriteLine(cmd != null ? cmd.CommandText : "Command Not Found"); } I can't find anything in google about this particular scenario, as no doubt it is not a common thing to attempt... So.... Any thoughts?

    Read the article

  • Ubuntu Linux main utilities

    - by Harry
    I've never used Ubuntu Linux before, but I am researching about the main system tools that are included, e.g. Windows has Disk Cleanup, Disk Defrag... but what does Ubuntu Linux have. I need to know what the main five utilities that are included on Ubuntu Linux and what do they do.

    Read the article

  • C#: Parallel forms, multithreading and "applications in application"

    - by Harry
    First, what I need is - n WebBrowser-s, each in its own window doing its own job. The user should be able to see them all, or just one of them (or none), and to execute commands on each one. There is a main form, without a browser, this one contains control panel for my application. The key feautre is, each browser logs on to secured web page and it needs to stay logged in as long as possible. Well, I've done it, but I'm afraid something is wrong with my approach. The question is: Is code below valid, or rather a nasty hack which can cause problems: internal class SessionList : List<Session> { public SessionList(Server main) { MyRecords.ForEach(record => { var st = new System.Threading.Thread((data) => { var s = new Session(main, data as MyRecord); this.Add(s); Application.Run(s); Application.ExitThread(); }); st.SetApartmentState(System.Threading.ApartmentState.STA); st.Start(record); }); } // some other uninteresting methods here... } What's going on here? Session inherits from Form, so it creates a form, puts WebBrowser into it, and has methods to operate on websites. WebBrowser requires to be run in STA thread, so we provide one for each browser. The most interesting part of it is Application.Run(s). It makes the newly created forms alive and interactive. The next Application.ExitThread() is called after browser window is closed and its controls disposed. Main application stays alive to perform the rest of the cleanup job. When user select "Exit" or "Shutdown" option - first the browser threads are ended, so Application.ExitThread() is called. It all works, but everywhere I can read about "main GUI thread" - and here - I've created many GUI threads. I handle communication between main form and my new forms (sessions) with thread-safe methods using Invoke(). It all works, so is it right or is it wrong? Is everything right with using Application.Run() more than once in one application? :) An ugly hack or a normal practice? This code dies if I start a WebBrowser from the session form thread. It beats me why. It works however if I start WebBrowser (by changing its Url property) from any other thread. I'd like to know more what is really happening in such application. But most of all - I'd like to know if my idea of "applications in application" is OK. I'm not sure what exactly does Application.Run() do. Without it forms created in new threads were dead unresponsive. How is it possible I can call Application.Run() many times? It seems to do exactly what it should, but it seems a little undocumented feature to me. I'm almost sure, that the crashes are caused by WebBrowser component itself (since it's not completely "managed" and "native"). But maybe it's something else.

    Read the article

  • rpxnow - How to promote users to sign in

    - by Harry
    Since adding rpxnow to our website, less users are signing in. Are these readers worried about giving their (eg hotmail) password to a third party site? Has anyone found a good way to promote use of rpxnow (or other openid managers) as a secure method of authentication to non tech savvy readers?

    Read the article

  • ASP.net MVC How to change the Textbox Class upon validation failure?

    - by Harry
    I notice in the default MVC template project that the Account registration fields are highlighted via a class change. I can't seem to get the same behavour out of my own code (in the same project - same CSS etc) What might be stopping this from occuring? Update I believe this relates to one of my other questions Because I was having trouble with NullReferenceExceptions I have changed the Html.ValidationMessage fields to have different names than the target fields. So really, I need to resolve this question

    Read the article

  • How to have a user control as a ListBoxItem

    - by Harry
    I want to bind a user control (View) to a ListBoxItem. The ListBox is bound to a collection of ViewModels. I have set the ListBox's ItemTemplate as so: <ListBox.ItemTemplate> <DataTemplate> <View:ContactView/> </DataTemplate> </ListBox.ItemTemplate> But all I get are blank ListBoxItems. I can click on them, but nothing is showing visually. My ContactView code is very simply: <Border> <DockPanel> <StackPanel DockPanel.Dock="Right" Orientation="Vertical"> <TextBlock Text="{Binding Path=ContactFirstName, FallbackValue=FirstName}" FontWeight="Bold" Margin="5, 0, 5, 0"></TextBlock> <TextBlock Text="{Binding Path=ContactLastName, FallbackValue=LastName}" FontWeight="Bold" Margin="5, 0, 5, 0"></TextBlock> <TextBlock Text="{Binding Path=ContactNumber, FallbackValue=Number}" Margin="5, 0, 5, 0"></TextBlock> </StackPanel> </DockPanel> </Border> What could be wrong with this? Thanks.

    Read the article

  • Removing last part of string divided by a colon

    - by Harry Beasant
    I have a string that looks a little like this, world:region:bash It divides folder names, so i can create a path for FTP functions. However, i need at some points to be able to remove the last part of the string, so, for example I have this world:region:bash I need to get this world:region The script wont be able to know what the folder names are, so some how it needs to be able to remove the string after the last colon.

    Read the article

  • How to model in J2EE / JEE?

    - by Harry
    Let's say, I have decided to go with J(2)EE stack for my enterprise application. Now, for domain modelling (or: for designing the M of MVC), which APIs can I safely assume and use, and which I should stay away from... say, via a layer of abstraction? For example, Should I go ahead and litter my Model with calls to Hibernate/JPA API? Or, should I build an abstraction... a persistence layer of my own to avoid hard-coding against these two specific persistence APIs? Why I ask this: Few years ago, there was this Kodo API which got superseded by Hibernate. If one had designed a persistence layer and coded the rest of the model against this layer (instead of littering the Model with calls to specific vendor API), it would have allowed one to (relatively) easily switch from Kodo to Hibernate to xyz. Is it recommended to make aggressive use of the *QL provided by your persistence vendor in your domain model? I'm not aware of any real-world issues (like performance, scalability, portability, etc) arising out of a heavy use of an HQL-like language. Why I ask this: I would like to avoid, as much as possible, writing custom code when the same could be accomplished via query language that is more portable than SQL. Sorry, but I'm a complete newbie to this area. Where could I find more info on this topic? Many thanks in advance. /HS

    Read the article

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