Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 138/191 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • Storing information in the DOM?

    - by John
    Im making a small private message application in the form of a phone. Ten messages are shown at the time. And the list of messages are scrolled up/down by hiding them. Just how bad is it to use the DOM to store information in this way. My main goal for doing this is to reduce calls to the database. And instead of making a new call all the time, it only checks if any new messages has arrived and ads the new message(s). Whats the alternative, cookies anyone? Thank you for the time

    Read the article

  • OpenID and Google hosted domains

    - by John Leidegren
    I get an "The remote name could not be resolved: 'mine.com'" When using this open ID identifier: https://www.google.com/accounts/o8/site-xrds?hd=mine.com And it's true, that the mine.com DNS record doesn't exist. But I'm wondering why it goes to look there in the first place. All I want to be doing is to check if the user can login to our hosted domain. Is that really so hard?

    Read the article

  • Using LINQ, how do you get all label controls.

    - by John
    I want to get a collection of all label controls that are part of a user control. I have the following code: var labelControls = from Control ctl in this.Controls where ctl.GetType() == typeof(Label) select ctl; but the result is zero results. Please assist. Thanks.

    Read the article

  • How to test my outgoing emails in MS Outlook?

    - by John
    Some people are complaining my html emails are showing up as plain text with html mark ups and others are complaining about unusual characters like 0=D 3=D. They appear to be using MS Outlook. I just installed MS Outlook and configured the imap settings to work with my gmail account. All my emails appear fine. So I suspect I need my MS Outlook to work with an MS Exchange server in order to produce the results my other Outlook recipients are seeing. But I'm not sure how to get access to an MS Exchange server (assuming that is the case). Can anyone recommend how I can reproduce the same email environment as my recipients such that I can get the same bugs they get? Thanks

    Read the article

  • Sometimes when visiting a php page, the browser asks me to download the .php file with nothing in it

    - by John
    I've noticed an unusual problem with some of my php programs. Sometimes when visiting a page like profile.edit.php, the browser throws a dialogue box asking to download profile.edit.php page. When I download it, there's nothing in the file. profile.edit.php is supposed to be a web form that edits user information. I've noticed this on some of my other php pages as well. I look in my apache error logs, but don't see any errors. How do i figure out why this is happening?

    Read the article

  • Creating a C# DLL and using it from unmanaged C++

    - by John
    I have a native (unmanaged) C++ application (using wxWidgets for what it's worth). I'm considering a separate tool application to be written in C# which would contain winform-based dialogs. putting some of those dialogs in a separate DLL would be useful as I'd hope to be able to use them from my C++ app. But I have no idea how much messing about is needed to accomplish this, is it particularly easy?

    Read the article

  • Visual Studio 2008 - Is it possible for two projects to share common classes?

    - by John M
    In Visual Studio 2008 I know its possible to have one solution with two (or more) projects. Is it possible OR How is it possible for the projects to share common class files? For example - Project 1 has a log file handling class. Can Project 2 reference it? My hope is to increase code re-use and avoid two copies of the same thing that need to be maintained. The target is Winforms C# (3.5)

    Read the article

  • Is there a TextWriter interface to the System.Diagnostics.Debug class?

    - by John Källén
    I'm often frustrated by the System.Diagnostics.Debug.Write/WriteLine methods. I would like to use the Write/WriteLine methods familiar from the TextWriter class, so I often write Debug.WriteLine("# entries {0} for connection {1}", countOfEntries, connection); which causes a compiler error. I end up writing Debug.WriteLine(string.Format("# entries {0} for connection {1}", countOfEntries, connection)); which is really awkward. Does the CLR have a class deriving from TextWriter that "wraps" System.Debug, or should I roll my own?

    Read the article

  • Getting the dynamic value of a checkbox in repeating region loop with Jquery

    - by John
    How do I get the values of a check box that is in a repeating region with its values dynamically generated from a recordset from the database.I want to retrieve the value when it is checked and after I click on a link.The problem is that it is retrieving only the first value of the recordset which is 1.This is the code: //jQuery $(document).ready(function(){ $("#clickbtn").click(function(){ $("input[type=checkbox][checked]").each(function(){ var value=$("#checkid").attr('value'); $("#textfield").attr('value',value); }); return false; }); }); //html <td width="22"><form id="form1" name="form1" method="post" action=""> <input type="checkbox" name="checkid" id="checkid" value="<?php echo $row_people['NameID']; ?>" /> </form></td> I would appreciate the help.

    Read the article

  • Is map/collection order stable between calls?

    - by John
    If I have a hash map and iterate over the objects repeatedly, is it correct that I'm not guaranteed the same order for every call? For example, could the following print two lines that differ from each other: Map<String,Integer> map = new HashMap<String,Integer>() {{ put("a", 1); put("b", 2); put("c", 3); }}; System.out.println(map); System.out.println(map); And is this the case for sets and collections in general? If so, what's the best way in case you have to iterate twice over the same collection in the same order (regardless of what order that is)? I guess converting to a list.

    Read the article

  • Can I Have Polymorphic Containers With Value Semantics in C++11?

    - by John Dibling
    This is a sequel to a related post which asked the eternal question: Can I have polymorphic containers with value semantics in C++? The question was asked slightly incorrectly. It should have been more like: Can I have STL containers of a base type stored by-value in which the elements exhibit polymorphic behavior? If you are asking the question in terms of C++, the answer is "no." At some point, you will slice objects stored by-value. Now I ask the question again, but strictly in terms of C++11. With the changes to the language and the standard libraries, is it now possible to store polymorphic objects by value in an STL container? I'm well aware of the possibility of storing a smart pointer to the base class in the container -- this is not what I'm looking for, as I'm trying to construct objects on the stack without using new. Consider if you will (from the linked post) as basic C++ example: #include <iostream> using namespace std; class Parent { public: Parent() : parent_mem(1) {} virtual void write() { cout << "Parent: " << parent_mem << endl; } int parent_mem; }; class Child : public Parent { public: Child() : child_mem(2) { parent_mem = 2; } void write() { cout << "Child: " << parent_mem << ", " << child_mem << endl; } int child_mem; }; int main(int, char**) { // I can have a polymorphic container with pointer semantics vector<Parent*> pointerVec; pointerVec.push_back(new Parent()); pointerVec.push_back(new Child()); pointerVec[0]->write(); pointerVec[1]->write(); // Output: // // Parent: 1 // Child: 2, 2 // But I can't do it with value semantics vector<Parent> valueVec; valueVec.push_back(Parent()); valueVec.push_back(Child()); // gets turned into a Parent object :( valueVec[0].write(); valueVec[1].write(); // Output: // // Parent: 1 // Parent: 2 }

    Read the article

  • Why do I have to set the max length of every damn text column in the database?

    - by John Leidegren
    Why is it that every RDBMS insists that you tell it what the max length of a text field is going to be... why can't it just infer this information form the data that's put into the database? I've mostly worked with MS SQL Server, but every other database I know also demands that you set these arbitrary limits on your data schema. The reality is that this is not particulay helpful or friendly to work with becuase the business requirements change all the time and almost every day some end-user is trying to put a lot of text into that column. Does any one with some inner working knowledge of a RDBMS know why we just don't infer the limits from the data that's put into the storage? I'm not talking about guessing the type information, but guessing the limits of a particular text column. I mean, there's a reason why I don't use nvarchar(max) on every text column in the database.

    Read the article

  • Can the Browser 'Forward' Button be Set from HTML?

    - by John C
    Example: At the bottom of the StackOver Questions page are a bunch of page numbers (1,2,3...), enclosed in a set of prev and next buttons. Clicking next repeatedly will bring me to, say page 5, at which point I will have: The page's prev button will be set to 'http://stackoverflow.com/questions?page=4' The Back button on my Browser will have the same value. The page's next button will be set to 'http://stackoverflow.com/questions?page=6' The Forward button on my Browser - won't be set to anything. Obviously, if I hit the Back button on the Browser, then Forward will have a value, pointing to the URL for page 5 - but not otherwise. Is there any way, from HTML (plus Javascript), to set the value of the Browser's Forward button? Or is this one of those things that HTML is simply forbidden to do?

    Read the article

  • Difference between [object variable] and object.variable in Obj-C?

    - by John Smith
    I was working on a program today and hit this strange bug. I had a UIButton with an action assigned. The action was something like: -(void) someaction:(id) e { if ([e tag]==SOMETAG) { //dostuff } } What confuses me is that when I first wrote it, the if line was if (e.tag==SOMETAG) XCode refused to compile it, saying error: request for member 'tag' in 'e', which is of non-class type 'objc_object*' but I thought the two were equivalent. So under what circumstances are they not the same?

    Read the article

  • C# Reflection StackTrack get value

    - by John
    I'm making pretty heavy use of reflection in my current project to greatly simplify communication between my controllers and the wcf services. What I want to do now is to obtain a value from the Session within an object that has no direct access to HttpSessionStateBase (IE: Not a controller). For example, a ViewModel. I could pass it in or pass a reference to it etc. but that is not optimal in my situation. Since everything comes from a Controller at some point in my scenario I can do the following to walk the sack to the controller where the call originated, pretty simple stuff: var trace = new System.Diagnostics.StackTrace(); foreach (var frame in trace.GetFrames()) { var type = frame.GetMethod().DeclaringType; var prop = type.GetProperty("Session"); if(prop != null) { // not sure about this part... var value = prop.GetValue(type, null); break; } } The trouble here is that I can't seem to work out how to get the "instance" of the controller or the Session property so that I can read from it.

    Read the article

  • is "else if" faster than "switch() case" ?

    - by John
    Hello, I'm an ex Pascal guy,currently learning C#. My question is the following: Is the code below faster than making a switch? int a = 5; if (a == 1) { .... } else if(a == 2) { .... } else if(a == 3) { .... } else if(a == 4) { .... } else .... And the switch: int a = 5; switch(a) { case 1: ... break; case 2: ... break; case 3: ... break; case 4: ... break; default: ... break; } Which one is faster? I'm asking ,because my program has a similiar structure(many,many "else if" statements). Should I turn them into switches?

    Read the article

  • How to return the number of a month in C# function

    - by john
    I want to return the number of a month and i made a function but it always returns 0 this is my code: public int getNrMonth(String s) { int nr=0; if (s.Equals("January")) nr = 1 if (s.Equals("February")) nr = 2; return nr; } Could someone tell me wath is wrong please? I'm beginner!

    Read the article

  • Django store regular expression in DB which then gets evaluated on page

    - by John
    Hi, I want to store a number of url patterns in my django model which a user can provide parameters to which will create a url. For example I might store these 3 urls in my db where %s is the variable parameter provided by the user: www.thisissomewebsite.com?param=%s www.anotherurl/%s/ www.lastexample.co.uk?param1=%s&fixedparam=2 As you can see from these examples the parameter can appear anywhere in the string and not in a fixed position. I have 2 models, one holds the urls and one holds the variables: class URLPatterns(models.Model): pattern = models.CharField(max_length=255) class URLVariables(models.Model): pattern = models.ForeignKey(URLPatterns) param = models.CharField(max_length=255) What would be the best way to generate these urls by replacing the %s with the variable in the database. would it just be a simple replace on the string e.g: urlvariable = URLVariable.objects.get(pk=1) pattern = url.pattern url = pattern.replace("%s", urlvariable.param) or is there a better way? Thanks

    Read the article

  • Abstract away a compound identity value for use in business logic?

    - by John K
    While separating business logic and data access logic into two different assemblies, I want to abstract away the concept of identity so that the business logic deals with one consistent identity without having to understand its actual representation in the data source. I've been calling this a compound identity abstraction. Data sources in this project are swappable and various and the business logic shouldn't care which data source is currently in use. The identity is the toughest part because its implementation can change per kind of data source, whereas other fields like name, address, etc are consistently scalar values. What I'm searching for is a good way to abstract the concept of identity, whether it be an existing library, a software pattern or just a solid good idea of some kind is provided. The proposed compound identity value would have to be comparable and usable in the business logic and passed back to the data source to specify records, entities and/or documents to affect, so the data source must be able to parse back out the details of its own compound ids. Data Source Examples: This serves to provide an idea of what I mean by various data sources having different identity implementations. A relational data source might express a piece of content with an integer identifier plus a language specific code. For example. content_id language Other Columns expressing details of content 1 en_us 1 fr_ca The identity of the first record in the above example is: 1 + en_us However when a NoSQL data source is substituted, it might somehow represent each piece of content with a GUID string 936DA01F-9ABD-4d9d-80C7-02AF85C822A8 plus language code of a different standardization, And a third kind of data source might use just a simple scalar value. So on and so forth, you get the idea.

    Read the article

  • Why is [date] + [time] non-deterministic in SQL Server 2008?

    - by John Gietzen
    I'm trying to do the following for my IIS logs table: ALTER TABLE [W3CLog] ADD [LogTime] AS [date] + ([time] - '1900-01-01') PERSISTED However, SQL Server 2008 tells me: Computed column 'LogTime' in table 'W3CLog' cannot be persisted because the column is non-deterministic. The table has this definition: CREATE TABLE [dbo].[W3CLog]( [Id] [bigint] IDENTITY(1,1) NOT NULL, ... [date] [datetime] NULL, [time] [datetime] NULL, ... ) Why is that non-deterministic? I really need to index that field. The table currently has 1598170 rows, and it is a pain to query if we can't do an index seek on the full time. Since this is being UNION'd with some other log formats, we can't very easily just use the two columns separately.

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >