Search Results

Search found 613 results on 25 pages for 'pdns troubles'.

Page 20/25 | < Previous Page | 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • coredata using old file version on device

    - by Martin KS
    This is a follow on from my previous problems here. Resetting the simulator solved all my troubles before, and I've gone on to complete my App. I now have the exact same problem when installing the app onto my iPhone device. It picks up an old version of my database, which doesn't have the second entity in it, and crashes when I try to access the second entity: 2010-04-22 23:52:18.860 albumCloud[135:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Image'' 2010-04-22 23:52:18.874 albumCloud[135:207] Stack: ( 843263261, 825818644, 820669213, 20277, 844154820, 16985, 14633, 844473760, 844851728, 862896011, 843011267, 843009055, 860901832, 843738160, 843731504, 11547, 11500 ) terminate called after throwing an instance of 'NSException' I have two questions: 1) How on earth do I delete my app thoroughly enough from my phone that it removes the old data? (I've so far tried regular app deletion, deleting and then holding home and power for a reboot, cursing at and threatening the app while running it... everything) 2) How do I prevent this happening when my application is in the App store, and I for some reason decide that I want to add another entity to the store, or another attribute to the existing entities? is there an "if x doesn't exist then create it" method?

    Read the article

  • Timeout error occurred trying to start MySQL Daemon. CentOS 5

    - by epema
    I ran into troubles with MySQL on my CentOS. I had some problems and backed up my database and removed mysql with all dependencies. After that I ran reinstalled: yum groupinstall "MySQL Database" Installed without errors. Running the mysql daemon: service mysqld start Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] I also ran # /usr/bin/mysql_install_db --user=mysql Installing MySQL system tables... 120112 1:49:44 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 480 error messages, but it should contain at least 481 error messages. Check that the above file is the right version for this program! 120112 1:49:44 [ERROR] Aborting Installation of system tables failed! Examine the logs in /var/lib/mysql for more information. You can try to start the mysqld daemon with: /usr/libexec/mysqld --skip-grant & and use the command line tool /usr/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/bin/mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in /var/lib/mysql that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the /usr/bin/mysqlbug script! Checking the logs: less /var/log/mysqld.log Log file is empty. I don't even know how to debug it and not sure what to do. Any recommendations? Thank you

    Read the article

  • AudioRecord problems with non-HTC devices

    - by Marc
    I'm having troubles using AudioRecord. An example using some of the code derived from the splmeter project: private static final int FREQUENCY = 8000; private static final int CHANNEL = AudioFormat.CHANNEL_CONFIGURATION_MONO; private static final int ENCODING = AudioFormat.ENCODING_PCM_16BIT; private int BUFFSIZE = 50; private AudioRecord recordInstance = null; ... android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO); recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, FREQUENCY, CHANNEL, ENCODING, 8000); recordInstance.startRecording(); short[] tempBuffer = new short[BUFFSIZE]; int retval = 0; while (this.isRunning) { for (int i = 0; i < BUFFSIZE - 1; i++) { tempBuffer[i] = 0; } retval = recordInstance.read(tempBuffer, 0, BUFFSIZE); ... // process the data } This works on the HTC Dream and the HTC Magic perfectly without any log warnings/errors, but causes problems on the emulators and Nexus One device. On the Nexus one, it simply never returns useful data. I cannot provide any other useful information as I'm having a remote friend do the testing. On the emulators (Android 1.5, 2.1 and 2.2), I get weird errors from the AudioFlinger and Buffer overflows with the AudioRecordThread. I also get a major slowdown in UI responsiveness (even though the recording takes place in a separate thread than the UI). Is there something apparent that I'm doing incorrectly? Do I have to do anything special for the Nexus One hardware?

    Read the article

  • How can I optimize retrieving lowest edit distance from a large table in SQL?

    - by Matt
    Hey, I'm having troubles optimizing this Levenshtein Distance calculation I'm doing. I need to do the following: Get the record with the minimum distance for the source string as well as a trimmed version of the source string Pick the record with the minimum distance If the min distances are equal (original vs trimmed), choose the trimmed one with the lowest distance If there are still multiple records that fall under the above two categories, pick the one with the highest frequency Here's my working version: DECLARE @Results TABLE ( ID int, [Name] nvarchar(200), Distance int, Frequency int, Trimmed bit ) INSERT INTO @Results SELECT ID, [Name], (dbo.Levenshtein(@Source, [Name])) As Distance, Frequency, 'False' As Trimmed FROM MyTable INSERT INTO @Results SELECT ID, [Name], (dbo.Levenshtein(@SourceTrimmed, [Name])) As Distance, Frequency, 'True' As Trimmed FROM MyTable SET @ResultID = (SELECT TOP 1 ID FROM @Results ORDER BY Distance, Trimmed, Frequency) SET @Result = (SELECT TOP 1 [Name] FROM @Results ORDER BY Distance, Trimmed, Frequency) SET @ResultDist = (SELECT TOP 1 Distance FROM @Results ORDER BY Distance, Trimmed, Frequency) SET @ResultTrimmed = (SELECT TOP 1 Trimmed FROM @Results ORDER BY Distance, Trimmed, Frequency) I believe what I need to do here is to.. Not dumb the results to a temporary table Do only 1 select from `MyTable` Setting the results right in the select from the initial select statement. (Since select will set variables and you can set multiple variables in one select statement) I know there has to be a good implementation to this but I can't figure it out... this is as far as I got: SELECT top 1 @ResultID = ID, @Result = [Name], (dbo.Levenshtein(@Source, [Name])) As distOrig, (dbo.Levenshtein(@SourceTrimmed, [Name])) As distTrimmed, Frequency FROM MyTable WHERE /* ... yeah I'm lost */ ORDER BY distOrig, distTrimmed, Frequency Any ideas?

    Read the article

  • I seek a PDF paginator

    - by Cameron Laird
    More precisely, I need software that will allow me to consume existing PDF instances, decorate them with page numbers, or page-number-like writing, then write them back to the filesystem. I'll happily pay for an application, or program it myself. I almost certainly require the software run under Linux (Ubuntu, more specifically). iText comes close. iText certainly can read existing PDF instances. While iText is, for this purpose, only a library, and requires me to program a tiny amount to specify where on the page the numbers should appear, I'm happy to do that. I hesitate with iText only because the latest iText license is a headache at certain government agencies (in practice, I'd probably request and pay for a special license), and because, over the last few years, I've observed cases where iText doesn't appear to keep up with the standard, that is, it has more troubles than I expect reading PDFs observed "in the wild". Similarly, every other possibility I know has at least one difficulty: ReportLab would likely require a disproportionate licensing fee for the small value it provides in this situation, and so on. This application requires no particular sophistication with Unicode, fonts, ... I recognize there are plenty of executables and libraries that do some or all of what I require. I welcome any tips on software that is reliable, generally current with PDF practice, flexible/programmable/configurable/..., and "automatable". In the absence of any new insight, I'll likely go with a specific open-source library I don't want to mention now for which I've already contracted enhancements, or perhaps revisit iText.

    Read the article

  • Passing PHP variables trough functions?

    - by Mateus Nunes
    I'm facing some troubles to pass php variables value trough functions,every time i try to use a variable inside one of my functions its value becomes nil,let me be more specific.I have the following code in my php file: $myvar = $Session['username']; function updateuserinformation(){ if(trim($_FILES["fileUpload"]["tmp_name"]) != ""){ $images = $_FILES["fileUpload"]["tmp_name"]; $new_images = "thumbnails_".$_FILES["fileUpload"]["name"]; copy($_FILES["fileUpload"]["tmp_name"],"Photos/".$_FILES["fileUpload"]["name"]); $width=200; //*** Fix Width & Heigh (Autu caculate) ***// $size=GetimageSize($images); $height=round($width*$size[1]/$size[0]); $images_orig = ImageCreateFromJPEG($images); $photoX = ImagesX($images_orig); $photoY = ImagesY($images_orig); $images_fin = ImageCreateTrueColor($width, $height); ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY); ImageJPEG($images_fin,"Photos/".$new_images); ImageDestroy($images_orig); ImageDestroy($images_fin); print $data["foo"]; echo"$myvar"; mysql_query("UPDATE users SET userpictureaddress = 'http://www.litsdevelopment.com/litsapplication/userimages/MATEUS' WHERE username = 'Mateus' "); } } I trying to use the $myvar value in my function but every time i run the code it just doesn't work,i've already tried global,globals,arrays and session for nothing worked.Of corse i'm making a little mistake in some part of it,but anyone know what is the correct way to do this?

    Read the article

  • Problem Render backbone collection using Mustache template

    - by RameshVel
    I am quite new to backbone js and Mustache. I am trying to load the backbone collection (Object array) on page load from rails json object to save the extra call . I am having troubles rendering the backbone collection using mustache template. My model & collection are var Item = Backbone.Model.extend({ }); App.Collections.Items= Backbone.Collection.extend({ model: Item, url: '/items' }); and view App.Views.Index = Backbone.View.extend({ el : '#itemList', initialize: function() { this.render(); }, render: function() { $(this.el).html(Mustache.to_html(JST.item_template(),this.collection )); //var test = {name:"test",price:100}; //$(this.el).html(Mustache.to_html(JST.item_template(),test )); } }); In the above view render, i can able to render the single model (commented test obeject), but not the collections. I am totally struck here, i have tried with both underscore templating & mustache but no luck. And this is the Template <li> <div> <div style="float: left; width: 70px"> <a href="#"> <img class="thumbnail" src="http://placehold.it/60x60" alt=""> </a> </div> <div style="float: right; width: 292px"> <h4> {{name}} <span class="price">Rs {{price}}</span></h4> </div> </div> </li> and my object array kind of looks like this

    Read the article

  • How to display many SVGs in Java with high performance

    - by Oak
    What I want My goal is to be able to display a large number of SVG images on a single drawing area in Java, each with its own translation/rotation/scale values. I'm looking for the simplest solution allowing this, optionally even using OpenGL to speed things up. What I've Tried My initial naive approach was to use SVGSalamander to draw directly on a JPanel, but the performance was pathetic. I poked around around and learned that I should do something like manually convert each SVG into a BufferedImage created with createCompatibleImage, then do the transformations I want, then draw it using double buffering. I ran into some troubles here, and before I continued I tried looking for frameworks to simplify things. What I've Looked At I've been a bit overwhelmed by the available options, which is why I'm turning to SO for help. I've looked at: Cairo (with Glitz maybe?) Libart - not sure if this actually supports SVGs FengGUI Slick - looks promising but a bit of an overkill But couldn't decide what is best for me to start working with, and I hope someone here as experience with any of these doing similar things.

    Read the article

  • Reversible numerical calculations in Prolog

    - by user8472
    While reading SICP I came across logic programming chapter 4.4. Then I started looking into the Prolog programming language and tried to understand some simple assignments in Prolog. I found that Prolog seems to have troubles with numerical calculations. Here is the computation of a factorial in standard Prolog: f(0, 1). f(A, B) :- A > 0, C is A-1, f(C, D), B is A*D. The issues I find is that I need to introduce two auxiliary variables (C and D), a new syntax (is) and that the problem is non-reversible (i.e., f(5,X) works as expected, but f(X,120) does not). Naively, I expect that at the very least C is A-1, f(C, D) above may be replaced by f(A-1,D), but even that does not work. My question is: Why do I need to do this extra "stuff" in numerical calculations but not in other queries? I do understand (and SICP is quite clear about it) that in general information on "what to do" is insufficient to answer the question of "how to do it". So the declarative knowledge in (at least some) math problems is insufficient to actually solve these problems. But that begs the next question: How does this extra "stuff" in Prolog help me to restrict the formulation to just those problems where "what to do" is sufficient to answer "how to do it"?

    Read the article

  • Numerical calculations in Prolog

    - by user8472
    While reading SICP I came across logic programming chapter 4.4. Then I started looking into the Prolog programming language and tried to understand some simple assignments in Prolog. I found that Prolog seems to have troubles with numerical calculations. Here is the computation of a factorial in standard Prolog: f(0, 1). f(A, B) :- A > 0, C is A-1, f(C, D), B is A*D. The issues I find is that I need to introduce two auxiliary variables (C and D), a new syntax (is) and that the problem is non-reversible (i.e., f(5,X) works as expected, but f(X,120) does not). Naively, I expect that at the very least C is A-1, f(C, D) above may be replaced by f(A-1,D), but even that does not work. My question is: Why do I need to do this extra "stuff" in numerical calculations but not in other queries? I do understand (and SICP is quite clear about it) that in general information on "what to do" is insufficient to answer the question of "how to do it". So the declarative knowledge in (at least some) math problems is insufficient to actually solve these problems. But that begs the next question: How does this extra "stuff" in Prolog help me to restrict the formulation to just those problems where "what to do" is sufficient to answer "how to do it"?

    Read the article

  • How to implement a Client-side Ajax Login on Asp.Net MVC (A link to the solution for Asp.Net Webform

    - by Matt
    Hi, I'm trying to implement a client-side ajax login on Asp.Net MVC. I used to have this set up just fine on WebForms, but now that I've moved to MVC it's giving me some troubles. If you'd like a tutorial on Client-side Ajax Login for Asp.Net Webforms, it can be found here -- Easy, A++ Now... for some reason it's not working for Asp.Net MVC. I used the exact same tutorial as for the Webforms, except when it executes the ssa.login() (equivalently: Sys.Services.AuthenticationService.login()) it's not doing anything. I have alerts in both the onLoginComplete() function and the onError() function. As well I have an alert before the ssa.login gets called and right after... function loginHandler() { var username = $("#login_UserName").val(); var password = $("#login_Password").val(); var isPersistent = $("#login_RememberMe").attr("checked"); var customInfo = null; var redirectUrl = null; // Log them in. alert("try login"); ssa.login(username, password, isPersistent, customInfo, redirectUrl, onLoginComplete, onError); alert("made it here"); } The first alert fires but the second one doesn't which means the function is failing. Here's the function I pulled from Asp.Net Ajax to show you: function(c, b, a, h, f, d, e, g) { this._invoke(this._get_path(), "Login", false, { userName: c, password: b, createPersistentCookie: a }, Function.createDelegate(this, this._onLoginComplete), Function.createDelegate(this, this._onLoginFailed), [c, b, a, h, f, d, e, g]); } Anyone have any idea of why it's failing?

    Read the article

  • ASP MVC: E-mail Verification (Encrypting the activation link)

    - by wh0emPah
    Okay i'm a little bit stuck on how to solve this problem. When a user registers. I want to send him a link so that he can verify hes email address. But i have troubles generating the link. I've already written the controller to accept the links with the correct keys. i only have no idea on how to generate the activation keys. So when the user registers i'll send him a link by mail like this: Your activation link is : http://site.com/user/verify?key=keyhere Now i have created this method (called by the controller/action) to handle the key in the link: public string Verify(string value) { String email = Decrypt(value); user u = gebRep.GetUsers().WithEmail(email).SingleOrDefault(); if (u != null) { u.emailValid = true; userReppository.Save(); } return "Invallid validation value!"; } Now my problem is I have no idea on how to encrypt and decrypt the email into some sort of key (url friendly) So i can mail it with the link and can use it to verify the email. I need some kind of (not to complicated but secure) way to encrypt the email into a urlfriendly key. Tyvm

    Read the article

  • Refactoring or Rewriting Monolithic PHP Spaghetti Codebase

    - by nategood
    I've inherited a really poorly designed PHP spaghetti code project. It's been gaining a good bit of traffic recently and is starting to have performance issues on top of the poor monolithic code base. Its maxing out performance on a chunky 16GB dedicated machine when it really shouldn't be. I'm planning on doing some performance tweaks right off the bat to help the performance issue, but this still won't really help the horrible code base. The team is small but expecting to grow very soon. I've read Joel's article on the troubles of doing a complete rewrite and see the concerns. But how bad does the code base have to be before you consider a rewrite? There is PHP handling logic interjected into what one would usually consider a "view". Even worse, in some places SQL statements are in these same files! The only real separation of presentation and logic are a few PHP scripts that serve as function libraries. These scripts do most of the ORM stuff... if you can even call it that. Trying to slowly refractor this seems like a nightmare. Open to your thoughts and opinions... however not interested in hearing, "Run away, Run away!".

    Read the article

  • How do you tell that your unit tests are correct?

    - by Jacob Adams
    I've only done minor unit testing at various points in my career. Whenever I start diving into it again, it always troubles me how to prove that my tests are correct. How can I tell that there isn't a bug in my unit test? Usually I end up running the app, proving it works, then using the unit test as a sort of regression test. What is the recommended approach and/or what is the approach you take to this problem? Edit: I also realize that you could write small, granular unit tests that would be easy to understand. However, if you assume that small, granular code is flawless and bulletproof, you could just write small, granular programs and not need unit testing. Edit2: For the arguments "unit testing is for making sure your changes don't break anything" and "this will only happen if the test has the exact same flaw as the code", what if the test overfits? It's possible to pass both good and bad code with a bad test. My main question is what good is unit testing since if your tests can be flawed you can't really improve your confidence in your code, can't really prove your refactoring worked, and can't really prove that you met the specification?

    Read the article

  • I'm having an issue to use GLshort for representing Vertex, and Normal.

    - by Xylopia
    As my project gets close to optimization stage, I notice that reducing Vertex Metadata could vastly improve the performance of 3D rendering. Eventually, I've dearly searched around and have found following advices from stackoverflow. Using GL_SHORT instead of GL_FLOAT in an OpenGL ES vertex array How do you represent a normal or texture coordinate using GLshorts? Advice on speeding up OpenGL ES 1.1 on the iPhone Simple experiments show that switching from "FLOAT" to "SHORT" for vertex and normal isn't tough, but what troubles me is when you're to scale back verticies to their original size (with glScalef), normals are multiplied by the reciprocal of the scale. Natural remedy for this is to multiply the normals w/ scale before you submit to GPU. Then, my short normals almost become 0, because the scale factor is usually smaller than 0. Duh! How do you use "short" for both vertex and normal at the same time? I've been trying this and that for about a full day, but I could only go for "float vertex w/ byte normal" or "short vertex w/ float normal" so far. Your help would be truly appreciated.

    Read the article

  • problem with implementing a simple work queue

    - by John Deerikio
    Hi all, I am having troubles with implementing a simple work queue. Doing some analysis, I am facing a subtle problem. The work queue is backed by a regular linked list. The code looks like this (simplified): 0. while (true) 1. while (enabled == true) 2. acquire lock on the list and get the next action to be executed (blocking operation) (store it in a local variable) 3. execute the action (outside the lock on the list on previous line) 4. get lock on this work queue 5. wait until this work queue has been notified (triggered when setEnabled(true) has been callled) The setEnabled(e) operation looks like this (simplified): enabled = e if (enabled == true) acquire lock on this work queue and do notify() Although this works, there is a condition in which a deadlock occurs. It happens in the following rare situation: while an action is being executed, setEnabled(false) is called just before step (4) is entered, setEnabled(true) is called now step (5) keeps waiting forever, because this work queue has already been notified How do I solve this? I have been looking at this for some time, but I cannot come up with a solution. Please note I am fairly new to thread synchronization. Thanks a lot.

    Read the article

  • Django extending user model and displaying form

    - by MichalKlich
    Hello, I am writing website and i`d like to implement profile managment. Basic thing would be to edit some of user details by themself, like first and last name etc. Now, i had to extend User model to add my own stuff, and email address. I am having troubles with displaying form. Example will describe better what i would like achieve. This is mine extended user model. class UserExtended(models.Model): user = models.ForeignKey(User, unique=True) kod_pocztowy = models.CharField(max_length=6,blank=True) email = models.EmailField() This is how my form looks like. class UserCreationFormExtended(UserCreationForm): def __init__(self, *args, **kwargs): super(UserCreationFormExtended, self).__init__(*args, **kwargs) self.fields['email'].required = True self.fields['first_name'].required = False self.fields['last_name'].required = False class Meta: model = User fields = ('username', 'first_name', 'last_name', 'email') It works fine when registering, as i need allow users to put username and email but when it goes to editing profile it displays too many fields. I would not like them to be able to edit username and email. How could i disable fields in form? Thanks for help.

    Read the article

  • NLB and Web Deploy

    - by asgerhallas
    I have two webservers in a cluster serving a web application. Using MS Web Deploy to push a new version of the application to one server, and then again to synchronize the files to the other server in the cluster. It seems to be the most ordinary thing to do. But wouldn't there be a problemm, when one server is deployed with the new version, and the other is not yet finished. Will it not cause troubles, when a page loaded with the new version makes a webservice request and the balancer sends the request to the server with the old version? What's the best way to avoid this? I thought about scripting a drainstop of the server, that we deploy to, and make sure only one server is running at a time. But I can't find anyone else, who seems to have written about such a solution. And guess that it doesn't scale very well too. Another solution could be to shut down all servers when updating. But that doesn't seems very clever. Any suggestions?

    Read the article

  • Linq to SQL - Failing to update

    - by Isaac
    Hello, I'm having some troubles with updating linq to sql entities. For some reason, I can update every single field of my item entity besides name. Here are two simple tests I wrote: [TestMethod] public void TestUpdateName( ) { using ( var context = new SimoneDataContext( ) ) { Item item = context.Items.First( ); if ( item != null ) { item.Name = "My New Name"; context.SubmitChanges( ); } } } [TestMethod] public void TestUpdateMPN( ) { using ( var context = new SimoneDataContext( ) ) { Item item = context.Items.First( ); if ( item != null ) { item.MPN = "My New MPN"; context.SubmitChanges( ); } } } Unfortunately, TestUpdateName() fails with the following error: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'WHERE'.. And here's the outputted SQL: UPDATE [dbo].[Items] SET WHERE ([Id] = @p0) AND ([CategoryId] = @p1) AND ([MPN] = @p2) AND ([Height] = @p3) AND ([Width] = @p4) AND ([Weight] = @p5) AND ([Length] = @p6) AND ([AdministrativeCost] = @p7) -- @p0: Input Int (Size = 0; Prec = 0; Scale = 0) [1] -- @p1: Input Int (Size = 0; Prec = 0; Scale = 0) [1] -- @p2: Input VarChar (Size = 10; Prec = 0; Scale = 0) [My New MPN] -- @p3: Input Decimal (Size = 0; Prec = 5; Scale = 3) [30.000] -- @p4: Input Decimal (Size = 0; Prec = 5; Scale = 3) [10.000] -- @p5: Input Decimal (Size = 0; Prec = 5; Scale = 3) [40.000] -- @p6: Input Decimal (Size = 0; Prec = 5; Scale = 3) [30.000] -- @p7: Input Money (Size = 0; Prec = 19; Scale = 4) [350.0000] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.4926 As you can see, no update is being generated (SET is empty ...) I have no clue why is this happening. And already in advance ... YES, the table Item has a PK (Id). Thank you in advance!

    Read the article

  • When an NSWindow object has a delegate that is a NSWindow subclass, who is responsible to act on received events?

    - by spade78
    So I'm building a program that features the use of the IKImageBrowserView component as a subview in an NSWindow. As a side note, I have a controller object called ImageBrowserController which subclasses NSWindow and is set as the delegate of the NSWindow object of my app. I have sent IKImageBrowserView the message setCanControlQuickLookPanel:YES to enable it to automatically use the QuickLook functionality to preview image files when the IKImageBrowserView is a first responder to receive key events. Then it took me a while to figure out how to make the IKImageBrowserView a first responder which I finally got working by overriding acceptsFirstResponder inside my ImageBrowserController. Now I understand that as the delegate to the NSWindow, ImageBrowserController has a place in the responder chain after the event gets triggered on NSWindow. And I understand that as a subview of NSWindow, IKImageBrowserView is in line to be passed events for event handling. What I don't get is where the connection is between the ImageBrowserController being a first responder and the event somehow making it to the IKImageBrowserView. I didn't set NSWindow or IKImageBrowserView as first responders explicitly. So why isn't it necessary for me to implement event handling inside my ImageBrowserController? EDIT: So after reading the accepted answer and going back to my code I tried removing the acceptsFirstResponder override in my ImageBrowserController and the QuickLook functionality still triggered just like the accepted answer said it would. Commenting out the setCanControlQuickLookPanel:YES made the app beep at me when I tried to invoke QuickLook functionality via the spacebar. I'm getting the feeling that my troubles were caused by user error of XCode in hitting the RUN button instead of the BUILD button after making changes to my code (sigh).

    Read the article

  • How to make use of Grails Dependencies in your IDE

    - by raoulsson
    Hi All, So I finally got my dependencies working with Grails. Now, how can my IDE, eg IntelliJ or Eclipse, take advantage of it? Or do I really have to manually manage what classes my IDE knows about at "development time"? If the BuildConfig.groovy script is setup right (see here), you will be able to code away with vi or your favorite editor without any troubles, then run grails compile which will resolve and download the dependencies into the Ivy cache and off you go... If, however, you are using an IDE like Eclipse or IntelliJ, you will need the dependencies at hand while coding. Obviously - as these animals will need them for the "real time" error detection/compilation process. Now, while it is certainly possible to code with all the classes shining up in bright red all over the place that are unknown to your IDE, it is certainly not much fun... The Maven support or whatever it is officially called lives happily with the pom file, no extra "jar directory" pointers needed, at least in IntelliJ. I would like to be able to do the same with Grails dependencies. Currently I am defining them in the BuildConfig.groovy and additionally I copy/paste the current jars around on my local disk and let the IDE point to it. Not very satisfactory, as I am working in a highly volatile project module environment with respect to code change. And this situation ports me directly into "jar hell", as my "develop- and build-dependencies" easily get out of sync and I have to manage manually, that is, with my brain... And my brain should be busy with other stuff... Thanks! Raoul P.S: I'm currently using Grails 1.2M4 and IntelliJ 92.105. But feel free to add answers on future versions of Grails and different, future IDEs, as the come in...

    Read the article

  • Why doesn't access database update?

    - by Ryan
    Recently I met a strange problem, see code snips as below: var sqlCommand: string; connection: TADOConnection; qry: TADOQuery; begin connection := TADOConnection.Create(nil); try connection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.MDB;Persist Security Info=False'; connection.Open(); qry := TADOQuery.Create(nil); try qry.Connection := connection; qry.SQL.Text := 'Select * from aaa'; qry.Open; qry.Append; qry.FieldByName('TestField1').AsString := 'test'; qry.Post; beep; finally qry.Free; end; finally connection.Free; end; end; First, Create a new access database named test.mdb and put it under the directory of this test project, we can create a new table named aaa in it which has only one text type field named TestField1. We set a breakpoint at line of "beep", then lunch the test application under ide debug mode, when ide stops at the breakpoint line (qry.post has been executed), at this time we use microsoft access to open test.mdb and open table aaa you will find there are no any changes in table aaa, if you let the ide continue running after pressing f9 you can find a new record is inserted in to table aaa, but if you press ctrl+f2 to terminate the application at the breakpoint, you will find the table aaa has no record been inserted, but in normal circumstance, a new record should be inserted in to the table aaa after qry.post executed. who can explain this problem , it troubles me so long time. thanks !!! BTW, the ide is delphi 2010, and the access mdb file is created by microsoft access 2007 under windows 7

    Read the article

  • Lambda Functions in PHP aren't Logical

    - by Chacha102
    Note: I have condensed this article into my person wiki: http://wiki.chacha102.com/Lambda - Enjoy I am having some troubles with Lambda style functions in PHP. First, This Works: $foo = function(){ echo "bar"; }; $foo(); Second, This Works: class Bar{ public function foo(){ echo "Bar"; } Third, This works: $foo = new stdClass; $foo->bar = function(){ echo "bar"; }; $test = $foo->bar; $test(); But, this does not work: $foo = new stdClass; $foo->bar = function(){ echo "bar"; }; $foo->bar(); And, this does not work class Bar{ public function foo(){ echo "Bar"; } $foo = new Bar; $foo->foo = function(){ echo "foo"; }; $foo->foo(); // echo's bar instead of Foo. My Question is Why?, and how can I assure that both this: $foo->bar = function(){ echo "test"; }; $foo->bar(); and this $foo = new Bar; $foo->bar(); are called properly? Extra Points if you can point to documentation stating why this problem occurs.

    Read the article

  • Problem with function calls [javascript]

    - by Samuel
    <script language="javascript"> function toggle(id) { alert('call'); if (document.getElementById(id).style.display == "none") { alert('now visible'); document.getElementById(id).style.display = ""; } else { alert('now invisible'); document.getElementById(id).style.display = "none"; } } </script> </head> <body onload="toggle('image1');alert('test_body');toggle('image2')"> <script language="javascript"> alert('test_pre_function'); toggle('image1'); alert('test_after_function'); toggle('image2'); </script> Looks like a lot of code but it's pretty simple so i think most of you won't have troubles with it. toggle() should toggle the display status of divs containing images. When the user enters the site the divs should hide, when everything is loaded the divs should show up. (onload) Strangely enough, the funtion in the body (not in the body tag) only work half, i get and alert 'test_pre_function' and i get an alert 'call' (out of the function), but that's it. The code in the body tag runs just fine. I find this weird because it's supposed to do exactly the same twice and one time it runs, another time not, so i guess i must have made some stupid mistake. Thanks for any help!

    Read the article

  • MSI install sequence - run DB scripts before services start

    - by marc_s
    Folks, we're running into some sequencing troubles with our MSI install. As part of our app, we install a bunch of services and allow the user to pick whether to start them right away or later. When they start right away, they seem to start too early in the install sequence - before our database manager had a chance to update the database. Right now, our custom action to run the database updater looks like this - it's being run after "InstallFinalize" - very late in the process. <InstallExecuteSequence> <RemoveExistingProducts After='InstallInitialize' /> <Custom Action='RunDbUpdateManagerAction' After='InstallFinalize'> DbUpdateManager=3</Custom> </InstallExecuteSequence> What would be the more appropriate step to run after or before, to make sure the DB scripts are executed before any of the installed services start up? Is there a "BeforeServiceStart" step? EDIT: Just defining the "Before='StartServices'" attribute on the tag didn't solve my problem. I am assuming the issue is this: the custom action has an "inner text", which represents a condition, and this condition is: "&DbUpdateManager=3". From what I can deduce from trial & error, this probably means "the DbUpdateManager feature must be published". Now, trouble is: "PublishFeature" comes way at the end in the install sequence, just before "InstallFinalize", and definitely AFTER InstallServices / StartServices. So when I specify the "Before=StartServices" requirement, the condition "DbUpdateManager feature must be published" isn't true yet, so the DbUpdateManager doesn't get executed :-( I tried removing the condition - in that case, my DbUpdateManager sometimes doesn't execute at all, sometimes more than once - no real clear pattern as to what happens when..... Any more ideas?? Is there a way I could check for a condition "the DbUpdateManager feature is installed" which would be true after the "InstallFiles" step?? Marc

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25  | Next Page >