Search Results

Search found 6726 results on 270 pages for 'rafael de f ferreira'.

Page 169/270 | < Previous Page | 165 166 167 168 169 170 171 172 173 174 175 176  | Next Page >

  • Find Missing Records

    - by Lennie De Villiers
    Hi, My SQL is a bit bad. I got a query that when I run it I return for example 10 rows but there are 15 in my where clause, how do I identify those 5 that I can't find? Off course I can dump it in MS Excel but how do I use SQL?

    Read the article

  • How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ?

    - by Ernst de Haan
    How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ? I have an open-source project that I am converting from Ant to Maven, including its unit tests. Here's the project source repository with the Maven project: http://github.com/znerd/logdoc My question pertains to the primary module, called "base". This module has a unit test that tests the behaviour of the static method getVersion() in the class org.znerd.logdoc.Library. This method returns: Library.class.getPackage().getImplementationVersion() The getImplementationVersion() method returns a value of a setting in the manifest file. So far, so good. I have tested this in the past and it works well, as long as the manifest is indeed available on the classpath at the path META-INF/MANIFEST.MF (either on the file system or inside a JAR file). Now my challenge is that the manifest file is not available when I run the unit tests: mvn test Surefire runs the unit tests, but my unit test fails with a mesage indicating that Library.getVersion() returned null. When I want to check the JAR, I find that it has not even been generated. Maven/Surefire runs the unit tests against the classes, before the resources are added to the classpath. So can I either run the unit tests against the JAR (implicitly requiring the JAR to be generated first) or can I make sure the resources (including the manifest file) are generated/copied under target/classes before the unit tests are run? Note that I use Maven 2.2.0, Java 1.6.0_17 on Mac OS X 10.6.2, with JUnit 4.8.1.

    Read the article

  • Invoking powershell from Java

    - by Hannes de Jager
    Anyone know of a good library to invoke powershell scripts from within Java? I'm currently spawning a seperate process (powershell.exe) and then parse the output, but it would really be nice if I can leverage Powershell's 'power' by getting objects back from a powershell call. Edit: Otherwise, anyone else doing such interop? What method do you use?

    Read the article

  • How to build a C++ Dll wrapper that catches all exceptions?

    - by bart de vries
    Like the title says, we’re looking for a way to catch all exceptions from a piece of C++ code, and wrap this in a dll. This way we can shield of the application that uses this dll, from any errors occurring in this dll. However, this does not seem possible with C++ under Windows. Example: void function() { try { std::list<int>::iterator fd_it; fd_it++; } catch(...) {} } The exception that occurs is not caught by the standard C++ try/catch block, nor by any SEH translator function set by _set_se_translator(). Instead, the DLL crashes, and the program that uses the DLL is aborted. We compiled with Visual C++ 2005, with the option /SHa. Does anyone know if it’s possible in C++/Win32 to catch these kind of problems and make a rocksolid DLL wrapper?

    Read the article

  • Music and Mathematics. Finding the natural scale matemathically. Is this correct?

    - by Alfonso de la Osa
    Hi! I wrote this post Music and Mathematics, finding the Natural and the Pentathonic scales. Central A at 383,56661 Hz. Is a method to find the Natural scale. I want to discuss it and find if its true. This is the code of the reasoning in js. <script> var c = 1.714285714285714; var tot = 0; var scale = []; while(tot < (14 - c)){ tot += c; scale.push(Math.round(tot)); } if(scale.length == 8){ document.write(scale + " " + c + "<br />"); } </script>

    Read the article

  • The Definitive Guide To Website Authentication (beta)

    - by Michiel de Mare
    Form Based Authentication For Websites Please help us create the definitive resource for this topic. We believe that stackoverflow should not just be a resource for very specific technical questions, but also for general guidelines on how to solve variations on common problems. "Form Based Authentication For Websites" should be a fine topic for such an experiment. It should include topics such as: how to log in how to remain logged in how to store passwords using secret questions forgotten password functionality OpenID "Remember me" checkbox Browser autocompletion of usernames and passwords secret urls (public urls protected by digest) checking password strength email validation and much more It should not include things like: roles and authorization http basic authentication Please help us by Suggesting subtopics Submitting good articles about this subject Editing the official answer (as soon as you have enough karma) UPDATE: See the terrific 7-part series by Jens Roland below.

    Read the article

  • Retrieving NSDate from NSString

    - by Olivier de Jonge
    I have an iPhone app. that is receiving data with IRFC 3339 timestamp format (e.g. @"2010-01-29T11:30:00.000+01:00"), as in GData. I want to convert the data to an NSDate NSDateFormatter *inputFormatter = [[[NSDateFormatter alloc] init] autorelease]; [inputFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"]; [currentEntry setStartTime:[inputFormatter dateFromString: ][currentEntry startTimeString]]]; But I'm missing out how to convert the last part of the string @"2010-01-29T11:30:00.000+01:00": the time offset. Anyone knows what I have to add to this String to take the time offset in account too?

    Read the article

  • QGraphicsView and custom Cursors

    - by Etienne de Martel
    I am trying to make use of a mix of custom cursors and preset cursors for my QGraphicsView. In my implementation we have created a notion of "modes" for the view. Meaning that depending on what "mode" the user is in, different things will happen on the left-click, or left-click drag. Anyway, none of that is the problem, just the context. The problem arises when I try to change the cursor for each mode. For instance, for mode 1 we want to show the regular Arrow cursor, but for mode 2, we want to use a custom pixmap. Seemingly simple we call graphicsview->viewport()->setCursor(Qt::QArrowCursor)  when we are switching to mode 1, and graphicsview->viewport()->setCursor(our custom cursor) for mode 2. Except it doesn't work at all. Firstly, the cursor does not change to the custom cursor. That is the first problem. However, if through another operation the drag mode of the graphics view gets set to ScrollHandDrag, the cursor will switch to the custom cursor once the drag operation is complete. Weird. But the plot thickens... Once we switch to the custom cursor, it can never be changed back to the ArrorCursor no matter how many times we call setCursor(Qt::QArrowCursor). it also doesn't seem to matter whether I call setCursor on the viewport or the graphics view itself. So, just for fun, I added a call to graphicsview->unsetCursor() just before we want to change the cursor, and that at least rectifies the second problem. The cursor changes just fine so long as we do a little HandDragging in between. Better, but certainly not optimal. However it should be noted, that doing the unsetCursor on the viewport doesn't work. it must absolutely be done on the graphicsview - regardless of the fact that we are setting the cursor on the viewport. To completely patch over the problem I have added these two lines after I set the cursor: graphicsview->setDragMode(QGraphicsView::ScrollHandDrag); graphicsview->setDragMode(QGraphicsView::NoDrag); Which works, but ye gads!! So something magical is happening inside these two methods that fixes the problem, but glancing at the code I don't see what. Something to do with the fact that the drag mode is changing the cursor I imagine. Just for completeness, I should also mention that the thing that triggers the mode change, is a QPushButton that has been added to the scene using QGraphicsScene->addWidget(). I don't know if that has anything to do with it, but you never know. I am hoping that either someone could clarify why I need to make these seemingly random calls. I don't think I am doing anything wrong anywhere. Thanks in advance for any help. EDIT: Here is an actual code example with the cursor patches as described above. You can look at and/or download them from the link below. It was a little long to paste here. I included the framework around which the cursors are changed, because I have a funny feeling that that is important somehow. https://gist.github.com/712654 The code where the problem lies is in MyGraphicsView.cpp starting at line 104. This is where the cursor is set in the graphics view. It is exactly as described above. Keep in mind, with the very ugly patches in place the cursors do work - more or less. Without those lines you will see very clearly the problems listed in the post above. Also included in the link, is all the code for a mainWindow that uses the view, etc... the only thing missing are the images I am using. But the images themselves don't matter, any 16x16 pngs will do.

    Read the article

  • What's the most efficient way to setup a multi-lingual website

    - by Jasper De Bruijn
    Hi, I'm developing a website that will be available in different languages. It is a LAMP (Linux, Apache, MySQL, PHP) setup, and it makes use of Smarty, mostly for the template engine. The way we currently translate is by a self-written smarty plugin, which will recognize certain tags in the HTML files, and will find the corresponding tag in an earlier defined language file. The HTML could look as follows: <p>Hi, welcome to $#gamedesc;!</p> And the language file could look like this: gamedesc:Poing 2009$; welcome:this is another tag$; Which would then output <p>Hi, welcome to Poing 2009!</p> This system is very basic, but it is pretty hard to control, if I f.e. would like to keep track of what has been translated so far, or give certain users the rights to translate only certain tags. I've been looking at some alternative ways to approach this, by either replacing the text-file with XML files which could store some extra meta-data, or by perhaps storing all the texts in the database, and retrieving it there. My question is, what would be the best way to make this system both maintainable and perform well with high user-traffic? Are there perhaps any (lightweight) plugins I could take a look at?

    Read the article

  • Zend framework helper intellisense

    - by Nicky De Maeyer
    Not so much a programming problem, but more a productivity problem. We've got quite a few custom view and action helpers in our project. Working with around 7 programmers. Now when someone, creates a helper or if one would want to use a helper, it all goes through the brokers. This means we do not get intellisense for those helpers, which can be real time consuming, having to go look in the docs or the code files. This is ofcourse true for both build in and custom helpers. Does any1 share this pain? Does any1 have a solution for this?

    Read the article

  • new operator in DllMain of MFC Extension Dll

    - by Picaro De Vosio
    Hi, Dll best practices document from Microsoft available Here recommends avoiding use of memory management function from the dynamic C Run-Time (CRT) within DllMain. But DllMain function of MFC Extension DLL is dynamically allocating the memory for CDynLinkLibrary in the code snippet available at MSDN "http://msdn.microsoft.com/en-us/library/1btd5ea3%28v=VS.80%29.aspx". Is it a violation of Dll Best Practices or ok to use in MFC extension DLL? thanks

    Read the article

  • HBox Image as BorderSkin

    - by Maurits de Boer
    I've designed a pretty 6pixel border for an HBox. It's a .png file and I tried setting it as the border skin like so: HBox { border-skin: Embed('../graphics/skins/border.png'); } However, when I run the application, the image is used for the background instead of the border. How do I fix this?

    Read the article

  • Asp.net Web Site Administration Tool with SqlCeMembership

    - by Riderman de Sousa Barbosa
    I am developing an application in MVC 3. I installed this provider via Nuget . Basically, it allows to use any part of memberships, rules and profiles with a .sdf (compact) database. I need the "Web Site Administration Tool" use this provider. But I can not use it. Already checked the web.config and everything is ok. When I open the "Web Site Administration Tool" on the Security I click test (any provider) and the error happens. The following images. Error when clicking test "Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider." Here part of my web.config <authentication mode="Forms" /> <membership> <providers> <add connectionStringName="SqlCeServices" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" writeExceptionsToEventLog="false" name="SqlCeMembershipProvider" type="ErikEJ.SqlCeMembershipProvider, ErikEJ.SqlCeMembership" /> </providers> </membership> <profile enabled="false"> <providers> <clear /> <add name="SqlCeProfileProvider" type="ErikEJ.SqlCeProfileProvider" connectionStringName="SqlCeServices" applicationName="/" /> </providers> </profile> <roleManager> <providers> <add connectionStringName="SqlCeServices" applicationName="/" writeExceptionsToEventLog="false" name="SqlCeRoleProvider" type="ErikEJ.SqlCeRoleProvider, ErikEJ.SqlCeMembership" /> </providers> </roleManager> <connectionStrings> <add name="SqlCeServices" connectionString="data source=|DataDirectory|\SqlCeAspnetdb.sdf" /> </connectionStrings>

    Read the article

  • How can I specify a different configuration for Vim based on the executable name?

    - by Jacobo de Vera
    I am trying to open Vim with different configuration options depending on the executable file name. I intend to create a number of symbolic links to vim and I'd like to do something like this in my .vimrc if execname == "vim2" " configuration here endif Is there a variable in Vim that holds the name of the executable file being run? Alternatively, is there another way I can have different configurations without having to keep more than one .vimrc file?

    Read the article

  • Problem adding UIBarButtonItems to a ToolBar

    - by Olivier de Jonge
    I have a UINavigationController with a UITableViewController in it. I want to show a ToolBar on the bottom with UIBarButtonItem's. The ToolBar is showing up, but the buttons won't appear. Anyone knows why? - (void)viewDidLoad { [super viewDidLoad]; [[self navigationItem] setTitle:@"Selections List"]; [[self navigationItem] setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addProjectSearch:)] autorelease]]; [[self navigationItem] setLeftBarButtonItem:[self editButtonItem]]; [[super tableView] setDataSource: self]; [[super tableView] setDelegate: self]; //Toolbar UIBarButtonItem * logoutButton = [[[UIBarButtonItem alloc] initWithTitle:@"Log out" style:UIBarButtonItemStylePlain target:self action:@selector(logOut:)]autorelease]; NSMutableArray * arr = [NSMutableArray arrayWithObjects:logoutButton, nil]; [[self navigationController] setToolbarHidden: NO animated:YES]; [[self navigationController] setToolbarItems:arr animated:YES]; }

    Read the article

  • Mobile web on nokia devices not displaying centain elements

    - by Jan de Jager
    So i have a site which is rendered with our in-house portal engine. It resizes images and adjusts style-sheets automatically in real-time. Issue is that some html elements are inexplicably disappearing due to what only can be described as HTML compatibility. But the problem is not consistent. And only seems to be an issue on some nokia devices. I have tried to install the Nokia Mobile Browser Emulator... but its the worst piece of software i have seen in my life... after 4 hours of installing and uninstalling different versions of JRE, i still can't get it to install. EDIT: Problem now residing at http://wiseguy.mobi/?PageID=657

    Read the article

  • Swift CMutablePointers in factories e.g. NewMusicSequence

    - by Gene De Lisa
    How do you use C level factory methods in Swift? Let's try using a factory such as NewMusicSequence(). OSStatus status var sequence:MusicSequence status=NewMusicSequence(&sequence) This errors out with "error: variable 'sequence' passed by reference before being initialized". Set sequence to nil, and you get EXC_BAD_INSTRUCTION. You can try being explicit like this: var sp:CMutablePointer<MusicSequence>=nil status=NewMusicSequence(sp) But then you get a bad access exception when you set sp to nil. If you don't set sp, you get an "error: variable 'sp' used before being initialized" Here's the reference.

    Read the article

  • How do you make life easier for yourself when developing a really large database

    - by Hannes de Jager
    I am busy developing 2 web based systems with MySql databases and the amount of tables/views/stored routines is really becoming a lot and it is more and more challenging to handle the complexity. Now in programming languages we have namespacing e.g. Java packages, C++ namespaces to partition the software, grouping it together to make things more understandable. Databases on the other hand have more of a flat structure (MySql at least) e.g. tables and stored procedures are on the same level. So one have to be more creative, creating naming conventions, perhaps use more than one database or using tools to visualize things. What methods do you use to ease the pain? To be effective while developing your databases? To not get lost in a sea of tables and fields and stored procs? Feel free to mention tools you use also, but try to restrict it to open source and preferably Linux solutions if thats OK. b.t.w How many tables would a database have to be considered large in terms of design?

    Read the article

  • Maven: Multiple class with the same path implemented in different jar

    - by Phuong Nguyen de ManCity fan
    I'm running into trouble with having multiple class with the same path (i.e. same name, same package!!!). For some reason, gwt-dev comes with its own version of org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory. At the same time, spring also depends on these classes but from different jar. I don't know what should be, but look like xalan & xml-api are the two dependencies that spring depends on (these dependency are optional) Funny thing is that eclipse can run the same code (it's a unit test) without problem, but surefire cannot. So I guess the problem is due to the way each runner consider the priority of each jar. Now come to the question: How can I setup my POM so that I can sure that when ever any code running inside my app, then class from a jar will be selected over class from other jar? Thanks.

    Read the article

  • SQL Server 2008 spatial index and CPU utilization with MapGuide Open Source 2.1

    - by Antonio de la Peña
    I have a SQL Server table with hundreds of thousands of geometry type parcels. I have made indexes on them trying different combinations of density and objects per cell settings. So far I'm settiling for LOW, LOW, MEDIUM, MEDIUM and 16 objects per cell and I made a SP that sets the bounding box according to the extents of the entities in the table. There is an incredible performance boost from queries taking almost minutes without index to less than seconds, it gets faster when the zoom is closer thus less objects are displayed. Yet the CPU utilization gets to 100% when querying for features, even when the queries themselves are fast. I'm worrying this will not fly in a production environment. I am using MapGuide Open Source 2.1 for this project, but I am positive the CPU load is caused by SQL Server. I wonder if my indexes are set properly. I haven't found any clear documentation on how to properly set them up. Every article I've read basically says "it depends..." but nothing specific. Do you have any recommendations for me, including books, articles? Thank you.

    Read the article

  • How to generate a PDF from a view using media=print for styles

    - by Riderman de Sousa Barbosa
    Most of the questions in stackoverflow or in other forums, show how to generate views and sends them by email. But my goal is to generate a PDF from a view with the media=print format and sends it in attachment by email. I have a view that displays a report. I use CSS Print to display this report in a print format. (Basically I display some elements and hide others). How can I generate a PDF from this view (with format media=print) and send it by e-mail in attachment. I am using ActionMailer to send emails and iTextSharp to generate PDFs

    Read the article

< Previous Page | 165 166 167 168 169 170 171 172 173 174 175 176  | Next Page >