Search Results

Search found 5637 results on 226 pages for 'triple slash comments'.

Page 137/226 | < Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >

  • simple c# arithmetics. winForms

    - by jello
    I'm doing simple divisions in c#, and I am a bit puzzled by its intricacies. Here's some code, and in the comments, the result. (btw, I only compile with 1 line not commented, if you say that I have 5 declarations of the same variable) double result = 2 / 3; //gives 0 double result = Convert.ToDouble(2) / Convert.ToDouble(3); // is good double result = double.Parse(2) / double.Parse(3); // gives me errors double result = double.Parse(2 / 3); // gives me errors double result = Convert.ToDouble(2 / 3); // gives 0 MessageBox.Show(result.ToString()); so if you have a bunch of integers you wanna mess with, you have to convert each one to a double. pretty tedious...

    Read the article

  • SQL - query inside NOT IN takes longer than the complete query ??

    - by Aleksandar Tomic
    Hi every1, I'm using NOT IN inside my SQL query. For example: select columnA from table1 where columnA not in ( select columnB from table2) How is it possible that this part of the query select columnB from table2 takes 30sec to complete, but the whole query above takes 0.1sec to complete?? Shouldn't the complete query take 30sec + ? BTW, both queries return valid results. Thanks! Answers to Comments Is it because the second query hasn't actually completed but has only returned back the first 'x' rows (out of a very large table?) No, the query is completed after 30 seconds, not to many rows returned (eg. 50). But @Aleksandar wondered why the question congaing the performance killer was so fast. my point exactly Also how long does select distinct columnB from table2 take to execute? actually, the original query is "select distinct...

    Read the article

  • Why is there no code-folding in emacs ?

    - by Pierre
    There are several questions on SO about how to get code folding in emacs, without having to add any special characters like "markers" in the comments for example. Someone said that there was "no perfect solution." It seems that it could be done by parsing the source of the program being written and look for matching parenthesis or bracket, or to do it based on indentation. You could also use a combination of scripts that use different methods. So why is it commonly accepted that there is no "perfect" and straightforward way to get code-folding in emac? Is there something in emacs or its architecture that makes it hard to program? If it were easy, after so many years of smart people using emacs you would think that someone would have wrote it.

    Read the article

  • Does anyone know of a code change management tool that can highlight code changes in Visual Studio?

    - by Leejo
    Hey all, I am trying to find a tool that can highlight code changes in Visual Studio so they can be easily found and reviewed. Below are some requirements for what we are looking for... Identify and use a difference highlighting tool that meets the following criteria: • can highlight areas that need to be reviewed • there is a place to enter comments • retains line numbering from code • preference for doing within IDE Issue addressed: Hard to see what was changed in code - changes not identified. Coders do not provide administrators diffs. No tool that does a nice job to identify differences. Daunting/time consuming to provide a good diff. When highlighting differences was provided, loss of line numbers was a substantial issue (was worse).

    Read the article

  • MYSQL OR vs IN performance

    - by Scott
    I am wondering if there is any difference in regards to performance between the following SELECT ... FROM ... WHERE someFIELD IN(1,2,3,4) SELECT ... FROM ... WHERE someFIELD between 0 AND 5 SELECT ... FROM ... WHERE someFIELD = 1 OR someFIELD = 2 OR someFIELD = 3 ... or will MySQL optimize the SQL in the same way compilers will optimize code ? EDIT: Changed the AND's to OR's for the reason stated in the comments.

    Read the article

  • OpenType programming

    - by Sorush Rabiee
    Hi all Recently i asked two questions (1 and 2) about using OpenType features in programs written by python and .net languages, but didn't get an answer. i realized there is no way to change text rendering engines of operating systems, or force them to use OpenType. so now want to implement my own. such a program that: provides a text engine that receives glyph shapes from otf and ttf files and renders them in sequence of glyphs in text. generates all of OTL features can be used in other parts of applications like controls and components of .NET or python GUI libraries. if python and .net languages are not suitable in this situation, aware me about other programming languages or tools. comments and answers about text rendering system of common Operating Systems, or designing text engines compatible with unicode 5.02 protocol are welcomed.

    Read the article

  • linking to an app on the Itunes store

    - by William Jockusch
    A few web searches yield all sorts of contradictory advice on linking from an iPhone app to an app on the store. Here are some links that come up, together with comments from testing: http://itunes.apple.com/us/app/anagramania/id360016055?mt=8 -- works great. But is it US only? "http://itunes.com/apps/anagramania" -- works after a bunch of redirects, which are likely to annoy the customer. @"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=360016055&mt=8"]; -- works great. But Apple appears to be trying to remove "phobos" links from its documentation. @"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=360016055&mt=8"]; -- works great, but Apple's documentation mentions problems with similar links. Apple doc here: http://developer.apple.com/iphone/library/qa/qa2008/qa1633.html#STANDARD_APPSTORE_LINKS Can anyone bring order out of this chaos?

    Read the article

  • Will Apple's new "originally written in" clause affect your decision to target the iPhone?

    - by Michael Aaron Safyan
    So, you've probably heard about Apple's change to its agreement to prohibit source-to-source translation, thereby blocking translation from Flash (in CS5) and also from Android (via XMLVM). You may also have read about a response by a well-known Adobe developer, and calls to boycott development for the iPhone. Given that this audience is a better representative of the developer community than those who post comments on the NYT, Digg, and other news sites, I was wondering what your opinions were about this decision. Will any of you switch to Android from the iPhone or avoid development on the iPhone as a result of this? Since this is fairly subjective, I am making this a community wiki. Also, please, keep things civil.

    Read the article

  • Passing empty list as parameter to JPA query throws error

    - by Tuukka Mustonen
    If I pass an empty list into a JPA query, I get an error. For example: List<Municipality> municipalities = myDao.findAll(); // returns empty list em.createQuery("SELECT p FROM Profile p JOIN p.municipality m WHERE m IN (:municipalities)") .setParameter("municipalities", municipalities) .getResultList(); Because the list is empty, Hibernate generates this in SQL as "IN ()", which gives me error with Hypersonic database. There is a ticket for this in Hibernate issue tracking but there are not many comments/activity there. I don't know about support in other ORM products or in JPA spec either. I don't like the idea of having to manually check for null objects and empty lists every time. Is there some commonly known approach/extension to this? How do you handle these situations?

    Read the article

  • django app organization

    - by iHeartDucks
    I have been reading some django tutorial and it seems like all the view functions have to go in a file called "views.py" and all the models go in "models.py". I fear that I might end up with a lot of view functions in my view.py file and the same is the case with models.py. Is my understanding of django apps correct? Django apps lets us separate common functionality into different apps and keep the file size of views and models to a minimum? For example: My project can contain an app for recipes (create, update, view, and search) and a friend app, the comments app, and so on. Can I still move some of my view functions to a different file? So I only have the CRUD in one single file?

    Read the article

  • Guice + Quartz + iBatis

    - by DroidIn.net
    I'm trying to wire together Guice (Java), Quartz scheduler and iBatis (iBaGuice) to do the following: Start command line utility-scanner using main() Periodically scan directory (provided as argument) for files containing formatted output (XML or YAML) When file is detected, parse and output result to the database The problems: I used this example to wire Guice and Quartz. However I'm missing some important details which I'm asking in the comments but the post is somewhat dated so I'm quoting it here also: It's not obvious how to set-up the scheduler. Where and how would I wire the Trigger (I can use Trigger#makeMinutelyTrigger)? I really have just one type of job I will be executing, I understand that details in the JobFactory#newJob are coming from the TriggerFiredBundle parameter but where/how do I wire that? And where/how do I create or wire concrete Job?

    Read the article

  • How to Serialize a WPF Drawing?

    - by Néstor Sánchez A.
    Hi, maybe I'm missing something. I believed that WPF vector-based Drawings (like DrawingGroup, DrawingGeometry, etc.) were ready to be serialized. But they are not. So, should I navigate all these drawing childrens, and store they points, lines, brushes (that also are not serializable) and so on, and then made my custom serialization? Is really that difficult or I'm missing something pretty obvious? I mean, even serializing Bitmap images is easy. I thinked serializing vector-based drawings were easier (no quality loss, just descriptive info, no massive data). Thanks for your practical answers, alternate-way suggestions and comments!

    Read the article

  • Hiding a value in an Android application

    - by Ewan
    Hi, I need to hide a value in a mobile (Android OS) application. As far as I can see, encrypting the value is of no use as the key to the encryption mechanism must be available to the program and is thus available to an attacker reverse-engineering the code. So, it seems that the only "solution" is to hide the secret value in the application as well as possible, obviously not ideal. Any comments? Am I missing something? If not, what's the best way to hide the value? Thanks for your ideas! Ewan

    Read the article

  • TreeView nodes always have .Checked=true on postback even when not checked in UI

    - by GISmatters
    I have a treeview in my .aspx: <asp:TreeView ID="tvDocCatAndType" runat="server" /> Not much else going on in the page -- two <asp:LinkButtons> and one <asp:Label>; the page is a child of a master page, so these controls are within a <asp:Content> control. I populate the treeview in code -- just 3 node levels, including the root node. All nodes have checkboxes, and I initialize all node.Checked to true. I have some Javascript to do the usual check/uncheck up and down the tree as parent and child node checkboxes are toggled. No matter how many checkboxes I clear in the UI, on postback every single node has node.Checked = true regardless of the state of the checkbox in the UI. This is not the first time I've used a treeview, but I've never had this problem before. I created this page by light adaptation of an earlier project that works fine. Thanks in advance for any helpful comments or questions, Chris

    Read the article

  • How to join mysql tables

    - by Ivan
    I've an old table like this: user> id | name | address | comments And now I've to create an "alias" table to allow some users to have an alias name for some reasons. I've created a new table 'user_alias' like this: user_alias> name | user But now I have a problem due my poor SQL level... How to join both tables to generate something like this: 1 | my_name | my_address | my_comments 1 | my_alias | my_address | my_comments 2 | other_name | other_address | other_comments I mean, I want to make a "SELECT..." query that returns in the same format as the "user" table ALL users and ALL alias.. Something like this: SELECT user.* FROM user LEFT JOIN user_alias ON `user`=`id` but it doesn't work for me..

    Read the article

  • casting unused return values to void

    - by markh44
    int fn(); void whatever() { (void) fn(); } Is there any reason for casting an unused return value to void, or am I right in thinking it's a complete waste of time? Follow up: Well that seems pretty comprehensive. I suppose it's better than commenting an unused return value since self documenting code is better than comments. Personally, I'll turn these warnings off since it's unnecessary noise. I'll eat my words if a bug escapes because of it...

    Read the article

  • Rails: Convert HTML to PDF?

    - by rip747
    What is the best and easiest way of taking HTML and converting it into a PDF, similar to use CFDOCUMENT on ColdFusion? UPDATE: I really appreciate all the comments and suggestions that people have given so far, however I feel that people leaving their answers are missing the point. 1) the solution has to be free or open sourced. one person suggested using pricexml and the other pd4ml. both of these solutions costs money (pricexml costing an arm and a leg) which i'm not about the fork over. 2) they must be able to take in html (either from a file, url or a string variable) and then produce the pdf. libraries like prawn, rprf, rtex are produced using their own methods and not taking in html. please don't think i'm ungrateful for the suggestions, it's just that pdf generation seems like a really problem for people like me who use ColdFusion but want to convert to Rails.

    Read the article

  • How to differentiate document requests from variable requests? and how to allow for urls that are no

    - by Lucas
    Hello. My last post was met by smarmy, unhelpful "answers" (comments), so i'll get right to it: if I have an htaccess file like so: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] RewriteRule ^([^/]+)/([^/]+)$ /index.php?page=$1&subject=$2 RewriteRule ^([^/]+)$ /index.php?page=$1 [L] how can I allow for other url variable names and values to be handled... say for instance I want to add extra unexpected url vars to this scenario /page/subject?urlvar1=value1&urlvar2=value2 and get the page I want without creating unexpected results? Any real help is greatly appreciated. Thanks!

    Read the article

  • .Net: Adding files and folders to SETUP Project programmatically

    - by Manish
    So, here is the scenario: I want to create a installer which would just dump few files and folders at a location specified by user. But the problem is these files are required to be picked up from a fixed source folder and then the installer is build. Also, these files may change any time and then again a new version of the installer is required to be created. So this needs to be done programmatically. Also, how can I add some coding stuff in setup projects? (New to SETUP PROJECTS) How? Any ideas/comments appreciated...

    Read the article

  • Android-iPhone single codebase cross development

    - by Lorenzo
    Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C. What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS? Update: based on current answers, the best cross platform development tool for iOS and Android seems to be Titanium appcelerator. I suspect that this topic will evolve overtime, so feel free to contribute with new information and comments. Thank you!

    Read the article

  • Erlang code critique

    - by dagda1
    Hi, I am trying to get my head round some basic erlang functionality and I could do with some comments on the following. I have the following erlang code that takes a list of tuples and returns a list minus an element if a key is found: delete(Key, Database) -> remove(Database, Key, []). remove([], Key, Acc) -> Acc; remove([H|T], Key, Acc) -> if element(1, H) /= Key -> [H| remove(T, Key, Acc)]; true -> remove(T, Key, Acc) end. Is this a good way of doing this? The if statement seems incorrect. Also is my use of the accumulator Acc making this tail recursive? Cheers Paul

    Read the article

  • WinDbg can't find mfc90 version 9.0.30729.4148 symbols on msdl.microsoft.com

    - by Simon Hofverberg
    I think the title states my problem fairly well. Where are those mfc symbols? Some background info: I have a crash dump that I want to analyze in WinDbg. My symbol path contains msdl.microsoft.com/download/symbols (and it says h t t p first but I'm a new user here so I'm not allowed to write that twice. The 9.0.30729.4148 version seems to be installed by some Windows update When a dump contains an earlier version of mfc90, it is located by WinDbg on the Microsoft symbol server with the same settings. When I use !sym noisy, the output for mfc90.dll contains: SYMSRV: http://msdl.microsoft.com/download/symbols/mfc90.dll/4A596D4939c000/mfc90.dll not found The same thing happens on two different computers Edit: See my comments below. The symbols are present on the server, but WinDbg can't get them.

    Read the article

  • Questions every good Java/J2EE Developer should be able to answer?

    - by Rachel
    I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question, and so in the same spirit, I am asking this question for Java/J2EE Developer. What questions do you think should a good Java/J2EE programmer be able to answer? I am marking this question as community wiki as it is not user specific and it aims to serve programming community at large. Looking forward for some amazing responses. EDIT: Please answer questions too, as suggested in the comments, so that people could learn something new regarding the language, too.

    Read the article

  • Revision histories and documenting changes

    - by jasonline
    I work on legacy systems and I used to see revision history of files or functions being modified every release in the source code, for example: // // Rev. No Date Author Description // ------------------------------------------------------- // 1.0 2009/12/01 johnc <Some description> // 1.1 2009/12/24 daveb <Some description> // ------------------------------------------------------- void Logger::initialize() { // a = b; // Old code, just commented and not deleted a = b + c; // New code } I'm just wondering if this way of documenting history is still being practiced by many today? If yes, how do you apply modifications on the source code - do you comment it or delete it completely? If not, what's the best way to document these revisions? If you use version control systems, does it follow that your source files contain pure source codes, except for comments when necessary (no revision history for each function, etc.)?

    Read the article

  • ImageCaptureCore documentation

    - by Marc Rochkind
    There are a few overviews in the OS X 10.6 docs that I access via XCode, and a bunch of examples, but the actual reference docs seem to be absent. I was able to figure things out by reading the inline comments in the header files (e.g., ICCameraDevice.h), which looks like the source for the XCode docs. Is there a way to install these docs? The biggest problem with the overview writeups and the examples is that they assume you have a GUI. The whole point of ImageCaptureCore, vs. ImageKit, as I understand it is that you don't have a GUI, or want to have your own (my case). Anyone else have a good time figuring out how these APIs work? Way too much work! --Marc

    Read the article

< Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >