Search Results

Search found 496 results on 20 pages for 'nb'.

Page 8/20 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to get Eclipse + PyDev + App Engine + Unit testing to work?

    - by PEZ
    I want to run my unit tests for a Python Google App Engine project using Run As = Python unit-test But when I try that all my Model tests bail with the error message: BadArgumentError: app must not be empty. Anyone got this to work? NB: The tests runs fine using Nose --with-gae. But I want the PyDev integration with hyperlinking of resources and such.

    Read the article

  • How to update strongly typed Html.DropDownList using Jquery

    - by Remnant
    I have a webpage with two radiobuttons and a dropdownlist as follows: <div class="sectionheader">Course <div class="dropdown"><%=Html.DropDownList("CourseSelection", Model.CourseList, new { @class = "dropdown" })%> </div> <div class="radiobuttons"><label><%=Html.RadioButton("CourseType", "Advanced", false )%> Advanced </label></div> <div class="radiobuttons"><label><%=Html.RadioButton("CourseType", "Beginner", true )%> Beginner </label></div> </div> The dropdownlist is strongly typed and populated with Model.CourseList (NB - on the first page load, 'Beginner' is the default selection and the dropdown shows the beginner course options accordingly) What I want to be able to do is to update the DropDownList based on which radiobutton is selected i.e. if 'Advanced' selected then show one list of course options in dropdown, and if 'Beginner' selected then show another list of courses. The code I would like to call sits within my Controller: public JsonResult UpdateDropDown(string courseType) { IDropDownList dropdownlistRepository = new DropDownListRepository(); IEnumerable<SelectListItem> courseList = dropdownlistRepository.GetCourseList(courseType); return Json(courseList); } Edit - Updated below to show latest position Using examples provided in jQuery in Action, I now have the following jQuery code: $('.radiobuttons input:radio').click(function() { var courseType = $(this).val(); //Get selected courseType from radiobutton var dropdownList = $(".dropdown"); //Ref for dropdownlist $.getJSON("/ByCourse/UpdateDropDown", { courseType: courseType }, function(data) { $(dropdownList).loadSelect(data); }); }); The loadSelect function is taken straight from the book and is as follows: (function($) { $.fn.emptySelect = function() { return this.each(function() { if (this.tagName == 'SELECT') this.options.length = 0; }); } $.fn.loadSelect = function(optionsDataArray) { return this.emptySelect().each(function() { if (this.tagName == 'SELECT') { var selectElement = this; $.each(optionsDataArray, function(index, optionData) { var option = new Option(optionData.Text, optionData.Value); if ($.browser.msie) { selectElement.add(option); } else { selectElement.add(option, null); } }); } }); } })(jQuery); 1 day+ later I still cannot get this to work. Assuming the jQuery code is correct then I can only think that the issue is with retrieving the actual data with $getJSON. I have verified that JsonResult UpdateDropDown does actually retrieve valid data. What am I missing? Assembly reference? (NB: I have MicrosoftAjax.js and MicrosoftMvcAjax.js in my head tags of the master page Should JsonResult be ActionResult? (I have seen both used in samples on web) Do I need to register route Controller/UpdateDropDown in Global.asax? Any further guidance would be appreciated.

    Read the article

  • How to search for alphanumeric word before or after a keyword in perl?

    - by aliocee
    I have sentences as shown in the below examples: $sen1 = "The quick brown fox jump KEYWORD over123 the3 lazy dog, fox is quick"; $sen2 = "The quick brown fox jump123 KEYWORD over the lazy dog, fox is quick"; i want to use the keyword 'KEYWORD' as my search string to extract the alphanumeric words before and after the search string using Perl regular expression. sample output: over123 jump123 NB: The word 'the3' is left out because i'm only searching for alphanumeric words exactly before or after the 'KEYWORD'. Thanks

    Read the article

  • Xcode SDK version for testing & release?

    - by fuzzygoat
    I am just putting the finishing touches to an iPhone app that I have written, signed up to the developer program and installed Xcode 3.2.2 (1650) My question is which version of the SDK should I be using to build my application? I was thinking I should be using the latest 3.2 but when I select that I can only access the iPad simulator ... Should I be using 3.1.3 which runs the iPhone simulator. (NB: I originally developed the app in 3.1.2 cheers gary

    Read the article

  • Is there an alias for the local machine name in the Windows 7 login screen?

    - by Mikael
    We have many computers connected to a AD. The computers names is auto generated. When I want to log in using a local account, I have to figure out what the computer's name is, and log in using the following syntax: [COMPUTER_NAME]\local_account Now I'm wondering if there is an alias that I can use instead? So instead of logging in using NB-aw35sdds\local_account, I can use something like localhost\local_account.

    Read the article

  • String manipulation in Linux kernel module

    - by user577066
    I am having a hard time in manipulating strings while writing module for linux. My problem is that I have a int Array[10] with different values in it. I need to produce a string to be able send to the buffer in my_read procedure. If my array is {0,1,112,20,4,0,0,0,0,0} then my output should be: 0:(0) 1:-(1) 2:-------------------------------------------------------------------------------------------------------(112) 3:--------------------(20) 4:----(4) 5:(0) 6:(0) 7:(0) 8:(0) 9:(0) when I try to place the above strings in char[] arrays some how weird characters end up there here is the code int my_read (char *page, char **start, off_t off, int count, int *eof, void *data) { int len; if (off > 0){ *eof =1; return 0; } /* get process tree */ int task_dep=0; /* depth of a task from INIT*/ get_task_tree(&init_task,task_dep); char tmp[1024]; char A[ProcPerDepth[0]],B[ProcPerDepth[1]],C[ProcPerDepth[2]],D[ProcPerDepth[3]],E[ProcPerDepth[4]],F[ProcPerDepth[5]],G[ProcPerDepth[6]],H[ProcPerDepth[7]],I[ProcPerDepth[8]],J[ProcPerDepth[9]]; int i=0; for (i=0;i<1024;i++){ tmp[i]='\0';} memset(A, '\0', sizeof(A));memset(B, '\0', sizeof(B));memset(C, '\0', sizeof(C)); memset(D, '\0', sizeof(D));memset(E, '\0', sizeof(E));memset(F, '\0', sizeof(F)); memset(G, '\0', sizeof(G));memset(H, '\0', sizeof(H));memset(I, '\0', sizeof(I));memset(J, '\0', sizeof(J)); printk("A:%s\nB:%s\nC:%s\nD:%s\nE:%s\nF:%s\nG:%s\nH:%s\nI:%s\nJ:%s\n",A,B,C,D,E,F,G,H,I,J); memset(A,'-',sizeof(A)); memset(B,'-',sizeof(B)); memset(C,'-',sizeof(C)); memset(D,'-',sizeof(D)); memset(E,'-',sizeof(E)); memset(F,'-',sizeof(F)); memset(G,'-',sizeof(G)); memset(H,'-',sizeof(H)); memset(I,'-',sizeof(I)); memset(J,'-',sizeof(J)); printk("A:%s\nB:%s\nC:%s\nD:%s\nE:%s\nF:%s\nG:%s\nH:%s\nI:%s\nJ:%\n",A,B,C,D,E,F,G,H,I,J); len = sprintf(page,"0:%s(%d)\n1:%s(%d)\n2:%s(%d)\n3:%s(%d)\n4:%s(%d)\n5:%s(%d)\n6:%s(%d)\n7:%s(%d)\n8:%s(%d)\n9:%s(%d)\n",A,ProcPerDepth[0],B,ProcPerDepth[1],C,ProcPerDepth[2],D,ProcPerDepth[3],E,ProcPerDepth[4],F,ProcPerDepth[5],G,ProcPerDepth[6],H,ProcPerDepth[7],I,ProcPerDepth[8],J,ProcPerDepth[9]); return len; }

    Read the article

  • KVO on the "windows" value of UIApplication?

    - by Ariel Malka
    The following is not working: [[UIApplication sharedApplication] addObserver:self forKeyPath:@"windows" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:NULL]; Together with that, on the Observer side: - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { NSLog(@"never reached!"); } Any clues? N.B. My uber-goal is to get a notification when a (system-generated) UIAlertView is shown.

    Read the article

  • ADO Access Tab button

    - by CREFLY
    Hello I moved my access apllication from DAO into ADO connection. It works better but I am encountering a problem when I enter a value in a form's field then I push the tab button the screen takes me to the first fields of the form and I lose my activecontrol which is the control of the field in which i enter the value. N.B.: If I clicked the cursor using the mouse after applying the value in the specified field, it works properly... Any help will highly appreciated

    Read the article

  • Am I right in thinking there is no way to put an if statement and an else statement on line in Python?

    - by Louise
    Am I right in thinking I can't put an if-statement and the corresponding else-statement on one line in Python? NB: variable = value1 if condition else value2 is NOT two statements. It's one statement which can take the value of one of two expressions. I want to do something like if condition a=value else b=value Am I right in thinking this requires a full if-else in Python? Like if condition: a=value else: b=value Thanks, Louise

    Read the article

  • Parse lines of integers in C

    - by Jérôme
    This is a classical problem, but I can not find a simple solution. I have an input file like: 1 3 9 13 23 25 34 36 38 40 52 54 59 2 3 9 14 23 26 34 36 39 40 52 55 59 63 67 76 85 86 90 93 99 108 114 2 4 9 15 23 27 34 36 63 67 76 85 86 90 93 99 108 115 1 25 34 36 38 41 52 54 59 63 67 76 85 86 90 93 98 107 113 2 3 9 16 24 28 2 3 10 14 23 26 34 36 39 41 52 55 59 63 67 76 Lines of different number of integers separated by a space. I would like to parse them in an array, and separate each line with a marker, let say -1. The difficulty is that I must handle integers and line returns. Here my existing code, it loops upon the scanf loop (because scanf can not begin at a given position). #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { if (argc != 4) { fprintf(stderr, "Usage: %s <data file> <nb transactions> <nb items>\n", argv[0]); return 1; } FILE * file; file = fopen (argv[1],"r"); if (file==NULL) { fprintf(stderr, "Error: can not open %s\n", argv[1]); fclose(file); return 1; } int nb_trans = atoi(argv[2]); int nb_items = atoi(argv[3]); int *bdd = malloc(sizeof(int) * (nb_trans + nb_items)); char line[1024]; int i = 0; while ( fgets(line, 1024, file) ) { int item; while ( sscanf (line, "%d ", &item )){ printf("%s %d %d\n", line, i, item); bdd[i++] = item; } bdd[i++] = -1; } for ( i = 0; i < nb_trans + nb_items; i++ ) { printf("%d ", bdd[i]); } printf("\n"); }

    Read the article

  • Android phone contact 2.1

    - by Sudeep SR
    Hi in my application i need to show all the phone contact including contact image, currently i read all the data in to array and show ,but in some lower end phones it create problem ,like out of memory is there any alternative way to display the all the phone contact NB: the default phone contact intent is not my requirment , i need to get all the phone numbers, and also if first name is empty i need to show the organization name

    Read the article

  • Scripty2 : how to close dialog

    - by nicolas_o
    Heya, I am looking for a way to close a scripty2 dialog like this : http://mir.aculo.us/stuff/scripty2-ui/test/functional/controls_dialog.html From outside of the dialog (i.e. with firebug command line) but my javascript mojo is a bit limited and after 30 min of going around the DOM I cannot find a way. Any hints ? NB : scripty2 is a rewrite of script.aculo.us which uses bits of Jquery UI.

    Read the article

  • php,unix command ,imagick not working

    - by user345804
    Hi, i am trying to bend text using imagemagik in PHP. but the commands shown in the website are not working. http://www.fmwconcepts.com/imagemagick/texteffect/index.php how can i run these scripts in PHP ? somebody please help me.. NB :-t \'SOME ARCHBOTTOM TEXT\' -s outline -e arch-bottom -d 1.0 -f Arial -p 48 -c skyblue -b white -o black -l 1 -u lightpink

    Read the article

  • How can I "merge", "flatten" or "pivot" results from a query which returns multiple rows into a sing

    - by dsm
    I have a simple query over a table, which returns results like the following: id id_type id_ref 2702 5 31 2702 16 14 2702 17 3 2702 40 1 2702 26 4 And I would like to merge the results into a single row, for instance: id concatenation 2702 5,16,17,40,26:31,14,3,1,4 Is there any way to do this within a trigger? NB: I know I can use a cursor, but I would really prefer not to unless there is no better way.

    Read the article

  • how to run imagemagik commands in PHP ?

    - by user345804
    Hi, i am trying to bend text using imagemagik in PHP. but the commands shown in the website are not working. http://www.fmwconcepts.com/imagemagick/texteffect/index.php how can i run these scripts in PHP ? somebody please help me.. NB :-t \'SOME ARCHBOTTOM TEXT\' -s outline -e arch-bottom -d 1.0 -f Arial -p 48 -c skyblue -b white -o black -l 1 -u lightpink

    Read the article

  • Is there an ActiveRecord equivalent to using a nested subquery i.e. ... where NOT IN(select...) ?

    - by Snorkpete
    I have 3 models: Category, Account, and SubAccount The relations are: Accounts has_many :sub_accounts Categories has_many :sub_accounts I wanted to get a list of all Categories that are not used by a given account. My method in the Category model currently looks like: class Category < ActiveRecord::Base def self.not_used_by(account) Category.find_by_sql("select * from categories where id not in(select category_id from sub_accounts where account_id = #{account.id})") end end My question is, is there a cleaner alternative than using SQL? NB. I am currently using Rails 3(beta)

    Read the article

  • How can I "merge" or "flatten" results from a query which returns multiple rows into a single result

    - by dsm
    I have a simple query over a table, which returns results like the following: id id_type id_ref 2702 5 31 2702 16 14 2702 17 3 2702 40 1 2702 26 4 And I would like to merge the results into a single row, for instance: id concatenation 2702 5,16,17,40,26:31,14,3,1,4 Is there any way to do this within a trigger? NB: I know I can use a cursor, but I would really prefer not to unless there is no better way.

    Read the article

  • Aligning a link beside a h2 heading

    - by jme1988
    Really simple question, how do I force a link to appear inline with a h2 heading? I have the following code : http://jsfiddle.net/jezzipin/6DpPX/ and I'd just like the 'Back to top' link to appear inline with the 'Social Media' heading but everything I try doesn't seem to work. Even the use of spans. Any help would be greatly appreciated. jme1988 N.B. Just to be clear, this is the effect I am after:

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >