Daily Archives

Articles indexed Friday May 21 2010

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

  • best IDE for ruby on rails

    - by Sanjay
    Having moved from java to ruby, I am struggling to find a good IDE for ruby. I used eclipse on java, so I tried Aptana Studio (previously Radrails), but its not even half as good. Currently I am trying out Netbeans for Ruby. Please suggest me the best RoR IDE out there. I believe TextMate is universally accepted as the best editor on Mac OS X. I am looking for windows. So far it seems netbeans and e-texteditor are worth a try.

    Read the article

  • How to configure git repository so a branch other than master is checked out after a cloning?

    - by Suraj Barkale
    I am trying to set up a git server with bunch of repositories. I am planning to use the branching model described in http://nvie.com/git-model article. So I will have at least two branches (named master and develop) in the repository. After a clone the master branch is checked out by git. Is there a git config option so that develop branch will be checked out instead? In effect I want git clone my_repo_url to behave as git clone -b develop my_repo_url.

    Read the article

  • Free Learning Resources for Visual Studio 2010 and SharePoint Server 2010

    - by Enrique Lima
    Visual Studio Resources From the Microsoft Press blog:  http://blogs.msdn.com/microsoft_press/archive/2010/05/13/free-ebook-moving-to-microsoft-visual-studio-2010-draft-preview-ii.aspx Keybinding Cards: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=92ced922-d505-457a-8c9c-84036160639f SharePoint Resources From the Microsoft Office site on Training courses for End Users http://office2010.microsoft.com/en-us/sharepoint-server-help/take-sharepoint-server-2010-training-at-your-desk-HA101859255.aspx

    Read the article

  • Where to put code snippets in Rails?

    - by Nik
    Hello all, I have this code snippets that generates a signature for POSTs. The detail of it is not important, but what I want to know is: since it is not a model-related chunk of code, it really can be use anywhere: in controllers, in models, in view helpers; even in views. So I am unsure where and, even bigger of a problem, how to activate the use of it once I place it in some location. Is it what those "require" statements are all about? That you can acquire some functionality through a "require" statement in the current file you are working on? Just so that we have an example to talk about, say, I have a little snippet of code that does cubing: def cube_it(num) num**3 end I know that I will be using it in various places across the application, so where should I put it? and when I do need to use it, how can I "summon" it? Thank You

    Read the article

  • Horizontal page curl in iPhone - I have - But Valid ?

    - by sagar
    Hello ! Every one. I was googling for applying horizontal page curl in iPhone. I also tried this, but it wasn't appropriate for me (To change orientation & work in different ori.). I tried to google more. Finally I got a link or link . From Where, I could Understand the horizontal page curl. But when I went to code deeply, I found some confusing points. Let me list down. Please download attached code - it's not my code. ( I am not selling any code, but Direct project link would be better than placing multiple codes here. ) extern NSString *kCAFilterPageCurl; // From QuartzCore.framework is it valid to use internal variable ? ( as it's mentioned - from QuartzCore ) CAFilter *previousFilter = [[CAFilter filterWithType:kCAFilterPageCurl] retain]; Above statement is giving warning ( not error ) - no '+filterWithType:' method found Might be using internal (apple's private) method. [previousFilter setDefaults]; Above statement is giving warning ( not error ) - no '-setDefaults:' method found Might be using internal (apple's private) method. Now My queries. I have above doubts in the project ( that might be using apple's private methods ). Is this code safe for apple store approval ? If 2's answer is wrong, what should be done for horizontal page curl ? In short, I want a horizontal page curl, But Need your suggestions for having the proper solution, which might not trouble me in future. Thanks in advance for your great help. Sagar.

    Read the article

  • TFS 2010 build config transform problem

    - by Zdenek
    Hi all, I'm facing quite a problem while setting up automated TFS Builds. Basically I created new configuration called Tests, added transform config, defined different connection strings for the Database. Then defined TFS build, building whole solution with MSBuild arguments /p:DeployOnBuild=True /p:Configuration=Tests. The problem is that in the drop location (Build_PublishedWebsites\Project) I get web.config, web.debug.config, web.release.config and web.tests.config, however I would expect just one transformed web.config. I already checked PDC presentation Web Deployment Painkillers: Microsoft Visual Studio 2010 & MS Deploy but didn't help. Thanks for any answer.

    Read the article

  • File write not getting updated in Qt 4.5.3

    - by user249490
    Hi, I have an XML file. My application requires manipulation into that XML file. I will be writing the values into the XML value. I also have interface to display the read contents of the file. The user might add values into that XML (through an interface). Without closing the application he may decide to display the File contents also. Now the problem is, after i write the XML contents into the file, when i view the file through the interface , the values are not getting updated. After i close the application and open it the updated values are available.I am using the following code to achieve this. For writing QXmlStreamWriter and for reading QDomDocument, QDomNodeList. After i complete the writing, I flush and close the file too. lFile.flush(); lFile.close(); After reading also i closed the file. Can someone tell me what am doing wrong??

    Read the article

  • JMS MessageCreator.createMessage() in Grails

    - by Hans Wurst
    Hi there, I am trying to implement jms to my grails application. I have several JMS consumer in a spring based enviroment listining on an ActiveMQ broker. I wrote a simple test commandline client which creates messages and receives them in an request response manner. Here is the snippet that sends a MapMessage in Spring JMS way. This works for me as long I am in my spring world. final String corrID = UUID.randomUUID().toString(); asyncJmsTemplate.send("test.RequestQ", new MessageCreator() { public Message createMessage(Session session) throws JMSException { try { MapMessage msg = session.createMapMessage(); msg.setStringProperty("json", mapper.writeValueAsString(List<of some objects>)); msg.setJMSCorrelationID(corrID); msg.setJMSReplyTo(session.createQueue("test.ReplyQ")); return msg; } catch (JsonGenerationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JsonMappingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }); BUT when I tried to implement this methods to my grails test app I receive some METHOD_DEF exceptions. Sending simple TextMessages via the jmsTemplate.convertAndSende(Queue, Message) provided by the JMS Plugin works. Can any one help me? Is this a common problem? Cheers Hans

    Read the article

  • Django 1.2 crash course needed

    - by delusionalweekendwarrior
    I know Python but I've never used Django. What do I need to know about Django 1.2 to port my typical PHP CRUD web application in one weekend? (Yes I've read Joel Spolsky's Netscape article :-)) I'm reading this tutorial right now and it's excellent. I'm already playing around with inspectdb to generate my models from the existing schema. I'm planning to use the following features of Django this weekend: Fragment caching Static asset versioning (for far future expires) Schema migrations (or whatever they're called in Django) Auto-admin (and customize it later) The test framework ...other stuff I probably don't know about yet I'm familiar with all these concepts in other languages/frameworks, except for the ORM which I've never used. I know SQL pretty well though. Any links, sage bits of advice, gotchas, stuff not mentioned in the (excellent) tutorial/docs, or stuff that is mentioned but warrants repeating == very welcome. Thanks!

    Read the article

  • Relative Dates with Datejs

    - by Prasanna
    I have a requirement where in, I have to parse the dates relative to a date object returned from the server side. But the datejs library always considers only the browsers date object. The situation is something like this: The server gives back the date in PST and the browser is in IST. And all the inputs are getting parsed with respect to the current date in IST instead of current date in PST. Is there any way I could resolve this. Or could you suggest any workarounds. Thanks in advance.

    Read the article

  • Several C# Language Questions

    - by Water Cooler v2
    1) What is int? Is it any different from the struct System.Int32? I understand that the former is a C# alias (typedef or #define equivalant) for the CLR type System.Int32. Is this understanding correct? 2) When we say: IComparable x = 10; Is that like saying: IComparable x = new System.Int32(); But we can't new a struct, right? or in C like syntax: struct System.In32 *x; x=>someThing = 10; 3) What is String with a capitalized S? I see in Reflector that it is the sealed String class, which, of course, is a reference type, unlike the System.Int32 above, which is a value type. What is string, with an uncapitalized s, though? Is that also the C# alias for this class? Why can I not see the alias definitions in Reflector? 4) Try to follow me down this subtle train of thought, if you please. We know that a storage location of a particular type can only access properties and members on its interface. That means: Person p = new Customer(); p.Name = "Water Cooler v2"; // legal because as Name is defined on Person. but // illegal without an explicit cast even though the backing // store is a Customer, the storage location is of type // Person, which doesn't support the member/method being // accessed/called. p.GetTotalValueOfOrdersMade(); Now, with that inference, consider this scenario: int i = 10; // obvious System.object defines no member to // store an integer value or any other value in. // So, my question really is, when the integer is // boxed, what is the *type* it is actually boxed to. // In other words, what is the type that forms the // backing store on the heap, for this operation? object x = i; Update Thank you for your answers, Eric Gunnerson and Aaronought. I'm afraid I haven't been able to articulate my questions well enough to attract very satisfying answers. The trouble is, I do know the answers to my questions on the surface, and I am, by no means, a newbie programmer. But I have to admit, a deeper understanding to the intricacies of how a language and its underlying platform/runtime handle storage of types has eluded me for as long as I've been a programmer, even though I write correct code.

    Read the article

  • NSString stringWithContentsOfFile failing with what seems to be the wrong error code

    - by deanWombourne
    Hello. I'm trying to load a file into a string. Here is the code I'm using: NSError *error = nil; NSString *fullPath = [[NSBundle mainBundle] pathForResource:filename ofType:@"html"]; NSString *text = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:&error]; When passed in @"about" as the filename, it works absolutely fine, showing the code works. When passed in @"eula" as the filename, it fails with 'Cocoa error 258', which translates to NSFileReadInvalidFileNameError. However, if I swap the contents of the files over but keep the names the same, the other file fails proving there is nothing wrong with the filename, it's something to do with the content. The about file is fairly simple HTML but the eula file is a massive mess exported from Word by the legal department. Does anyone know of anything inside a HTML file that could cause this error to be raised? Much thanks, Sam

    Read the article

  • Encoding issue: Cocoa Error 261?

    - by Attacus
    So I'm fetching a JSON string from a php script in my iPhone app using: NSURL *baseURL = [NSURL URLWithString:@"test.php"]; NSError *encodeError = [[NSError alloc] init]; NSString *jsonString = [NSString stringWithContentsOfURL:baseURL encoding:NSUTF8StringEncoding error:&encodeError]; NSLog(@"Error: %@", [encodeError localizedDescription]); NSLog(@"STRING: %@", jsonString); The JSON string validates when I test the output. Now I'm having an encoding issue. When I fetch a single echo'd line such as: { "testKey":"é" } (I'm aware I could\should be using NSUrlConnection for asynchronous fetching of data, but at this point in the app development, I don't really need it.) The JSON parser works fine and I am able to create a valid JSON object. However, when I fetch my 2MB JSON string, I get presented with: Error: Operation could not be completed. (Cocoa error 261.) and a Null string. My PHP file is UTF8 itself and I am not using utf8_encode() because that seems to double encode the data since I'm already pulling the data as NSUTF8StringEncoding. Either way, in my single-echo test, it's the approach that allowed me to successfully log \ASDAS style UTF8 escapes when building the JSON object. What could be causing the error in the case of the larger string? Also, I'm not sure if it makes a difference, but I'm using the php function addslashes() on my parsed php data to account for quotes and such when building the JSON string.

    Read the article

  • How to publish a list of integers?

    - by Mason Wheeler
    I want to make a component that includes a list of integers as one of its serialized properties. I know I can't declare a TList<integer> as a published property, because it doesn't descend from TPersistent. I've read that you can define "fake" published properties if you override DefineProperties, but I'm not quite sure how that works, especially when it comes to creating a fake property that's a list, not a single value. Can someone point me in the right direction?

    Read the article

  • How do I override Currency symbols in Java?

    - by edgydruid
    I'm trying to print prices in Turkish Liras (ISO 4217 currency code TRY) with Java. When I do Currency curr = Currency.getInstance("TRY"); Locale trLocale = new Locale("tr", "TR"); System.out.println(curr.getSymbol(trLocale)); the output is: "YTL". However, the currency symbol for Turkish Lira has recently changed from "YTL" to "TL" (as can be seen on the Wikipedia page for Turkish Lira). Formatting with NumberFormat gives a similar result. I really don't want to write yet another Currency class, especially when Java has one built-in. Is there a way to override Java's default currency symbol for TRY to "TL"?

    Read the article

  • Can I Always debug multiple instances of a same object that is of type thread with GDB?

    - by yan bellavance
    program runs fine. When I put a breakpoint a segmentation fault is generated. Is it me or GDB? At run time this never happens and if I instantiate only one object then no problems. Im using QtCreator on ubuntu x86_64 karmic koala. UPDATE1: I have made a small program containing a simplified version of that class. You can download it at: example program simply put a breakpoint on the first line of the function called drawChart() and step into to see the segfault happen UPDATE2: This is another small program but it is practically the same as the mandlebrot example and it is still happening. You can diff it with mandlebrot to see the small difference. almost the same as mandlebrot example program

    Read the article

  • iPad Split View Controller - Master View and Detial View contain TableViews

    - by vman9999
    Hi, I've managed to read some values into a table view and display them in the Master View of a SplitViewController. What I would like to do is to tap on a row of the Master View and display the details on the detailViewController but in a TableView. When I tap on the row in the MasterView table, I can't seem to get the detail to populate the detailview TableView. Any suggestions? Thanks in advance.

    Read the article

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