Search Results

Search found 1476 results on 60 pages for 'robert ling iii'.

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

  • What method do you use to identify the Aggregate Roots in Domain Drive Design?

    - by Robert
    When applying Domain Driven Design to a project, how do you identify the Aggregate Roots? For example, in a standard E-Commerce website, you might say that the Order is one, and the User is the other. But what if your Users belong to a Company? Does that make your Company the aggregate root? I'm interested in hearing people's approaches to working out the Aggregate roots, and how to identify poorly chosen aggregate roots.

    Read the article

  • how to loop through an array of vectors in C#

    - by Robert
    Hello everyone,I now have an array of vectors: static Vector3[] axes = new Vector3[] { Vector3.UnitX, Vector3.UnitY, Vector3.UnitZ }; and I want to loop through it,the code I write is: for(int i=0;i<axes.Length;i++) { do sth. about axes[i]; } However,it doesnt work and gets into infinite loop,could anyone help? thx.

    Read the article

  • Vertical positioning of text in table cell

    - by Robert
    When I place an image followed by text in a table cell, the vertical alignment of the text shifts down compared to text in adjacent cells. I tried using a line-height CSS property, but it didn't seem to have an affect. In the following example, I need "123 Description" to be flush with "cell one." Also, there is a space between the image and "123" by default. How can I adjust that - negative margins perhaps? <html <head <style type="text/css" table { border-collapse: collapse; } td { border: thin solid; width: 10em;} /* .adjust-text { line-height: 1.3em; } */ </style </head <body <table <tbody <tr <tdcell one</td <td <img src="small-star.png" / <span class="adjust-text"123 Description</span </td </tr </tbody </table </body </html

    Read the article

  • A beginner question on passthru() function in PHP

    - by Robert
    Hi all, I've used the following code to do an XSLT translation in PHP and save the result SVG file into a sub folder: $command = $java . $saxon . $target2 . ' ' . $xsl2.' '.$param; ob_start(); passthru($command, $result); $content_grabbed=ob_get_contents(); ob_end_clean(); $info = pathinfo($_FILES['file']['name']); $file_name= basename($_FILES['file']['name'],'.'.$info['extension']); $myFile = "images/convert/".$file_name."_".$_POST["mydropdown"].".svg"; $fh = fopen($myFile, 'w') or die("can't open file"); fwrite($fh, $content_grabbed); fclose($fh); It does a very simple SVG to SVG transformation, and created the resulting SVG file. the $command is just a simple java -jar saxon.jar input.xml stylesheet java command. The current situation is ,the file gets created perfectly, however, the error gets shown in browser, probably because I inserted the "ob_start" before passthru() command. I am thinking of making use of an argument that comes with the saxon.jar, that is "-o output_file_name". Because the final purpose is not to display the resulting SVG to the browser, but instead creating an SVG file ,and provide the link to the user for downloading. Are there any better ways to handle this problem, I am still thinking about how to get rid of the result that gets shown in the browser that is sent by the "passthru()". Thanks in advance for suggestions!

    Read the article

  • PHP resizing PNGs results in corrupted files

    - by Robert
    I have a PHP script that resizes .jpg, .gif, and .png files to a bounding box. $max_width = 500; $max_height = 600; $filetype = $_FILES["file"]["type"]; $source_pic = "img/" . $idnum; if($filetype == "image/jpeg") { $src = imagecreatefromjpeg($source_pic); } else if($filetype == "image/png") { $src = imagecreatefrompng($source_pic); } else if($filetype == "image/gif") { $src = imagecreatefromgif($source_pic); } list($width,$height)=getimagesize($source_pic); $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if( ($width <= $max_width) && ($height <= $max_height) ) { $tn_width = $width; $tn_height = $height; } else if (($x_ratio * $height) < $max_height) { $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; } else { $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $tmp = imagecreatetruecolor($tn_width,$tn_height); imagecopyresampled($tmp,$src,0,0,0,0,$tn_width, $tn_height,$width,$height); $destination_pic = "img/thumbs/" . $idnum . "thumb"; if($filetype == "image/jpeg") { imagejpeg($tmp,$destination_pic,80); } else if($filetype == "image/png") { imagepng($tmp,$destination_pic,80); } else if($filetype == "image/gif") { imagegif($tmp,$destination_pic,80); } imagedestroy($src); imagedestroy($tmp); The script works fine with jpeg and gif but when running on a png the file will be corrupted. Is there anything special I need to use when working with a png? I have never worked with this sort of thing in PHP so I'm not very familiar with it.

    Read the article

  • Creating a floating button

    - by Robert Smith
    Hey all, I'm working on a Firefox extension and am out of ideas on how to implement a floating button. I need a button that is overlayed on my page that I can show/hide and dynamically position just about anywhere on my page. I thought I could do something like a fancy CSS tool-tip except replace it with button functionality, but that idea failed because I couldn't pull my example apart well enough to understand what all I need to include, need to change, etc. I've thought about using jQuery(though wouldn't mind avoiding, unless it makes this painfully easy) but will be looking more into that as a possibility now. If anyone can offer a tutorial link, ideas, sample code, anything to help get me moving in the right direction I will greatly appreciate it! Thanks! Edit: Clarification I'm not entirely sure how to actually create the overlayed button. I tried to create a a floating div with some text in it, and nothing showed up, but I got no errors, which means I'm doing something wrong, but I have no idea what that is. http://www.fijiwebdesign.com/blog/css-tooltips-floating-html-elements.html If you take a look at that webpage you see that there is that floating "feedback" button, I would like to create something similar, only it wouldn't be anchored to the sides, but I could position it over text, etc. #floatingBtn { position: absolute; z-index: 10000; top: 50%; left: 50%; } Thats the CSS I used to try and float my div. I don't know if I'm creating the div in the wrong place or... I thought if I could get a floating div with some text, I could turn that into my button.

    Read the article

  • Is the Subversion 'stack' a realistic alternative to Team Foundation Server?

    - by Robert S.
    I'm evaluating Microsoft Team Foundation Server for my customer, who currently uses Visual SourceSafe and nothing else. They have explicitly expressed a desire to implement a more rigid and process-driven environment as their application is in production and they have future releases to consider. The particular areas I'm trying to cover are: Configuration management (e.g., source control) Change management (workflow and doco for change requests, tasks) Release management (builds and deployments) Incident and problem management (issues and bugs) Document management (similar to source control, but available via web) Code analysis constraints on check-ins A testing framework Reporting Visual Studio 2008 integration TFS does all of these things quite well, but it's expensive and complex to maintain, and the inexpensive Workgroup edition doesn't scale. We don't get TFS as part of our MSDN subscription. Those problems can be overcome, but before I tell my customer to go the TFS route, which in itself isn't a terrible thing, I wanted to evaluate the alternatives. I know Subversion is often suggested for its configuration management/source control, but what about the other areas? Would a combination of Subversion/NUnit/Wiki/CruiseControl/NAnt/something else satisfy all of these requirements? What tools do I need to include in my evaluation? Or should I just bite the bullet and go with TFS since we're already invested in the Microsoft stack?

    Read the article

  • Tutorial on Consuming a WCF service in ASP.Net web site?

    - by Robert
    I'm attempting to create my first WCF service. I've created the service and now I'm trying to call it from a asp.net (vb) web site and I've tried adding a web reference to it and using the scvutil.exe to consume the service. So far neither have worked. It's not letting me declare the service in my code. If someone could point me to a good tutorial on how to consume a WCF service in an ASP.Net web site that would be great. I've found numorous on how to use them with AJAX or silverlight or windows apps but nothing on using it in just a plain old website.

    Read the article

  • What's the best way to return different cells depending on position in a UITableView

    - by Robert Conn
    I have a grouped UITableView that has 3 sections and a number of cells in each section that each need to be a different custom cell, with different display requirements. I currently have a large if statement in cellForRowAtIndexPath, with each branch instantiating and returning the appropriate custom cell based on interrogating the indexPath's section and row properties. e.g. if (indexPath.section == 0 && indexPath.row == 0) { // instantiate and return cell A } else if (indexPath.section == 1 && indexPath.row == 2) { // instantiate and return cell B } //etc etc What is best practice for this scenario? A large if statement does the job, but is it the best implementation?

    Read the article

  • Why would one want to use the public constructors on Boolean and similar immutable classes?

    - by Robert J. Walker
    (For the purposes of this question, let us assume that one is intentionally not using auto(un)boxing, either because one is writing pre-Java 1.5 code, or because one feels that autounboxing makes it too easy to create NullPointerExceptions.) Take Boolean, for example. The documentation for the Boolean(boolean) constructor says: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. My question is, why would you ever want to get a new instance in the first place? It seems like things would be simpler if constructors like that were private. For example, if they were, you could write this with no danger (even if myBoolean were null): if (myBoolean == Boolean.TRUE) It'd be safe because all true Booleans would be references to Boolean.TRUE and all false Booleans would be references to Boolean.FALSE. But because the constructors are public, someone may have used them, which means that you have to write this instead: if (Boolean.TRUE.equals(myBoolean)) But where it really gets bad is when you want to check two Booleans for equality. Something like this: if (myBooleanA == myBooleanB) ...becomes this: if ( (myBooleanA == null && myBooleanB == null) || (myBooleanA == null && myBooleanA.equals(myBooleanB)) ) I can't think of any reason to have separate instances of these objects which is more compelling than not having to do the nonsense above. What say you?

    Read the article

  • Endless saving of CoreData Context

    - by Robert
    Sometimes I noticed that a 'save:' operation an a ManagedObjectContext never returns and consumes 100% CPU. I'm using an SQL Store in a GarbageCollected environment (Mac OS X 10.6.3). The disk activity shows about 700 KB/s writing. While having a look at the folder that contains the sqlite database file the "-journal" file appears and disappears, appears and disappears, ... This is part of the call graph from the process analysis: 2203 -[NSManagedObjectContext save:] 1899 -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:] 1836 -[NSSQLCore executeRequest:withContext:] 1836 -[NSSQLCore saveChanges:] 1479 -[NSSQLCore performChanges] ... 335 -[NSSQLCore recordChangesInContext:] ... 20 -[NSSQLCore rollbackChanges] ... 2 -[NSSQLCore prepareForSave:] ... 62 -[NSPersistentStoreCoordinator(_NSInternalMethods) _checkRequestForStore:originalRequest:andOptimisticLocking:] ... 1 -[NSPersistentStore(_NSInternalMethods) _preflightCrossCheck] ... 184 -[NSMergePolicy resolveConflicts:] ... 120 -[NSManagedObjectContext(_NSInternalChangeProcessing) _prepareForPushChanges:] ... Everything a happening in the main GUI thread. Any ideas what I can to do to resolve the problem?

    Read the article

  • Is there a simple library that will render JSON objects as trees?

    - by Robert Gould
    So, is there a VERY simple library that will render JSON objects as trees? I know that this can be done in many ways (such as YUI), but for debug purposes I'd like to simply be able to view a JSON objects I receive from a server as a tree, nothing fancy (but collapsable tree's would be a bonus). The kind of solution I'm looking for would be something like: <script source="something.js"/> <script> obj ={"hello":"world"} lib.renderJSON("someid",obj); </script> ... <div id="someid"/> Any ideas?

    Read the article

  • Programmatically adding an object and selecting the correspondig row does not make it become the CurrentRow

    - by Robert
    I'm in a struggle with the DataGridView: I do have a BindingList of some simple objects that implement INotifyPropertyChanged. The DataGridView's datasource is set to this BindingList. Now I need to add an object to the list by hitting the "+" key. When an object is added, it should appear as a new row and it shall become the current row. As the CurrentRow-property is readonly, I iterate through all rows, check if its bound item is the newly created object, and if it is, I set this row to "Selected = true;" The problem: although the new object and thereby a new row gets inserted and selected in the DataGridView, it still is not the CurrentRow! It does not become the CurrentRow unless I do a mouse click into this new row. In this test program you can add new objects (and thereby rows) with the "+" key, and with the "i" key the data-bound object of the CurrentRow is shown in a MessageBox. How can I make a newly added object become the CurrentObject? Thanks for your help! Here's the sample: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { BindingList<item> myItems; public Form1() { InitializeComponent(); myItems = new BindingList<item>(); for (int i = 1; i <= 10; i++) { myItems.Add(new item(i)); } dataGridView1.DataSource = myItems; } public void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Add) { addItem(); } } public void addItem() { item i = new item(myItems.Count + 1); myItems.Add(i); foreach (DataGridViewRow dr in dataGridView1.Rows) { if (dr.DataBoundItem == i) { dr.Selected = true; } } } private void btAdd_Click(object sender, EventArgs e) { addItem(); } private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Add) { addItem(); } if (e.KeyCode == Keys.I) { MessageBox.Show(((item)dataGridView1.CurrentRow.DataBoundItem).title); } } } public class item : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private int _id; public int id { get { return _id; } set { this.title = "This is item number " + value.ToString(); _id = value; InvokePropertyChanged(new PropertyChangedEventArgs("id")); } } private string _title; public string title { get { return _title; } set { _title = value; InvokePropertyChanged(new PropertyChangedEventArgs("title")); } } public item(int id) { this.id = id; } #region Implementation of INotifyPropertyChanged public void InvokePropertyChanged(PropertyChangedEventArgs e) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) handler(this, e); } #endregion } }

    Read the article

  • Running ARM assembly code in Android

    - by Robert Joseph Dacunto
    I've been following the guide posted here, trying to get this Hello, World program to run on my Samsung Galaxy S3. It's rooted already, and I successfully pushed the "hello" file onto the sdcard. Now when I enter the shell as the superuser (# instead of $), and try to run the file, I get "cannot execute - permission denied". I used chmod 755 hello to see if that would fix it, still nothing. Is there something I'm missing? This is my first time fiddling around with Android, just got the phone, and wanted to see if I could get this to work. Very new to it all. Thanks!

    Read the article

  • Calculating collission for a moving circle, without overlapping the boundaries

    - by Robert Vella
    Let's say I have circle bouncing around inside a rectangular area. At some point this circle will collide with one of the surfaces of the rectangle and reflect back. The usual way I'd do this would be to let the circle overlap that boundary and then reflect the velocity vector. The fact that the circle actually overlaps the boundary isn't usually a problem, nor really noticeable at low velocity. At high velocity it becomes quite clear that the circle is doing something it shouldn't. What I'd like to do is to programmitically take reflection into account and place the circle at it's proper position before displaying it on the screen. This means that I have to calculate the point where it hits the boundary between it's current position and it's future position -- rather than calculating it's new position and then checking if it has hit the boundary. This is a little bit more complicated than the usual circle/rectangle collission problem. I have a vague idea of how I should do it -- basically create a bounding rectangle between the current position and the new position, which brings up a slew of problems of it's own (Since the rectangle is rotated according to the direction of the circle's velocity). However, I'm thinking that this is a common problem, and that a common solution already exists. Is there a common solution to this kind of problem? Perhaps some basic theories which I should look into?

    Read the article

  • simple c++ file opening issue

    - by Robert
    #include <iostream> #include <fstream> using namespace std; int main () { ofstream testfile; testfile.open ("test.txt"); testfile << "success!\n"; testfile.close(); return 0; } 1)called "g++ testfile.cpp" 2)created "test.txt" 3)called "chmod u+x a.out" 4)??? 5)file remains blank. I feel like an idiot for failing at something as trivial as this is supposed to be.

    Read the article

  • Efficiency: what block size of kernel-mode memory allocations?

    - by Robert
    I need a big, driver-internal memory buffer with several tens of megabytes (non-paged, since accessed at dispatcher level). Since I think that allocating chunks of non-continuous memory will more likely succeed than allocating one single continuous memory block (especially when memory becomes fragmented) I want to implement that memory buffer as a linked list of memory blocks. What size should the blocks have to efficiently load the memory pages? (read: not to waste any page space) A multiple of 4096? (equally to the page size of the OS) A multiple of 4000? (not to waste another page for OS-internal memory allocation information) Another size? Target platform is Windows NT = 5.1 (XP and above) Target architectures are x86 and amd64 (not Itanium)

    Read the article

  • C++ function object terminology functor, deltor, comparitor, etc..

    - by Robert S. Barnes
    Is there a commonly accepted terminology for various types for common functors? For instance I found myself naturally using comparitor for comparison functors like this: struct ciLessLibC : public std::binary_function<std::string, std::string, bool> { bool operator()(const std::string &lhs, const std::string &rhs) const { return strcasecmp(lhs.c_str(), rhs.c_str()) < 0 ? 1 : 0; } }; Or using the term deltor for something like this: struct DeleteAddrInfo { void operator()(const addr_map_t::value_type &pr) const { freeaddrinfo(pr.second); } }; If using these kinds of shorthand terms is common, it there some dictionary of them all someplace?

    Read the article

  • Sorting an NSArray of NSString

    - by Robert Eisinger
    Can someone please show me the code for sorting an NSMutableArray? I have the following NSMutableArray: NSMutableArray *arr = [[NSMutableArray alloc] init]; with elements such as "2", "4", "5", "1", "9", etc which are all NSString. I'd like to sort the list in descending order so that the largest valued integer is highest in the list (index 0). I tried the following: [arr sortUsingSelector:@selector(compare:)]; but it did not seem to sort my values properly. Can someone show me code for properly doing what I am trying to accomplish? Thanks!

    Read the article

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