Search Results

Search found 5015 results on 201 pages for 'compiler construction'.

Page 90/201 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • PHP: How to Pass child class __construct() arguments to parent::__construct() ?

    - by none
    I have a class in PHP like so: class ParentClass { function __construct($arg) { // Initialize a/some variable(s) based on $arg } } It has a child class, as such: class ChildClass extends ParentClass { function __construct($arg) { // Let the parent handle construction. parent::__construct($arg); } } What if, for some reason, the ParentClass needs to change to take more than one optional argument, which I would like my Child class to provide "just in case"? Unless I re-code the ChildClass, it will only ever take the one argument to the constructor, and will only ever pass that one argument. Is this so rare or such a bad practice that the usual case is that a ChildClass wouldn't need to be inheriting from a ParentClass that takes different arguments? Essentially, I've seen in Python where you can pass a potentially unknown number of arguments to a function via somefunction(*args) where 'args' is an array/iterable of some kind. Does something like this exist in PHP? Or should I refactor these classes before proceeding?

    Read the article

  • Develop a small size software using C only for copying same data to multiple external drives simultaneously [on hold]

    - by VSP
    I want to develop a software that can copy the same data to multiple external drives, simultaneously. For example, consider a file Movie and I have 3 external drives to copy it to, and I want to copy Movie to all these 3 drives(these drives can be flash storage or external hard-disk or pen-drive etc. but have one thing in common, i.e. they are all external drives) at the same time, means when I right-click on Movie there has to be 1 option saying Copy to All Drives. It's a sort of mini-project and I want to use C language only. For starting I would like it to work only on Windows OS. What are the requirements of developing this software (not the system requirements but what will I need to develop such a software, like editor,compiler etc.)? I know this type of software must have already been developed but I want to use C language and C Language only. So, is it possible to develop such a software?

    Read the article

  • How to flag a class as under development in Java

    - by Usavich
    I'm working on a internship project, but I have to leave before I can finish up everything. I have 1 class that is not stable enough for production use. I want to mark/flag this class so that other people will not accidentally use it in production. I have already put the notice in Javadoc, but that doesn't seem enough. Some compiler error or warning would be better. The code is organized like this: [Package] | company.foo.bar.myproject |-- Class1.java |-- Class2.java |-- Class3.java <--(not stable) If there was a single factory class that calls those classes in public methods, I could have set the method to class3 as private. However the API is NOT exposed that way. Users will directly use those class, e.g. new Class1();, but I can't make a top-level class private. What's the best practice to deal with this situation?

    Read the article

  • MinGw Multiple Definitions

    - by makuto
    I'm trying to get the MinGw C++ compiler set up so I can compile my code for Windows computers and I'm having troubles. I originally installed minGw32 but then found that mingw-w64 was a better fit for me, so I uninstalled minGw32 and installed mingw-w64. The problem is that when I try to compile a simple hello world application I get Multiple Definition errors (which are not from my code). I'm thinking it has something to do with the removal of w32 and the installation of w64 without a clean directory. How do/should I clean the necessary folders & get rid of those multiple definitions.

    Read the article

  • Data driven charts and graphs from xml to svg

    - by garymlewis
    I asked this question a week ago, but did not do a good job of describing the problem. Here's a second attempt. I'd like to produce data-driven charts, graphs, and other data visualizations, starting with data in an xml database and ending up with the visualizations as SVG. Here's an example from the W3C. It uses Javascript to create a stacked bar chart as SVG from xml. I'd like to do something similar but use a graphics library (or ???) instead of js to handle the construction of axes, labels, titles, data points, etc. My question, then: what are the options that I should consider ... things like Raphael I suppose, but initially I'd like to cast a wide net and look at many different options. My experience is all with static data visualizations using statistics packages like R, but eventually I'd like to create interactive data visualizations with html5/css3/svg. Any help would be much appreciated. Thanks.

    Read the article

  • JVM Language Summit 2012 - Registration Open

    - by arungupta
    The 2012 edition of the JVM Languages Summit is Jul 30 - Aug 1, at Oracle's Santa Clara Campus. This is an "an open technical collaboration among language designers, compiler writers, tool builders, runtime engineers, and VM architects". There are presentations, workshops, and lightning talks. About 70 language and VM implementers attended last year and the talks were recorded. Some videos from last year are available here. Check out the Main Page, the Agenda, Logistics, and the Wiki. See the Registration Online; for questions, send mail to inquire AT jvmlangsummit.com.

    Read the article

  • Unable to locate essential development tools Ubuntu 11.04

    - by Anita 7
    I'm using Ubuntu 11.04 (VMware). I aim to implement OpenMP. Im using gcc 4.5 compiler. I tried to install it by using the command sudo apt-get install gcc 4.5. Afterwards I proceed with gcc -fopenmp foo.c BUT the output was: gcc: foo.c: No such file or directory gcc: no input files –. Now I tried to install the package by using : ubuntu@ubuntu:~$ sudo apt-get install essential Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package essential. I also tried apt-cache search essential and after that sudo apt-get install essential-dev But the same error again, E: Unable to locate package essential-dev Any solution,please? Do I need to download any package? What should I do? Thank you in advance :))

    Read the article

  • Less Mathematical Approaches to Machine Learning?

    - by Ed
    Out of curiosity, I've been reading up a bit on the field of Machine Learning, and I'm surprised at the amount of computation and mathematics involved. One book I'm reading through uses advanced concepts such as Ring Theory and PDEs (note: the only thing I know about PDEs is that they use that funny looking character). This strikes me as odd considering that mathematics itself is a hard thing to "learn." Are there any branches of Machine Learning that use different approaches? I would think that a approaches relying more on logic, memory, construction of unfounded assumptions, and over-generalizations would be a better way to go, since that seems more like the way animals think. Animals don't (explicitly) calculate probabilities and statistics; at least as far as I know.

    Read the article

  • Flash/SWF Editor For Ubuntu 12.10

    - by Chantelle
    First, thank you in advance for any help that you can give a recent transplant from Windows to Ubuntu. I have a question that I have been seeking the answer too but I draw a blank at every turn. I design websites, free of charge, for nonprofit organizations that are just starting and do not have the resources to hire a design firm. I am in need of a flash/swf editor and compiler. I had a program that I used with the awful previous O/S, however WINE would not run the program. Thank you in advance for any help that you can offer. Since I do not earn a dime for doing this, I would prefer if the program was open source, however any suggestions are greatly appreciated.

    Read the article

  • jquery animate() problem (syntax ?)

    - by meo
    $('#somediv').stop(false, true).animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() }) e.with() returns 640 opctions.speed contains 800 options.onNewSlide() contains a a custom callback function It works fine in firefox. But i debugged it with jquery.lint because it was throwing some random error in IE. lint tells me: When I called animate(...) with your args, an error was thrown! TypeError: c.speed is not a function { message="c.speed is not a function", more...} You passed: [Object { marginLeft="-=640px"}, 800, function()] and it indicates me the line i have posted. I have checked the jquery doc, but my syntax seams ok. Do you know what i am doing wrong? PS: i use jquery 1.4.2 from the google API you can see the error here: http://meodai.ch/slider/ (i know the code is under construction, but still)

    Read the article

  • Is there a way to continue a partially finished MinGW build?

    - by vsz
    I am just trying to become familiar with MinGW (and with more complex command-line compiler tools) I have a really giant project to build, I successfully managed to generate the makefile with CMake, and started mingw. After more than an hour of hard work, and building dozens of libraries successfully, the build ended in an error. It seems I added an option in CMake which is not supported in my system. My problem is, I cannot figure out a way to just skip that library and continue with the build process. If I remove the option in CMake and start mingw again, it starts from the beginning and rebuilds everything, even those libraries which are already built.

    Read the article

  • Is it a good idea to always use Google as the first step to solving a problem? [closed]

    - by The Rubber Duck
    Possible Duplicate: Importance of learning to google efficiently for a programmer? Avoiding lengthy discussions, as a senior level student in CS, how can I get away from Googling problems I run into? I find myself using it too much; I seemingly reach for the instant answer and then blindly copy and paste code, hoping it works. Anyone can do that. I've read the related threads about being a better programmer, but mostly those recommend practicing on pet projects, which I have done, but again I feel EVERY wall encountered, from design through completion, was hurdled with Google. Do professionals instantly "research" their problem? Or do you guys step back and try and figure it out yourselves? I'm talking about both 'algorithm/design' problems as well as compiler issues.

    Read the article

  • Why do I get this error trying to compile libxml2?

    - by bfaskiplar
    Although, I installed libxml2 once and reinstalled it for a few times. I cannot compile c-source code because compiler cannot find where the header file is. I am able to locate where it is (in the folder where I downloaded the tar.gz package) but I had a feeling in my guts that this package isn't installed correctly because when I tried to sudo make install, it says /bin/bash: /home/bfaskiplar/Downloads/tar.gz: No such file or directory make[2]: *** [install-libLTLIBRARIES] Error 127 make[2]: Leaving directory `/home/bfaskiplar/Downloads/tar.gz packages/libxml2-2.8.0' make[1]: *** [install-am] Error 2 make[1]: Leaving directory `/home/bfaskiplar/Downloads/tar.gz packages/libxml2-2.8.0' make: *** [install-recursive] Error 1 that's why I installed synaptic package manager and reinstalled it, but in this case, isn't it supposed to put header files in default directory where gcc normally searches in currently, I am able to compile it with -I option, but I wonder why do I have to copy headers manually even if I used synaptic for installation and why I am getting Error 1 and Error 2 when trying to install the package manually. thanks in advance

    Read the article

  • SEO: It's recommended to upload and put live a beta / non-finished version of web site??

    - by Jonathan
    I'm working on this big website and I want to put it online before its fully finished... I'm working locally and the database is getting really big so I wanted to upload the website and continue to work on it in the server, but allowing people to enter, so I can test. The question is if this is good for SEO, I mean, there are a lot of things SEO related that are incomplete.. For example: there are no friendly URLs, no sitemap, no .htacces file, lot of 'in-construction' sections... Does Google will penalize me forever? How does it works? Google indexes adn get the structure of the site just once or its constantly updating and checking for changes??? What i should do? What you recommend?!!?

    Read the article

  • How to install Syngen?

    - by inLoveWithPython
    I'm using Ubuntu 12.04. I found out that there is a near-obsolete program based on the obsolete Caml Special Light by someone at INRIA ( ftp.inria.fr, directory lang/caml-light ). The program is called Syngen. I need it to create Syntax diagrams. But i am not able to run the binaries that come with it, and i'm not able to compile the source because it needs a compiler called cmlc. Somebody help, i find REALLY less documentation about this in internet.

    Read the article

  • Problem adding a ppa

    - by Roman Rdgz
    I want to install gcc compiler 4.7 to use c++11 features. I have looked on the internet for instructions, and I found in several websites these steps: sudo add-apt-repository ppa:Ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.7 g++-4.7 The problem is that my console freezes when adding the ppa. At first I thought it was due to having an old Ubuntu version (11.04). So I have upgraded to 11.10 and then 12.04, and everything seems to work OK. But still having the same problem. Any help?

    Read the article

  • Imitating Multiple Inheritance in PHP

    - by fabieno
    I am working on my own MVC framework and found myself stuck. I need the following construction: Controller -- Backend_Controller -- Backend_Crud_Controller -- Frontend_Controller -- Frontend_Crud_Controller Both 'Backend_Crud_Controller' and 'Frontend_Crud_Controller' have the same functionality and thus they should extend another class named 'Base_Crud_Controller', the only difference comes from the 'Backend/Frontend' Controllers which implement different mechanisms. Basically they should inherit both classes but my problem is that 'Backend/Frontend' controller doesn't necessarily extend 'Base_Crud_Controller'. I know multiple inheritance doesn't exist in PHP but I am looking for a solution, I choose to refrain Mixins (like in Symfony) as I don't consider that an elegant solution. Interfaces do not suit me as all of these end up as concrete classes that should implement methods.

    Read the article

  • C++ linkage error . What am I doing wrong ? [migrated]

    - by nashmaniac
    So, this is the first time I actually separated a single program into a header and two .cpp files . But I think I am getting an linkage error . Heres how the directory looks . (heres a link to my image I dont have enough rep to post image in the question) http://i.stack.imgur.com/sbT4V.png The main.cpp is my main source file where all the calling functions and other important stuff goes . In functions.cpp I have all my functions , in the coordin.h file I have the function prototypes and structures and Constants . Everything is ok no typo nothing I have checked everything . But I am getting an undefined reference to function error. I have included the coordin.h file too . Do you think the functions.cpp file needs to go somewhere else I mean is the compiler not looking inside that file ? Thanks !

    Read the article

  • Class Members Over Exports

    - by VirusEcks
    When Using DLLs or Code-injecting to be Specific this is an example class only intended for explaining class test { int newint1; char newchararray[512]; void (*newfunction1)( int newarg1 ); int newfunction2( bool newarg1, char newarg2 ) { return newint1; } } mynewclass1; that covers most common elements that's included in classes now when exporting this function to another DLL or application and missed an element of those, either data member or function member, private or public what happens or changed their order ? and if each function is assigned it's value when Code-Injecting like mynewclass1.newfunction1 = (void *)(newexportedfunction); what's the happens in this case, if members of the class are pointers that are assigned after class construction and then missed one member or changed their order ?

    Read the article

  • Does this language feature already exist?

    - by Pindatjuh
    I'm currently developing a new language for programming in a continuous environment (compare it to electrical engineering), and I've got some ideas on a certain language construction. Let me explain the feature by explanation and then by definition: x = a U b; Where x is a variable and a and b are other variables (or static values). This works like a union between a and b; no duplicates and no specific order. with(x) { // regular 'with' usage; using the global interpretation of "x" x = 5; // will replace the original definition of "x = a U b;" } with(x = a) { // this code block is executed when the "x" variable // has the "a" variable assigned. All references in // this code-block to "x" are references to "a". So saying: x = 5; // would only change the variable "a". If the variable "a" // later on changes, x still equals to 5, in this fashion: // 'x = a U b U 5;' // '[currentscope] = 5;' // thus, 'a = 5;' } with(x = b) { // same but with "b" } with(x != a) { // here the "x" variable refers to any variable // but "a"; thus saying x = 5; // is equal to the rewriting of // 'x = a U b U 5;' // 'b = 5;' (since it was the scope of this block) } with(x = (a U b)) { // guaranteed that "x" is 'a U b'; interacting with "x" // will interact with both "a" and "b". x = 5; // makes both "a" and "b" equal to 5; also the "x" variable // is updated to contain: // 'x = a U b U 5;' // '[currentscope] = 5;' // 'a U b = 5;' // and thus: 'a = 5; b = 5;'. } // etc. In the above, all code-blocks are executed, but the "scope" changes in each block how x is interpreted. In the first block, x is guaranteed to be a: thus interacting with x inside that block will interact on a. The second and the third code-block are only equal in this situation (because not a: then there only remains b). The last block guarantees that x is at least a or b. Further more; U is not the "bitwise or operator", but I've called it the "and/or"-operator. Its definition is: "U" = "and" U "or" (On my blog, http://cplang.wordpress.com/2009/12/19/binop-and-or/, there is more (mathematical) background information on this operator. It's loosely based on sets. Using different syntax, changed it in this question.) Update: more examples. print = "Hello world!" U "How are you?"; // this will print // both values, but the // order doesn't matter. // 'userkey' is a variable containing a key. with(userkey = "a") { print = userkey; // will only print "a". } with(userkey = ("shift" U "a")) { // pressed both "shift" and the "a" key. print = userkey; // will "print" shift and "a", even // if the user also pressed "ctrl": // the interpretation of "userkey" is changed, // such that it only contains the matched cases. } with((userkey = "shift") U (userkey = "a")) { // same as if-statement above this one, showing the distributivity. } x = 5 U 6 U 7; y = x + x; // will be: // y = (5 U 6 U 7) + (5 U 6 U 7) // = 10 U 11 U 12 U 13 U 14 somewantedkey = "ctrl" U "alt" U "space" with(userkey = somewantedkey) { // must match all elements of "somewantedkey" // (distributed the Boolean equals operated) // thus only executed when all the defined keys are pressed } with(somewantedkey = userkey) { // matches only one of the provided "somewantedkey" // thus when only "space" is pressed, this block is executed. } Update2: more examples and some more context. with(x = (a U b)) { // this } // can be written as with((x = a) U (x = b)) { // this: changing the variable like x = 5; // will be rewritten as: // a = 5 and b = 5 } Some background information: I'm building a language which is "time-independent", like Java is "platform-independant". Everything stated in the language is "as is", and is continuously actively executed. This means; the programmer does not know in which order (unless explicitly stated using constructions) elements are, nor when statements are executed. The language is completely separated from the "time"-concept, i.e. it's continuously executed: with(a < 5) { a++; } // this is a loop-structure; // how and when it's executed isn't known however. with(a) { // everytime the "a" variable changes, this code-block is executed. b = 4; with(b < 3) { // runs only three times. } with(b > 0) { b = b - 1; // runs four times } } Update 3: After pondering on the type of this language feature; it closely resemblances Netbeans Platform's Lookup, where each "with"-statement a synchronized agent is, working on it's specific "filter" of objects. Instead of type-based, this is variable-based (fundamentally quite the same; just a different way of identifiying objects). I greatly thank all of you for providing me with very insightful information and links/hints to great topics I can research. Thanks. I do not know if this construction already exists, so that's my question: does this language feature already exist?

    Read the article

  • override __set in __construct() in php?

    - by user151841
    I have a class based on database values. I'm using __set to automatically sync database values with the class properties. Set checks an array of database fields that it is allowed to update in the database. The field 'id' isn't in the list, so __set will throw an exception if you try to do $objDbRow->id = 5;. However, there is one time when I do want to set the id property of the object, and that's on instantiation. So in __constuct, I have $this->id = $id (where $id is passed to __construct). However, __set seems to be intercepting the setting here, because an exception is being thrown on construction. What's the way to get around this? I suppose I also have a boolean flag, like $instantiated, that __set() would check before it does it's field whitelist checking. But that feels inelegant.

    Read the article

  • What are steps in making an operating system in C ? [duplicate]

    - by ps06756
    This question already has an answer here: Compiler/OS Design - Where to start [closed] 3 answers I am trying to make an my own OS. This is for educational purpose only, so that I get to understand the internals as well as get a good idea of low level programming. I have some prior application development experience in C#/python/C++/C. I am a noob in assembly language(very less experience and knowledge). I understand that in writing an operating system,we can't go without assembly language. Currently, I have just printed a string in assembly language in the boot sector using qemu and BIOS interrupts. What I want is that, can someone specifically point out the steps that I need to follow to make my operating systems run C programs. So that, I can start writing my OS in C. Any other piece of advice to help a newbie, regarding the same is also welcome. Although, I have looked into many os development related tutorials/websites, I can't seem to find this information anywhere.

    Read the article

  • Google offre un SDk permettant de créer des web apps natives en C et C++ dans son navigateur Chrome

    Google offre un SDk permettant de créer des web apps natives en C et C++ dans son navigateur Chrome Google vient de sortir une présentation du SDK de Native Client, sa technologie open source qui permet à des codes natifs en C et C++ de s'exécuter dans un navigateur. Ceci permettra d'utiliser des applications plus avancées sur le web, et qui pourront tourner dans Google Chrome. Les capacités des applications web sont étendues au delà des limites imposées par l'utilisation de JavaScript. Un aperçu vidéo du SDK vient d'être publié, il montre les bases de son utilisation : comment se lancer dans l'écriture d'une application en quelques minutes seulement. Google offre donc un compiler C et C++ basé sur GCC...

    Read the article

  • Questions to ask a client before beginning a website

    - by Jason
    I am aware of this question which deals with the technical aspects of website construction, but I was unable to find any place with suggestions on knowledge you must obtain from a client before undergoing a project. As someone who freelances on the side, I think this could be incredibly useful. What important questions must one ask the client (and require an answer to) before undergoing a website? or, in other words, What must you know about the project before starting it? This can range from "When do I get paid?" to "How many pages will the site be?". I believe this is relevant to programming because you must know how to communicate with your client to get all the information necessary before you can begin programming. If not, downstream changes can put a serious delay on the project from things not hashed out beforehand. Thanks!

    Read the article

  • gfortran in ubuntu 12.10

    - by user115334
    I hope my message will get read soon and somebody will give me a solution. I use fortran to do simulation and gfortran is the compiler I use. Recently I migrated from Ubuntu 10.10 to 12.10. After installing gfortran then I tried to compile and run my fortran programs then the problem started. I successfully compiled the program but I am unable to execute it. (I work in a directory in shared partition, not in HOME directory). When I compiled the program and run it within HOME directory, everything worked fine. On my Ubuntu 10.10, I was able to compile and execute fortran program from everywhere not only within HOME directory. This is what I do for compiling and executing fortran program: gfortran hello.f90 -o hello # to compile it ./hello # to execute it I'm blind about PATH or anything like it (this has to do with it, I suspect) so please give me direction.

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >