Search Results

Search found 1365 results on 55 pages for 'joe t'.

Page 25/55 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Are there any small scale, durable document/object databases?

    - by Joe Doyle
    I have a few .Net projects that would benefit from using a document/object database opposed to a relational one. I think that db4o would be a good choice, but we're not sure how much the cost is. I'd love to use MongoDB but it's design isn't for small scale, single server applications. Are there other options out there that I just haven't run across for small scale applications? EDIT: So is this a space that doesn't have a good solution, yet? Are there no small scale & durable document databases? Would my best choice be to use MongoDB and set the --syncdelay option set to 1?

    Read the article

  • Is it too early to start designing for Task Parallel Library?

    - by Joe Erickson
    I have been following the development of the .NET Task Parallel Library (TPL) with great interest since Microsoft first announced it. There is no doubt in my mind that we will eventually take advantage of TPL. What I am questioning is whether it makes sense to start taking advantage of TPL when Visual Studio 2010 and .NET 4.0 are released, or whether it makes sense to wait a while longer. Why Start Now? The .NET 4.0 Task Parallel Library appears to be well designed and some relatively simple tests demonstrate that it works well on today's multi-core CPUs. I have been very interested in the potential advantages of using multiple lightweight threads to speed up our software since buying my first quad processor Dell Poweredge 6400 about seven years ago. Experiments at that time indicated that it was not worth the effort, which I attributed largely to the overhead of moving data between each CPU's cache (there was no shared cache back then) and RAM. Competitive advantage - some of our customers can never get enough performance and there is no doubt that we can build a faster product using TPL today. It sounds fun. Yes, I realize that some developers would rather poke themselves in the eye with a sharp stick, but we really enjoy maximizing performance. Why Wait? Are today's Intel Nehalem CPUs representative of where we are going as multi-core support matures? You can purchase a Nehalem CPU with 4 cores which share a single level 3 cache today, and most likely a 6 core CPU sharing a single level 3 cache by the time Visual Studio 2010 / .NET 4.0 are released. Obviously, the number of cores will go up over time, but what about the architecture? As the number of cores goes up, will they still share a cache? One issue with Nehalem is the fact that, even though there is a very fast interconnect between the cores, they have non-uniform memory access (NUMA) which can lead to lower performance and less predictable results. Will future multi-core architectures be able to do away with NUMA? Similarly, will the .NET Task Parallel Library change as it matures, requiring modifications to code to fully take advantage of it? Limitations Our core engine is 100% C# and has to run without full trust, so we are limited to using .NET APIs.

    Read the article

  • MPMediaickerController memory leak

    - by Joe
    This is code from Apple's Addmusic example. MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic]; picker.delegate = self; picker.allowsPickingMultipleItems = YES; picker.prompt = NSLocalizedString (@"Add songs to play", "Prompt in media item picker"); // The media item picker uses the default UI style, so it needs a default-style // status bar to match it visually [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated: YES]; [self presentModalViewController: picker animated: YES]; [picker release]; I'm using this code in my app and the Leaks instrument highlights a leak on the line: [self presentModalViewController: picker animated: YES]; I think that this is because this line retains a reference to picker which cannot be subsequently released. Is there any way around this?

    Read the article

  • Core Data inserting objects

    - by Joe
    I'm trying to get my head around Core Data on the iphone. This is code from Apple's 'Navigation based app using Core data' template (method - insertNewObject) // Create a new instance of the entity managed by the fetched results controller. NSManagedObjectContext *context = [fetchedResultsController managedObjectContext]; NSEntityDescription *entity = [[fetchedResultsController fetchRequest] entity]; NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context]; It seems completely counter intuitive to me that the fetched results controller is used when inserting a new object. I changed the code to this: NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:managedObjectContext]; NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:managedObjectContext]; which works just as well and does not require access to the fetch request. Am I missing something here? Is there any good reason to use the fetched results controller in the insert method?

    Read the article

  • Static variables in Java for a test oObject creator

    - by stevebot
    Hey, I have something like the following TestObjectCreator{ private static Person person; private static Company company; static { person = new Person() person.setName("Joe"); company = new Company(); company.setName("Apple"); } public Person createTestPerson(){ return person; } public Person createTestCompany(){ return company; } } By applying static{} what am I gaining? I assume the objects are singletons as a result. However, if I did the following: Person person = TestObjectCreator.createTestPerson(); person.setName("Jill"); Person person2 = TestObjectCreator.createTestPerson(); would person2 be named Jill or Joe?

    Read the article

  • Servlet Exception + Class Cast Exception + Glassfish + Netbeans + JPA Entities + Vaadin

    - by Random Joe
    Hi all, I get this error: StandardWrapperValve[Vaadin Servlet]: PWC1406: Servlet.service() for servlet Vaadin Servlet threw exception java.lang.ClassCastException: com.delhi.entities.Category cannot be cast to com.delhi.entities.Category when I try to run my webapps on glassfish v2. Category is a JPA entity object the offending code according to the server log is: for (Category c : categories) { mymethod(); } categories is derived from: List<Category> categories = q.getResultList(); Any idea what went wrong?

    Read the article

  • Tame this format with a cross tab ?

    - by Damien Joe
    I have result of query in form EmpId Profit OrderID CompanyName ------ ------ ------- -------------- 1 500 $ 1 Acme Company 1 200 $ 1 Evolve Corp. 2 400 $ 1 Acme Company 2 100 $ 1 Evolve Corp. 3 500 $ 1 Acme Company 3 500 $ 1 Evolve Corp. Now the desired report format is EmpId OrderId Acme's Profit Evolve's Profit ----- ------ ------------- --------------- 1 1 700 $ 700 $ 2 1 500 $ 500 $ 3 3 1000 $ 1000 $ I tried hard at the crosstab but I'm unable to figure out how to group the records. I tried moving CompanyName in CrossTab columns and moved EmpId in rows & tried a cross tab group but results are not as expected. My questions are 1) Is this format achievable with a cross tab ? 2) How do I group record's by EmpId's in my crosstab in such a way that the Companies are moved horizontally ?

    Read the article

  • How to halt only if shift is pressed?

    - by Joe
    Hi, in Pharo I'd like Object>>halt to halt only if shift is pressed, so that I don't break down my image. How do I do that? So, for example, I'd like to be able to add a self halt. into Array>>add:, without losing my image.

    Read the article

  • Optimal method to create a large string containing several variables?

    - by Runcible
    I want to create a string that contains many variables: std::string name1 = "Frank"; std::string name2 = "Joe"; std::string name3 = "Nancy"; std::string name4 = "Sherlock"; std::string sentence; sentence = name1 + " and " + name2 + " sat down with " + name3; sentence += " to play cards, while " + name4 + " played the violin."; This should produce a sentence that reads Frank and Joe sat down with Nancy to play cards, while Sherlock played the violin. My question is: What is the optimal way to accomplish this? I am concerned that constantly using the + operator is ineffecient. Is there a better way?

    Read the article

  • Segmenting a double array of labels

    - by Ami
    The Problem: I have a large double array populated with various labels. Each element (cell) in the double array contains a set of labels and some elements in the double array may be empty. I need an algorithm to cluster elements in the double array into discrete segments. A segment is defined as a set of pixels that are adjacent within the double array and one label that all those pixels in the segment have in common. (Diagonal adjacency doesn't count and I'm not clustering empty cells). |-------|-------|------| | Jane | Joe | | | Jack | Jane | | |-------|-------|------| | Jane | Jane | | | | Joe | | |-------|-------|------| | | Jack | Jane | | | Joe | | |-------|-------|------| In the above arrangement of labels distributed over nine elements, the largest cluster is the “Jane” cluster occupying the four upper left cells. What I've Considered: I've considered iterating through every label of every cell in the double array and testing to see if the cell-label combination under inspection can be associated with a preexisting segment. If the element under inspection cannot be associated with a preexisting segment it becomes the first member of a new segment. If the label/cell combination can be associated with a preexisting segment it associates. Of course, to make this method reasonable I'd have to implement an elaborate hashing system. I'd have to keep track of all the cell-label combinations that stand adjacent to preexisting segments and are in the path of the incrementing indices that are iterating through the double array. This hash method would avoid having to iterate through every pixel in every preexisting segment to find an adjacency. Why I Don't Like it: As is, the above algorithm doesn't take into consideration the case where an element in the double array can be associated with two unique segments, one in the horizontal direction and one in the vertical direction. To handle these cases properly, I would need to implement a test for this specific case and then implement a method that will both associate the element under inspection with a segment and then concatenate the two adjacent identical segments. On the whole, this method and the intricate hashing system that it would require feels very inelegant. Additionally, I really only care about finding the large segments in the double array and I'm much more concerned with the speed of this algorithm than with the accuracy of the segmentation, so I'm looking for a better way. I assume there is some stochastic method for doing this that I haven't thought of. Any suggestions?

    Read the article

  • What should a Java/SOA developer be able to do?

    - by Regular Joe
    I got assigned the task to list the activities a Java Developer should be able to perform and create an estimate about the time it would take. I've came up with the following: Create JDBC CRUD backend ( S=1d, M=5d, H=10d ) Create JSP/Servlet frontend for a CRUD app ( S=1d, M=10d, H=20d ) Create Swing desktop frontend ( S=1d, M=15d, H=30d) Create ORM based CRUD etc. Create Webapp fronend with webframework etc Where.. S = Small complexity M = Medium complexity H = High complexity 1d = 1 day This is thought for a Java "enterprise" developer. The other profile I have is SOA Developer, but I could not pass beyond: Create webservice ( S=.5d, M=2d, H=7d ) Q.- What other activities should a Java Developer be able to do? Q.- What activities should a SOA Developer be able to do? Please, help me with this, I know this is in the limit of the kind of questions that could be asked here, but I really need a little push on this, and I don't want to go to Yahoo Answers for this.

    Read the article

  • Tree Widgets on Rails

    - by Joe
    I would like to find some help building a tree interface in Rails. I've tried using jsTree but am having trouble integrating it properly into Rails. Thanks.

    Read the article

  • pyparsing ambiguity

    - by Claudiu
    I'm trying to parse some text using PyParser. The problem is that I have names that can contain white spaces. So my input might look like this: Joe Bob Jimmy Foo Joe decides to eat. Bob decides to not eat. Jimmy Foo decides to eat. How can I create a parser for the decides to eat line? If I create my name parser naively, meaning with alphabetic characters plus space characters, then it will match the entire line.

    Read the article

  • How to extract valid email from larger string in Scala

    - by luigi-prog
    My scala version 2.7.7 Im trying to extract an email adress from a larger string. the string itself follows no format. the code i've got: import scala.util.matching.Regex import scala.util.matching._ val Reg = """\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b""".r "yo my name is joe : [email protected]" match { case Reg(e) => println("match: " + e) case _ => println("fail") } the Regex passes in RegExBuilder but does not pass for scala. Also if there is another way to do this without regex that would be fine also. Thanks!

    Read the article

  • Font Rendering between Mozilla and webkit

    - by Joe Payton
    I'm not sure if this has anything to do with the recent Safari update, but I'm beginning to notice this a lot. There is a drastic difference in the way each browser is rendering fonts. for instance, I took screenshots of what I am seeing here on stackoverflow... http://twitpic.com/q43eh I have verified that this is a trend via my co-workers machines. has anyone noticed this or have any thoughts on non-hack solutions?

    Read the article

  • CSS - Which method is better?

    - by Joe
    Which is better in regards to processing time but also taking into account ease of use for a developer? .font_small{ font-size:10px; } .font_blue{ color:blue; } .font_red{ color:red; } <span class="font_small font_blue">Hello World!</span><br /> <span class="font_small font_red">Today's the day!</span> OR .font_blue_small{ color:blue; } .font_red_small{ color:red; } .font_blue_small .font_red_small { font-size:10px; } <span class="font_blue_small">Hello World!</span><br /> <span class="font_red_small">Today's the day!</span> OR .font_blue_small{ color:blue; font-size:10px; } .font_red_small{ color:red; font-size:10px; } <span class="font_blue_small">Hello World!</span><br /> <span class="font_red_small">Today's the day!</span> OR Another option I haven't though of yet...?

    Read the article

  • Why does this query only select a single row?

    - by Joe
    SELECT * FROM tbl_houses WHERE (SELECT HousesList FROM tbl_lists WHERE tbl_lists.ID = '123') LIKE CONCAT('% ', tbl_houses.ID, '#') It only selects the row from tbl_houses of the last occuring tbl_houses.ID inside tbl_lists.HousesList I need it to select all the rows where any ID from tbl_houses exists within tbl_lists.HousesList

    Read the article

  • MYSQL - Help with a more complicated Query

    - by Joe
    I have two tables: tbl_lists and tbl_houses Inside tbl_lists I have a field called HousesList - it contains the ID's for several houses in the following format: 1# 2# 4# 51# 3# I need to be able to select the mysql fields from tbl_houses WHERE ID = any of those ID's in the list. More specifically, I need to SELECT SUM(tbl_houses.HouseValue) WHERE tbl_houses.ID IN tbl_lists.HousesList -- and I want to do this select to return the SUM for several rows in tbl_lists. Anyone can help? I'm thinking of how I can do this in a SINGLE query since I don't want to do any mysql "loops" (within PHP).

    Read the article

  • Concise SSE and MMX instruction reference with latencies and throughput

    - by Joe
    I am trying to optimize some arithmetic by using the MMX and SSE instruction sets with inline assembly. However, I have been unable to find good references for the timings and usages of these enhanced instruction sets. Could you please help me find references that contain information about the throughput, latency, operands, and perhaps short descriptions of the instructions? So far, I have found: Intel Instruction References http://www.intel.com/Assets/PDF/manual/253666.pdf http://www.intel.com/Assets/PDF/manual/253667.pdf Intel Optimization Guide http://www.intel.com/Assets/PDF/manual/248966.pdf Timings of Integer Operations http://gmplib.org/~tege/x86-timing.pdf

    Read the article

  • iOS localization inconsistency

    - by Joe Völker
    I'm localizing an iPhone app for the first time. I've put all my strings into a Localizable.strings file, accessing them via NSLocalizedString from within my code. Works fine. Next, I have a file called info.html that contains the flesh of a UIWebView that I use as an About box. I've put it in the language folders (en.lproj and de.lproj), and added them to my Resources in Xcode. Now, in Simulator, both the Strings, and the html file display in the appropriate language. However, on the device, the Strings appear localized while the html file remains untranslated. This is a strange inconsistency between Simulator and Device! Anybody know of a workaround? (...other than defying the localization system, and using NSLocalizedString to call de_info.html, en_info.html etc. by hand.)

    Read the article

  • Problem implementing Blinn–Phong shading model

    - by Joe Hopfgartner
    I did this very simple, perfectly working, implementation of Phong Relflection Model (There is no ambience implemented yet, but that doesn't bother me for now). The functions should be self explaining. /** * Implements the classic Phong illumination Model using a reflected light * vector. */ public class PhongIllumination implements IlluminationModel { @RGBParam(r = 0, g = 0, b = 0) public Vec3 ambient; @RGBParam(r = 1, g = 1, b = 1) public Vec3 diffuse; @RGBParam(r = 1, g = 1, b = 1) public Vec3 specular; @FloatParam(value = 20, min = 1, max = 200.0f) public float shininess; /* * Calculate the intensity of light reflected to the viewer . * * @param P = The surface position expressed in world coordinates. * * @param V = Normalized viewing vector from surface to eye in world * coordinates. * * @param N = Normalized normal vector at surface point in world * coordinates. * * @param surfaceColor = surfaceColor Color of the surface at the current * position. * * @param lights = The active light sources in the scene. * * @return Reflected light intensity I. */ public Vec3 shade(Vec3 P, Vec3 V, Vec3 N, Vec3 surfaceColor, Light lights[]) { Vec3 surfaceColordiffused = Vec3.mul(surfaceColor, diffuse); Vec3 totalintensity = new Vec3(0, 0, 0); for (int i = 0; i < lights.length; i++) { Vec3 L = lights[i].calcDirection(P); N = N.normalize(); V = V.normalize(); Vec3 R = Vec3.reflect(L, N); // reflection vector float diffuseLight = Vec3.dot(N, L); float specularLight = Vec3.dot(V, R); if (diffuseLight > 0) { totalintensity = Vec3.add(Vec3.mul(Vec3.mul( surfaceColordiffused, lights[i].calcIntensity(P)), diffuseLight), totalintensity); if (specularLight > 0) { Vec3 Il = lights[i].calcIntensity(P); Vec3 Ilincident = Vec3.mul(Il, Math.max(0.0f, Vec3 .dot(N, L))); Vec3 intensity = Vec3.mul(Vec3.mul(specular, Ilincident), (float) Math.pow(specularLight, shininess)); totalintensity = Vec3.add(totalintensity, intensity); } } } return totalintensity; } } Now i need to adapt it to become a Blinn-Phong illumination model I used the formulas from hearn and baker, followed pseudocodes and tried to implement it multiple times according to wikipedia articles in several languages but it never worked. I just get no specular reflections or they are so weak and/or are at the wrong place and/or have the wrong color. From the numerous wrong implementations I post some little code that already seems to be wrong. So I calculate my Half Way vector and my new specular light like so: Vec3 H = Vec3.mul(Vec3.add(L.normalize(), V), Vec3.add(L.normalize(), V).length()); float specularLight = Vec3.dot(H, N); With theese little changes it should already work (maby not with correct intensity but basically it should be correct). But the result is wrong. Here are two images. Left how it should render correctly and right how it renders. If i lower the shininess factor you can see a little specular light at the top right: Altough I understand the concept of Phong illumination and also the simplified more performant adaptaion of blinn phong I am trying around for days and just cant get it to work. Any help is appriciated. Edit: I was made aware of an error by this answer, that i am mutiplying by |L+V| instead of dividing by it when calculating H. I changed to deviding doing so: Vec3 H = Vec3.mul(Vec3.add(L.normalize(), V), 1/Vec3.add(L.normalize(), V).length()); Unfortunately this doesnt change much. The results look like this: and if I rise the specular constant and lower the shininess You can see the effects more clearly in a smilar wrong way: However this division just the normalisation. I think I am missing one step. Because the formulas like this just dont make sense to me. If you look at this picture: http://en.wikipedia.org/wiki/File:Blinn-Phong_vectors.svg The projection of H to N is far less than V to R. And if you imagine changing the vector V in the picture the angle is the same when the viewing vector is "on the left side". and becomes more and more different when going to the right. I pesonally would multiply the whole projection by two to become something similiar (and the hole point is to avoid the calculation of R). Altough I didnt read anythinga bout that anywehre i am gonna try this out... Result: The intension of the specular light is far too much (white areas) and the position is still wrong. I think I am messing something else up because teh reflection are just at the wrong place. But what? Edit: Now I read on wikipedia in the notes that the angle of N/H is in fact approximalty half or V/R. To compensate that i should multiply my shineness exponent by 4 rather than my projection. If i do that I end up with this: Far to intense but still one thing. The projection is at the wrong place. Where could i mess up my vectors?

    Read the article

  • Ruby Large HTML getting error, limit to header size

    - by Joe Stein
    def mailTo(subject,msg,folks) begin Net::SMTP.start('localhost', 25) do |smtp| smtp.send_message "MIME-Version: 1.0\nContent-type: text/html\nSubject: #{subject}\n#{msg}\n#{DateTime.now}\n", '[email protected]', folks end rescue => e puts "Emailing Sending Error - #{e}" end end when the HTML is VERY large I get this exception Emailing Sending Error - 552 5.6.0 Headers too large (32768 max) how can i get a larger html above max to work with Net::SMTP in Ruby

    Read the article

  • Vertical crosshair reposition on Google Map after map resize Issue

    - by joe
    I use the following function to add a crosshair to my Google Map. It works great for horizontal resizing. I can not figure out how to make it work for vertical. After resizing the map it requires the user to either zoom in or out 1 layer, upon which the crosshair snaps to center. var crosshairsSize=17; GMap2.prototype.addCrosshairs=function(){ var container=this.getContainer(); if(this.crosshairs){$(this.crosshairs).remove();} var crosshairs=document.createElement("img"); crosshairs.src='../images/crosshair2.gif'; crosshairs.style.width=crosshairsSize+'px'; crosshairs.style.height=crosshairsSize+'px'; crosshairs.style.border='0'; crosshairs.style.position='relative'; crosshairs.style.top=((parseInt(container.clientHeight)-crosshairsSize)/2)+'px'; crosshairs.style.left="0px"; // The map is centered so 0 will do crosshairs.style.zIndex='500'; container.appendChild(crosshairs); this.crosshairs=crosshairs; return crosshairs;}; I use map.checkResize(); and the map is correct, it's just the crosshair that is off. I've tried firing a javascript zoom in one level but it doesn't work like zooming in with the mouse. It's only zooming in/out with the mouse scroll wheel too... clicking and dragging the zoom slider doesn't work so somehow it's liking the mouse scroll wheel. Firing addCrosshairs(); after resize makes no difference. It places the new crosshair in old spot and still requires a mouse scroll zoom.

    Read the article

  • In LaTeX, how can one add a header/footer in the document class Letter?

    - by Brian M. Hunt
    In LaTeX, how can one create a document using the Letter documentclass, but with customized headers and footers? Typically I would use: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Custom left-head-note} } \lfoot{\footnotesize \parbox{11cm}{\textit{#2}}} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand\headheight{24pt} \renewcommand\footrulewidth{0.4pt} However, with \documentclass{letter}, this doesn't work at all. Suggestions are duly appreciated. EDIT: Here is sample code that doesn't work (for any apparent reason): \documentclass[12pt]{letter} \usepackage{fontspec}% font selecting commands \usepackage{xunicode}% unicode character macros \usepackage{xltxtra} % some fixes/extras % page counting, header/footer \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Draft 1} } \lfoot{\footnotesize \parbox{11cm}{\textit{2}}} \cfoot{} \rhead{\footnotesize 3} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand{\headheight}{24pt} \renewcommand{\footrulewidth}{0.4pt} \begin{document} \name{ Joe Laroo } \signature{ Joe Laroo } \begin{letter}{ To-Address } \renewcommand{\today}{ February 16, 2009 } \opening{ Opening } Content of the letter. \closing{ Yours truly, } \end{letter} \end{document}

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >