Search Results

Search found 1034 results on 42 pages for 'legal'.

Page 31/42 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Polymorphic classes in templates

    - by soxarered
    Let's say we have a class hierarchy where we have a generic Animal class, which has several classes directly inherit from it (such as Dog, Cat, Horse, etc..). When using templates on this inheritance hierarchy, is it legal to just use SomeTemplateClass<Animal> and then shove in Dogs and Cats and Horses into this templated object? For example, assume we have a templated Stack class, where we want to host all sorts of animals. Can I simply state Stack<Animal> s; Dog d; s.push(d); Cat c; s.push(c);

    Read the article

  • Visual C++/CLI "An unhandled exception of type 'System.StackOverflowException' occurred in"

    - by JennyWong
    Hi, I have a game I am making, it is giving me this message... "An unhandled exception of type 'System.StackOverflowException' occurred in game.exe" To explain...I have a 2D array with 9 different opening moves and I am getting a random number to use as the array reference to retrieve the details needed for a move... you may get the same move again - but that's illegal. the move may be illegal for other reasons too So to try and fix this, I am calling the function again from within the function. The error occurs very randomly Is this bad practise to call a function from within itself? What would be a better way to randomly row from a 2D array, AND if it isn't accept to get another one.... Or better still, how can I retrieve a random LEGAL move?

    Read the article

  • Querying my JPA provider (Hibernate) for a collection of <Id,Name> of an entity

    - by Ittai
    Hi, I have an entity which looks something like this: Id (PK) Name Other business properties and associations... I have the need for my DAL (JPA with hibernate as provider) to return a list of the entities which correlate to some constraints (or just return them all) but instead of returning the entities themselves I'd like to receive only the Id and the Name properties. I know this can be achieved with HQL/SQL (something like: select id,name from entity where...) but I don't want to go down that road. I was thinking of somehow defining the pair a compositioned part of the entity and thought that might help me but I'm not sure that's "legal" as the Id is the PK. The logic for this scenario is to have a textbox which asynchronously queries the web-service (and through it the DAL) for the relevant entities and once an entity is selected then it is loaded as a whole and shipped to the front-end. Would appreciate any feedback, Ittai

    Read the article

  • A web application that uses someone else's mail server?

    - by John
    I'm building a web application, call it http://mywebapp.com, where a user should be able to create a newsletter and email it to everyone in his user account's contact list. So he can check mark all his friends, select an html template, fill in the body content, and send. The only catch to this is that after the user sends the email, the recipient must NOT be allowed to trace the source of the email back to http://mywebapp.com. The reason for this condition is because the user is a "reseller" of my business who wants to appear as if he's an independent business. If liability issues arise due to the reseller's unduly usage, I do not want to be caught up in the legal issues. Hence, I do not want anything about my business or technology to be traceable back to me by newsletter recipients. What's the best way to achieve this?

    Read the article

  • Can an XML prolog contain custom information?

    - by DaveJohnston
    Is it legal to add additional custom information somewhere in an XML prolog? For example, in my case, I would like to add an indicator of which serialiser version was used to create the XML, so that clients receiving the XML could automatically select the correct corresponding de-serialiser. I could add the information as an attribute of the root tag, but I thought it would be cleaner to add the information in the prolog, like the standard XML version: <?xml version="1.0"?> something like: <?serialiser version="1.0"?> or is the prolog reserved purely for those things specified by W3C?

    Read the article

  • Using code from this site

    - by user553798
    Hi, The legal section of this site mentions that all code by the contributors is licensed under the Creative Commons Attribution Share Alike License. Does this mean that I have to attribute the submitter even if the code in question is a few lines amongst hundreds or thousands of lines of code? What if I use code from a book or SDK? For eg; If I use the sample code from Google's Android SDK documentation, does that mean I need to attribute Google every time I write an app, after all it would be impossible to write an app without consulting the SDK docs, atleast initially... I am totally confused :S

    Read the article

  • C# private (hidden) base class

    - by Loadmaster
    It is possible to make a C# base class accessible only within the library assembly it's compiled into, while making other subclasses that inherit from it public? For example: using System.IO; class BaseOutput: Stream // Hidden base class { protected BaseOutput(Stream o) { ... } ...lots of common methods... } public class MyOutput: BaseOutput // Public subclass { public BaseOutput(Stream o): base(o) { ... } public override int Write(int b) { ... } } Here I'd like the BaseOutput class to be inaccessible to clients of my library, but allow the subclass MyOutput to be completely public. I know that C# does not allow base classes to have more restrictive access than subclasses, but is there some other legal way of achieving the same effect?

    Read the article

  • is it possible to use a python scrapper in a website?

    - by Tom
    I want to scrap a website and use that content in a website of my own. I am just wondering if that can be done with python 2.7, and if so how? If not, do I have to use JavaScript to scrap it? And do you have a good place to learn how to do that or good libraries for it. For those of you wondering, the website I am scrapping is legal, and they allow for this to be done. I have searched all over but apparently nobody tries to implement these scrappers that they write. I can write a web scrapper in python just fine. Say my scrapper scraps a name from a wikipedia page (John Doe for example), how can I use that name that I get in my website? Another update, I have found pjsrape and PhantomJS. I have only found one stack overflow post and the github examples with aren't very intuitive. If anybody has any experience or better ways to do it I would very much appreciate it

    Read the article

  • A way of allocating multidimensional arrays dynamically

    - by C77431
    salute.. I am learning dynamic allocations for multidimensional arrays in a book and I found some ways for that, And now haven't problem in it. But the author of the book shows us a way, but it doesn't work correctly. It is this: pbeans = new double [3][4]; // Allocate memory for a 3x4 array And this is the error: error C2440: '=' : cannot convert from 'int (*)[4]' to 'int *' how should i define pbeans ( if this type of coding is legal)? and what is the problem exactly? Regards.

    Read the article

  • Constructors with inheritance in c++

    - by Crystal
    If you have 3 classes, with the parent class listed first shape- 2d shapes, 3d shapes - circle, sphere When you write your constructor for the circle class, would you ever just initialize the parent Shape object and then your current object, skipping the middle class. It seems to me you could have x,y coordinates for Shape and initialize those in the constructor, and initialize a radius in the circle or sphere class, but in 2d or 3d shape classes, I wouldn't know what to put in the constructor since it seems like it would be identical to shape. So is something like this valid Circle::Circle(int x, int y, int r) : Shape(x, y), r(r) {} I get a compile error of: illegal member initialization: 'Shape' is not a base or member So I wasn't sure if my code was legal or best practice even. Or if instead you'd have the middle class just do what the top level Shape class does TwoDimensionalShape::TwoDimensionalShape(int x, int y) : Shape (x, y) {} and then in the Circle class Circle::Circle(int x, int y, int r) : TwoDimensionalShape(x, y), r(r) {}

    Read the article

  • Are there any sFTP clients that support a proxy that uses NTLM authentication?

    - by Iraklis
    The title pretty much summarizes the question. We have deployed an sFTP server that needs to be accessed from our client's MS Windows Pc's that reside within a restricted local area network. The only way they can get out for their Intranet is to use an HTTP proxy that requires NTLM authentication. From what I understand all open-source sFTP clients (FilleZilla,WinSCP,etc) do NOT support NTLM authentication (Because of legal issues). I know that there are workarounds to this (installing a local proxy at the machine that understands NTLM) but this would break all sorts of security policies of our client. So my question is : Does anyone know of any sFTP client that supports NTLM ?

    Read the article

  • iOS Downloading Videos and saving in Application Support folder

    - by Satyam svv
    In my application, i've to download videos around 10 to my application and play accordingly. Each video is around 50 MB. I'm using following code and then after downloading the video, i'm saving it to Application support folder to avoid icloud sync. But the problem is that when downloading the videos its crashing. [NSURLConnection sendAsynchronousRequest:req queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *rcvdDat, NSError * err) { . . . } What I'm thinking is that, while downloading the video, it resides in memory and so the total memory occupying by the app is increasing. Finally iOS is making the app to close. I would like to download the video and when ever a stream of data received, write to temp file and when completes move it to application support folder. Can some one help me on how to write it to file and save it at the end? I cannot use 3rd party libraries (unless its small) due to legal issues.

    Read the article

  • How can I declare a pointer structure using {}?

    - by Y_Y
    This probably is one of the easiest question ever in C programming language... I have the following code: typedef struct node { int data; struct node * after; struct node * before; }node; struct node head = {10,&head,&head}; Is there a way I can make head to be *head [make it a pointer] and still have the availability to use '{ }' [{10,&head,&head}] to declare an instance of head and still leave it out in the global scope? For example: //not legal!!! struct node *head = {10,&head,&head};

    Read the article

  • const keyword in Objective-c

    - by user392412
    int main(int argc, char *argv[]) { @autoreleasepool { const int x = 1; const NSMutableArray *array1 = [NSMutableArray array]; const NSMutableString *str1 = @"1"; NSString * const str2 = @"2"; // x = 2; compile error [array1 addObject:@"2"]; // ok // [str1 appendString:@"2"]; // runtime error // Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Attempt to mutate immutable object with appendString:' // str2 = @"3"; compile error } } my Question is Why array1 addObject is legal and why str1 appendString is forbidden?

    Read the article

  • odd behavior with java collections of parameterized Class objects

    - by Paul
    Ran into some questionable behavior using lists of parameterized Class objects: ArrayList<Class<String>> classList = new ArrayList<Class<String>>(); classList.add(Integer.class); //compile error Class intClass = Integer.class; classList.add(intClass); //legal apparently, as long as intClass is not parameterized Found the same behavior for LinkedList, haven't tried other collections. Is it like this for a reason? Or have I stumbled on something?

    Read the article

  • Bug in variadic function template specialization with MSVC?

    - by Andrei Tita
    Using the Visual Studio Nov 2012 CTP, which supports variadic templates (among other things). The following code: template<int, typename... Args> void myfunc(Args... args) { } template<> void myfunc<1, float>(float) { } produces the following errors: error C2785: 'void myfunc(Args...)' and 'void myfunc(float)' have different return types error C2912: explicit specialization 'void myfunc(float)' is not a specialization of a function template (yeah, the first one is pretty funny) So my questions are: 1) Am I writing legal C++11 here? 2) If yes, is there a way to find out if this is a known bug in MSVC before submitting it?

    Read the article

  • How to prevent illegal file and folder name creation in Windows Server 2003 or Windows Server 2008

    - by Joel Thibeault
    Preventing illegal file and Folder name creation on a Windows 2003/2008 file server is the goal. We know from articles like http://stackoverflow.com/questions/62771/how-check-if-given-string-is-legal-allowed-file-name-under-windows that for some reason the file system allows creation of illegal file/folder chacters and paths that exceed the limitations of Windows. I need the following question answered: How to remove cabability to create file or folder creation in NTFS that contains invalid characters? Can you remove the POSIX subsystem from Windows to fix this issue? How does disabling 8.3 dos name creation factor into this issue? Will any of these fixes prevent linux clients from creating windows compliant files?

    Read the article

  • Can you Borrow a PDF?

    - by WeNeedAnswers
    What are the legalities of letting someone borrow a book that you have purchased that so happens to be in PDF format with no DRM? I know that I can lend a printed book to someone and this not infringe copyright, but a pdf? I know that the thought police are going to be on my case about "no one here is a legal expert" or the "question can't be answered" or "controversial", But I would like to have the opportunity to at least surface the issue, and allow people to comment. I am not looking for point scoring on this, or even an answer, but as stackoverflow has a rather large technical savvy audience that would appreciate the question I think that it could be the next hurdle that will stop technical progress.

    Read the article

  • Use of class definitions inside a method in Java

    - by Bragaadeesh
    Hi public class TestClass { public static void main(String[] args) { TestClass t = new TestClass(); } private static void testMethod(){ class TestMethodClass{ int a; int b; int c; } TestMethodClass testMethodClass = new TestMethodClass(); } } I found out that the above piece of code is perfectly legal in Java. I have the following questions. What is the use of ever having a class definition inside a method? Will a class file be generated for TestMethodClass Its hard for me to imagine this concept in an Object Oriented manner. Having a class definition inside a behavior. Probably can someone tell me with equivalent real world examples. Thanks

    Read the article

  • Const-Qualification of Main's Parameters in C++

    - by pt2cv
    The C++ standard mandates that all conforming implementations support the following two signatures for main: int main(); int main(int, char*[]); In case of the latter signature, would the addition of (top-level) const-ness break any language rules? For example: int main(const int argc, char** const argv); From my understanding, top-level const qualification doesn't affect the function's signature hash, so it should be legal as far as the specification is concerned. Also, did anyone ever encounter an implementation which rejected this type of modification?

    Read the article

  • user buffer after doing 'write' to file opened with O_DIRECT

    - by user1868481
    I'm using the O_DIRECT flag to write to the disk directly from the user buffer. But as far as I understand, Linux doesn't guarantee that after this call, the data is written. It just writes directly from the user buffer to the physical device using DMA or anything else... Therefore, I don't understand if I can write to the user buffer after the call to 'write' function. I'm sure that example code will help to understand my question: char *user_buff = malloc(...); /* assume it is aligned as needed */ fd = open(..., O_DIRECT); write(fd, ...) memset(user_buff, 0, ...) Is the last line (memset) legal? Is writing to the user buffer valid that is maybe used by DMA to transfer data to the device?

    Read the article

  • Lua : How to check if one of the values associated with the specified key of a table is nil, from ap

    - by felace
    In lua, it's legal to do this : table={} bar if(table[key]==nil) foo However, using C API, I couldn't find way to check if there's a nil value on the specified position. lua_getglobal(L,"table"); lua_gettable(L,key); If there's a nil value stored in table[key], lua_gettable would give me the "unprotected error in call to Lua API (attempt to index a nil value)" message. Is there any way to check if there's actually something associated with that key, before actually pushing the key to do so ?

    Read the article

  • Getting all parent rows in one SQL query

    - by Alex
    I have a simple MySQL table thats contains a list of categories, level is determined by parent_id: id name parent_id --------------------------- 1 Home 0 2 About 1 3 Contact 1 4 Legal 2 5 Privacy 4 6 Products 1 7 Support 1 I'm attempting to make a breadcrumb trail. So i have the 'id' of the child, I want to get all available parents (iterating up the chain until we reach 0 "Home"). There could be any number or child rows going to an unlimited depth. Currently I am using an SQL call for each parent, this is messy. Is there a way in SQL to do this all on one query?

    Read the article

  • How does the increment operator (++) work on DateTime in C#

    - by sohtimsso1970
    What happens if you use the increment operator (++) on a DateTime type in C#? For instance, if I did this: DateTime blah = new DateTime(2010, 12, 24); blah++; What does blah become? Does that increment by a tick or a day? Or is that even legal? I don't have a dev environment around, and won't for a few days, or I would just try it and find out. I was too curious to wait so I figured I'd ask the community.

    Read the article

  • Legalities of programming companion Android apps

    - by honeal
    I'm interested in creating companion apps to several current Android apps and was curious if there is a legal issue with using their name and/or icons from the app. Like the companion app being called Angry Birds Companion or something and you were to use a picture of the level or one of the characters, etc (I'm simply pulling from thin air so don't judge the idea, just the question, please). I know there are Strategy guides to video games that use icons and names, but I'm assuming they have prior consent. Does anyone have any factual input on this?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >