Search Results

Search found 2404 results on 97 pages for 'alex howell'.

Page 73/97 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • 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

  • help me to choose between two designs

    - by alex
    // stupid title, but I could not think anything smarter I have a code (see below, sorry for long code but it's very-very simple): namespace Option1 { class AuxClass1 { string _field1; public string Field1 { get { return _field1; } set { _field1 = value; } } // another fields. maybe many fields maybe several properties public void Method1() { // some action } public void Method2() { // some action 2 } } class MainClass { AuxClass1 _auxClass; public AuxClass1 AuxClass { get { return _auxClass; } set { _auxClass = value; } } public MainClass() { _auxClass = new AuxClass1(); } } } namespace Option2 { class AuxClass1 { string _field1; public string Field1 { get { return _field1; } set { _field1 = value; } } // another fields. maybe many fields maybe several properties public void Method1() { // some action } public void Method2() { // some action 2 } } class MainClass { AuxClass1 _auxClass; public string Field1 { get { return _auxClass.Field1; } set { _auxClass.Field1 = value; } } public void Method1() { _auxClass.Method1(); } public void Method2() { _auxClass.Method2(); } public MainClass() { _auxClass = new AuxClass1(); } } } class Program { static void Main(string[] args) { // Option1 Option1.MainClass mainClass1 = new Option1.MainClass(); mainClass1.AuxClass.Field1 = "string1"; mainClass1.AuxClass.Method1(); mainClass1.AuxClass.Method2(); // Option2 Option2.MainClass mainClass2 = new Option2.MainClass(); mainClass2.Field1 = "string2"; mainClass2.Method1(); mainClass2.Method2(); Console.ReadKey(); } } What option (option1 or option2) do you prefer ? In which cases should I use option1 or option2 ? Is there any special name for option1 or option2 (composition, aggregation) ?

    Read the article

  • Reference table values in a war against magic numbers

    - by Alex N.
    This question bugged me for years now and can't seem to find good solution still. I working in PHP and Java but it sounds like this maybe language-agnostic :) Say we have a standard status reference table that holds status ids for some kind of entity. Further let's assume the table will have just 5 values, and will remain like this for a long time, maybe edited occasionally with addition of a new status. When you fetch a row and need to see what status it is you have 2 options(as I see it at least) - put it straight ID values(magic numbers that is) or use a named constant. Latter seem much cleaner, the question though is where those named constants should leave? In a model class? In a class that uses this particular constant? Somewhere else?

    Read the article

  • Generic applet style system for publishing mathematics demonstrations?

    - by Alex
    Anyone who's tried to study mathematics using online resources will have come across these Java applets that demonstrate a particular mathematical idea. Examples: http://www.math.ucla.edu/~tao/java/Mobius.html http://www.mathcs.org/java/programs/FFT/index.html I love the idea of this interactive approach because I believe it is very helpful in conveying mathematical principles. I'd like to create a system for visually designing and publishing these 'mathlets' such that they can be created by teachers with little programming experience. So in order to create this app, i'll need a GUI and a 'math engine'. I'll probably be working with .NET because thats what I know best and i'd like to start experimenting with F#. Silverlight appeals to me as a presentation framework for this project (im not worried about interoperability right now). So my questions are: does anything like this exist already in full form? are there any GUI frameworks for displaying mathematical objects such as graphs & equations? are there decent open source libraries that exposes a mathematical framework (Math.NET looks good, just wondering if there is anything else out there) is there any existing work on taking mathematical models/demos built with maple/matlab/octave/mathematica etc and publishing them to the web?

    Read the article

  • How can I write this Table Valued Function as a Stored Procedure?

    - by Alex
    I have the following TVF for fulltext search: FUNCTION [dbo].[Fishes_FullTextSearch] (@searchtext nvarchar(4000), @limitcount int) RETURNS TABLE AS RETURN SELECT * FROM Fishes INNER JOIN CONTAINSTABLE(Fishes, *, @searchtext, @limitcount) AS KEY_TBL ON Fishes.Id = KEY_TBL.[KEY] When I'm using this TVF, it doesn't return a collection of objects of type Fish (which I want!) - instead LINQ creates a new result type which includes all "Fish" fields and the fields Key and Rank. In another question, it was suggested that I rewrite this TVF into a stored procedure for it to return Fish objects only. Can someone help me do this please? Also, it needs to be ordered by Rank. Thank you!

    Read the article

  • Tool that auto-generate a code for accesing a xml-file

    - by alex
    My application have a configuration xml-file. That file contains more than 50 program settings. At the present time I read and save each program setting separately. I guess It is not effi?iently for such tasks. I need something that can auto-generate a code for load and save my program settings using predefined xml-schema. I found a dataset in Add New Item dialog. Unfortunately, i cannot add new code to dataset1 such as events in set-accessors of properties because of this // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Maybe, there is a tool that allows a user to generate a wrapper for accesing a xml-file ? Such as DataSet1, but with availability to add events.

    Read the article

  • Change row/column span programatically (tablelayoutpanel)

    - by alex
    I have a tablelayoutpanel. 2x2 - 2 columns 2 rows. For example, I added a button button1 in a 1 row, second column. button1 has a dock property set to Fill. VS Designer allows to set column/row span properties of button1. I want an availability to change row span property of button1 programatically, so it can fill all second column(1 row and second row) and availability to set it back. How ?

    Read the article

  • Reordering fields in Django model

    - by Alex Lebedev
    I want to add few fields to every model in my django application. This time it's created_at, updated_at and notes. Duplicating code for every of 20+ models seems dumb. So, I decided to use abstract base class which would add these fields. The problem is that fields inherited from abstract base class come first in the field list in admin. Declaring field order for every ModelAdmin class is not an option, it's even more duplicate code than with manual field declaration. In my final solution, I modified model constructor to reorder fields in _meta before creating new instance: class MyModel(models.Model): # Service fields notes = my_fields.NotesField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True last_fields = ("notes", "created_at", "updated_at") def __init__(self, *args, **kwargs): new_order = [f.name for f in self._meta.fields] for field in self.last_fields: new_order.remove(field) new_order.append(field) self._meta._field_name_cache.sort(key=lambda x: new_order.index(x.name)) super(TwangooModel, self).__init__(*args, **kwargs) class ModelA(MyModel): field1 = models.CharField() field2 = models.CharField() #etc ... It works as intended, but I'm wondering, is there a better way to acheive my goal?

    Read the article

  • script only works in IE

    - by Alex
    I have the following JavaScript for show running line: <script type="text/javascript" language="javascript"> //Change script's width (in pixels) var marqueewidth=800 //Change script's height (in pixels, pertains only to NS) var marqueeheight=20 //Change script's scroll speed (larger is faster) var speed=3 //Change script's contents var marqueecontents='You text here' if (document.all) document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>') function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ setTimeout("window.onresize=regenerate",450) intializemarquee() } } function intializemarquee(){ document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>') document.cmarquee01.document.cmarquee02.document.close() thelength=document.cmarquee01.document.cmarquee02.document.width scrollit() } function scrollit(){ if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){ document.cmarquee01.document.cmarquee02.left-=speed setTimeout("scrollit()",100) } else{ document.cmarquee01.document.cmarquee02.left=marqueewidth scrollit() } } window.onload=regenerate2 </script> What should I change in script to make it work in FF and Chrome? Thanks

    Read the article

  • In Python, how do I decode GZIP encoding?

    - by alex
    I downloaded a webpage in my python script. In most cases, this works fine. However, this one had a response header: GZIP encoding, and when I tried to print the source code of this web page, it had all symbols in my putty. How do decode this to regular text?

    Read the article

  • How do you make a wrapped div fill the window horizontally?

    - by Alex Parkinson
    I have a div which is contained by another 960px-wide centered div. I'm adding a background to the inner div which should expand all the way to the window's edges horizontally, essentially escaping the boundaries of its container. If I apply a large negative margin and equal amount of padding, this works on the left side, but the right side causes a scroll bar to appear. Does anyone know how I can achieve this without causing scroll bars?

    Read the article

  • Search-friendly way to store checkbox values in MySQL?

    - by Alex
    What is a search-friendly way to store checkbox values in the database? Currently, checkboxes are processed as an array and values are separated by a ";" As such: <input type="checkbox" name="frequency[]" value="Daily"/> Daily <input type="checkbox" name="frequency[]" value="Weekly"/> Weekly <input type="checkbox" name="frequency[]" value="Monthly"/> Monthly The PHP backend runs implode(';', $frequency) and adds the string to the database. This works fine but it's a nightmare when it comes to searching. Is there a better way to approach this?

    Read the article

  • Jquery ui Datepicker, showing next month.

    - by Alex
    I wonder how to set next month with showing only mondays active: i tried to do smth like that but it wont work function onlyMondaysNextMonth(date){ var day = date.getDay(); var mDate = date.getMonth() + 1; return { minDate: mDate, } return [(day == 1),'']; } Thank you.

    Read the article

  • How does one go about writing a virtual MIDI interface?

    - by Alex
    I want to do some funky things with controlling MIDI streams, and I'd like to be able to pipe MIDI input into an application like Ableton or Reason. Presumably this involves some sort of driver level work? Ultimately I'd like to write my application in Python, so if there is some Python-based solution, I'd consider it. I'm perfectly fine with using C/C++, though, so that's not a problem.

    Read the article

  • How do I configure emacs speedbar for C# mode?

    - by Alex B
    I'm using emacs with C# Mode and when I turn on the speedbar, no files show up by default. I can choose "show all files" on the speedbar mode, but then every .cs file shows up with a '[?]' next to the name. How do I properly configure speedbar so it shows up with .cs files by default? How do I get the '[+]' next to each file so I can navigate inside the file?

    Read the article

  • How to call a generic method with an anonymous type involving generics?

    - by Alex Black
    I've got this code that works: def testTypeSpecialization = { class Foo[T] def add[T](obj: Foo[T]): Foo[T] = obj def addInt[X <% Foo[Int]](obj: X): X = { add(obj) obj } val foo = addInt(new Foo[Int] { def someMethod: String = "Hello world" }) assert(true) } But, I'd like to write it like this: def testTypeSpecialization = { class Foo[T] def add[X, T <% Foo[X](obj: T): T = obj val foo = add(new Foo[Int] { def someMethod: String = "Hello world" }) assert(true) } This second one fails to compile: no implicit argument matching parameter type (Foo[Int]{ ... }) = Foo[Nothing] was found. Basically: I'd like to create a new anonymous class/instance on the fly (e.g. new Foo[Int] { ... } ), and pass it into an "add" method which will add it to a list, and then return it The key thing here is that the variable from "val foo = " I'd like its type to be the anonymous class, not Foo[Int], since it adds methods (someMethod in this example) Any ideas? I think the 2nd one fails because the type Int is being erased. I can apparently 'hint' the compiler like this: def testTypeSpecialization = { class Foo[T] def add[X, T <% Foo[X]](dummy: X, obj: T): T = obj val foo = add(2, new Foo[Int] { def someMethod: String = "Hello world" }) assert(true) }

    Read the article

  • Why doesn't my javascript work after AJAX filling the HTML?

    - by alex
    $.ajax({ method:"get", url:"/details/", data:"id="+id, beforeSend:function(){ }, success:function(html){ $("#holder").html(html); } }); After I fill a div with a HTML from an AJAX call, this is my javascript at the top of /details/ <script type="text/javascript"> alert('hi'); </script> MY DETAILS HTML CONTENT GOES HERE But it's not working

    Read the article

  • How to write specific application for facebook?

    - by alex
    Hi there! Please help me with documentation to write specific application for Facebook. Need to know, what language to choose? is specific facebook API? is documentation for API? is site with samples catalogue? need to know all related info. Some words about app, it would be app, which compare users interests. Thanks in advance.

    Read the article

  • Scan site for images and alt tags

    - by Alex
    We'd like to run an scan on our site that returns a report with the following: each image tag found and a visual representation of that image on the report the alt tag for that image (also identify if an alt tag not found) Is there a simple tool that does this? We're attempting to check for alt tags, and make sure the alt tags accurately describe to the image they represent. That's why the visual representation in the report is important.

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >