Search Results

Search found 721 results on 29 pages for 'benjamin jones'.

Page 16/29 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Why does it make a difference where I include the jQuery script file?

    - by Matthew Jones
    On my master page (for all pages in my site) I have a ToolkitScriptManager. On my content page, there are a series of hyperlinks and divs for collapsible functionality. The code to show/hide the panels work like the following: $('#nameHyperLink').click(function() { var div = $('#nameDiv'); var link = $('#nameHyperLink'); if (div.css('display') == 'none') { link.text('Hide Data'); div.show('100'); } else { link.text('Show Data'); div.hide('100'); } }); If I include a ScriptReference to the jQuery 1.4.2 file in the toolkitscriptmanager, the javascript code is executed incorrectly on the page (only the text for the hyperlink is changed, the div is not actually shown.) However, if I don't include the jQuery file in the ToolkitScriptManager and instead include it in the content page, it works correctly. I'm a Javascript/jQuery newbie, and this makes no sense at all. What's going on here?

    Read the article

  • When are response headers created in ASP.NET web forms?

    - by Jones
    I read somewhere the you can't remove response headers once they've been added. Given that, I'm wondering where in a standard ASP.NET web forms application do response headers get added initially. For example, these: Date Fri, 23 Apr 2010 16:25:56 GMT Server Microsoft-IIS/6.0 X-Powered-By ASP.NET Cache-Control private And can I stop it from happening? Do subsequent headers override old headers? Does my question even make sense? Thanks.

    Read the article

  • confusing fork system call

    - by benjamin button
    Hi, i was just checking the behaviour of fork system call and i found it very confusing. i saw in a website that Unix will make an exact copy of the parent's address space and give it to the child. Therefore, the parent and child processes have separate address spaces #include <stdio.h> #include <sys/types.h> int main(void) { pid_t pid; char y='Y'; char *ptr; ptr=&y; pid = fork(); if (pid == 0) { y='Z'; printf(" *** Child process ***\n"); printf(" Address is %p\n",ptr); printf(" char value is %c\n",y); sleep(5); } else { sleep(5); printf("\n ***parent process ***\n",&y); printf(" Address is %p\n",ptr); printf(" char value is %c\n",y); } } the output of the above program is : *** Child process *** Address is 69002894 char value is Z ***parent process *** Address is 69002894 char value is Y so from the above mentioned statement it seems that child and parent have separet address spaces.this is the reason why char value is printed separately and why am i seeing the address of the variable as same in both child and parent processes.? Please help me understand this!

    Read the article

  • UIView Login screen to tabbar logic

    - by Benjamin De Bos
    Folks, i'm having trouble with some navigation logic. Currently i have a simple two tabbed tabbar application. But i want to show a loginscreen in front. So that would be an UIView. Currently the code is as follows: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; UIViewController *viewController1 = [[roosterViewController alloc] initWithNibName:@"roosterViewController" bundle:nil]; UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; self.tabBarController = [[UITabBarController alloc] init]; self.tabBarController.viewControllers = @[viewController1, viewController2]; self.window.rootViewController = self.tabBarController; [self.window makeKeyAndVisible]; return YES; } SO this pushes a simple tabcontroller. Well, now i want to have a login screen. So that would be a simple UIView which pushes the tabbar controller. But i can't seem to see the logic on how to do this. I've been trying to present a modal view controller, but the thing is: the tabbar will be loaded on the background. Since i need the username/password information to work on the tabbarview, this won't work. My Logic would be: delegate load loginViewController load tabbar controller But, then i need to be able to "logout". So i need to destroy the tabbar controller and present the login screen. Any thoughts on this?

    Read the article

  • How should I handle incomplete packet buffers?

    - by Benjamin Manns
    I am writing a client for a server that typically sends data as strings in 500 or less bytes. However, the data will occasionally exceed that, and a single set of data could contain 200,000 bytes, for all the client knows (on initialization or significant events). However, I would like to not have to have each client running with a 50 MB socket buffer (if it's even possible). Each set of data is delimited by a null \0 character. What kind of structure should I look at for storing partially sent data sets? For example, the server may send ABCDEFGHIJKLMNOPQRSTUV\0WXYZ\0123!\0. I would want to process ABCDEFGHIJKLMNOPQRSTUV, WXYZ, and 123! independently. Also, the server could send ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890LOL123HAHATHISISREALLYLONG without the terminating character. I would want that data set stored somewhere for later appending and processing. Also, I'm using asynchronous socket methods (BeginSend, EndSend, BeginReceive, EndReceive) if that matters.

    Read the article

  • Scala and HttpClient: How do I resolve this error?

    - by Benjamin Metz
    I'm using scala with Apache HttpClient, and working through examples. I'm getting the following error: /Users/benjaminmetz/IdeaProjects/JakartaCapOne/src/JakExamp.scala Error:Error:line (16)error: overloaded method value execute with alternatives (org.apache.http.HttpHost,org.apache.http.HttpRequest)org.apache.http.HttpResponse <and> (org.apache.http.client.methods.HttpUriRequest,org.apache.http.protocol.HttpContext)org.apache.http.HttpResponse cannot be applied to (org.apache.http.client.methods.HttpGet,org.apache.http.client.ResponseHandler[String]) val responseBody = httpclient.execute(httpget, responseHandler) Here is the code with the error and line in question highlighted: import org.apache.http.client.ResponseHandler import org.apache.http.client.HttpClient import org.apache.http.client.methods.HttpGet import org.apache.http.impl.client.BasicResponseHandler import org.apache.http.impl.client.DefaultHttpClient object JakExamp { def main(args : Array[String]) : Unit = { val httpclient: HttpClient = new DefaultHttpClient val httpget: HttpGet = new HttpGet("www.google.com") println("executing request..." + httpget.getURI) val responseHandler: ResponseHandler[String] = new BasicResponseHandler val responseBody = httpclient.execute(httpget, responseHandler) // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ println(responseBody) client.getConnectionManager.shutdown } } I can successfully run the example in java...

    Read the article

  • MySQLi Prepared Statement Query Issue

    - by Benjamin Flak
    I'm relatively new to MySQLi prepared statements, and running into an error. Take this code: $user = 'admin'; $pass = 'admin'; if ($stmt = $mysqli->query("SELECT * FROM members WHERE username='$user' AND password='$pass'")) { echo $stmt->num_rows; } This will display "1", as it should. This next piece of code though, returns "0": $user = 'admin'; $pass = 'admin'; if ($stmt = $mysqli->prepare("SELECT * FROM members WHERE username=? AND password=?")) { $stmt->bind_param("ss", $user, $pass); $stmt->execute(); echo $stmt->num_rows; } Any ideas why?

    Read the article

  • Private Java class properties mysteriously reset between method calls....

    - by Michael Jones
    I have a very odd problem. A class property is mysteriously reset between method calls. The following code is executed so the constructor is called, then the parseConfiguration method is called. Finally, processData is called. The parseConfiguration method sets the "recursive" property to "true". However, as soon as it enters "processData", "recursive" becomes "false". This problem isn't isolated to a single class -- I have several examples of this in my code. How can this possibly be happening? I've tried initialising properties when they're declared outside any methods, I've tried initialising them in constructors... nothing works. The only complication I can think of here is that this class is invoked by an object that runs in a thread -- but here is one instance per thread, so surely no chance that threads are interfering. I've tried setting both methods to "synchronized", but this still happens. Please help! /** * This class or its superclasses are NOT threaded and don't extend Thread */ public class DirectoryAcquirer extends Manipulator { /** * @var Whether to recursively scan directories */ private boolean recursive = false; /** * Constructor */ public DirectoryAcquirer() { } /** * Constructor that initialises the configuration * * @param config * @throws InvalidConfigurationException */ public DirectoryAcquirer(HierarchicalConfiguration config) throws InvalidConfigurationException { super(config); } @Override protected void parseConfiguration() throws InvalidConfigurationException { // set whether to recurse into directories or not if (this.config.containsKey("recursive")) { // this.recursive gets set to "true" here this.recursive = this.config.getBoolean("recursive"); } } @Override public EntityCollection processData(EntityCollection data) { // here this.recursive is "false" this.logger.debug("processData: Entered method"); } }

    Read the article

  • Should I upgrade to Intellij Ultimate Edition?

    - by Benjamin Metz
    I am working in java and primarily Scala. I'm using the community edition of Intellij. I'm curious if its worth it to upgrade to the Ultimate Edition? I've been back and forth with Intellij and Eclipse... and for Scala dev I like Intellij a little bit better (for now). Thanks in advance...

    Read the article

  • mysql order-by original "where order"

    - by Benjamin Dobnikar
    I have this order-by problem I canot crack. I select from my table like this: SELECT * FROM 'sidemodules' WHERE name = 'module1' OR name = 'module2' OR 'name3' Which returns me the modules I want. But the modules lie the table, say in this order: module3 module1 module2 And they are returned to me in this order. How can I get them to display in order AS IN THE WHERE CLAUSE (1,2,3) ? Big thanks!

    Read the article

  • Should image size be defined in the img tag height/width attributes or in CSS?

    - by Benjamin Manns
    Is it better coding practice to define an images size in the img tag's width and height attributes? <img src="images/academia_vs_business.png" width="740" height="382" alt="" /> Or in the CSS style with width/height? <img src="images/academia_vs_business.png" style="width:740px; height:382px;" alt="" /> Or both? <img src="images/academia_vs_business.png" width="740" height="382" style="width:740px; height:382px" alt="" />

    Read the article

  • Freeing memory twice

    - by benjamin button
    Hi, AFAIK, freeing a NULL pointer will result in nothing. I mean nothing is being done by the compiler/no functionality is performed. Still, I do see some statements where people say that one of the scenarios where memory corruption can occur is "freeing memory twice"? Is this still true?

    Read the article

  • Problem linking SDL_Image against libpng

    - by Tim Jones
    I'm trying to compile SDL_Image 1.2.10 with MinGW + MSys (gcc 4.5.0) on Windows, I have compiled all the requires libs (zlib 1.2.5, libpng 1.4.2, libjpeg 8a, libtiff 3.9.2). SDL_Image compiles fine, but fails to link to libpng, throwing .libs/IMG_png.o:IMG_png.c:(.text+0x16): undefined reference errors on various png structs. If I run ./configure --prefix=/mingw --disable-png for SDL_Image, it compiles and links against the other libs just fine. I have tried older versions of libpng (1.2.43), but they also caused SDL_Image to throw the same errors.

    Read the article

  • Converting String^ and Collection of String^ to const char*

    - by Jim Jones
    Using VS2008 Managed C++ to wrap a dll. The native method takes a series of single const char* values and a collection of char* values. Going to make an example function: Function1(char * value1, TF_StringList& catList); TF_StringList is a dll class with 3 insert methods, the one I want to use is: TF_StringList::insert(const char* str); So I set up a wrapper method of: WrapperClass::callFunction(String^ mvalue1, ArrayList mcatList); mvalue1 is converted to const char* using: const char* value1 = (char*)(Marshal::StringToHGlobalAnsi(mvalue1)).ToPointer(); However, when a get to the collection of strings, I iterate over it getting each string using the index: String^ mstr = mcatList[i]; Have tried every way of converting String^ to const char* and in every case the TF_StringList::insert(const char* str) method throws a C2663 error which has to do with the const-ness of the value. What is the problem?

    Read the article

  • SQL 2005: Select top N, group by ID with joins

    - by Suzy Fresh
    I'm having real difficulty with a query involving 3 tables. I need to get the 3 newest users per department grouped by department names. The groups should be sorted by the users.dateadded so the department with the newest activity is first. The users can exist in multiple departments so Im using a lookup table that just contains the userID and deptID. My tables are as follows. Department - depID|name Users - userID|name|dateadded DepUsers - depID|userID The output I need would be Receiving John Doe - 4/23/2010 Bill Smith - 4/22/2010 Accounting Steve Jones - 4/22/2010 John Doe - 4/21/2010 Auditing Steve Jones - 4/21/2010 Bill Smith - 4/21/2010

    Read the article

  • How can you tell if a person is a programmer?

    - by Lucas Jones
    I was wondering when I read the famous "Programmer Habits" thread, I was wondering: Is there any way to tell if somebody is a programmer without actually asking them? Clarification: I am asking for things that you can use to recognise a programmer from "afar" or without knowing them well. To identify habits, you need to be around a person for a certain amount of time.

    Read the article

  • Help me understand this C code

    - by Benjamin
    INT GetTree (HWND hWnd, HTREEITEM hItem, HKEY *pRoot, TCHAR *pszKey, INT nMax) { TV_ITEM tvi; TCHAR szName[256]; HTREEITEM hParent; HWND hwndTV = GetDlgItem (hWnd, ID_TREEV); memset (&tvi, 0, sizeof (tvi)); hParent = TreeView_GetParent (hwndTV, hItem); if (hParent) { // Get the parent of the parent of the... GetTree (hWnd, hParent, pRoot, pszKey, nMax); // Get the name of the item. tvi.mask = TVIF_TEXT; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); TreeView_GetItem (hwndTV, &tvi); //send the TVM_GETITEM message? lstrcat (pszKey, TEXT ("\\")); lstrcat (pszKey, szName); } else { *pszKey = TEXT ('\0'); szName[0] = TEXT ('\0'); // Get the name of the item. tvi.mask = TVIF_TEXT | TVIF_PARAM; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); if (TreeView_GetItem (hwndTV, &tvi)) //*pRoot = (HTREEITEM)tvi.lParam; //original hItem = (HTREEITEM)tvi.lParam; else { INT rc = GetLastError(); } } return 0; } The block of code that begins with the comment "Get the name of the item" does not make sense to me. If you are getting the listview item why does the code set the parameters of the item being retrieved? If you already had the values there would be no need to retrieve them. Secondly near the comment "original" is the original line of code which will compile with a warning under embedded visual c++ 4.0, but if you copy the exact same code into visual studio 2008 it will not compile. Since I did not write any of this code, and am trying to learn, is it possible the original author made a mistake on this line? The *pRoot should point to HKEY type yet he is casting to an HTREEITEM type which should never work since the data types don't match?

    Read the article

  • PHP matching a string

    - by John Jones
    Hi, I have an Indian company data set and need to extract the City and Zip from the address field: Address Field Example: Gowripuram West, Sengunthapuram Post, Near L.G.B., Karur, Tamilnadu, Karur - 639 002, India As you can see the City is Karur and the zip is followed after the - (hyphen). I need the PHP code to match [city] - [zip] Not sure how to do this I can find the Zip after the Hypen but not sure how to find the City, please note the City can be 2 words. Cheers for your time./ J

    Read the article

  • Have a link that is imported in xml, clickable to execute a function

    - by Benjamin Sterling
    Ok, here's the question, I have an xml doc that is being import into an AS3 file and then with .htmlText, appending it to a movie clip. An example of what this looks like is: <abstract><![CDATA[<p><strong>AEO Times Square</strong> Store Wins Prestigious SEGD Merit Award for Dynamic Environments <a href='event:OpenArticle1'>View Article</a></p>]]></abstract> What I'd like to have happen is when I click that view article link that I can call a function passing in "OpenArticle1". Thanks in advance.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >