Search Results

Search found 2684 results on 108 pages for 'michael soriano'.

Page 81/108 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • Is there a Java unit-test framework that auto-tests getters and setters?

    - by Michael Easter
    There is a well-known debate in Java (and other communities, I'm sure) whether or not trivial getter/setter methods should be tested. Usually, this is with respect to code coverage. Let's agree that this is an open debate, and not try to answer it here. There have been several blog posts on using Java reflection to auto-test such methods. Does any framework (e.g. jUnit) provide such a feature? e.g. An annotation that says "this test T should auto-test all the getters/setters on class C, because I assert that they are standard". It seems to me that it would add value, and if it were configurable, the 'debate' would be left as an option to the user.

    Read the article

  • Should I use interface builder or not?

    - by Michael Waterfall
    I'd like to know more about the pros and cons of using interface builder when developing iPhone/iPad apps. I've written a fairly complex and customized app that's on the app store right now, but all of the interfaces are hand coded as they are fairly complex. I've customised the navigation and tab bars with backgrounds, table view cells are manually drawn for speed, and some views are complex and scalable with many subviews. I'm pondering whether or not to start using interface builder but I'm not sure to what extent I'll use it and whether it's worth it at all. Is it quicker? Can things still be easily customised? Any advice would be most welcome!

    Read the article

  • How to copy a variable in JavaScript?

    - by Michael Stum
    I have this JavaScript code: for (var idx in data) { var row = $("<tr></tr>"); row.click(function() { alert(idx); }); table.append(row); } So I'm looking through an array, dynamically creating rows (the part where I create the cells is omitted as it's not important). Important is that I create a new function which encloses the idx variable. However, idx is only a reference, so at the end of the loop, all rows have the same function and all alert the same value. One way I solve this at the moment is by doing this: function GetRowClickFunction(idx){ return function() { alert(idx); } } and in the calling code I call row.click(GetRowClickFunction(idx)); This works, but is somewhat ugly. I wonder if there is a better way to just copy the current value of idx inside the loop? While the problem itself is not jQuery specific (it's related to JavaScript closures/scope), I use jQuery and hence a jQuery-only solution is okay if it works.

    Read the article

  • List show/add/remove View

    - by Michael
    Looking for some best practices of UI list on iPhone which has item add/modify/delete functions. Please refer to some sample codes or articles to build user friendly interface. The main application is tab bar application and one of the tabs supposed to show item management. The item itself consisting of 3 text items, first one can be label, it's short, the rest if it's not terribly complicated I would like to show below with small font or show when user taps on item entering edit mode... Not sure how to design all this and which views to use.

    Read the article

  • c# Lambda Expression built with LinqKit does not compile

    - by Frank Michael Kraft
    This lambda does not compile, but I do not understand why. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; using LinqKit; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { var barModel = new BarModel(); string id = "some"; Console.WriteLine(barModel.subFor(id).ToString()); // output: m => (True AndAlso (m.key == value(ConsoleApplication2.Bar`1+<>c__DisplayClass0[ConsoleApplication2.Model]).id)) Console.ReadKey(); var subworkitems = barModel.list.Where(barModel.subFor(id).Compile()); // Exception {"variable 'm' of type 'ConsoleApplication2.Model' referenced from scope '', but it is not defined"} Console.WriteLine(subworkitems.ToString()); Console.ReadKey(); } } class Bar<TModel> { public Bar(Expression<Func<TModel, string>> foreignKeyExpression) { _foreignKeyExpression = foreignKeyExpression; } private Expression<Func<TModel, string>> _foreignKeyExpression { get; set; } public Expression<Func<TModel, bool>> subFor(string id) { var ex = forTargetId(id); return ex; } public Expression<Func<TModel, bool>> forTargetId(String id) { var fc = _foreignKeyExpression; Expression<Func<TModel, bool>> predicate = m => true; var result = predicate.And(m => fc.Invoke(m) == id).Expand(); return result; } } class Model { public string key; public string value; } class BarModel : Bar<Model> { public List<Model> list; public BarModel() : base(m => m.key) { list = new List<Model>(); } } }

    Read the article

  • Question about Modal Dialog in Gtk application

    - by michael
    Hi, In Gtk application, there is 1 main loop which listens for events (e.g. mouse click, keyboard, etc). And when a modal dialog popup, the main loop is blocked until user clicks 'OK' in the dialog, right? (i.e. nothing will happen when user clicks on the main window). Is that correct? My question is how can firefox did its modal dialog so that it can: 1. when 1 have 2 Firefox windows 2. one of them has a modal dialog 3. other one is still interactive If both window shares the same gtk main loop, how is that possible? Please help me understanding this. Thank you.

    Read the article

  • TreeView binding issue in WPF

    - by Michael Stoll
    Consider the following data structure: List<Person> People; class Person { List<Car> Cars; List<Hobby> Hobbies; } I want to bind a TreeView to this structure. And it should look like this: People > Frank > Cars > BMW > Ford > Hobbies > Tennis > Golf > Jane > Cars > Hobbies How can this be achieved in XAML? This is a follow up question to binding-a-treeview-with-contextmenu-in-xaml

    Read the article

  • Pushing notifications to a JavaScript?

    - by Michael Stum
    I'm just wondering if there is a way to have a server push information to a JavaScript function. Essentially I have a Dashboard-type page that has a javaScript function to get updates from the server and update the dashboard. I would like my server to be able to "ping" the JS. I don't even know how that could be possible (I'm guessing Twitter and Facebook use polling?), but I'd thought I ask. I heard of Comet, but I don't know if that works with a plain standard IIS 7 installation? (It's a SharePoint 2010 site if that matters in any way) If I understand it correctly, Comet is essentially a constantly open connection, so it seems like it's actually the opposite of what I want (reducing # of requests and therefore load)

    Read the article

  • Once an HTML document has a manifest (cache.manifest), how can you remove it?

    - by Michael F
    It seems that once you have a manifest entry, a la: <html manifest="cache.manifest"> Then that page (the master entry in the cache) will always be cached (at least by Safari) until the user does something to remove the cache, even if you later remove the manifest attribute from the html tag and update the manifest (by changing something within it), forcing the master entry to be reloaded along with everything else. In other words, if you have: index.html (with manifest defined) file1.js (referenced in manifest) file2.js (referenced in manifest) cache.manifest (lists the two js files) -- removing the manifest entry from index.html and modifying the manifest (so it gets expired by the browser and all content reloaded) will not stop this page from behaving as if it's still fully cached. If you view source on index.html you won't see the manifest listed anymore, but the browser will still request only the cache.manifest file, and unless that file's content is changed, no other changes to any files will be shown to the user. It seems like a pretty glaring bug, and it's present on iOS as well as Mac versions of Safari. Has anyone found a way of resetting the page and getting rid of the cache without requiring user intervention?

    Read the article

  • php, extract data from a non-standard xml document

    - by Michael
    I have some kind xml content I need to extract the information and store it into database <xml file="136000000-136100000"> <Id>136000000</Id> <Name>Sem Serxy</Na me> <Email>[email protected]</Email> <DateRegistration>10/13/2010 1:49:30 AM</DateRegistration> </xml> <xml file="136000000-136100000"> <Id>136000001</Id> <Name>God Deckor</Name> <Email>[email protected]</Email> If I try simple xml load is not working as the document doesn't seem to be valid xml. I can use regex to extract the info with preg_match_all but I feel this is not the right way as the data is already well structured. Any other method ?

    Read the article

  • jQuery ajax only works first time

    - by Michael Itzoe
    I have a table of data that on a button click certain values are saved to the database, while other values are retrieved. I need the process to be continuous, but I can only get it to work the first time. At first I was using .ajax() and .replaceWith() to rewrite the entire table, but because this overwrites the DOM it was losing events associated with the table. I cannot use .live() because I'm using stopPropagation() and .live() doesn't support it due to event bubbling. I was able to essentially re-bind the click event onto the table within the .ajax() callback, but a second call to the button click event did nothing. I changed the code to use .get() for the ajax and .html() to put the results in the table (the server-side code now returns the complete table sans the <table> tags). I no longer have to rebind the click event to the table, but subsequent clicks to the button still do nothing. Finally, I changed it to .load(), but with the same (non-) results. By "do nothing" I mean while the ajax call is returning the new HTML as expected, it's not being applied to the table. I'm sure it has something to do with altering the DOM, but I thought since I'm only overwriting the table contents and not the table object itself, it should work. Obviously I'm missing something; what is it? Edit: HTML: <table id="table1" class="mytable"> <tr> <td><span id="item1" class="myitem"></span> <td><span id="item2" class="myitem"></span> </tr> </table> <input id="Button1" type="button" value="Submit" /> jQuery: $( "Button1" ).click( function() { $( "table1" ).load( "data.aspx", function( data ) { //... } ); } );

    Read the article

  • C Question: How to store data inside the executable file

    - by michael
    Hello all, complete newbie here, I need to find a way to store 250 KB of plain text numbers inside my program's executable file. Usually, I would put the data in a separate file and let the program read it while it is running, but that's not an option here. Instead, the program and the data need to be in one executable file. I have absolutely no idea how to do it (except writing 250.000 #defines :-) and I'd appreciate any suggestions. Thank you very much!

    Read the article

  • 600 tables in DDBB

    - by Michael
    Hi all, I'm a very young software architect. Now I'm working in a very large and I have to lead a group of developers to rewrite all the mortgage system of the bank. I'm looking at database tables and I realize that there is no any data model, neither documentation. The worst part is that there are about 1000 tables in dev environment, and like 600 in production. I trust more the production environment, but anyway, what can I do? I mean, I can suicide me or something, but is there any good reverse engineering tool, so at least I could get the schema definition with the relations between tables and comments extracted from the fields? Can you advice me something? Thanks in advance.

    Read the article

  • jquery ajax form success callback not being called

    - by Michael Merchant
    I'm trying to upload a file using "AJAX", process data in the file and then return some of that data to the UI so I can dynamically update the screen. I'm using the JQuery Ajax Form Plugin, jquery.form.js found at http://jquery.malsup.com/form/ for the javascript and using Django on the back end. The form is being submitted and the processing on the back end is going through without a problem, but when a response is received from the server, my Firefox browser prompts me to download/open a file of type "application/json". The file has the json content that I've been trying to send to the browser. I don't believe this is an issue with how I'm sending the json as I have a modularized json_wrapper() function that I'm using in multiple places in this same application. Here is what my form looks after Django templates are applied: <form method="POST" enctype="multipart/form-data" action="/test_suites/active/upload_results/805/"> <p> <label for="id_resultfile">Upload File:</label> <input type="file" id="id_resultfile" name="resultfile"> </p> </form> You won't see any submit buttons because I'm calling submit with a button else where and am using ajaxSubmit() from the jquery.form.js plugin. Here is the controlling javascript code: function upload_results($dialog_box){ $form = $dialog_box.find("form"); var options = { type: "POST", success: function(data){ alert("Hello!!"); }, dataType: "json", error: function(){ console.log("errors"); }, beforeSubmit: function(formData, jqForm, options){ console.log(formData, jqForm, options); }, } $form.submit(function(){ $(this).ajaxSubmit(options); return false; }); $form.ajaxSubmit(options); } As you can see, I've gotten desperate to see the success callback function work and simply have an alert message created on success. However, we never reach that call. Also, the error function is not called and the beforeSubmit function is executed. The file that I get back has the following contents: {"count": 18, "failed": 0, "completed": 18, "success": true, "trasaction_id": "SQEID0.231"} I use 'success' here to denote whether or not the server was able to run the post command adequately. If it failed the result would look something like: {"success": false, "message":"<error_message>"} Your time and help is greatly appreciated. I've spent a few days on this now and would love to move on.

    Read the article

  • How can show data from another form

    - by Michael Quiles
    This is basically a tic tac toe game, and I have another form called Winner.cs when a player wins I want it to call the form (this part works) and then I want it to say xWinner.label =b1.text"" + has won the game!. the part I cant get to work is displaying the text in the winners form label. There's an example of a message box that commented out for reference instead of b1.text using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace MyGame { public class Result1 { static private int[,] Winners = new int[,] { {0,1,2}, {3,4,5}, {6,7,8}, {0,3,6}, {1,4,7}, {2,5,8}, {0,4,8}, {2,4,6}, }; static public bool CheckWinner(Button[] myControls) { bool gameOver = false; for (int i = 0; i < 8; i++) { int a = Winners[i, 0], b = Winners[i, 1], c = Winners[i, 2]; Button b1 = myControls[a], b2 = myControls[b], b3 = myControls[c]; if (b1.Text == "" || b2.Text == "" || b3.Text == "") continue; if (b1.Text == b2.Text && b2.Text == b3.Text) { b1.BackColor = b2.BackColor = b3.BackColor = System.Drawing.Color.LightCoral; b1.Font = b2.Font = b3.Font = new System.Drawing.Font("Microsoft Sans Serif", 32F, System.Drawing.FontStyle.Italic & System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); gameOver = true; Form xWinnerForm = new xWinnerForm(); xWinnerForm.Show(); //MessageBox.Show(b1.Text + " .... Wins the game!", "Game End", MessageBoxButtons.OK); //break; } } return gameOver; } } }

    Read the article

  • Mac OS X Lion no longer recognizes environment.plist?

    - by Michael Irwin
    Just installed Lion today and my PATH env variable is no longer being set by ~/.MacOSX/environment.plist. Did something change? Can't seem to find any info on that or how to fix. Any ideas? Here's the contents of the PLIST: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PATH</key> <string>/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11/bin:/Users/mdi/bin</string> </dict> </plist>

    Read the article

  • Firefox extension dev: observing preferencies, avoid multiple notifications

    - by Michael
    Let's say my Firefox extension has multiple preferences, but some of them are grouped, like check interval, fail retry interval, destination url. Those are used in just single function. When I subscribe to preference service and add observer, the observe callback will be called for each changed preference, so if by chance user changed all of the settings in group, then I will have to do the same routine for the same subsystem as many times as I have items in that preferences group. What I want is observe to be called just once for group of preferences. Say extensions.myextension.interval1 extensions.myextension.site extensions.myextension.retry so if one or all of those preferences are changed, I receive only 1 notification about it.

    Read the article

  • Emulating a transaction-safe SEQUENCE in MySQL

    - by Michael Pliskin
    We're using MySQL with InnoDB storage engine and transactions a lot, and we've run into a problem: we need a nice way to emulate Oracle's SEQUENCEs in MySQL. The requirements are: - concurrency support - transaction safety - max performance (meaning minimizing locks and deadlocks) We don't care if some of the values won't be used, i.e. gaps in sequence are ok. There is an easy way to archieve that by creating a separate InnoDB table with a counter, however this means it will take part in transaction and will introduce locks and waiting. I am thinking to try a MyISAM table with manual locks, any other ideas or best practices?

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >