Search Results

Search found 2850 results on 114 pages for 'andrew 46'.

Page 57/114 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • Looking for good PHP editor or IDE with 'IntelliSense'

    - by Andrew
    Hello, I'm looking for suitable PHP Editor or IDE with syntax auto-completion. I've tried trial versions of programs like Zend Studio, PHPDesigner, NetBeans PHP, NuSphere PhpED, and similar -- but none of them fully satisfied me. I quite liked hint window with detailed info about what function does and what it returns. Also I liked the way NetBeans auto-complete code (for example inserts all required parameters in function declaration as "dummy fields" and then you can jump between them using TAB in order to edit them). On the other hand, environment of NetBeans doesn't belong to the nicest. In this regard I prefer PHPDesigner with its sleek and light interface. At this moment I don't use any of the debugging options, since I don't know yet how to use profiller, breakpoints, watches and what not, so at this point my only concern is good autocompletion. For this purpose NetBean would be great choice, but with future in mind I am not sure debugging will be good in NetBeans, especially as I would prefer to use remote Linux server for this. So in short, I'm looking for editor that: Have similar code auto-completion (IntelliSense) like NetBeans Allow you to debug code using remote server (or sets up own debugging server like PHPDesigner does) without need to run Apache and similar on local computer Is preferably easy to use / intuitive interface Any ideas?

    Read the article

  • If I write an algorithm to encrypt a file, are their tools available to break the encryption?

    - by Andrew
    I have an idea for encryption that I could program fairly easily to encrypt some local text file. Given that my approach is novel, and does not use any of the industry standard encryption techniques, would I be able to test the strength of my encryption using 'cracker' apps or suchlike? Or do all those tools rely on advanced knowledge of the encryption process (or intercepted 'keys'), meaning I'd have to build my own cracker for testing?

    Read the article

  • Help needed with drawRect:

    - by Andrew Coad
    Hi, I'm having a fundamental issue with use of drawRect: Any advice would be greatly appreciated. The application needs to draw a variety of .png images at different times, sometimes with animation, sometimes without. A design goal that I was hoping to adhere to is to have the code inside drawRect: very simple and "dumb" - i.e. just do drawing and no other application logic. To draw the image I am using the drawAtPoint: method of UIImage. Since this method does not take a CGContext as a parameter, it can only be called within the drawRect: method. So I have: - (void)drawRect:(CGRect)rect { [firstImage drawAtPoint:CGPointMake(firstOffsetX, firstOffsetY)]; } All fine and dandy for one image. To draw multiple images (over time) the approach I have taken is to maintain an array of dictionaries with each dictionary containing an image, the point location to draw at and a flag to enable/suppress drawing for that image. I add dictionaries to the array over time and trigger drawing via the setNeedsDisplay: method of UIView. Use of an array of dictionaries allows me to completely reconstruct the entire display at any time. drawRect: now becomes: - (void)drawRect:(CGRect)rect { for (NSMutableDictionary *imageDict in [self imageDisplayList]) { if ([[imageDict objectForKey:@"needsDisplay"] boolValue]) { [[imageDict objectForKey:@"image"] drawAtPoint:[[imageDict objectForKey:@"location"] CGPointValue]]; [imageDict setValue:[NSNumber numberWithBool:NO] forKey:@"needsDisplay"]; } } } Still OK. The code is simple and compact. Animating this is where I run into problems. The first problem is where do I put the animation code? Do I put it in UIView or UIViewController? If in UIView, do I put it in drawRect: or elsewhere? Because the actual animation depends on the overall state of the application, I would need nested switch statements which, if put in drawRect:, would look something like this: - (void)drawRect:(CGRect)rect { for (NSMutableDictionary *imageDict in [self imageDisplayList]) { if ([[imageDict objectForKey:@"needsDisplay"] boolValue]) { switch ([self currentState]) { case STATE_1: switch ([[imageDict objectForKey:@"animationID"] intValue]) { case ANIMATE_FADE_IN: [self setAlpha:0.0]; [UIView beginAnimations:[[imageDict objectForKey:@"animationID"] intValue] context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDuration:2]; [self setAlpha:1.0]; break; case ANIMATE_FADE_OUT: [self setAlpha:1.0]; [UIView beginAnimations:[[imageDict objectForKey:@"animationID"] intValue] context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; [UIView setAnimationDuration:2]; [self setAlpha:0.0]; break; case ANIMATE_OTHER: // similar code here break; default: break; } break; case STATE_2: // similar code here break; default: break; } [[imageDict objectForKey:@"image"] drawAtPoint:[[imageDict objectForKey:@"location"] CGPointValue]]; [imageDict setValue:[NSNumber numberWithBool:NO] forKey:@"needsDisplay"]; } } [UIView commitAnimations]; } In addition, to make multiple sequential animations work correctly, there would need to be an outer controlling mechanism involving the animation delegate animationDidStop: callback that would set the needsDisplay entries in the dictionaries to allow/suppress drawing (and animation). The point that we are at now is that it all starts to look very ugly. More specifically: drawRect: starts to bloat quickly and contain code that is not "just drawing" code the UIView needs implicit awareness of the application state the overall process of drawing is now spread across three methods at a minimum And on to the point of this post: how can I do this better? What would the experts out there recommend in terms of overall structure? How can I keep application state information out of the view? Am I looking at this problem from the wrong direction. Is there some completely different approach that I should consider?

    Read the article

  • Singleton Issues in iOS http client

    - by Andrew Lauer Barinov
    I implemented an HTTP client is iOS that is meant to be a singleton. It is a subclass of AFNetworking's excellent AFHTTPClient My access method is pretty standard: + (LBHTTPClient*) sharedHTTPClient { static dispatch_once_t once = 0; static LBHTTPClient *sharedHTTPClient = nil; dispatch_once(&once, ^{ sharedHTTPClient = [[LBHTTPClient alloc] initHTTPClient]; }); return sharedHTTPClient; } // my init method - (id) initHTTPClient { self = [super initWithBaseURL:[NSURL URLWithString:kBaseURL]]; if (self) { // Sub class specific initializations } return self; } Super's init method is very long, and can be found here However the problem I experience is when the dispatch_once queue is run, the app locks and become unresponsive. When I step through code, I notice that it locks on dispatch_once and then remains frozen. Is this something to do with the main thread locking down? How come it stays locked like that? Also, none of the HTTP client methods fire. Stepping through the code some more, I find this line in dispatch/once.h is where the app locks down: DISPATCH_INLINE DISPATCH_ALWAYS_INLINE DISPATCH_NONNULL_ALL DISPATCH_NOTHROW void _dispatch_once(dispatch_once_t *predicate, dispatch_block_t block) { if (DISPATCH_EXPECT(*predicate, ~0l) != ~0l) { dispatch_once(predicate, block); // App locks here } }

    Read the article

  • running pdb from within pdb

    - by Andrew Farrell
    I'm debugging an script that I'm writing and the result of executing a statement from pdb does not make sense so my natural reaction is to try to trace it with pdb. To paraphrase: Yo dawg, I like python, so can you put my pdb in my pdb so I can debug while I debug?

    Read the article

  • Html Birthdate input usability best practice

    - by Andrew Florko
    Hello everybody, I am going to implement standard functionality - birthdate input on web form for PC. There are lots of interfaces how to implement this. Date picker (OMG, I can't stand picking date with it. Too many clicks required) 3 Dropdown lists. Day, Month, Year. (I am not very fond of it though - they are too long) Straightforward input: DD.MM.YYYY (My choice, but I am programmer, not a customer) ... some more What kind of input do you prefer? What is the worst one for your opinion?

    Read the article

  • MultipleHiddenInput doesn't encode properly over POST?

    - by andrew
    The form looks very simple: class MyForm(forms.Form): ids = forms.MultipleChoiceField(widget=forms.MultipleHiddenInput()) def view(request): ... form = MyForm(initial={'ids': [o.id for o in queryset]}) Which gives me the HTML (which looks good enough): <form method="post" action="/foo/bar/"> <input type="hidden" name="ids" value="7720889" id="id_ids_0"> <input type="hidden" name="ids" value="7717962" id="id_ids_1"> <input type="hidden" name="ids" value="7717807" id="id_ids_2"> <input type="hidden" name="ids" value="7713584" id="id_ids_3"> <input type="hidden" name="ids" value="7712277" id="id_ids_4"> <input type="hidden" name="ids" value="7707475" id="id_ids_5"> <input type="hidden" name="ids" value="7707257" id="id_ids_6"> <input type="hidden" name="ids" value="7705271" id="id_ids_7"> <input type="hidden" name="ids" value="7704338" id="id_ids_8"> <input type="hidden" name="ids" value="7704137" id="id_ids_9"> <input type="hidden" name="ids" value="7695444" id="id_ids_10"> <input type="hidden" name="ids" value="7695242" id="id_ids_11"> <input type="hidden" name="ids" value="7690683" id="id_ids_12"> <input type="hidden" name="ids" value="7690431" id="id_ids_13"> <input type="hidden" name="ids" value="7689035" id="id_ids_14"> <input type="hidden" name="ids" value="7681230" id="id_ids_15"> <input type="hidden" name="ids" value="7679189" id="id_ids_16"> <input type="hidden" name="ids" value="7675315" id="id_ids_17"> <input type="hidden" name="ids" value="7667291" id="id_ids_18"> <input type="hidden" name="ids" value="7661162" id="id_ids_19"> <button type="submit">Test</button> </form> But, in the POST that comes in, I'm only getting one value: <QueryDict: {u'ids': [u'7661162']}> What gives? What am I doing wrong?

    Read the article

  • Programmatically printing git revision and checking for uncommitted changes

    - by Andrew Grimm
    To ensure that my scientific analysis is reproducible, I'd like to programmatically check if there are any modifications to the code base that aren't checked in, and if not, print out what commit is being used. For example, if there are uncommitted changes, it should output Warning: uncommitted changes made. This output may not be reproducible. Else, produce Current commit: d27ec73cf2f1df89cbccd41494f579e066bad6fe Ideally, it should use "plumbing", not "porcelain".

    Read the article

  • CouchDB Find One not working

    - by Andrew
    I am a couchDB newbie and am doing the examples in the O'Reilly CouchDB guide. I have a problem using a view to retrieve a document by key: curl http://127.0.0.1:5984/basic/_design/example/_view/by_date?key="2009/01/15 15:52:20" gives the reply: curl: (52) Empty reply from server but just retrieving all rows: curl http://127.0.0.1:5984/basic/_design/example/_view/by_date gives me 3 rows including the specific row I am looking for: {"id":"hello-world","key":"2009/01/15 15:52:20","value":"Hello World"} why doesn't the key query work? I am using CouchDB version 0.10.0 on Ubuntu 9.10

    Read the article

  • Git command to display HEAD commit id?

    - by Andrew Arnott
    What command can I use to print out the commit id of HEAD? This is what I'm doing by hand: $ cat .git/HEAD ref: refs/heads/v3.3 $ cat .git/refs/heads/v3.3 6050732e725c68b83c35c873ff8808dff1c406e1 But I need a script that can reliably pipe the output of some command to a text file such that the text file contains exactly the commit id of HEAD (nothing more or less, and not just a ref). Can anyone help?

    Read the article

  • How do I add artwork to an iTunes track with obj-c AppScript?

    - by demonslayer319
    aTrack is an ITReference* object, value is an NSImage* object, initialized via a URL to a jpeg. [[[[[aTrack artworks] data_] set] to:value] send]; I get the following message in GDB: 2010-03-09 16:59:42.860 Sandbox[2260:a0f] Can't pack object of class NSImage (unsupported type): <NSImage 0x10054a440 Size={0, 0} Reps=( I then tried the following code: NSData *imageData = [[NSData alloc] initWithData:[value TIFFRepresentation]]; [[[[[aTrack artworks] data_] set] to:imageData] send]; and get this message instead 2010-03-09 16:46:09.341 Sandbox[2193:a0f] Can't pack object of class NSConcreteData (unsupported type): <4d4d002a 00000000> In the AppScript documentation, it says that the "data" property of the "artwork" item is a PICTPicture image. How do I convert an NSImage to a PICT? Am I using the AppScript all wrong?

    Read the article

  • string categorization strategies

    - by Andrew Heath
    I'm the one-man dev team on a fledgling military history website. One aspect of the site is a catalog of ~1,200 individual battles, including the nations & formations (regiments, divisions, etc) which took part. The formation information (as well as the other battle info) was manually imported from a series of books by a 10-man volunteer team. The formations were listed in groups with varying formatting and abbreviation patterns. At the time I set up the data collection forms I couldn't think of a good way to process that data... and elected to store it all as strings in the MySQL database and sort it out later. Well, "later" - as it tends to happen - has arrived. :-) Each battle has 2+ records in the database - one for each nation that participated. Each record has a formations text string listing the formations present as the volunteer chose to add them. Some real examples: 39th Grenadier Rgmt, 26th Volksgrenadier Division 2nd Luftwaffe Field Division, 246th Infantry Division 247th Rifle Division, 255th Tank Brigade 2nd Luftwaffe Field Division, SS Cavalry Division 28th Tank Brigade, 158th Rifle Division, 135th Rifle Division, 81st Tank Brigade, 242nd Tank Brigade 78th Infantry Division 3rd Kure Special Naval Landing Force, Tulagi Seaplane Base personnel 1st Battalion 505th Infantry Regiment The ultimate goal is for each individual force to have an ID, so that its participation can be traced throughout the battle database. Formation hierarchy, such as the final item above 1st Battalion (of the) 505th Infantry Regiment also needs to be preserved. In that case, 1st Battalion and 505th Infantry Regiment would be split, but 1st Battalion would be flagged as belonging to the 505th. In database terms, I think I want to pull the formation field out of the current battle info table and create three new tables: FORMATION [id] [name] FORMATION_HIERARCHY [id] [parent] [child] FORMATION_BATTLE [f_id] [battle_id] It's simple to explain, but complicated to enact. What I'm looking for from the SO community is just some tips on how best to tackle this problem. Ideally there's some sort of method to solving this that I'm not aware of. However, as a last resort, I could always code a classification framework and call my volunteers back to sort through 2,500+ records...

    Read the article

  • HLSL: Enforce Constant Register Limit at Compile Time

    - by Andrew Russell
    In HLSL, is there any way to limit the number of constant registers that the compiler uses? Specifically, if I have something like: float4 foobar[300]; In a vs_2_0 vertex shader, the compiler will merrily generate the effect with more than 256 constant registers. But a 2.0 vertex shader is only guaranteed to have access to 256 constant registers, so when I try to use the effect, it fails in an obscure and GPU-dependent way at runtime. I would much rather have it fail at compile time. This problem is especially annoying as the compiler itself allocates constant registers behind the scenes, on top of the ones I am asking for. I have to check the assembly to see if I'm over the limit. Ideally I'd like to do this in HLSL (I'm using the XNA content pipeline), but if there's a flag that can be passed to the compiler that would also be interesting.

    Read the article

  • Extand legacy site with another server-side programming platform best practice

    - by Andrew Florko
    Company I work for have a site developed 6-8 years ago by a team that was enthusiastic enough to use their own private PHP-based CMS. I have to put dynamic data from one intranet company database on this site in one week: 2-3 pages. I contacted company site administrator and she showed me administrative part - CMS allows only to insert html blocks & manage site map (site is deployed on machine that is inside company & fully accessible & upgradable). I'm not a PHP-guy & I don't want to dive into legacy hardly-who-ever-heard-about CMS engine I also don't want to contact developers team, 'cos I'm not sure they are still present and capable enough to extend this old days site and it'll take too much time anyway. I am about to deploy helper asp.net site on iis with 2-3 pages required & refer helper site via iframe from present site. New pages will allow to download some dynamic content from present site also. Is it ok and what are the pitfalls with iframe approach?

    Read the article

  • Can't seem to redirect from a ViewScoped constructor.

    - by Andrew
    I'm having trouble redirecting from a view scoped bean in the case that we don't have the required info for the page in question. The log entry in the @PostContruct is visible in the log right before a NPE relating to the view trying to render itself instead of following my redirect. Why is it ignoring the redirect? Here's my code: @ManagedBean public class WelcomeView { private String sParam; private String aParam; public WelcomeView() { super(); sParam = getURL_Param("surveyName"); aParam = getURL_Param("accountName"); project = fetchProject(sParam, aParam); } @PostConstruct public void redirectWithoutProject() { if (null == project) { try { logger.warn("NO project [" + sParam + "] for account [" + aParam + "]"); FacesContext fc = FacesContext.getCurrentInstance(); fc.getExternalContext().redirect("/errors/noSurvey.jsf"); return; } catch (Exception e) { e.printStackTrace(); } } } .... public boolean getAuthenticated() { if (project.getPasswordProtected()) { return enteredPassword.equals(project.getLoginPassword()); } else return true; } } Here's the stack trace: SEVERE: Error Rendering View[/participant/welcome.xhtml] javax.el.ELException: /templates/participant/welcome.xhtml @80,70 rendered="#{welcomeView.authenticated}": Error reading 'authenticated' on type com.MYCODE.general.controllers.participant.WelcomeView at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:107) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190) at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:416) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1607) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.MYCODE.general.filters.StatsFilter.doFilter(StatsFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:421) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:637) Caused by: java.lang.NullPointerException at com.MYCODE.general.controllers.participant.WelcomeView$$M$863c205f.getAuthenticated(WelcomeView.java:127) at com.MYCODE.general.controllers.participant.WelcomeView$$A$863c205f.getAuthenticated(<generated>) at com.MYCODE.general.controllers.participant.WelcomeView.getAuthenticated(WelcomeView.java:125) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.el.BeanELResolver.getValue(BeanELResolver.java:62) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) at org.apache.el.parser.AstValue.getValue(AstValue.java:118) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102) ... 33 more

    Read the article

  • Correct sequence of actions when using Markdown & MySQL?

    - by Andrew Heath
    I want my users to be able to write an article in Markdown, have it stored in the MySQL database (with the option to edit it in the future), and displayed for other users. In practice, this is my understanding of how it works: INPUT user input via HTML form using Markdown syntax $queryInput = mysql_real_escape_string($userInput); insert sanitized string into database OUTPUT query field from database $output = Markdown($queryResult); display $output Is that it? Does PHP Markdown preclude the need for htmlspecialchars or Pure HTML ? Thanks!

    Read the article

  • Best way to enter numeric values with decimal points?

    - by Andrew Grant
    In my app users need to be able to enter numeric values with decimal places. The iPhone doesn't provides a keyboard that's specific for this purpose - only a number pad and a keyboard with numbers and symbols. Is there an easy way to use the latter and prevent any non-numeric input from being entered without having to regex the final result? Thanks!

    Read the article

  • Way to get logged in user in Expression Engine?

    - by Andrew G. Johnson
    Hi all, I am using Expression Engine in part of a site I am developing and other parts are just using my own PHP. My question is how can I tell who the user is logged in as on a non-EE page? I have access to the EE cookies and the EE database but couldn't find a way to use these values to figure out who the user is. I have a list of all the cookie keys/values at: http://andrewgjohnson.com/cookies.html

    Read the article

  • Issue Implementing Colorbox Correctly in IE (all versions)

    - by Andrew
    I've been pulling my hair out (and going way over allotted hours) to try and figure out why Colorbox isn't working properly on the following page: http://www.fiberforge.com I've set up a Colorbox test link on the very bottom right that says "Web Design By All Web Cafe", which should open up a small logo image. In Firefox, Safari, etc the modal behaves as it should, opening center center above all of the existing on-page content. In IE, not only is the modal not centered, but it appears as though it's not obeying absolute positioning and pushing all of the existing on-page content down below. Add to that the fact that it's not opening to the correct size and creating scrollbars next to the modal image, and we have ourselves one ugly modal. The scrollbars I can live with (by just resizing the min-height of the modal), but I can't figure out why it won't center. Let me say that I did not code this site initially and it was completed quite a few years ago, so there are quite probably numerous CSS hacks to get things to display properly, any number of which may be causing this problem. By contrast, Thickbox is also set up on this site (if you click on the "Play Video" callout in the dark blue area) and behaves correctly, though suffers from some weird sizing/padding issues, hence the desire to replace it with something a bit more modern and extensible. I can verify that there is no conflict having both of these modal scripts/CSS files concurrently as the problem still occurs with Colorbox even when Thickbox is removed entirely. Any thoughts or suggestions would be greatly appreciated.

    Read the article

  • IStatelessSession insert object with many-to-one

    - by Andrew Kalashnikov
    Hello guys. I've got common mapping <class name="NotSyncPrice, Portal.Core" table='Not_sync_price'> <id name="Id" unsaved-value="0"> <column name="id" not-null="true"/> <generator class="native"/> </id> <many-to-one name="City" class="Clients.Core.Domains.City, Clients.Core" column="city_id" cascade="none"></many-to-one> <!--<property name="City"> <column name="city_id"/> </property>--> I want to use IStatelessSession for batch insert. But when i set city object to NotSyncPrice object and call IStatelessSession I've got strange exception: NHibernate.Impl.StatelessSessionImpl.get_Timestamp() When its null or int all is ok. I try use real && proxy city object. But no result. What's wrong:( Please help

    Read the article

  • Can't return a List from a Compiled Query.

    - by Andrew
    I was speeding up my app by using compiled queries for queries which were getting hit over and over. I tried to implement it like this: Function Select(ByVal fk_id As Integer) As List(SomeEntity) Using db As New DataContext() db.ObjectTrackingEnabled = False Return CompiledSelect(db, fk_id) End Using End Function Shared CompiledSelect As Func(Of DataContext, Integer, List(Of SomeEntity)) = _ CompiledQuery.Compile(Function(db As DataContext, fk_id As Integer) _ (From u In db.SomeEntities _ Where u.SomeLinkedEntity.ID = fk_id _ Select u).ToList()) This did not work and I got this error message: Type : System.ArgumentNullException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Value cannot be null. Parameter name: value However, when I changed my compiled query to return IQueryable instead of List like so: Function Select(ByVal fk_id As Integer) As List(SomeEntity) Using db As New DataContext() db.ObjectTrackingEnabled = False Return CompiledSelect(db, fk_id).ToList() End Using End Function Shared CompiledSelect As Func(Of DataContext, Integer, IQueryable(Of SomeEntity)) = _ CompiledQuery.Compile(Function(db As DataContext, fk_id As Integer) _ From u In db.SomeEntities _ Where u.SomeLinkedEntity.ID = fk_id _ Select u) It worked fine. Can anyone shed any light as to why this is? BTW, compiled queries rock! They sped up my app by a factor of 2.

    Read the article

  • Wrangling Control of HTTP Headers in ASP.NET

    - by Andrew Burgess
    I'm working with ASP.NET MVC3, and I'm trying to get absolute control over my headers because a client application that I'm working with expects a very specific content type. What I'm finding when using Fiddler to examine the HTTP traffic is that the text encoding is being returned as part of the header. For example, the client is expecting application/appname in the Content-Type header, but the server is returning application/appname; charset=utf-8. I think the client is using a strict comparison for checking the type, so I want to be able to specify exactly what is emitted in the headers. Right now I have a custom ActionResult in which I clear the headers and then specify only the content type, but the encoding still seems to be added on. How can I remove the encoding from the Content-Type header?

    Read the article

  • doctype syntax error

    - by Andrew Welch
    Do you see any problem with this: I'm in ASP.net and I'm using pikachoose jquery slideshow. It works fine in IE and was working in Firefox. However, somehow it's now stopped working in firefox and firebug is giving the doctype line above out as a syntax error and $ is not defined for the jquery script? Any ideas Thanks Andy

    Read the article

  • library to determine indefinite article of a noun

    - by Andrew Bullock
    Are there any libraries for .NET that deal with determining the Indefinite Article of a noun? My crude attempt is below, which will probably work for 99% of my usage (which is acceptable) just wondering if there are any established alternatives? public static string GetIndefinateArticle(string noun) { if(string.IsNullOrEmpty(self)) return self; var first = noun[0]; if(first == 'a' || first == 'e' || first == 'i' || first == 'o') return "a " + self; return "an " + self; }

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >