Search Results

Search found 3677 results on 148 pages for 'cs 79'.

Page 44/148 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Joining links together in a dictionary

    - by ptabatt
    Hi guys, I'm student here, new to python and programming in general. I have a dictionary links which holds a tuple mapped to a number. How can I join the second url in the second tuple together with the urljoin() function? What I'm trying to do is get complete links so I can run a recursive function search() which takes a complete url as an arguement, finds all the links in each url and stores the number of links mapped to the links in a database. So far, I have: links {('href', 'http://reed.cs.depaul.edu/lperkovic/csc242/test2.html'): 1, ('href', 'test3.html'): 1} I want http://reed.cs.depaul.edu/lperkovic/csc242/test3.html...

    Read the article

  • Why is generated XAML spitting out namespaces that are not asked for?

    - by Matt Holmes
    I have a very simple XAML form, that has one namespace definition. For some reason, when Visual Studio processes that XAML file in to it's component .g.cs, it's sticking a bunch of namespace definitions at the top that I have not asked for in the XAML, or the code behind, and they are namespaces that no longer exist in my project. Thus the project is failing to compile. Why is Visual Studio sticking arbitrary namespace 'using' statements in my generated XAML .g.cs files? It's caused my entire project to break. Not one time did this .xaml file ever reference the namespaces in question, so it's doubly annoying.

    Read the article

  • I want to request JSON inside of a WordPress page.

    - by gnucom
    Hello Everyone, For the last few hours I've been trying to set up this http://code.google.com/apis/books/docs/dynamic-links.html on a WordPress blog. Google's API sends back a JSON response (which is supposed to be "put" into _GBSBookInfo variable). However, that variable never is assigned so my javascript callback function explodes saying the variable doesn't exist. So far, all of my javascript is in the WordPress header. I tried this outside of WordPress and it works fine. This is the static page: <script src="http://books.google.com/books?bibkeys=0307346609&jscmd=viewapi&callback=response_handler"> This is the handler: function response_handler(data) { var bookInfo = _GBSBookInfo["0307346609"]; // the var that doesn't exist document.getElementById("test123").innerHTML = bookInfo.thumbnail_url; } Thanks for any help in advance, WordPress has been extremely frustrating by limiting so much! If I'm doing anything stupid please say so, I'm a new javascript programmer. EDIT: I've used firebug so far to identify the problem to be: the _GBSBookInfo variable never gets "created" or "exists". I'm not sure how javascript works at this level. Hopefully this helps. ERRORS: Error: _GBSBookInfo is not defined Line: 79

    Read the article

  • Problem deriving a user control from an abstract base class in website project

    - by Sprintstar
    In a Visual Studio website, I have created a user control. This control is derived from a class (in App_Code) that is itself derived from System.Web.UI.UserControl. This is an abstract class with an abstract method. I then try to implement that method in the user control, but I get the following errors from Visual Studio: Error 1 'WebUserControl.AbstractMethod()': no suitable method found to override C:\Users\User\Documents\Visual Studio 2010\WebSites\Delme\WebUserControl.ascx.cs 10 28 C:\...\Delme\ Error 2 'WebUserControl' does not implement inherited abstract member 'AbstractBaseClass.AbstractMethod()' c:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\delme\0eebaa86\f1a48678\App_Web_nrsbzxex.0.cs 14 Error 1 says that my override of the abstract method is invalid, it doesn't recognise the abstract method in the base class. Error 2 says that the partial class automatically built by asp.net doesn't implement the abstract method! Note that this works fine when the code is used in a Web Application project. Why is this happening?

    Read the article

  • Need some suggestions on my softwares architecture. [Code review]

    - by Sergio Tapia
    I'm making an open source C# library for other developers to use. My key concern is ease of use. This means using intuitive names, intuitive method usage and such. This is the first time I've done something with other people in mind, so I'm really concerned about the quality of the architecture. Plus, I wouldn't mind learning a thing or two. :) I have three classes: Downloader, Parser and Movie I was thinking that it would be best to only expose the Movie class of my library and have Downloader and Parser remain hidden from invocation. Ultimately, I see my library being used like this. using FreeIMDB; public void Test() { var MyMovie = Movie.FindMovie("The Matrix"); //Now MyMovie would have all it's fields set and ready for the big show. } Can you review how I'm planning this, and point out any wrong judgement calls I've made and where I could improve. Remember, my main concern is ease of use. Movie.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; namespace FreeIMDB { public class Movie { public Image Poster { get; set; } public string Title { get; set; } public DateTime ReleaseDate { get; set; } public string Rating { get; set; } public string Director { get; set; } public List<string> Writers { get; set; } public List<string> Genres { get; set; } public string Tagline { get; set; } public string Plot { get; set; } public List<string> Cast { get; set; } public string Runtime { get; set; } public string Country { get; set; } public string Language { get; set; } public Movie FindMovie(string Title) { Movie film = new Movie(); Parser parser = Parser.FromMovieTitle(Title); film.Poster = parser.Poster(); film.Title = parser.Title(); film.ReleaseDate = parser.ReleaseDate(); //And so an so forth. } public Movie FindKnownMovie(string ID) { Movie film = new Movie(); Parser parser = Parser.FromMovieID(ID); film.Poster = parser.Poster(); film.Title = parser.Title(); film.ReleaseDate = parser.ReleaseDate(); //And so an so forth. } } } Parser.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using HtmlAgilityPack; namespace FreeIMDB { /// <summary> /// Provides a simple, and intuitive way for searching for movies and actors on IMDB. /// </summary> class Parser { private Downloader downloader = new Downloader(); private HtmlDocument Page; #region "Page Loader Events" private Parser() { } public static Parser FromMovieTitle(string MovieTitle) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindMovie(MovieTitle); return newParser; } public static Parser FromActorName(string ActorName) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindActor(ActorName); return newParser; } public static Parser FromMovieID(string MovieID) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindKnownMovie(MovieID); return newParser; } public static Parser FromActorID(string ActorID) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindKnownActor(ActorID); return newParser; } #endregion #region "Page Parsing Methods" public string Poster() { //Logic to scrape the Poster URL from the Page element of this. return null; } public string Title() { return null; } public DateTime ReleaseDate() { return null; } #endregion } } ----------------------------------------------- Do you guys think I'm heading towards a good path, or am I setting myself up for a world of hurt later on? My original thought was to separate the downloading, the parsing and the actual populating to easily have an extensible library. Imagine if one day the website changed its HTML, I would then only have to modifiy the parsing class without touching the Downloader.cs or Movie.cs class. Thanks for reading and for helping!

    Read the article

  • FishEye REST API get reviews for changeset

    - by Viktar
    I am trying to get list of reviews for specific changeset using FishEye REST API. Here is my URL: http://fisheye.company.com/rest-service-fe/search-v1/reviewsForChangesets/NameOfRepository/ I am posting it using fiddler composer with following request body: cs=16964 Here is my response: <?xml version="1.0" encoding="UTF-8" standalone="true"?> <reviewsForChangesets> <changesets> <changeset> <reviews/> <changesetId>16964</changesetId> </changeset> </changesets> </reviewsForChangesets> As you can see it has no reviews information. However if I go to following url I can see that 16964 changeset has reviews assigned to it: http://fisheye.company.com/changelog/NameOfRepository?cs=16964 I also tried to use: http://fisheye.company.com/rest-service-fe/search-v1/reviewsForChangeset/NameOfRepository/ I got the same response. Am I missing something?

    Read the article

  • Python CGI Premature end of script error depending on script parameters.

    - by nickengland
    I have a python script which should parse a file and produce some output to disk, as well as returning a webpage linking to the outputted files. When run with a file posted from the HTML form I get no HTML output back, just a 500 error page and the error_log contains the line: [Mon Apr 19 15:03:23 2010] [error] [client xxx.xxx.121.79] Premature end of script headers: uploadcml.py, referer: http://xxx.ch.cam.ac.uk:9000/ However, the files which the script should be saving are indeed saved to disk. If I run it without any arguments, the script returns the correct HTML indicating no file was parsed. All the information I have found on the web about Premature end of script headers implies it is due to either a missing header, or lack of permissions on the python script but neither can apply to me. The first lines of the script are: #!/home/nwe23/bin/bin/python import cgitb; cgitb.enable() import cgi import pybel,openbabel import random print "Content-Type: text/html" print so when run, I can see no way for it to fail to output the header, and it DOES output the header when run without a file to parse, but when given a file produces the error(but still parsed the file and saves the output to disk!). Does anyone know how this is happening and what can be done to fix it? I have tried adding wrongly-indented gibberish (such as foobar) at various points in the file, and this results in adding an indent error to the error_log wherever it is, even if its the very last line in the script. The Premature script headers error remains though. Does this mean the script is executing all the way through?

    Read the article

  • updating batches of data

    - by gaponte69
    I am using GridView in asp .net and editing data with edit command field property (as we know after updating the edited row, we automatically update the database), and I want to use transactions (with begin to commit statement - including rollback) to commit this update query in database, after clicking in some button (after some events for example), not automatically to insert or update the edited data from grid directly to the DB...so I want to save them somewhere temporary (even many edited rows - not just one row) and then to confirm the transaction - to update the real tables in database... Any suggestions are welcomed... I've used some good links, but very helpful, like: http://www.asp.net/learn/data-access/tutorial-63-cs.aspx http://www.asp.net/learn/data-access/tutorial-66-cs.aspx etc...

    Read the article

  • Where can I learn more about datastructure tricky questions?

    - by Sandbox
    I am relatively new to programming (around 1 year programming C#-winforms). Also, I come from a non CS background (no formal degree) Recently, while being interviewed for a job, I was asked about implementing a queue using a stack. I fumbled and wan't able to answer the question. After, the interview I could do it(had to spend some time). I have learnt (and think that I know it well) basic algorithms in datastructures using the book Data Structures: A Pseudocode Approach with C - Richard F. Gilberg (Author) . I want to know about sites/ books which have such questions along with answers. I think this will allow me to develop my CS specific problem solving skills. Any help is appreciated. BOUNTY: I am looking at some blog/website with datastructure and algorithms Q&A.

    Read the article

  • Program repeats each time a character is scanned .. How to stop it ?

    - by ZaZu
    Hello there, I have a program that has this code : #include<stdio.h> main(){ int input; char g; do{ printf("Choose a numeric value"); printf(">"); scanf("\n%c",&input); g=input-'0'; }while((g>=-16 && g<=-1)||(g>=10 && g<=42)||(g>=43 && g<=79)); } It basically uses ASCII manipulation to allow the program to accept numbers only .. '0' is given the value 48 by default...the ASCII value - 48 gives a ranges of numbers above (in the while statement) Anyway, whenever a user inputs numbers AND alphabets, such as : abr39293afakvmienb23 The program ignores : a,b,r .. But takes '3' as the first input. For a b and r, the code under the do loop repeats. So for the above example, I get : Choose a numeric value >Choose a numeric value> Choose a numeric value >3 Is there a way I can stop this ??? I tried using \n%c to scan the character and account for whitespace, but that didnt work :( Please help thank you very much !

    Read the article

  • WCF service reference stopped generating code for one project

    - by Mike Pateras
    I have references to two different WCF services in a project. I updated the reference for one of the services, and now no code is generated for it. The references.cs file just has the "this is genrated code" comment at the top. Updating that same service in other projects and updating the other service both work fine. It's only that one service reference in this one project that's causing the problem, and I'm getting no information from Visual Studio (it just says it failed to generate code and I should look at the other errors, which provide no information). If I uncheck the "reuse types in referenced assemblies", code is generated, but I don't want to have this one project be different from the others. I'd like to solve the problem. Re-checking the reuse type option produces an empty references.cs file, again. The collection type doesn't seem to matter, either. How can I diagnose and solve this problem?

    Read the article

  • DNS Lookup in simple C#/asp.net ajax call is extremely slow

    - by Ryan
    I'm running this out of the VS 2008 debugger on Windows 7, running .Net 3.5. The idea was to make all ajax requests with jQuery only, rather than .net, following some tutorials online. Default.aspx - HTML page, jquery triggers method in Default.aspx.cs http://pastebin.com/pxBvKA2H Default.aspx.cs - C# Webform, just defines a GetDate fuction, which only returns a string for now (trying to eliminate any possible issues) (can only post one hyperlink...) pastebin.com/pnHn50hu The ajax query takes longer than it should. Profiling with firebug revealed that it took 1.03 ms. 1s DNS Lookup | 26ms Waiting | 1ms Receiving EDIT: It continues to take the same set of times if you continue to click and resubmit the request. Is there anything I can do to cut down on the DNS Lookup time / what did I do wrong? Thanks for any help.

    Read the article

  • Amazon S3 copy request timeouts

    - by jean27
    We're uploading files to a temporary folder in a bucket. After that, we're trying to copy the uploaded files to its actual folder then delete the files in the temporary folder. It doesn't timeout when working with a single file. We're using the ThreeSharp API. Stack Trace: [WebException: The operation has timed out] System.Net.HttpWebRequest.GetRequestStream() +5322142 Affirma.ThreeSharp.Query.ThreeSharpQuery.GenerateAndSendHttpWebRequest(Request request) in C:\Consulting\Amazon\Amazon S3\Affirma.ThreeSharp\Affirma.ThreeSharp\Query\ThreeSharpQuery.cs:386 Affirma.ThreeSharp.Query.ThreeSharpQuery.Invoke(Request request) in C:\Consulting\Amazon\Amazon S3\Affirma.ThreeSharp\Affirma.ThreeSharp\Query\ThreeSharpQuery.cs:479

    Read the article

  • Sending events to the dev version of a ruleset via HTTP

    - by Steve Nay
    I've been writing an endpoint that sends events to a KRL ruleset via HTTP GET (based on the documentation here), in this format: http://cs.kobj.net/blue/event/{domain}/{eventname}/{appid} That works great when the version of the app I want to test is the same one that's deployed. I don't always want to deploy before testing it, though. Using the stated format for calling the dev version doesn't work. It still calls the deployed version of my ruleset: http://cs.kobj.net/blue/event/{domain}/{eventname}/{appid}:kynetx_app_version=dev What am I doing wrong?

    Read the article

  • x509 certificate Information

    - by sid
    Certificate: Data: Version: 3 (0x2) Serial Number: 95 (0x5f) Signature Algorithm: sha1WithRSAEncryption Issuer: C=, O=, CN= Validity Not Before: Apr 22 16:42:11 2008 GMT Not After : Apr 22 16:42:11 2009 GMT Subject: C=, O=, CN=, L=, ST= Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): ... ... ... Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: critical Code Signing X509v3 Authority Key Identifier: keyid: ... Signature Algorithm: sha1WithRSAEncryption a9:55:56:9b:9e:60:7a:57:fd:7:6b:1e:c0:79:1c:50:62:8f: ... ... -----BEGIN CERTIFICATE----- ... ... ... -----END CERTIFICATE----- In This Certificate, Which is the public key? is Modulus? what does the Signature Algorithm, a9:55:56:... represent (is it message digest)? And what is between -----BEGIN CERTIFICATE----- & -----END CERTIFICATE-----, is That the whole certificate? As I am novice, little bit confusing between the message digest and public key? Thanks in Advance-opensid

    Read the article

  • MonoTouch & SQLite - Cannot open database after previous successful connections

    - by Tanis Draven
    I am having difficulty in reading data from my SQLite database from MonoTouch. I can read and write without any difficulty for the first few screens and then suddenly I am unable to create any further connections with the error: Mono.Data.Sqlite.SqliteException: Unable to open the database file at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x0007e] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:136 at Mono.Data.Sqlite.SqliteConnection.Open () [0x002aa] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteConnection.cs:888 I ensure that i dispose and close every connection each time i use it but still i have this problem. For example: var mySqlConn = new SqliteConnection(GlobalVars.connectionString); mySqlConn.Open(); SqliteCommand mySqlCommand = new SqliteCommand(SQL, mySqlConn); mySqlCommand.ExecuteNonQuery(); mySqlConn.Close(); mySqlCommand.Dispose(); mySqlConn.Dispose(); I'm guessing that I'm not closing the connections correctly. Any help would be greatly appreciated.

    Read the article

  • Problem with compiler in Web.Config for generating xml doc

    - by asksuperuser
    I have several problems when putting code below in Web.Config to be able to generate xml doc with website (not webproject): <compiler language="c#;cs;csharp" extension=".cs" warningLevel="0" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/doc:c:\doc\WebDocs.xml"> How do I put a directory with spaces instead of /doc:c:\doc\WebDocs.xml? How do I put a directory that is a subdirectory of current project? Why my xml file output is nearly empty? Is it because some properties, methods, ... have no xml comment?

    Read the article

  • ajax call is looping indefinitely

    - by zurna
    I am pulling categories from an xml file. I only have 5 categories but the code below keeps pulling categories indifitely! Weird thing, I dont even have a loop in the xml function. Test link: http://www.refinethetaste.com/FLPM/ $.ajax({ dataType: "xml", url: "/FLPM/content/home/index.cs.asp?Process=ViewVCategories", success: function(xml) { $(xml).find('row').each(function(){ var id = $(this).attr('id'); var CategoryName = $(this).find('CategoryName'); $("<div class='tab fleft'><a href='http://www.refinethetaste.com/FLPM/content/home/index.cs.asp?Process=ViewVideos&CATEGORYID="+ id +"'>"+ CategoryName.text() + "</a></div>").appendTo("#VCategories"); CategoryName.find("div.row-title .red").tabs("div.panes > div"); }); } });

    Read the article

  • Passing parameter to pthread

    - by Andrei Ciobanu
    Hello, i have the following code: #include <stdlib.h> #include <stdio.h> #include <pthread.h> #define NUM_THREADS 100 struct thread_param { char *f1; char *f2; int x; }; void *thread_function(void *arg){ printf("%d\n", ((struct thread_param*)arg)->x); } int main(int argc, char *argvs[]){ int i, thread_cr_res = 0; pthread_t *threads; threads = malloc(100 * sizeof(*threads)); if(threads == NULL){ fprintf(stderr,"MALLOC THREADS ERROR"); return (-1); } for(i = 0; i < NUM_THREADS; i++){ struct thread_param *tp; if((tp = malloc(sizeof(*tp))) == NULL){ fprintf(stderr,"MALLOC THREAD_PARAM ERROR"); return (-1); } tp->f1 = "f1"; tp->f2 = "f2"; tp->x = i; thread_cr_res = pthread_create(&threads[i], NULL, thread_function, (void*)tp); if(thread_cr_res != 0){ fprintf(stderr,"THREAD CREATE ERROR"); return (-1); } } return (0); } What i want to achieve, is to print all the numbers from 0 to 99, from threads. Also i am experimenting a way to pass a structure as a thread input parameter. What i am finding curios, is that not all the numbers are shown, eg: ./a.out | grep 9 9 19 29 39 49 And sometimes some numbers are shown twice: ... 75 74 89 77 78 79 91 91 Can you please explain me why is this happening ? No errors are shown.

    Read the article

  • Learning networking fundamentals

    - by bplus
    Not having a CS degree has left large holes in my programming related knowledge. In particular I'd really like to learn some of the computer networking stuff I would have got in a good CS degree. The problem I really have is "not knowing what I don't know". So far I know I don't know anything about the following (as far as computer networks are concearned) -sockets -ports -internet protocol (the whole IP stack I keep hearing about). Can anyone add more to the list? Can anyone suggest a project (writing a toy web server?) Thanks in advance

    Read the article

  • Strange Bug in iPhone SDK

    - by Crazer
    Hi all, I found a strange bug in iphone sdk. I try to explain it: I have a number of uibuttons in a view. They are all just images. Every buttons has a title but that is not displayed so you just see the images (all 80x80). I made it all in IB. In my code I position those buttons. Here's a snippet of that code: for(NSString *iconObject in iconArray){ //retrieve UIButtons from dictionary iconButton = [allIconsDictionary objectForKey:iconObject]; iconButton.hidden = NO; //position and resize icon Buttons iconButton.frame = CGRectMake((79 * col) + 28, (70 * row) + 70, 80 ,80); col++; //five buttons in a row if(col%5 == 0){ row++; col = 0; } } That works like it should. But for all buttons that title starts with a 't' the title displays in the simulator (also on the device). The title of the other buttons are not shown just those where the title starts with a 't'. I have no clue what this could be?! I hope I could describe the problem.

    Read the article

  • Hibernate saveorUpdate method problem

    - by umesh awasthi
    Hi all, i am trying to work on with Hibernate (Database side for first time) and some how struck in choosing best possible way to use saveOrUpdate or Save.Update i have a destination POJO class and its other attributes which needs to be updated along with the Destination entity. i am getting an XML file to be imported and i am using the following code to update/save the destination entity along with its attribute classes. try{ getSessionFactory().getCurrentSession().beginTransaction(); getSessionFactory().getCurrentSession().saveOrUpdate(entity); getSessionFactory().getCurrentSession().getTransaction().commit(); } catch(Exception e){ getSessionFactory().getCurrentSession().getTransaction().rollback(); } finally{ getSessionFactory().close(); } everything is working fine untill i am using the same session instance.but later on when i am using the same XML file to update the destination PO for certain attributes it giving me the following error. SEVERE: Duplicate entry 'MNLI' for key 'DESTINATIONID' 9 Jan, 2011 4:58:11 PM org.hibernate.event.def.AbstractFlushingEventListener performExecutions SEVERE: Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2242) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2678) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) i am using UUID as primary key for the Destination table and in destination table i have a destination id which is unique.but i can understand that in the secodn case hibernate is not able to find if there is already an entry for the same destination in the DB and trying to execute insert statement rather than update. one possible solution is i can user destinationid to check if there is already a destination inplace with the given id and based on the results i can issue save or update command. my question is can this be achieve by any other good way..? Thanks in advance

    Read the article

  • Properties are making trouble

    - by DhavalR
    In my application I have added a Properties.cs file which contains properties that I am would use through out the application. I am getting NullReferenceException = Object reference not set to an instance of an object. Here is the code for Properties.cs public class Properties { private static string type1; public static string Type1 { get { return type1; } set { type1= value; } } } And when I access this property in one of my form I am getting error. e.g. if (Properties.Type1.Equals(string.Empty) || Properties.Type1.Equals(null)) { //// Do something }

    Read the article

  • WPF TextBox Focus

    - by Jezz
    I am setting focus on a Textbox like this: <DockPanel Margin="0,0,0,0" LastChildFill="True" FocusManager.FocusedElement="{Binding ElementName=messengerTextToSend}"> <ListBox x:Name="messengerLabelParticipants" DockPanel.Dock="Top" Height="79" Margin="0,1,0,0" Padding="0" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" AllowDrop="True" ItemsSource="{Binding Path=involvedUsers}" ItemTemplate="{StaticResource chatParticipants}" Tag="{Binding Path=chatSessionID}" Drop="participantList_Drop" DragEnter="participantList_DragEnter" DragLeave="messengerLabelParticipants_DragLeave"> </ListBox> <TextBox x:Name="messengerTextToSend" Focusable="True" Margin="10,0,10,10" DockPanel.Dock="Bottom" Height="100" Tag="{Binding Path=.}" KeyUp="messengerTextToSend_KeyUp" Cursor="IBeam" Style="{StaticResource messengerTextBoxSendText}"/> <ScrollViewer x:Name="messengerScroller" Template="{DynamicResource ScrollViewerControlTemplate1}" ScrollChanged="messengerScroller_ScrollChanged" Loaded="messengerScroller_Loaded" Margin="0,10,0,10"> <ListBox x:Name="messengerListMessages" Margin="10,0,0,0" Padding="0" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=messages}" ItemTemplateSelector="{StaticResource messageTemplateSelector}"> </ListBox> </ScrollViewer> </DockPanel> However, when the page load, although the Textbox visually appears to have focus, the cursor is static and I have to manually either click on the Textbox or tab to it in order to start typing. I'm not sure what I'm doing wrong but I've tried every setting, inclduing setting it in the code to get it working. Any assistance would be greatly appreciated.

    Read the article

  • Multiple case or switch commands in php?

    - by kitenski
    Good Afternoon, I am trying to assign some variables to a listing which has a main category and a subcategory. This works fine for most of the variables, however in each sub category there are some fields which are other. ie Main Category 1 has sub category database, development and other Main Category 2 has sub category email, internet and other Main Category 3 has sub category graphics and other. So my first case statement is as follows which works fine. switch ($main_cat) { case "Main Category 1": $main="79"; break; case "Main Category 2": $main="83"; break; case "Main Category 3": $main="87"; break; } However I am struggling as to how to handle other. This stops the whole page loading with no error message switch ($second_cat) { case "Database": $second="145"; break; case "Development": $second="146"; break; case "Other": if ($main_cat) == 'Main Category 1' { $second="147";} break; } This doesn't work at all, second is not changed. switch ($second_cat) { case "Database": $second="145"; break; case "Development": $second="146"; break; case "Other": switch ($main_cat) { case "Main Category 1": $second="147"; break; } }

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >