Search Results

Search found 1523 results on 61 pages for 'assignment'.

Page 25/61 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Using perfectly formatted input as list in Haskell

    - by RankWeis
    I'm doing a program in Haskell (on the Haskell platform), and I know I'm getting perfectly formatted inputs, so the input may look like [ ['a'], ['b'], ['c'] ] I want Haskell to be able to take this and use it as a list of it's own. And, I'd like this list to be over multiple lines, i.e., I want this to also work: [ ['a'], ['b'], ['c'] ] I can parse this input, but I've been told there's a way to do this easily - this is supposed to be the 'trivial' part of the assignment, but I don't understand it.

    Read the article

  • Kernel error causing cpu to go into shutdown state

    - by EpsilonVector
    What kind of Kernel error can cause the cpu to go into a shut down state? I'm doing a homework assignment in OS, and we did changes in sched.c (adding a new scheduling policy, which involved ading another prio_array to the queue and switching between them when needed). Processes using this policy cause the cpu to enter a shut down state when they finish. Any suggestions where to look?

    Read the article

  • Is there a "fancy" Ruby way to check whether a local variable is both defined and evaluates to true without using ands and ors?

    - by Steven Xu
    This is quite a quick question. I currently use do_this if (testvar ||= false) Which works just fine. But this approach unnerves me because while fast, it does not short-circuit like defined?(testvar) && testvar does, and it instantiates and assigns a value to a local variable that is subsequently never used, which seems inefficient. I enjoy the very reasonable fact that instance variables are nil before assignment, but I'd like for the situation to be just as easy for local variables.

    Read the article

  • How can I stop user from navigating to the previous page

    - by ryanlancer
    Hi, I am developing a simple email portal as my college assignment and I refer gmail for various features.Now when we sign into a gmail account and then if we hit the back button of the browser we somehow still remain on the inbox page.In my case after login if I press back button I comeback to the login page.Please suggest how can I achieve this.Also I am a newbie to ASP.NET so keep it detailed

    Read the article

  • Copy constructor bug

    - by user168715
    I'm writing a simple nD-vector class, but am encountering a strange bug. I've stripped out the class to the bare minimum that still reproduces the bug: #include <iostream> using namespace std; template<unsigned int size> class nvector { public: nvector() {data_ = new double[size];} ~nvector() {delete[] data_;} template<unsigned int size2> nvector(const nvector<size2> &other) { data_ = new double[size]; int i=0; for(; i<size && i < size2; i++) data_[i] = other[i]; for(; i<size; i++) data_[i] = 0; } double &operator[](int i) {return data_[i];} const double&operator[](int i) const {return data_[i];} private: const nvector<size> &operator=(const nvector<size> &other); //Intentionally unimplemented for now double *data_; }; int main() { nvector<2> vector2d; vector2d[0] = 1; vector2d[1] = 2; nvector<3> vector3d(vector2d); for(int i=0; i<3; i++) cout << vector3d[i] << " "; cout << endl; //Prints 1 2 0 nvector<3> other3d(vector3d); for(int i=0; i<3; i++) cout << other3d[i] << " "; cout << endl; //Prints 1 2 0 } //Segfault??? On the surface this seems to work fine, and both tests print out the correct values. However, at the end of main the program crashes with a segfault, which I've traced to nvector's destructor. At first I thought the (incorrect) default assignment operator was somehow being called, which is why I added the (currently) unimplemented explicit assignment operator to rule this possibility out. So my copy constructor must be buggy, but I'm having one of those days where I'm staring at extremely simple code and just can't see it. Do you guys have any ideas?

    Read the article

  • Recursion problem in algorithm

    - by Marthin
    I'm not sure if this is the right place to post this, but the problem actually belongs to a programming assignment. Solve the recursion: T(0) = 2; T(n) = T(n-1) + 2; Solution: T(n) = 2(n+1) Could someone please show me how they got to that solution?

    Read the article

  • package private static member class vs. package private class

    - by Helper Method
    I was writing two implementations of a linked list for an assignment, a doubly linked list and a circular doubly linked list. Now as the class representing a Link within the linked list is the same in both implementations, I want to use it in both. Now I wonder which approach would be better: Implement the Link class as a package private static member class in the first implementation and then use this class in the second implementation or make the Link class a package private class.

    Read the article

  • Unnecessary code...

    - by Martin Milan
    Suppose I have some code that looks like this: Private Sub MySub() dim blnFlag as Boolean blnFlag = False for each item in collection if item.Name = "Mike" then blnFound = true exit for endif next item End Sub Now - the blnFLag = False assignment is not actually necessary - booleans are initialised as false, but I think it's inclusion makes the code easier to read. What's your opinion?

    Read the article

  • Pitfalls when switching to .NET for Windows CE?

    - by Presidenten
    Hi! I have been developing in .NET for quite some time now. But now I have customer who wants me to develop an application for them in .NET for Windows CE. I have done some embedded system programming in C before, but never in .NET. Please share any tips or tricks that would make my life easier when taking this assignment, or perhaps knowledge about any pitfalls to watch out for.

    Read the article

  • How we can dyanamically bind data with diffrerent dropdownlist in a grid view?

    - by Lock up
    i am wking on an assignment in which i have a gridview that contain deptno in a dropdownlist.by selecting a particular deptno from that dropdownlist,the number of employee of that department displayed in second dropdownlist that is for displaying employyee of a department.And after selecting the employee its salary detail and date of joining displayed in textboxes?we have two database table one is for employee(fields are deptno,empname,salary,joining date,status(true/false))and second department(fields are deptno,deptname,location);;;

    Read the article

  • Javascript code plagiarism checker

    - by Alex Ciminian
    I was wondering if there was any tool available that detects code plagiarism and works well with Javascript. I want to test assignment submissions for homework I'm going to hand out. The only tool that I know of that can do this is MOSS, but, from what I've heard, it's pretty poor for anything else than C. Unfortunately, I can't test it yet because I don't have submissions :).

    Read the article

  • muti user dungeon help

    - by mudman
    ive created a single user dungeon which i would like to create into a multi user dungoen so at least two plays can play how would i do that what code do i need to add can anyone help? i would show coding but if i do then everyone would see it and all my work will be copied as i know other students do use this site to so plz understand my situation and yes this is a homework/assignment work.

    Read the article

  • Add handler multiple times in jquery

    - by AdmSteck
    How does jquery handle event assignment when it comes to assigning the same handler multiple times? Let's say I have <div class="draggable">Some Text</div> Are there any side effects (performance or otherwise) from calling the following multiple times? $('.draggable').draggable();

    Read the article

  • System loops using non-integers?

    - by mary
    I wrote a .sh file to compile and run a few programs for a homework assignment. I have a "for" loop in the script, but it won't work unless I use only integers: #!/bin/bash for (( i=10; i<=100000; i+=100)) do ./hw3_2_2 $i done The variable $i is an input for the program hw3_2_2, and I have non-integer values I'd like to use. How could I loop through running the code with a list of decimal numbers?

    Read the article

  • When a tech document states that something is IP-Aware was does that specifically mean?

    - by Mike
    I need a class room definition for IP-aware for a research assignment. I.E. something that would be used, lets say, in a dictionary. Does anyone know or provide me with a link to a defintiion, I am having no luck with searches. Are IP-Aware devices only devices that can read/find/make decisions based on IP addresses. For example a router would be one, but a network printer would not?

    Read the article

  • Subset Problem -- Any Materials?

    - by bobber205
    Yes this is a homework/lab assignment. I am interesting in coming up with/finding an algorithm (I can comprehend :P) for using "backtracking" to solve the subset sum problem. Anyone have some helpful resources? I've spent the last hour or so Googling with not much like finding something I think I could actually use. xD Thanks SO!

    Read the article

  • PHP Priority Queue Implementation

    - by Zahymaka
    I just finished coding a complex job assignment application where a lot of the work was done using priority queues. When I deployed, however, I discovered the web server ran PHP 5.2. Has there been an implementation for PHP<5.3 that can server as a drop-in replacement for SPLPriorityQueue?

    Read the article

  • Ruby 1.8.7 and RSPEC tutorial

    - by Ben Nelson
    I'm just diving into ruby development for a class assignment and the machines at my Uni have only got ruby 1.8.7 on them so I need to develop for that. I have found tutorials on the web for ruby = 1.9 and rspec that are really good but I haven't found anything for ruby 1.8.7 (I'm guessing it's pretty dated?). Does anyone have anything using rspec testing and has an indepth discussion on ruby 1.8.7 for me? I'd really appreciate it! Thanks!

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >