Search Results

Search found 1569 results on 63 pages for 'daniel pacheco'.

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

  • How can i check if key is pressed during click event with jquery?

    - by daniel smith
    Hi, I would like to catch a click event with jquery and be able to tell if a key was pressed at the same time so i can fork within the callback function based on the keypress. for example: $("button").click(function() { if([KEYPRESSED WHILE CLICKED]) { do something... } else { do something different... } }); Does anyone know if this is possible at all or how it can be done if it is possible?

    Read the article

  • C# performance methods of receiving data from a socket?

    - by Daniel
    Lets assume we have a simple internet socket, and its going to send 10 megabytes (because i want to ignore memory issues) of random data through. Is there any performance difference or a best practice method that one should use for receiving data? The final output data should be represented by a byte[]. Yes i know writing an arbitrary amount of data to memory is bad, and if I was downloading a large file i wouldn't be doing it like this. But for argument sake lets ignore that and assume its a smallish amount of data. I also realise that the bottleneck here is probably not the memory management but rather the socket receiving. I just want to know what would be the most efficient method of receiving data. A few dodgy ways can think of is: Have a List and a buffer, after the buffer is full, add it to the list and at the end list.ToArray() to get the byte[] Write the buffer to a memory stream, after its complete construct a byte[] of the stream.Length and read it all into it in order to get the byte[] output. Is there a more efficient/better way of doing this?

    Read the article

  • Free/open source code editor UI control for .Net

    - by Daniel I-S
    I'm looking for a free, syntax-highlighting, possibly autocompleting 'code editor's textbox' style control for use in a Visual Studio winforms or wpf project. It should work with C# and self-defined languages. There are pay-for solutions available - something like http://www.syncfusion.com/products/user-interface-edition/windows-forms/Edit would work fine - but I am looking for something simpler, and don't need to pay for unnecessary functionality. Any ideas?

    Read the article

  • Firefox HTML5 video playback inconsistancy

    - by Daniel Redwood
    Hey all, I've got an HTML5 video on a page. When tested locally, Chrome, Safari, and Opera work beautifully. Firefox plays it, but doesn't loop as efficiently as the others. The real problem is when it's tested off a server. Firefox doesn't play the video, but recognizes there is one there. I was wondering if all that open ended three-different-ways syntax can be swung in Firefox's favor. Thanks! HTML: <video id="vid_home" width="780" height="520" autoplay="autoplay" loop="loop"> <source src="Video/fernando.ogv" type="video/ogg" /> <source src="Video/fernando.m4v" type="video/mp4" /> Your browser does not support this videos playback. </video>

    Read the article

  • Can you safely rely upon Yahoo Pipes to offload ETL for your application?

    - by Daniel DiPaolo
    Yahoo Pipes are a very intriguing choice for sort of a poor-man's server-free ETL solution, but would it be a good idea to build an application around one or many Pipes? I've really only used them for toy things here and there, with the only thing I've used longer than a week or two being one amalgamated and filtered RSS feed that I've plugged into Google Reader (which has worked great, but if it goes out for a while I wouldn't notice). So, my question is, would building an application around Yahoo Pipes be reliable (available most of the time)? Ideally it'd be something I could rely on being up 99+% of the time. It looks like the Pipes Terms of Use permit building apps around it, but I am unfamiliar with anyone building anything significant using them.

    Read the article

  • How to deploy a single webapp with multiple web-modules that may be removed or added individually

    - by Daniel Bleisteiner
    We currently run two separate webapps (WARs) deployed in one single EAR containing additional JARs and settings. To improve our deployment I want to split one of these webapps into different modules that may be build and packaged individually. But I've currently no clue on how to package these modules so that I'm able to add or remove them as desired - at best during runtime. The webapp is getting more and more complex and I'd like to separate some of the functionality into modules. These modules should be packaged as single archives. As long as they contain only classes and resources loaded through code I know how to do this (simple JARs). But how about JSPs? Normally a WAR file contains JSPs or HTML files. I my case it are JSF pages utilizing JBoss Seam and RichFaces. These modules will add classes, resources and JSF pages and other includes to the running webapplication. Is it somehow possible to deploy them as individual archives to serve the same running webapp? We are using Maven for our build and packaging and deploy into JBoss v4.

    Read the article

  • Structuring the UI code of a single-page EXTjs Web app using Rails?

    - by Daniel Beardsley
    I’m in the process of creating a large single-page web-app using ext-js for the UI components with Rails on the backend. I’ve come to good solutions for transferring data using Whorm gem and Rails support of RESTful Resources. What I haven’t come to a conclusion on is how to structure the UI and business logic aspects of the application. I’ve had a look at a few options, including Netzke but haven’t seen anything that I really think fits my needs. How should a web-application that uses ext-js components, layouts, and controls in the browser and Rails on the server best implement UI component re-use, good organization, and maintainability while maintaining a flexible layout design. Specifically I’m looking for best-practice suggestions for structuring the code that creates and configures UI components (many UI config options will be based on user data) Should EXT classes be extended in static JS for often re-used customizations and then instantiated with various configuration options by generated JS within html partials? Should partials create javascript blocks that instantiate EXT components? Should partials call helpers that return ruby hashes for EXT component config which is then dumped to Json? Something else entirely? There are many options and I'd love to hear from people who've been down this road and found some methodology that worked for them.

    Read the article

  • Returning the index number of an Arraylist in Java

    - by Daniel
    I would like my method public void showClassRoomDetails(String teacherName) to return the Arraylist index number using the teacherName. Thanks import java.util.ArrayList; public class School { private ArrayList<Classroom> classrooms; private String classRoomName; private String teacherName; public School() { classrooms = new ArrayList<Classroom>(); } public void addClassRoom(Classroom newClassRoom, String theClassRoomName) { classrooms.add(newClassRoom); classRoomName = theClassRoomName; } public void addTeacherToClassRoom(int classroomId, String TeacherName) { if (classroomId < classrooms.size() ) { classrooms.get(classroomId).setTeacherName(TeacherName); } } public void showClassRoomDetails(String teacherName) { for (Classroom classroom : this.classrooms) { if (classroom.returnTeacherName().equals(teacherName)) { System.out.println(classroom.returnClassRoomName()); System.out.println(classroom.returnTeacherName()); break; } } } }

    Read the article

  • A simple group-by (no count) in Django

    - by Daniel Quinn
    If this were raw-SQL, it'd be a no-brainer, but in Django, this is proving to be quite difficult to find. What I want is this really: SELECT user_id FROM django_comments WHERE content_type_id = ? AND object_pk = ? GROUP BY user_id It's those last two lines that're the problem. I'd like to do this the "Django-way" but the only thing I've found is mention of aggregates and annotations, which I don't think solve this issue... do they? If someone could explain this to me, I'd really appreciate it.

    Read the article

  • SVG via dynamic XML+XSL

    - by Daniel
    This is a bit of a vague notion which I have been running over in my head, and which I am very curious if there is an elegant method of solving. Perhaps it should be taken as a thought experiment. Imagine you have an XML schema with a corresponding XSL transform, which renders the XML as SVG in the browser. The XSL generates SVG with appropriate Javascript handlers that, ultimately, implement editing-like functionality such that properties of the objects or their locations on the SVG canvas can be edited by the user. For instance, an element can be dragged from one location to another. Now, this isn't particularly difficult - the drag/drop example is simply a matter of changing the (x,y) coordinates of the SVG object, or a resize operation would be a simple matter of changing its width or height. But is there an elegant way to have Javascript work on the DOM of the source XML document instead of the rendered SVG? Why, you ask? Well, imagine you have very complex XSL transforms, where the modification of one property results in complex changes to the SVG. You want to maintain simplicity in your Javascript code, but also a simple way to persist the modified XML back to the server. Some possibilities of how this may function: After modification of the source DOM, simply re-run the XSL transform and replace the original. Downside: brute force, potentially expensive operation. Create id/class naming conventions in the source and target XML/SVG so elements can be related back to each other, and do an XSL transform on only a subset of the new DOM. In other words, modify temporary DOM, apply XSL to it, remove changed elements from SVG, and insert the new one. Downside: May not be possible to apply XSL to temporary in-browser DOMs(?). Also, perhaps a bit convoluted or ugly to maintain. I think that it may be possible to come up with a framework that handles the second scenario, but the challenge would be making it lightweight and not heavily tied to the actual XML schema. Any ideas or other possibilities? Or is there maybe an existing method of doing this which I'm not aware of? UPDATE: To clarify, as I mentioned in a comment below, this aids in separating the draw code from the edit code. For a more concrete example of how this is useful, imagine an element which determines how it is drawn dependent on the value of a property of an adjacent element. It's better to condense that logic directly in the draw code instead of also duplicating it in the edit code.

    Read the article

  • What is '=>'? (C# Grammar Question)

    - by Daniel
    I was watching a Silverlight tutorial video, and I came across an unfamiliar expression in the example code. what is = ? what is its name? could you please provide me a link? I couldn't search for it because they are special characters. code: var ctx = new EventManagerDomainContext(); ctx.Events.Add(newEvent); ctx.SubmitChanges((op) => { if (!op.HasError) { NavigateToEditEvent(newEvent.EventID); } }, null);

    Read the article

  • OpenGL Performance Questions

    - by Daniel
    This subject, as with any optimisation problem, gets hit on a lot, but I just couldn't find what I (think) I want. A lot of tutorials, and even SO questions have similar tips; generally covering: Use GL face culling (the OpenGL function, not the scene logic) Only send 1 matrix to the GPU (projectionModelView combination), therefore decreasing the MVP calculations from per vertex to once per model (as it should be). Use interleaved Vertices Minimize as many GL calls as possible, batch where appropriate And possibly a few/many others. I am (for curiosity reasons) rendering 28 million triangles in my application using several vertex buffers. I have tried all the above techniques (to the best of my knowledge), and received almost no performance change. Whilst I am receiving around 40FPS in my implementation, which is by no means problematic, I am still curious as to where these optimisation 'tips' actually come into use? My CPU is idling around 20-50% during rendering, therefore I assume I am GPU bound for increasing performance. Note: I am looking into gDEBugger at the moment Cross posted at Game Development

    Read the article

  • Is there an alternative to Microsoft.SqlServer.Management.Smo.SqlDataType that includes a value for

    - by Daniel Schaffer
    The Microsoft.SqlServer.Management.Smo.SqlDataType enum has a value for the timestamp type but not rowversion. I'm looking for an updated version of the assembly or an alternate enum type that supports it. The existing enum has a value for Timestamp, but according to the rowversion documentation, timestamp is "deprecated and will be removed in a future version". I prefer to avoid using deprecated things :)

    Read the article

  • Detect main class

    - by Daniel
    Hoe can I detect the main class of my application? The one, which is either given on the command line or loaded from the jar given at the command line? If this is not possible, why not?

    Read the article

  • Is DOM not being loaded ?

    - by Daniel
    I went through episode 88 (Dynamic menus) of the railscasts and when I try to load my *js.erb file in the browser shows me that my fetched data from the controller is getting there Controller def dynamic_departments @departments = Department.all end localhost:3000/javascripts/dynamic_departments.js var departments = new Array(); departments.push(new Array(1,'????',1)); departments.push(new Array(2,'???-???',2)); function facultySelected(){ faculty_id = $('falculty_id').getValue(); options = $('department_id').options; options.length = 1; departments.each(function(department){ if(department[0] == faculty_id){ options[options.length] = new Option(department[1],department[2]) } }); if(options.length == 1){ $('department_field').hide(); } else { $('department_field').show(); } } document.observe('dom:loaded', function(){ alert("DOM loaded"); //$('department_field').hide(); //$('faculty_id').observe('change',facultySelected); }); My routes.rb has the match ':controller/:action.:format' Still...after the page's loaded and I change the value of my collection_select or select nothing happens.What am I missing? *I called the 'alert' and commented the rest to test it....still nothing.

    Read the article

  • Getting a UIImage from MySQL using PHP and jSON

    - by Daniel
    I'm developing a little news reader that retrieves the info from a website by doing a POST request to a URL. The response is a jSON object with the unread-news. E.g. the last news on the App has a timeStamp of "2013-03-01". When the user refreshes the table, it POSTS "domain.com/api/api.php?newer-than=2013-03-01". The api.php script goes to the MySQL database and fetches all the news posted after 2013-03-01 and prints them json_encoded. This is // do something to get the data in an array echo $array_of_fetched_data; for example the response would be [{"title": "new app is coming to the market", "text": "lorem ipsum dolor sit amet...", image: XXX}] the App then gets the response and parses it, obtaining an NSDictionary and adds it to a Core Data db. NSDictionary* obtainedNews = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error]; My question is: How can I add an image to the MySQL database, store it, pass it using jSON trough a POST HTTP Request and then interpret it as an UIImage. It's clear that to store an UIImage in CoreData, they must be transform into/from NSData. How can I pass the NSData back and forth to a MySQL db using php and jSON? How should I upload the image to the db? (Serialized, as a BLOB, etc)

    Read the article

  • C# / Entity Framework / Linq question regarding calling a method when a class is accessed...

    - by Daniel
    So this is probably really basic, but I'm fairly new to all this. I am using Entity Framework with POCO entities. I want to call a method when a class property is set. I am trying to build an advertisement platform. I have a Customer class, a Venue class and an Advertisement class. I have my indexes set up in such a way that I can call customer.venue. However, I want to be able to call Customer.Venue.CurrentAdvertisement and have it execute a method (if CurrentAdvertisement is null) and return the current advertisement. I know I can explicitly set it every time, but I want to be able to override my classes so that whenever the CurrentAdvertisement property is accessed via LINQ it runs that method to return an ad. In order to do this I need to pass the Venue class a variable (venue name).

    Read the article

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