Search Results

Search found 22653 results on 907 pages for 'robert may'.

Page 13/907 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Glassfish V3 SSL configuration CipherSuites may not be null at

    - by abc
    I have configured SSL with glassfish V3 i have followed this http://javadude.wordpress.com/2010/04/06/getting-started-with-glassfish-v3-and-ssl/ but now on console i am getting following exception constantly but on front end it works fine. SEVERE: ProtocolChain exception java.lang.IllegalArgumentException: CipherSuites may not be null at com.sun.net.ssl.internal.ssl.CipherSuiteList.(CipherSuiteList.java:58) at com.sun.net.ssl.internal.ssl.SSLEngineImpl.setEnabledCipherSuites(SSLEngineImpl.java:1696) at com.sun.grizzly.filter.SSLReadFilter.newSSLEngine(SSLReadFilter.java:358)

    Read the article

  • Vaadin - GWT error "module xxx may need to be recompiled

    - by John Leonard
    I'm ramping up on Vaadin and I'm getting this javascript alert whenever I try and run the demo apps. GWT module 'com.vaadin.terminal.gwt.DefaultWidgetSet' may need to be recompiled I've tried cleaning the project to no avail. As I said, I'm ramping up so I'm sure there's some simple step I'm missing or a concept I haven't grasped.

    Read the article

  • Update fails to Install

    - by FirmTech
    I get the below error when I try to install updates using Software Updater: Not enough free disk space The upgrade needs a total of 81.3 M free space on disk '/boot'. Please free at least an additional 15.9 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'. What should I do? firmtechnologies@FirmTechnologies:~$ (ls -l /boot) total 155801 -rw-r--r-- 1 root root 1158016 May 3 01:30 abi-3.13.0-24-generic -rw-r--r-- 1 root root 1161713 May 8 01:31 abi-3.13.0-26-generic -rw-r--r-- 1 root root 1161713 May 15 20:07 abi-3.13.0-27-generic -rw-r--r-- 1 root root 1161764 Jun 4 22:57 abi-3.13.0-29-generic -rw-r--r-- 1 root root 165510 May 3 01:30 config-3.13.0-24-generic -rw-r--r-- 1 root root 165538 May 8 01:31 config-3.13.0-26-generic -rw-r--r-- 1 root root 165521 May 15 20:07 config-3.13.0-27-generic -rw-r--r-- 1 root root 165544 Jun 4 22:57 config-3.13.0-29-generic drwxr-xr-x 5 root root 1024 Jun 6 14:31 grub -rw-r--r-- 1 root root 29091568 May 7 21:31 initrd.img-3.13.0-24-generic -rw-r--r-- 1 root root 29094684 May 12 12:24 initrd.img-3.13.0-26-generic -rw-r--r-- 1 root root 29095678 May 18 10:57 initrd.img-3.13.0-27-generic -rw-r--r-- 1 root root 29093700 Jun 6 14:32 initrd.img-3.13.0-29-generic drwx------ 2 root root 12288 Apr 30 17:11 lost+found -rw-r--r-- 1 root root 176500 Mar 12 13:31 memtest86+.bin -rw-r--r-- 1 root root 178176 Mar 12 13:31 memtest86+.elf -rw-r--r-- 1 root root 178680 Mar 12 13:31 memtest86+_multiboot.bin -rw------- 1 root root 3372643 May 3 01:30 System.map-3.13.0-24-generic -rw------- 1 root root 3377429 May 8 01:31 System.map-3.13.0-26-generic -rw------- 1 root root 3377429 May 15 20:07 System.map-3.13.0-27-generic -rw------- 1 root root 3378267 Jun 4 22:57 System.map-3.13.0-29-generic -rw------- 1 root root 5776416 May 3 01:30 vmlinuz-3.13.0-24-generic -rw------- 1 root root 5790912 May 8 01:30 vmlinuz-3.13.0-26-generic -rw------- 1 root root 5790912 May 15 20:07 vmlinuz-3.13.0-27-generic -rw------- 1 root root 5792544 Jun 4 22:57 vmlinuz-3.13.0-29-generic

    Read the article

  • Failed to launch simulated application: iPhone Simulator failed to find the process ID of com.iAndAp

    - by Nicsoft
    Hello, I'm having this annoyning problem giving this message in the console: Failed to launch simulated application: iPhone Simulator failed to find the process ID of com.iAndApp.BlockPop. When trying to Build and Run, the application builds fine. The simulator starts but doesn't start the application. However, it manages to do something since the icon for the app is installed in the simulator. I have been searching to find the answer and tried a couple of things, none that worked. This happens for both new and old projects. I.e. when I create a new project I will receive the same error message. I've tried several projects of which all get the same error, so it's not related to the code (and successful builds proves it). Among other things I have updated to xCode 3.2.2. in order to try to solve the problem. Using Mac OSX 10.6.3. Here are the logs: 1. 2010-05-30 17.20.39 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.20.40 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.20.40 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.20.40 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.20.40 SpringBoard[15713] Can't find the translation dictionary, loadTranslationDictionaries 2010-05-30 17.20.40 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.20.40 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.20.41 SpringBoard[15713] Launchd returned an unexpected type or didn't return a value for job label UIKitApplication:com.iAndApp.BlockPop[0x8abd] with job key PID 2010-05-30 17.20.41 SpringBoard[15713] Unable to create CFServerConnection. Telephony state may be incorrect. 2010-05-30 17.21.10 Xcode[15496] Error launching simulated application: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x200edcc00 "iPhone Simulator failed to find the process ID of com.iAndApp.BlockPop." 2. Form system.log May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: a0bc84e0 init_simulator_paths: No simulator root specified. Falling back to environment variable. May 30 17:20:39: --- last message repeated 5 times --- May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 init_simulator_paths: No simulator root specified. Falling back to environment variable. May 30 17:20:39: --- last message repeated 1 time --- May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 load_application_info: Could not load signer identity from /Users/Niklas/Library/Application Support/iPhone Simulator/3.0/Applications/1CD7E4BA-14D3-45A5-A05E-E552C04BCD4D/BlockPopLite.app/BlockPopLite May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 load_application_info: Could not load signer identity from /Users/Niklas/Library/Application Support/iPhone Simulator/3.0/Applications/62585F19-5FAD-4548-89DF-C9AE621FCCD7/SysSound.app/SysSound May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 load_application_info: Could not load signer identity from /Users/Niklas/Library/Application Support/iPhone Simulator/3.0/Applications/81AA51A5-7BFC-442F-BFF8-91E9C6EF13CD/BlockPop.app/BlockPop May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0103000 load_application_info: Could not load signer identity from /Users/Niklas/Library/Application Support/iPhone Simulator/3.0/Applications/A2DCBF96-8F15-4527-BDF1-BD90B34D401C/BlockPop.app/BlockPop May 30 17:20:39 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 init_simulator_paths: No simulator root specified. Falling back to environment variable. May 30 17:20:39: --- last message repeated 1 time --- May 30 17:20:39 Niklas-Johanssons-Mac-mini SpringBoard[15713]: Unable to create CFServerConnection. Telephony state may be incorrect. May 30 17:20:40 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 init_simulator_paths: No simulator root specified. Falling back to environment variable. May 30 17:20:40: --- last message repeated 1 time --- May 30 17:20:40 Niklas-Johanssons-Mac-mini SpringBoard[15713]: Unable to create CFServerConnection. Telephony state may be incorrect. May 30 17:20:40: --- last message repeated 2 times --- May 30 17:20:40 Niklas-Johanssons-Mac-mini SpringBoard[15713]: Can't find the translation dictionary, loadTranslationDictionaries May 30 17:20:40 Niklas-Johanssons-Mac-mini mobile_installationd[15712]: b0081000 init_simulator_paths: No simulator root specified. Falling back to environment variable. May 30 17:20:40: --- last message repeated 3 times --- May 30 17:20:40 Niklas-Johanssons-Mac-mini SpringBoard[15713]: Unable to create CFServerConnection. Telephony state may be incorrect. May 30 17:20:41: --- last message repeated 1 time --- May 30 17:20:41 Niklas-Johanssons-Mac-mini SpringBoard[15713]: Launchd returned an unexpected type or didn't return a value for job label UIKitApplication:com.iAndApp.BlockPop[0x8abd] with job key PID May 30 17:20:41 Niklas-Johanssons-Mac-mini SpringBoard[15713]: Unable to create CFServerConnection. Telephony state may be incorrect. May 30 17:21:10 Niklas-Johanssons-Mac-mini Xcode[15496]: Error launching simulated application: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x200edcc00 "iPhone Simulator failed to find the process ID of com.iAndApp.BlockPop." Where do I start? I am really stuck and would be most greatful for any help!

    Read the article

  • Method may fail to close stream on exception

    - by 01
    I get the critical error with finbugs The method creates an IO stream object, does not assign it to any fields, pass it to other methods, or return it, and does not appear to close it on all possible exception paths out of the method. This may result in a file descriptor leak. It is generally a good idea to use a finally block to ensure that streams are closed. try { ... stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); ... } catch (IOException e) { throw new RuntimeException(e); } finally { try { if (stdInput != null) { stdInput.close(); } if (stdError != null) { stdError.close(); } } catch (IOException e) { throw new RuntimeException(e); } } do i need to close also InputStreamReader or p.getErrorStream(it returns InputStream) ??

    Read the article

  • mutating, trigger/function may not see it- error during execution of trigger

    - by mahesh soni
    CREATE OR REPLACE TRIGGER UPDATE_TEST_280510 AFTER insert on TEST_TRNCOMPVISIT declare V_TRNCOMPNO NUMBER(10); CURSOR C1 IS SELECT B.COMPNO FROM TEST_TRNCOMPVISIT A, TEST_TRNCOMPMST B, TEST_MEMMAST C WHERE A.COMPNO=B.COMPNO AND B.TRNMEMID=C.MEMID AND C.MEMOS=1000; begin open c1; fetch c1 into V_TRNCOMPNO; UPDATE TEST_TRNCOMPMST SET COMPSTATUS='P', remark='comp is pending due to O/S1000' WHERE COMPNO=V_TRNCOMPNO AND COMPSTATUS='C'; CLOSE C1; end; I have made this trigger and while insert the row in table- TEST_TRNCOMPVISIT it gives following error- The following error has occurred: ORA-04091: table TEST.TEST_TRNCOMPVISIT is mutating, trigger/function may not see it ORA-06512: at "TEST.UPDATE_TEST_280510", line 4 ORA-06512: at "TEST.UPDATE_TEST_280510", line 10 ORA-04088: error during execution of trigger 'TEST.UPDATE_TEST_280510' Kindly suggest over this. MaheshA.....

    Read the article

  • Clearing "may not respond" warnings for UIView and UIViewController

    - by user284681
    In an iPad app, I'm using a custom subclass of UIView with UIViewController. Here's the view header: @interface pdfView : UIView { CGPDFDocumentRef doc; } -(void)setDoc:(CGPDFDocumentRef)newDoc; @end And here's the controller header: @interface iPadPDFTestViewController : UIViewController { CGPDFDocumentRef doc; } - (void)loadPDF; @end Part of the controller implementation: - (void)viewDidLoad { [super viewDidLoad]; [self loadPDF]; [self.view setDoc:doc]; } In Interface Builder, I've set the view object to use the class pdfView. At compilation, [self.view setDoc:doc]; gives the warning "'UIView' may not respond to '--setDoc'." I'm guessing that this warning appears because the compiler thinks it's looking at UIView (which does not implement the setDoc method) instead of pdfView. But why does it think that? And how can I tell it what class it's really looking at, so as to clear the warning?

    Read the article

  • Unable to reverse seemingly simple rails migration - getting "altered_table.column may not be NULL"

    - by brad
    I have a table 'invoices' in my development database (sqlite3) populated with a small amount of test data. I wanted to add a column 'invoice_number' to it and set up a migration like so: class AddInvoiceNumberColumnToInvoices < ActiveRecord::Migration def self.up add_column :invoices, :invoice_number, :integer end def self.down remove_column :invoices, :invoice_number end end I ran rake db:migrate and it seemed to migrate just fine. However, when I tried to access this column through ActiveRecord it didn't seem to be there. I decided to undo this migration and try again (not sure what I was going to try but I thought I'd start by undoing it) with rake db:migrate VERSION='whatever_the_migration_before_this_one_was_called'. This failed with the error message == AddInvoiceNumberColumnToInvoices: reverting =============================== -- remove_column(:invoices, :invoice_number) rake aborted! An error has occurred, this and all later migrations canceled: altered_invoices.invoice_number may not be NULL I can't find any documentation of this error. Is anyone able to explain what I have done wrong, and more importantly how I can fix this?

    Read the article

  • "SecondViewController" may not respond to '-updatePlayerQueueWithMedia:' Messages without a matching

    - by Pavan
    I don't understand whats happening I get a warning that says "SecondViewController" may not respond to '-updatePlayerQueueWithMedia:' Messages without a matching signature will be assumed to return 'id' and accept '...' as arguments. this is my method - (void)mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection { [self dismissModalViewControllerAnimated: YES]; [self updatePlayerQueueWithMediaCollection: mediaItemCollection]; } And the actual method which ive written in the same page is - (void) updatePlayerQueueWithMediaCollection: (MPMediaItemCollection *) mediaItemCollection { //and shit happens here. } I don't understand whats happening can someone please help me get rid of this warning.

    Read the article

  • Efficient JSON encoding for data that may be binary, but is often text

    - by Evgeny
    I need to send a JSON packet across the wire with the contents of an arbitrary file. This may be a binary file (like a ZIP file), but most often it will be plain ASCII text. I'm currently using base64 encoding, which handles all files, but it increases the size of the data significantly - even if the file is ASCII to begin with. Is there a more efficient way I can encode the data, other than manually checking for any non-ASCII characters and then deciding whether or not to base64-encode it? I'm currently writing this in Python, but will probably need to do the same in Java, C# and C++, so an easily portable solution would be preferable.

    Read the article

  • NSNotification center may not respond to -object ?

    - by blackkettle
    Hi, I'm trying to make simple use of the NSNotification center inside my iPhone application, but I seem to be doing something wrong in this case. I was under the impression that it was possible to retrieve an object associated with a particular message, or at least a reference to the object, but using the following example code I'm getting a warning, "NSNotification center may not respond to -object" - (void)addNewBookmark:(NSNotificationCenter *)notification { Bookmark *newBookMark = (Bookmark *)[notification object]; //Do some stuff with the bookmark object } Indeed, when I compile and run the code, basically nothing I try to do with the contents of the object actually gets carried out - it's simply ignored. The post code is as follows, - (IBAction)save:(id) sender{ //Sending the message with the related object [[NSNotificationCenter defaultCenter] postNotificationName:@"addNewBookmark" object:bookmark]; } and the bookmark object itself is just a dictionary. I also tried using the "userInfo" argument and passing the bookmark object through that, but the result was the same. How should I be doing this? What am I doing wrong?

    Read the article

  • error: typedef name may not be a nested-name-specifier

    - by Autopulated
    I am trying to do something along the lines of this answer, and struggling: $ gcc --version gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) file.cpp:7: error: template argument 1 is invalid file.cpp:7: error: typedef name may not be a nested-name-specifier And the offending part of the file: template <class R, class C, class T0=void, class T1=void, class T2=void> struct MemberWrap; template <class R, class C, class T0> struct MemberWrap<R, C, T0>{ typedef R (C::*member_t)(T0); typedef typename boost::add_reference<typename T0>::type> TC0; // <---- offending line MemberWrap(member_t f) : m_wrapped(f){ } R operator()(C* p, TC0 p0){ GILRelease guard; return (p->*(this->m_wrapped))(p0); } member_t m_wrapped; };

    Read the article

  • Scala: "Parameter type in structural refinement may not refer to an abstract type defined outside th

    - by raichoo
    Hi, I'm having a problem with scala generics. While the first function I defined here seems to be perfectly ok, the compiler complains about the second definition with: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement def >>[B](a: C[B])(implicit m: Monad[C]): C[B] = { ^ What am I doing wrong here? trait Lifter[C[_]] { implicit def liftToMonad[A](c: C[A]) = new { def >>=[B](f: A => C[B])(implicit m: Monad[C]): C[B] = { m >>= (c, f) } def >>[B](a: C[B])(implicit m: Monad[C]): C[B] = { m >> a } } } IMPORTANT: This is NOT a question about Monads, it's a question about scala polymorphism in general. Regards, raichoo

    Read the article

  • Collection was modified; enumeration operation may not execute

    - by Rita
    I have the below code. I am trying to remove the record and it is throwing Exception when it is removing the Record. "Collection was modified; enumeration operation may not execute." Any ideas on how to get rid of the message. Appreciate your time. //validClaimControlNo has valid ClaimControl Numbers. List<string> validClaimControlNo = new List<string>(); int count = 0; foreach (List<Field> f in records) { foreach (Field fe in f) { if (i == 0) if (!(validClaimControlNo.Contains(fe.Value))) { //if this claim is not in the Valid list, Remove that Record records.RemoveAt(count); } i++; } i = 0; count++; }

    Read the article

  • Warning of "Control may reach end of non-void function"

    - by Cloud_cal
    I ran a C++ program in Xcode, and encountered a warning of "Control may reach end of non-void function". Here is the code: Node* search(Node* head, int x) { if(!head) return NULL; else if(x == head->key) return head; else if(x < head->key) search(head->lchild, x); else search(head->rchild, x); } I got the same warning when compiling it in Linux, but got the correct result. But in Xcode, the result was wrong. By the way, I got the correct answer and no warning in Visual Studio.

    Read the article

  • Why does ruby-debug say 'Saved frames may be incomplete'

    - by Chris McCauley
    From time-to-time I get this when a breakpoint is triggered. It looks like stack frames aren't getting saved so I can't step back through the call stack - a real pain. See below for an example --> #0 BatchProcess.add_failure_record(row_id#Fixnum, test#Struct::Test, message#String,...) at line server/processes/batch.rb:309 Warning: saved frames may be incomplete; compare with caller(0). (rdb:1) pp caller ["./server/processes/batch.rb:309:in `run_tests'", "./server/processes/common/generic_process.rb:219:in `each'", "./server/processes/common/generic_process.rb:219:in `run_tests'", "./server/processes/common/generic_process.rb:271:in `run_plan'", "./server/processes/common/corrections.rb:19:in `each_with_index'", "./server/processes/common/generic_process.rb:266:in `each'", "./server/processes/common/generic_process.rb:266:in `each_with_index'", "./server/processes/common/generic_process.rb:266:in `run_plan'", "./server/processes/batch.rb:202:in `run_engine'", "/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'", "./server/processes/batch.rb:201:in `run_engine'", "./server/processes/common/generic_process.rb:88:in `run_dataset'", "./server/processes/batch.rb:210:in `run_dataset'", "/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'", "./server/processes/batch.rb:209:in `run_dataset'", "./server/processes/common/generic_process.rb:159:in `run'", "./server/processes/common/generic_process.rb:158:in `each'", "./server/processes/common/generic_process.rb:158:in `run'", "./server/processes/batch.rb:350:in `run'", "/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'", "./server/processes/batch.rb:349:in `run'", "server/processes/test_runs/run_tests.rb:55:in `run_one_process'", "server/processes/test_runs/run_tests.rb:81"] Any ideas on how to stop this happening?

    Read the article

  • xcode may not respond to warning

    - by Frames84
    Hi all, Can't seem to get rid of a warning. The warning is: 'UIImage' may not respond to '-scaleToSize' above the @implmentation MyViewController I have this @implementation: @implementation UIImage (scale) -(UIImage*)scaleToSize:(CGSize)size { UIGraphicsBeginImageContext(size); [self drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return scaledImage; } @end Then I have MyViewController implementation @implementation TodayNewsTableViewController @synthesize dataList; ...... - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MainNewsCellIdentifier = @"MainNewsCellIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: MainNewsCellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier: MainNewsCellIdentifier] autorelease]; } NSUInteger row = [indexPath row]; NSDictionary *stream = (NSDictionary *) [dataList objectAtIndex:row]; NSString *title = [stream valueForKey:@"title"]; if( ! [title isKindOfClass:[NSString class]] ) { cell.textLabel.text = @""; } else { cell.textLabel.text = title; } cell.textLabel.numberOfLines = 2; cell.textLabel.font =[UIFont systemFontOfSize:10]; cell.detailTextLabel.numberOfLines = 1; cell.detailTextLabel.font= [UIFont systemFontOfSize:8]; cell.detailTextLabel.text = [stream valueForKey:@"created"]; NSString *i = [NSString stringWithFormat:@"http://www.mywebsite.co.uk/images/%@", [stream valueForKey:@"image"]]; NSData *imageURL = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:i]]; UIImage *newsImage = [[UIImage alloc] initWithData:imageURL] ; UIImage *scaledImage = [newsImage scaleToSize:CGSizeMake(50.0f, 50.0f)]; // warning is appearing here. cell.imageView.image = scaledImage; [imageURL release]; [newsImage release]; return cell; } Thanks for your time in advance. Frames

    Read the article

  • How I May Have Taken A Wrong Path in Programming

    - by Ygam
    I am in a major stump right now. I am a BSIT graduate, but I only started actual programming less than a year ago. I observed that I have the following attitude in programming: I tend to be more of a purist, scorning unelegant approaches to solving problems using code I tend to look at anything in a large scale, planning everything before I start coding, either in simple flowcharts or complex UML charts I have a really strong impulse on refactoring my code, even if I miss deadlines or prolong development times I am obsessed with good directory structures, file naming conventions, class, method, and variable naming conventions I tend to always want to study something new, even, as I said, at the cost of missing deadlines I tend to see software development as something to engineer, to architect; that is, seeing how things relate to each other and how blocks of code can interact (I am a huge fan of loose coupling) i.e the OOP thinking I tend to combine OOP and procedural coding whenever I see fit I want my code to execute fast (thus the elegant approaches and refactoring) This bothers me because I see my colleagues doing much better the other way around (aside from the fact that they started programming since our first year in college). By the other way around I mean, they fire up coding, gets the job done much faster because they don't have to really look at how clean their codes are or how elegant their algorithms are, they don't bother with OOP however big their projects are, they mostly use web APIs, piece them together and voila! Working code! CLients are happy, they get paid fast, at the expense of a really unmaintainable or hard-to-read code that lacks structure and conventions, or slow executions of certain actions (which the common reasoning against would be that internet connections are much faster these days, hardware is more powerful). The excuse I often receive is clients don't care about how you write the code, but they do care about how long you deliver it. If it works then all is good. Now, did my "purist" approach to programming may have been the wrong way to start programming? Should I just dump these purist concepts and just code the hell up because I have seen it: clients don't really care how beautifully coded it is?

    Read the article

  • Designing model/database for distance between any two locations (that may change)

    - by Yo Ludke
    We should create a web app which has a number of events each with a location (created as user-generated content, so the number of events will be increasingly large). The distance between any events should be available, for example to determine the top 5 closest events and such things. Users may change the locations of events. How should one design the database/model for this (in a scalable way)? I was thinking of doing it with a "distance table" (like so http://www.deutschland-tourist.info/images/entfernungstabelle.gif). Then every time, if a location changes, one row and one column have to be recalculated (this should be done with a delayed job, because it is not important to have the changes instantly). Possible problems in Scaling: Database to large (n² items for n events), too much calculation to be done. For example we should see if this is okay for 10.000 users. If each has created just one event, then this would be 100 million integers... Do you think this would be a good way to do it efficiently? How could one realize such a distance table with an rails model? Is it possible with a SQL databse? Would you start other approaches?

    Read the article

  • May volatile be in user defined types to help writing thread-safe code

    - by David Rodríguez - dribeas
    I know, it has been made quite clear in a couple of questions/answers before, that volatile is related to the visible state of the c++ memory model and not to multithreading. On the other hand, this article by Alexandrescu uses the volatile keyword not as a runtime feature but rather as a compile time check to force the compiler into failing to accept code that could be not thread safe. In the article the keyword is used more like a required_thread_safety tag than the actual intended use of volatile. Is this (ab)use of volatile appropriate? What possible gotchas may be hidden in the approach? The first thing that comes to mind is added confusion: volatile is not related to thread safety, but by lack of a better tool I could accept it. Basic simplification of the article: If you declare a variable volatile, only volatile member methods can be called on it, so the compiler will block calling code to other methods. Declaring an std::vector instance as volatile will block all uses of the class. Adding a wrapper in the shape of a locking pointer that performs a const_cast to release the volatile requirement, any access through the locking pointer will be allowed. Stealing from the article: template <typename T> class LockingPtr { public: // Constructors/destructors LockingPtr(volatile T& obj, Mutex& mtx) : pObj_(const_cast<T*>(&obj)), pMtx_(&mtx) { mtx.Lock(); } ~LockingPtr() { pMtx_->Unlock(); } // Pointer behavior T& operator*() { return *pObj_; } T* operator->() { return pObj_; } private: T* pObj_; Mutex* pMtx_; LockingPtr(const LockingPtr&); LockingPtr& operator=(const LockingPtr&); }; class SyncBuf { public: void Thread1() { LockingPtr<BufT> lpBuf(buffer_, mtx_); BufT::iterator i = lpBuf->begin(); for (; i != lpBuf->end(); ++i) { // ... use *i ... } } void Thread2(); private: typedef vector<char> BufT; volatile BufT buffer_; Mutex mtx_; // controls access to buffer_ };

    Read the article

  • iPhone OS 3.2 - How to register for notifcations that may not be available

    - by cdstamper
    So I'm trying to register for the MPMoviePlayerDidExitFullscreenNotification notification in my universal app (iPhone and iPad). Problem is, OS 3.1.3 doesn't support this notification, and just crashes. I've tried version checking, like so: if ([MPMoviePlayerController instancesRespondToSelector:@selector(setShouldAutoplay:)]) {//Check for shouldSetAutoplay, this ensures that we are running at least 3.2 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerDidFinish:) name:(NSString*)class2 object:[self player]]; Doesn't work, still crashes. How do I do this?

    Read the article

  • May I define aliases elsewhere than into .bashrc ?

    - by Luc M
    We are several persons using the same login id on Linux Box. I want to define my own aliases without interfering with anyone. In the .bashrc, I define a alias to my bash file defining my own aliases. alias luc=/full/path/to/my/def_alias_luc.sh The file /full/path/to/my/def_alias_luc.sh contains #!/bin/bash echo "" echo "Defining Luc's aliases" echo "" echo "" echo "aliases before..." echo "" alias alias vimluc="vim -u /full/path/to/my/.vimrc " echo "" echo "aliases after" echo "" alias After executing /full/path/to/my/def_alias_luc.sh, the alias is still undefined. What do I miss ?

    Read the article

  • MEF = may experience frustration?

    - by Dave
    Well, it's not THAT bad yet. :) But I do have questions after Reed has pointed me at MEF as a potential alternative to IoC (and so far it does look pretty good). Consider the following model: As you can see, I have an App, and this app uses Plugins (whoops, missed that association!). Both the App and Plugins require usage of an object of type CandySettings, which is found in yet another assembly. I first tried to use the ComposeParts method in MEF, but the only way I could get this to work was to do something like this in the plugin code. var container = new CompositionContainer(); container.ComposeParts(this, new CandySettings()); But this doesn't make any sense, because why would I want to create the instance of CandySettings in the plugin? It should be in the App. But if I put it in the App code, then the Plugin doesn't magically figure out how to get at ICandySettings, even though I am using [Import] in the plugin, and [Export] in CandySettings. The way I did it was to use MEF's DirectoryCatalog, because this allows the plugin, when constructed, to scan all of the assemblies in the current folder and automagically import everything that is marked with the [Import] attribute. So it looks like this, and potentially in every plugin: var catalog = new DirectoryCatalog( "."); var container = new CompositionContainer( catalog); container.ComposeParts( this); This totally works great, but I can't help but think that this is not how MEF was intended to be used?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >