Search Results

Search found 9366 results on 375 pages for 'common lisp'.

Page 154/375 | < Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >

  • Equivalent of IllegalArgumentException of Java in C++

    - by vito
    In Java if an input argument to a method is invalid, we can throw an IllegalArgumentException (which is of type RuntimeException). In C++, there is no notion of checked and unchecked exceptions. Is there a similar exception in standard C++ which can be used to indicate a runtime exception? Or is there a common style not in the standard but everyone follows in practice for a situation like this? Or, should I just create my own custom exception and throw it?

    Read the article

  • javascript instanceof get type from string name

    - by dcp
    Let's say I have this (assume the name variable is "receiver"): if (!(receiver instanceof com.HTMLReceiver)) { throw new com.IllegalArgumentException( name + " is not an instance of com.HTMLReceiver."); } I'd like to factor this code out into a common method so I could call it like this: Helper.checkInstance(receiver, "com.HTMLReceiver"); But I don't know of a way to convert the com.HTMLReceiver from a string to its actual type so I can use instanceof on it. Is there a way?

    Read the article

  • Tool to generated rotated versions of an image

    - by John
    In sprite-based systems, it's common to fake rotation of a sprite by having many different images, each showing it rotated an extra few degrees. Is there any free tool which will take a single image, and output a single image containing several rotations? It should also ideally let us control how many images are in each row. e.g if I have a 32x32 sprite and I want it rotated at 10 degree intervals, the tool might generate a 320x32 file or a 160x64 file

    Read the article

  • Where is python Language used

    - by Mirage
    I am a web developer and usually use php/JS/mysql. I have heard lot about python. I have no idea where is python used and why it is used. Just like php/asp/cold fusion/.net/ are used to build websites C, C++ , Java are used to build software or desktop apps Where does python stands from those langages WHich is the thing whic can be done by python but not with those common languages

    Read the article

  • Updating an atom with a single value

    - by mikera
    I have a number of atoms in my code where a common requirement is to update them to a new value, regardless of the current value. I therefore find myself writing something like this: (swap! atom-name (fn [_] (identity new-value))) This works but seems pretty ugly and presumably incurs a performance penalty for constructing the anonymous closure. Is there a better way?

    Read the article

  • How to implement automatic replacement of typos in Delphi2010

    - by sum1stolemyname
    I am looking for a way to develop a plugin for Delphi 2010IDE and have yet to find any information on that topic, not even on how to get started. What I want to accomplish is some kind of auto-spellchecker wich can be given a list of common typos (flase instead of false, .cerate instead of .create and the like) and replace them with the intended word. Do you know of a tutorial on plugin development, or maybe an open source plugin which i could base my work on?

    Read the article

  • Help needed to construct a SQL query

    - by song202y
    Need your help to get the list of suggested friends (who aren't friends of the current user but are friends of 2 or more of the current user's friends). The primary ordering should put people at the same school at the top, and the secondary ordering should put people with more common friends (that is, the number of people who are friends of that person and the current user) near the top. Users: user_id PK, user_name Profiles: user_id PK, school_name, ... Friendships: id PK, user_id FK, friend_id FK Thank you in advance. Joe

    Read the article

  • Get more than 7 dimensions in google analytics

    - by Paritosh Singh
    I am fetching my data from google analytics core api. I came to know that we can fetch only 7 dimensions using api, But here I need to fetch more than 7 dimensions with correct metrics. Is there anyway (other than using paid google analytics) to fetch more than 7 dmensions with correct metrics from google analytics. If not, then is there any mathematical formula through which we can find intersection of dimensions fetched using 2 different dimensions having one dimension in common. Thanks

    Read the article

  • Question with "extern" in C

    - by why
    When programming, I would like to split one large file(which contains main function) to many small files, so there is one common case: functions in small files can modify the var from main file, so i think extern is very useful! for instance: in main.c extern int i = 100; in small.c extern int i; fprintf(stdout, "var from main file: %d\n", i); I just want to know is my understanding right?

    Read the article

  • Any application to bind documents of different kind

    - by Codeslayer
    A situation that may be quite common in offices is: We communicate with clients over e-mails, exchange documents and spreadsheets with them. Is there any tool which will help me in binding all these outputs. Maybe I may get flamed on this as this is not exactly a programming question. But some inputs may certainly help me. Thanx

    Read the article

  • Good practice : compare a value with a boolean?

    - by NLemay
    Most of the time, I prefer to write this : if(isWelcome() == true){} if(isWelcome() == false){} instead of this if(isWelcome()){} if(!isWelcome()){} Because I feel that it is easier to read (but I do understand that it doesn't make sense). I would like to know if there is a common agreement about this practice. What most developer do? And I'm wondering if the compiler is doing the extra comparaison, or if it understand that it is useless.

    Read the article

  • How to justify text on a TextView made easy- Android

    - by Juan
    I'm looking for a simple way to forget that I'm using a WebView to have justified text in my TextView. Has someone made a custom view for this? I'm well aware that I can do something like this: WebView view = new WebView(this); view.loadData("my html with text justification","text/html","utf-8"); But it gets ugly when you want to set the size, the color or other common properties of the TextView, there must be a more convenient way of doing it.

    Read the article

  • Powershell interact with open Excel

    - by HKK
    To interact with excel in Powershell it is common to start a new excel as follows: $x = New-Object -comobject Excel.Application Instead of that I have an open Excel process already. (I get it as follows) $excelprocess = Get-Process | Where-Object {$_.name -eq "excel"} | Sort-Object -Property "Starttime" -descending | Select-Object -First 1 Is there a way to interact with this specific excel process over PS?

    Read the article

  • Database Patterns

    - by Onorio Catenacci
    Does anyone know of papers/books/etc. that document patterns for databases? For example, one common rule of thumb is that every table should have a primary key and that the key should be devoid of information content. So I was wondering if anyone had written a book or published papers regarding design patterns for designing relational databases?

    Read the article

  • How to test unescaped &nbsps; as a whitespace

    - by gleery
    I use apache common lang to unescape a block of html text which contains &nbsp;, I want to filter out blocks that contains only whitespaces. But I can't test the   as a whitespace. It's not in the normal whitespace list(http://en.wikipedia.org/wiki/Whitespace_character), and I try to print its Hex form by calling Character.getNumericValue which return -1. &nbsp should be a whitespace,isn't? But How can I test it?

    Read the article

  • Transforming OLTP Relational Database to Data Warehousing Model

    - by Russ Cam
    What are the common design approaches taken in loading data from a typical Entity-Relationship OLTP database model into a Kimball star schema Data Warehouse/Marts model? Do you use a staging area to perform the transformation and then load into the warehouse? How do you link data between the warehouse and the OLTP database? Where/How do you manage the transformation process - in the database as sprocs, dts/ssis packages, or SQL from application code?

    Read the article

  • Reinject dependencies of a freshly deserialized object

    - by NathanE
    If a program has literally just deserialized an object (doesn't really matter how, but just say BinaryFormatter was used). What is a good design to use for re-injecting the dependencies of this object? Is there a common pattern for this? I suppose I would need to wrap the Deserialize() method up to act as a factory inside the container. Thanks!

    Read the article

  • C#, XmlDocument, and special ISO Latin characters

    - by Trent
    I'm trying to load up xml into an XmlDocument, but it doesn't recognize the encoded '&eacute' and throws an error 'An error occurred while parsing Entity Name'. Now I can add a custom entity set in a DTD of my xml, so the XmlDocument loads properly. But what I'm hoping is that I can reference a url that has a common set of these ISO Latin encoded characters. Is this possible, or do I need to inject a custom list of DTD sets?

    Read the article

  • What are the rules about using an underscore in a C++ identifier?

    - by Roger Lipscombe
    It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use "m_foo". I've also seen "myFoo" occasionally. C# (or possibly just .NET) seems to recommend using just an underscore, as in "_foo". Is this allowed by the C++ standard?

    Read the article

< Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >