Search Results

Search found 1485 results on 60 pages for 'dan heyse'.

Page 40/60 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Typical text encoding and EOL behavior on mobile devices

    - by Dan W
    Typical things to worry about when dealing with text are the BOM/signature, encoding, and the end of line (EOL) char/chars. I know that Windows often favours \r\n (CR+LF) and Mac/Linux favours \n (LF), but how about popular mobile devices such as the iPhone and Android? Do typical apps on those platforms favour one or the other (or maybe even \r for iOS)? I'll supply both types to the user just in case, but I'd like to choose one as default. Also, which text encodings are mobiles most likely to use - UTF-8, iso-8859-1, Windows 1252 (or other default codepage) or maybe even UTF-16? And if they use UTF-8/16, are they likely to need (or require not having) a BOM/signature? What is the typical behavior here? Once again, I'll supply a range of encodings to the user just in case, but I'd like to prioritize or use certain encodings as default if it's appropriate.

    Read the article

  • Is it possible to have 'sub-templates' when using MailDefinition

    - by Dan
    I am using the MailDefinition class to create html emails for my site. The only problem I am having is that there is alot of repetition in the string templates. For example the email footer along with all the associated html and css has to be repeated in each template type. Is there a way to have sub-template? or some mechanism for avoiding this repetition?

    Read the article

  • Is it possible for a XSS attack to obtain HttpOnly cookies?

    - by Dan Herbert
    Reading this blog post about HttpOnly cookies made me start thinking, is it possible for an HttpOnly cookie to be obtained through any form of XSS? Jeff mentions that it "raises the bar considerably" but makes it sound like it doesn't completely protect against XSS. Aside from the fact that not all browser support this feature properly, how could a hacker obtain a user's cookies if they are HttpOnly? I can't think of any way to make an HttpOnly cookie send itself to another site or be read by script, so it seems like this is a safe security feature, but I'm always amazed at how easily some people can work around many security layers. In the environment I work in, we use IE exclusively so other browsers aren't a concern. I'm looking specifically for other ways that this could become an issue that don't rely on browser specific flaws.

    Read the article

  • How can I get an IObservable<T> in Rx from a "non-standard" event?

    - by Dan Tao
    Here's what I mean. Suppose I'm working with an API that exposes events, but these events do not follow the standard EventHandler or EventHandler<TEventArgs> signature. One event might look like this, for instance: Public Event Update(ByVal sender As BaseSubscription, ByVal e As BaseEvent) Now, typically, if I want to get an IObservable<TEventArgs> from an event, I can just do this: Dim updates = Observable.FromEvent(Of UpdateEventArgs)( _ target:=updateSource, _ eventName:="Update" _ ) But this doesn't work, because the Update event is not an EventHandler<UpdateEventArgs> -- in fact, there is no UpdateEventArgs -- it's basically just its own thing. Obviously, I could define my own class deriving from EventArgs (i.e., UpdateEventArgs), write another class to wrap the object providing the Update event, give the wrapper class its own Update event that is an EventHandler<UpdateEventArgs>, and get an IObservable<UpdateEventArgs> from that. But that's an annoying amount of work. Is there some way to create an IObservable<[something]> from a "non-standard" event like this, or am I out of luck?

    Read the article

  • Data Access example using Entity Framework

    - by Dan
    Does anyone know of or having any good examples of how to use Entity Framework version 2 in the Data Access layer and put an interface on it so the business layer uses the interface rather than knowing about EF? I have found some examples but they are all from 2009 and I'm not sure how they relate to Entity Framework version 2.

    Read the article

  • How do I pass a DBNull value to a parameterized SELECT statement?

    - by Dan
    I have a SQL statement in C# (.NET Framework 4 running against SQL Server 2k8) that looks like this: SELECT [Column1] FROM [Table1] WHERE [Column2] = @Column2 The above query works fine with the following ADO.NET code: DbParameter parm = Factory.CreateDbParameter(); parm.Value = "SomeValue"; parm.ParameterName = "@Column2"; //etc... This query returns zero rows, though, if I assign DBNull.Value to the DbParameter's Value member even if there are null values in Column2. If I change the query to accommodate the null test specifically: SELECT [Column1] FROM [Table1] WHERE [Column2] IS @Column2 I get an "Incorrect syntax near '@Column2'" exception at runtime. Is there no way that I can use null or DBNull as a parameter in the WHERE clause of a SELECT statement?

    Read the article

  • Separation of static and dynamic content in Java EE applications

    - by Dan
    We work with IBM products and we typically use IBM Http Servers (read Apache) as a reverse proxy for our application servers. For performance reasons we serve static content (.gif, .jpg, .css, .html etc.) from our http servers, to ease the burden a bit from the application server. So far, we have to distribute files to http server and configure it manually (writing custom scripts at best.) The problem is the effort needed to keep everything in synch, especially when you need to update the app. Does any Java EE product support this “out of the box”? Is there a way to have application server do this automatically, like in cluster configuration for example, where master node is in charge of distributing the application to other nodes and for keeping everything in synch.

    Read the article

  • Javascript/jQuery: programmatically follow a link

    - by Dan
    In Javascript code, I would like to programmatically cause the browser to follow a link that's on my page. Simple case: <a id="foo" href="mailto:[email protected]">something</a> function goToBar() { $('#foo').trigger('follow'); } This is hypothetical as it doesn't actually work. And no, triggering click doesn't do it. I am aware of window.location and window.open but these differ from native link-following in some ways that matter to me: a) in the presence of a <base /> element, and b) in the case of mailto URLs. The latter in particular is significant. In Firefox at least, calling window.location.href = "mailto:[email protected]" causes the window's unload handlers to fire, whereas simply clicking a mailto link does not, as far as I can tell. I'm looking for a way to trigger the browser's default handling of links, from Javascript code. Does such a mechanism exist? Toolkit-specific answers also welcome (especially for Gecko).

    Read the article

  • Why am I getting this warning about my app delegate and CLLocationManageDelegate?

    - by Dan Ray
    Observe this perfectly simple UIViewController subclass method: -(IBAction)launchSearch { OffersSearchController *search = [[OffersSearchController alloc] initWithNibName:@"OffersSearchView" bundle:nil]; EverWondrAppDelegate *del = [UIApplication sharedApplication].delegate; [del.navigationController pushViewController:search animated:YES]; [search release]; } On the line where I get *del, I am getting a compiler warning that reads, Type 'id <UIApplicationDelegate>' does not conform to the 'CLLocationManagerDelegate' protocol. In fact, my app delegate DOES conform to that protocol, AND what I'm doing here has nothing at all to do with that. So what's up with that message? Secondary question: sometimes I can get to my navigationController via self.navigationController, and sometimes I can't, and have to go to my app delegate's property to get it like I'm doing here. Any hint about why that is would be very useful.

    Read the article

  • Looping an animation made with script.aculo.us

    - by Dan T
    I've created an animation using script.aculo.us. However, when the animation is finished, I want to have it reset all the objects and perform the animation again. I plan to just reset the positions of the objects manually, but how can I make the animations loop? If I put the effect declarations inside a for or while loop, it just crashes the browser. Any ideas?

    Read the article

  • Using Flex Builder with source control

    - by Dan Monego
    When setting up a source control repository for a Flex Builder workspace, what do you consider to be worth checking in? Do you exclude the workspace .metadata folder but keep the .project and other project specific files? Keep both? Throw away both? Is there a guideline you use to decide which is worth holding onto or do you do it out of practical experience?

    Read the article

  • Javascript permission denied. Not cross domain?

    - by Dan
    I'm working on a web app that very rarely returns a Javacript permission denied error when attempting to access document elements. I'm well aware of cross-domain issues and I am actively pursuing them as a possible cause. My question is: are there other possible causes for a permission denied exception? Just want to make sure I'm looking in to all possible avenues. Thanks!

    Read the article

  • In flex how do I pass data retrieved from a remote object service to a modules interface?

    - by Dan G
    I found at this Adobe tutorial a nice "RemoteService" class that creates a RemoteObject and contains the functions for handling the result and fault events. If I wanted to use this approach, how could I pass the data from the result handler to interfaces that modules from the main application could use? I could put the RemoteService/RemoteObject in the modules, but (in my opinion- and I could be wrong) the best design seems to be using the remote calls in the main app and passing the data along to the modules.

    Read the article

  • Dynamic table memory usage

    - by Dan
    I use a dynamic table: <html> <body> <button id="button">Build table</button> <div id="container"> <script type="text/javascript"> window.onload=function(){ var table = null; var row = "<tr><td>111111111111111111111111111111111111111111111111111111</td>" + "<td>222222222222222222222222222222222222222222222222222222</td>" + "<td>333333333333333333333333333333333333333333333333333333</td></tr>"; var data = null; for (var i = 0; i < 2000; i++){ data += row; } var obj = document.getElementById("button"); obj.onclick=function buildTable(){ document.getElementById("container").innerHTML = "<div><table><tbody>" + data + "</tbody></table></div>"; }; }; </script> </body> </html> Using chromes task manager, each time new data is loaded the memory usage increases considerably and doesn't go down, so after some time the app consumes a lot of memory and requires the browser to be closed. Is there any change in the code I can use to solve this or is it a browser side problem?

    Read the article

  • Linq qurery with multiple where's

    - by Dan
    I am trying the to query my Status Update repository using the following var result = (from s in _dataContext.StatusUpdates where s.Username == "friend1" && s.Username == "friend2" etc... select s).ToList(); Insead of using s.Username == "friendN" continously is there anyway I can pass a list or array or something like that rather that specifying each one, or can i use a foreach loop in the middle of the query. Thanks

    Read the article

  • How do you pipe output from a Ruby script to 'head' without getting a broken pipe error

    - by dan
    I have a simple Ruby script that looks like this require 'csv' while line = STDIN.gets array = CSV.parse_line(line) puts array[2] end But when I try using this script in a Unix pipeline like this, I get 10 lines of output, followed by an error: ruby lib/myscript.rb < data.csv | head 12080450 12080451 12080517 12081046 12081048 12081050 12081051 12081052 12081054 lib/myscript.rb:4:in `write': Broken pipe - <STDOUT> (Errno::EPIPE) Is there a way to write the Ruby script in a way that prevents the broken pipe exception from being raised?

    Read the article

  • How to use Comparator in Java to sort

    - by Dan
    I learned how to use the comparable but I'm having difficulty with the Comparator. I am having a error in my code: Exception in thread "main" java.lang.ClassCastException: New.People cannot be cast to java.lang.Comparable at java.util.Arrays.mergeSort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.Collections.sort(Unknown Source) at New.TestPeople.main(TestPeople.java:18) Here is my code: import java.util.Comparator; public class People implements Comparator{ private int id; private String info; private double price; public People(int newid, String newinfo, double newprice){ setid(newid); setinfo(newinfo); setprice(newprice); } public int getid() { return id; } public void setid(int id) { this.id = id; } public String getinfo() { return info; } public void setinfo(String info) { this.info = info; } public double getprice() { return price; } public void setprice(double price) { this.price = price; } public int compare(Object obj1, Object obj2) { Integer p1 = ((People)obj1).getid(); Integer p2 = ((People)obj2).getid(); if (p1 p2 ){ return 1; } else if (p1 < p2){ return -1; } else return 0; } } import java.util.ArrayList; import java.util.Collections; public class TestPeople { public static void main(String[] args) { ArrayList peps = new ArrayList(); peps.add(new People(123, "M", 14.25)); peps.add(new People(234, "M", 6.21)); peps.add(new People(362, "F", 9.23)); peps.add(new People(111, "M", 65.99)); peps.add(new People(535, "F", 9.23)); Collections.sort(peps); for(int i=0;i I believe it has to do something with the casting in the compare method but I was playing around with it and still could not find the solution

    Read the article

  • HTML5 audio object doesn't play on iPad (when called from a setTimeout)

    - by Dan Halliday
    I have a page with a hidden <audio> object which is being started and stopped using a custom button via javascript. (The reason being I want to customise the button, and that drawing an audio player seems to destroy rendering performance on iPad anyway). A simplified example (in coffeescript): // Works fine on all browsers constructor: (@_button, @_audio) -> @_button.on 'click', @_play // Bind button's click event with jQuery _play: (e) => @_audio[0].play() // Call play() on audio element The audio plays fine when triggered from a function bound to a click event, but I actually want an animation to complete before the file plays so I put .play() inside a setTimeout. However I just can't get this to work: // Will not play on iPad constructor: (@_button, @_audio) -> @_button.on 'click', @_play // Bind button's click event with jQuery _play: (e) => setTimeout (=> // Declare a 300ms timeout @_audio[0].play() // Call play() on audio element ), 300 I've checked that @_audio (this._audio) is in scope and that its play() method exists. Why doesn't this work on iPad?

    Read the article

  • Combine overlapping urls in C#

    - by Dan Revell
    I've got two Urls. A server and a relative url that I would like to combine. The problem is that part of the url's may well overlap. I've done this using some horrible string manipulation but would like to put this out there and see if there is a nice and clean way of doing it. string siteUrl = "http://seed-dev6/sites/irs"; string formUrl = "/sites/irs/Forms/testform.xsn";

    Read the article

  • Making a view scrollable when keyboard active

    - by Dan Ray
    I have a view with half a dozen text fields and labels, and a button. I want it to be that when the keyboard pops up, the view becomes scrollable, so you can scroll the view up and see the bottom half of the fields without having to dismiss the keyboard to get to them. Just putting it inside a UIScrollView doesn't seem to do it.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >