Search Results

Search found 20852 results on 835 pages for 'intellij idea'.

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

  • Java Script in Rails 3.1 works only in certain parts. Any idea why?

    - by Sergio Nekora
    This might seem a bit weird, but since I am new in RoR and cannot find any similar questions I thought you might know. The situation is that JavaScript does not work throughout my whole site. For instance. For the sake of checking, I place a link with an alert function in the footer. It did not work at the beginning, it felt like the JS was disabled(but it wasn't). But eventually it worked. Now it works in most the pages but it does not work in one that there is also an 'autocomplete' field. Of course, this autocomplete field does not work either. That could lead you to think that there is something wrong with the autocomplete code. However this same code is working in the sidebar. Any ideas why? Could it have anything to do with the fact that one day my assets folder appeared empty? After installing the gmaps4rails gem I realized that all my Js and CSS files were gone from my assests folder. Ok, it might have happened long before and I just realized at that point. I don't really know. Here in the root you can see that the 'Hola sip' click at the button works. here it works However, here same link does not trigger the alert function. here it doesn't

    Read the article

  • Is it a good idea to return " const char * " from a function?

    - by AJ
    Now I have a function that has to return a string. I saw a particular implementation where he returns a const char * from the function. Something like this: const char * GetSomeString() { ........ return somestlstring.c_str(); } SomeOtherFoo () { const char * tmp = GetSomeString(); string s = tmp; } Now I felt there is something potentially wrong with this. Is my gut feel right? or Is this a perfectly safe code? Kindly give me ur suggestions. I have a feeling return const char * this way might result in havoc.. Thanks, Arjun

    Read the article

  • Is it a good idea to work on header files only, just at the start of the project?

    - by m4design
    To explain my point further, I'm a beginner in programming, and I'm working on a small project. Instead of separating the .cpp file from the header file, I'm implementing the code in the header files, and making one .cpp file for testing. I do this to have less files, hence easier navigation. Then later I'll separate the code as it should be. Will this cause any problems? should I continue doing that? Thanks.

    Read the article

  • What if I change my Android App price to free and after i change idea?

    - by Skatephone
    Hi, i have read on the market support that "If you have previously published an application for free, you cannot change it to have a price." But I was wondering, if at the contrary I change my app from payed to free and some time after i want to re change it from free to payed! Can I? And if yes, Have I to wait some period (I have read something like this in the contract)? Tnk's Valerio From Italy

    Read the article

  • Is it a good idea to use .Net for commercial software?

    - by user146780
    I was playing around with .Net reflector today and realized that Miicrosoft's entire Expression suite is written in .Net. As a result I was pretty much able to see the underlying code for expression. This makes it far easier than binary to break copy protection. I think that that's a big deal. Is it generally recommended to make commercial software in .Net where it is fairly easy to see the source code down to the variable names? I was surprised that Microsoft didn't at least dotfescate it. Thanks

    Read the article

  • How is a h264 idea bitstream organized? / header start codes

    - by Wolax
    I was trying to learn a bit about h264 by looking at the bitstream of a video file with a hex editor. I found here the start codes for a video object planes (0x000001b6) and for i-frames (0x000001b600). But I can't find many of those bytes in video files. Most of the time those start codes appear at the beginning of a file with only a few bites in between. I expected them to show up very regularly, in equal distance all over the file!? Is is even ok to look at a file with a hex editor this way? What other start codes exist and how is a h264 file organised?

    Read the article

  • PHP - Concatenating objects and casting to string - bad idea?

    - by franko75
    Is it bad practice to concatenate objects when used in this context: $this->template->head .= new View('custom_javascript') This is the way i normally add extra css/js stuff to specific pages. I use an MVC structure where my basic html template has a $head variable which I set in my main Website_controller. I have used this approach for a while as it means I can just add bits and pieces of css/js stuff from whichever page/controller needs it. But having come across a problem in PHP 5.1.6 where the above code results in "Object ID #24", the result of toString() not being called i think, I am rethinking whether i should just fix this to work in PHP 5.1.6 or if i should rethink this approach in general. Any pointers appreciated!

    Read the article

  • g++ - is using the "-g" flag for production builds a good idea?

    - by Grigory
    Just to give some context, I'm talking about compiling C++ code with g++ here. I can see how including the -g flag for production builds would be convenient for maintenance: the program will be much easier to debug if it crashes unexpectedly. My question here is, does including the -g flag affect the output executable in any other way than increasing its size? Can it somehow make the code slower (e.g. by turning off certain optimizations)? From what I understand, it shouldn't (the documentation only mentions the inclusion of debug symbols), but I'm not sure.

    Read the article

  • Is it a bad idea to have a login dialog inside an iframe?

    - by AyKarsi
    We're creating a website where we will be giving out code snippets to our users which they can place on their own websites. These snippets contain a link a javascript include. When clicking the link, an iframe containing the login dialog to our site opens. The user then authenticates inside the iframe, does his work and when he leaves the iframe his session is closed. We've got it working allready and it's very slick. Our main concern though is phishing. The user has absolutely now way of veryifying where the login page is really coming from. On the other hand, phising attacks are also succesfull even if the user can see the fake-url in the address bar. Would you enter your (OpenId) credentials in an iframe? Does anyone know a pattern with which we could minimise the chances of a phishing attack?

    Read the article

  • iPhone UI: No edit button for UITableView, bad idea?

    - by Nic Hubbard
    I have a UITableViewController which lets the user drill down into different records. On the second level/view, the user can add and edit new records. But, I am not sure what to do, since the back button is on the top left, and I need to put the "Add" button on the top right, so there is no room (keeping to HIG) for the edit button, which would normally go where the back button is. (I am using a tab bar, so can't put it at the bottom.) Do you think that it is logical, to expect users to know to swipe to delete a record? Or, do I need to have an edit button? If I DO need an edit button, where should I put it if I am following HIG?

    Read the article

  • Style question: Writing "this." before instance variable and methods: good or bad idea?

    - by Uri
    One of my nasty (?) programming habits in C++ and Java is to always precede calls or accesses to members with a this. For example: this.process(this.event). A few of my students commented on this, and I'm wondering if I am teaching bad habits. My rationale is: 1) Makes code more readable — Easier to distinguish fields from local variables. 2) Makes it easier to distinguish standard calls from static calls (especially in Java) 3) Makes me remember that this call (unless the target is final) could end up on a different target, for example in an overriding version in a subclass. Obviously, this has zero impact on the compiled program, it's just readability. So am I making it more or less readable? Related Question Note: I turned it into a CW since there really isn't a correct answer.

    Read the article

  • Is it a good idea to use an integer column for storing US ZIP codes in a database?

    - by Yadyn
    From first glance, it would appear I have two basic choices for storing ZIP codes in a database table: Text (probably most common), i.e. char(5) or varchar(9) to support +4 extension Numeric, i.e. 32-bit integer Both would satisfy the requirements of the data, if we assume that there are no international concerns. In the past we've generally just gone the text route, but I was wondering if anyone does the opposite? Just from brief comparison it looks like the integer method has two clear advantages: It is, by means of its nature, automatically limited to numerics only (whereas without validation the text style could store letters and such which are not, to my knowledge, ever valid in a ZIP code). This doesn't mean we could/would/should forgo validating user input as normal, though! It takes less space, being 4 bytes (which should be plenty even for 9-digit ZIP codes) instead of 5 or 9 bytes. Also, it seems like it wouldn't hurt display output much. It is trivial to slap a ToString() on a numeric value, use simple string manipulation to insert a hyphen or space or whatever for the +4 extension, and use string formatting to restore leading zeroes. Is there anything that would discourage using int as a datatype for US-only ZIP codes?

    Read the article

  • Is it a good idea to use a computed column as part of a primary key ?

    - by Brann
    I've got a table defined as : OrderID bigint NOT NULL, IDA varchar(50) NULL, IDB bigint NULL, [ ... 50 other non relevant columns ...] The natural primary key for this table would be (OrderID,IDA,IDB), but this it not possible because IDA and IDB can be null (they can both be null, but they are never both defined at the same time). Right now I've got a unique constraint on those 3 columns. Now, the thing is I need a primary key to enable transactional replication, and I'm faced with two choices : Create an identity column and use it as a primary key Create a non-null computed column C containing either IDA or IDB or '' if both columns were null, and use (OrderID,C) as my primary key. The second alternative seams cleaner as my PK would be meaningful, and is feasible (see msdn link), but since I've never seen this done anywhere, I was wondering if they were some cons to this approach.

    Read the article

  • ingenious idea needed: how to declare different sizes for different fonts? @font-face?

    - by Haroldo
    I've never seen this done, but i get a feeling that there's gotta be a clever way of doing it. css font-size-adjust looks like it was never meant to be, but when i look around I'm seeing some really ingenious css techniques going on. Take this on nettuts yesterday for using @font-face for vector icons. my challenge: if(user has calibri ) { font-family: calibri; font-size: 12px; } if(user hasn't calibri ) { font-family: arial; font-size: 10px; }

    Read the article

  • Give me better idea to do Marquee tag in asp.net page.

    - by Ayyappan.Anbalagan
    The bellow code working, but i don’t know it the write way or not? <td align="center" style=" height:50px; width:100%; background-color:Red;width:10%;"> <div id="divremview" > <marquee behavior="scroll" direction="up"> <div id="div1"><asp:Label ID="Label1" runat="server" Text="Label">Hi</asp:Label></div> </marquee> </div> </td> Also it not in center alignment. As usual it in left alignment

    Read the article

  • Give me some idea : How do I match photographer?

    - by user231430
    I have photographer in my database such as PhotographerID, PhotographerName, JobArea, BestPhotography, FavoritePhotography. And I want to match some photographer from my database. The question that I will ask the user before matching photographer is.. Area or province that you want to hire a photographer? Type of photography? How do I match?

    Read the article

  • HTTP POST with URL query parameters -- good idea or not?

    - by Steven Huwig
    I'm designing an API to go over HTTP and I am wondering if using the HTTP POST command, but with URL query parameters only and no request body, is a good way to go. Considerations: "Good Web design" requires non-idempotent actions to be sent via POST. This is a non-idempotent action. It is easier to develop and debug this app when the request parameters are present in the URL. The API is not intended for widespread use. It seems like making a POST request with no body will take a bit more work, e.g. a Content-Length: 0 header must be explicitly added. It also seems to me that a POST with no body is a bit counter to most developer's and HTTP frameworks' expectations. Are there any more pitfalls or advantages to sending parameters on a POST request via the URL query rather than the request body? Edit: The reason this is under consideration is that the operations are not idempotent and have side effects other than retrieval. See the HTTP spec: In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested. ... Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent.

    Read the article

  • Detecting Screen Resolution to load alternative CSS a good idea?

    - by jdln
    Im working with a graphic designer who constantly wants to make websites larger than the 960 pixels i recommend. I can do a certain amount with liquid layouts but id really love to be able to load different CSS for larger resolutions. I googled it and found the link below, but im worried that I havnt heard more about this. Is this is a reliable method? Im concerned as I would have thought that more people would want to do this. http://www.ilovecolors.com.ar/detect-screen-size-css-style/ Thanks

    Read the article

  • cURL + HTTP_POST, keep getting 500 error. Has no idea?

    - by mysqllearner
    Okay, I want to make a HTTP_POST using cURL to a SSL site. I already imported the certificate to my server. This is my code: $url = "https://www.xxx.xxx"; $post = "";# all data that going to send $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0'); $exe = curl_exec($ch); $getInfo = curl_getinfo($ch); if ($exe === false) { $output = "Error in sending"; if (curl_error($ch)){ $output .= "\n". curl_error($ch); } } else if($geInfo['http_code'] != 777){ $output = "No data returned. Error: " . $geInfo['http_code']; if (curl_error($ch)){ $output .= "\n". curl_error($ch); } } curl_close($c); echo $output; It keep returned "500". Based on w3schools, 500 means Internal Server Error. Is my server having problem? How to solve/troubleshoot this?

    Read the article

  • I don't like Python functions that take two or more iterables. Is it a good idea?

    - by Xavier Ho
    This question came from looking at this question on Stackoverflow. def fringe8((px, py), (x1, y1, x2, y2)): Personally, it's been one of my pet peeves to see a function that takes two arguments with fixed-number iterables (like a tuple) or two or more dictionaries (Like in the Shotgun API). It's just hard to use, because of all the verbosity and double-bracketed enclosures. Wouldn't this be better: >>> class Point(object): ... def __init__(self, x, y): ... self.x = x ... self.y = y ... >>> class Rect(object): ... def __init__(self, x1, y1, x2, y2): ... self.x1 = x1 ... self.y1 = y1 ... self.x2 = x2 ... self.y2 = y2 ... >>> def fringe8(point, rect): ... # ... ... >>> >>> point = Point(2, 2) >>> rect = Rect(1, 1, 3, 3) >>> >>> fringe8(point, rect) Is there a situation where taking two or more iterable arguments is justified? Obviously the standard itertools Python library needs that, but I can't see it being pretty in maintainable, flexible code design.

    Read the article

  • Is locking on the requested object a bad idea?

    - by Quick Joe Smith
    Most advice on thread safety involves some variation of the following pattern: public class Thing { private static readonly object padlock = new object(); private string stuff, andNonsense; public string Stuff { get { lock (Thing.padlock) { if (this.stuff == null) this.stuff = "Threadsafe!"; } return this.stuff; } } public string AndNonsense { get { lock (Thing.padlock) { if (this.andNonsense == null) this.andNonsense = "Also threadsafe!"; } return this.andNonsense; } } // Rest of class... } In cases where the get operations are expensive and unrelated, a single locking object is unsuitable because a call to Stuff would block all calls to AndNonsense, degrading performance. And rather than create a lock object for each call, wouldn't it be better to acquire the lock on the member itself (assuming it is not something that implements SyncRoot or somesuch for that purpose? For example: public string Stuff { get { lock (this.stuff) { // Pretend that this is a very expensive operation. if (this.stuff == null) this.stuff = "Still threadsafe and good?"; } return this.stuff; } } Strangely, I have never seen this approach recommended or warned against. Am I missing something obvious?

    Read the article

  • Using static strings to define input field names in JSPs - good idea or not?

    - by Derek Clarkson
    Hi all, I've just be asked to work on a large portal project and have been looking through the established code. I keep finding this in the jsps: <input class="portlet-form-button" name="<%=ModifyUserProfile.FORM_FIRST_TIME_LOGIN_SUBMIT%>" type="submit" ... The authors are using static strings defined in classes to define the names of input fields and buttons in jsp forms. I've never seen this done before and was wondering if this is common practice. I'm inclined to think not, but I'm asking because, apart from centralising names which I would have thought are not likely to change, I can't see the reason why. Any thoughts on this?

    Read the article

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