Search Results

Search found 714 results on 29 pages for 'christopher jones'.

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

  • 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

  • Can't Display Bitmap of Higher Resolution than CDC area

    - by T. Jones
    Hi there dear gurus and expert coders. i am not gonna start with im a newbie and don't know much about image programming but unfortunately those are the facts :( I am trying to display an image from a bitmap pointer *ImageData which is of resolution 1392x1032. I am trying to draw that at an area of resolution or size 627x474. However, repeated trying doesnt seem to work. It works when I change the bitmap image I created from *ImageData width and height to resolution or size of around 627x474 I really do not know how to solve this after trying all possible solutions from various forums and google. pDC is a CDC* and memDC is a CDC initialized in an earlier method Anything uninitialized here was initialized in other methods. Here is my code dear humble gurus. Do provide me with guidance Yoda and Obi-Wan provided to Luke Skywalker. void DemoControl::ShowImage( void *ImageData ) { int Width; //Width of Image From Camera int Height; //Height of Image From Camera int m_DisplayWidth = 627 ;//width of rectangle area to display int m_DisplayHeight = 474;//height of rectangle area to display GetImageSize( &Width, &Height ) ; //this will return Width = 1392, Height 1032 CBitmap bitmap; bitmap.CreateBitmap(Width,Height,32,1,ImageData); CBitmap* pOldBitmap = memDC.SelectObject((CBitmap*)&bitmap); pDC->BitBlt(22, 24, 627, 474, &memDC, 0, 0, SRCCOPY); memDC.SelectObject((CBitmap*)pOldBitmap); ReleaseDC(pDC); }

    Read the article

  • 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

  • How do I split filenames from paths using python?

    - by Rasputin Jones
    I have a list of files that look like this: Input /foo/bar/baz/d4dc7c496100e8ce0166e84699b4e267fe652faeb070db18c76669d1c6f69f92.mp4 /foo/baz/bar/60d24a24f19a6b6c1c4734e0f288720c9ce429bc41c2620d32e01e934bfcd344.mp4 /bar/baz/foo/cd53fe086717a9f6fecb1d0567f6d76e93c48d7790c55e83e83dd1c43251e40e.mp4 And I would like to split out the filenames from the path while retaining both. Output ['/foo/bar/baz/', 'd4dc7c496100e8ce0166e84699b4e267fe652faeb070db18c76669d1c6f69f92.mp4'] ['/foo/baz/bar/', '60d24a24f19a6b6c1c4734e0f288720c9ce429bc41c2620d32e01e934bfcd344.mp4'] ['/bar/baz/foo', 'd53fe086717a9f6fecb1d0567f6d76e93c48d7790c55e83e83dd1c43251e40e.mp4'] How would one go about this? Thanks!

    Read the article

  • HTML Calendar form and input arrays

    - by Christopher Ickes
    Hello. Looking for the best practice here... Have a form that consists of a calendar. Each day of the calendar has 2 text input fields - customer and check-in. What would be the best & most efficient way to send this form to PHP for processing? <form action="post"> <div class="day"> Day 1<br /> <label for="customer['.$current['date'].']">Customer</label> <input type="text" name="customer['.$current['date'].']" value="" size="20" /> <label for="check-in['.$current['date'].']">Check-In</label> <input type="text" name="check-in['.$current['date'].']" value="" size="20" /> <input type="submit" name="submit" value="Update" /> </day> <div class="day"> Day 2<br /> <label for="customer['.$current['date'].']">Customer</label> <input type="text" name="customer['.$current['date'].']" value="" size="20" /> <label for="check-in['.$current['date'].']">Check-In</label> <input type="text" name="check-in['.$current['date'].']" value="" size="20" /> <input type="submit" name="submit" value="Update" /> </day> </form> Is my current setup good? I feel there has to be a better option. My concern involves processing a whole year at once (which can happen) and adding additional text input fields.

    Read the article

  • automating hudson builds with ant throwing 403

    - by Christopher Dancy
    We have a hudson server which deploys builds. We have a few services which we want to be able to remotely tell hudson to deploy a certain build ... these services are using ant. So I'm trying to get it working but keeping getting a 403 response when giving a build number like so... <ac:post to="http://hostname:8080/hudson/job/test_release_indexes/build?" verbose="true" wantresponse="true"> <prop name="token" value="indexes"/> <prop name="BUILDNUMBER" value="0354"/> </ac:post> this throws the 403. I've also tried passing it props for the username and password like so ... <ac:post to="http://srulesre2:8080/hudson/job/test_dartmouth_indexes/build?" verbose="true" wantresponse="true"> <prop name="token" value="indexes"/> <prop name="BUILDNUMBER" value="0354"/> <prop name="username" value="test"/> <prop name="password" value="test"/> </ac:post> I've tried a hundred different variations on username and password ... like j_username and j_password or user and pass ... but nothing is working ... keep getting the same 403. And the username and password are valid because I can manually log in with admin privileges. Any ideas would be great

    Read the article

  • STA threads with SQLXMLBULKLOAD

    - by Christopher
    If I have N STA .NET Threads each performing an independent bulk load operation on a different database using the SQLXMLBulkLoad dll (which requires calling threads to be STA), is it possible for all bulk loads to be happening at the same time, or are they implicitly serialized due to the STA COM configuration? Thanks!

    Read the article

  • how to time out an ant task

    - by Christopher Dancy
    Without writing a custom ant task is there a way to use a timeout on a regular ant target? To give some background info ... we are using the delete task to remove all contents of a given directory. Sometimes this directory is massive with lots of generated folders and files. We wanted to have that task say timeout after 5 minutes. I could not find anything online anywhere ... any ideas?

    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

  • How 'terse' is too terse? -- Practical guidelines for expressing as much intent in as few characters

    - by Christopher Altman
    First, I love writing as little code as possible. I think, and please correct me, one of the golden rules of programming is to express your code in as few of character as possible while maintaining human readability. But I can get a little carried away. I can pack three or four lines into one statement, something like $startDate = $dateTime > time() ? mktime(0,0,0,date('m',time()-86400),date('d',time()*2),2011) : time(); (Note: this is a notional example) I can comprehend the above code when reading it. I prefer 'mushing' it all together because having less lines per page is a good thing to me. So my question: When writing code and thinking about how compact or terse you can express yourself, what are some guidelines you use? Do you write multiple lines because you think it helps other people? Do you write as little as possible, but use comments? Or do you always look for the way to write as little code as possible and enjoy the rewards of compact statements? (Just one slightly off topic comment: I love the Perl one-liners, but that is not what I am talking about here)

    Read the article

  • LAMP Stack with APC installed - WordPress Site - Is WP opcode being cached with APC?

    - by Christopher Altman
    I have a LAMP stack with APC installed. I have a WordPress site on this server. Is WP taking advantage of the opcode caching? I have done no WP configurations. My understanding is that simply having APC installed means that all PHP code is being cached. If that is untrue, please point me to the direction where I can configure WP to take advantage of APC. Note: I thought about this as a ServerFault question, but since the solution to is code related I posted on Stackoverflow.

    Read the article

  • Clean way to perform commands in the Emacs minibuffer

    - by Christopher Monsanto
    Consider the following example: I want to read a file using ido from the minibuffer, but merge in all of the directories I use often. I can't just execute (ido-find-file) (ido-merge-work-directories) Because the second sexp will only execute after the user is finished selecting the file. The question then is: what is the best/cleanest way to execute commands in the minibuffer's command loop? The only way I know to do this is to bind my desired command to a key sequence, and add that sequence to unread-command-events so the key runs once we enter the minibuffer command loop: (setq unread-command-events (append (listify-key-sequence (kbd "M-s")) unread-command-events)) ; std key-binding for ido-merge-work-directories (ido-find-file) But that is very hacky, and I would like to know if there is a better solution. Thanks!

    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

  • 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

  • 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

  • bad performance from too many caught errors?

    - by Christopher Klein
    I have a large project in C# (.NET 2.0) which contains very large chunks of code generated by SubSonic. Is a try-catch like this causing a horrible performance hit? for (int x = 0; x < identifiers.Count; x++) {decimal target = 0; try { target = Convert.ToDecimal(assets[x + identifiers.Count * 2]); // target % } catch { targetEmpty = true; }} What is happening is if the given field that is being passed in is not something that can be converted to a decimal it sets a flag which is then used further along in the record to determine something else. The problem is that the application is literally throwing 10s of thousands of exceptions as I am parsing through 30k records. The process as a whole takes almost 10 minutes for everything and my overall task is to improve that time some and this seemed like easy hanging fruit if its a bad design idea. Any thoughts would be helpful (be kind, its been a miserable day) thanks, Chris

    Read the article

  • How can I run a Perl program when I don't have ssh or shell access?

    - by Christopher
    I just installed an IRC bot, B****X (Don't ask, I don't know - the real name is not censored). I did all of the configuration and chmod'ed the pl files to 755, but running it won't work. My host does not allow SSH/Shell (which is how the documentation says to runs he script), but just going to the URL usually works because of this. However, I get a 500 (Internal Server Error) error. I have logged errors and you can find them at http://services.cl58tools.co.cc/irc/errors.txt Thanks in advance

    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

  • Insert string from database into an aspx and have databinding expressions within that text evaluated

    - by Christopher Edwards
    Well, as you can see I want something quick-and-dirty! How can I get a string from a db that has aspx databinding syntax in it and have the databinding expressions evaluated? So I have text such as this stored in the DB:- Hello <%=User.Name %> I haven't seen you since <%=User.LastVisit %> And I want it to be inserted here say:- ... <body> <form id="form1" runat="server"> <div> <asp:FormView ID="FormView1" DataSourceID="DataSource1" runat="server"> <ItemTemplate> <-- insert stuff here! --> ... But with the databinding expressions evaluated. I'd rather not build a full parsing, templating and evaluation engine...

    Read the article

  • jruby hangs on connection to sqlserver

    - by Christopher Dancy
    Jruby is hanging on connection to sqlserver and I cannot figure out why. Here is my code ... puts "make connection" ActiveRecord::Base.establish_connection( :adapter => 'jdbc', :driver => 'com.microsoft.jdbc.sqlserver.SQLServerDriver', :url => 'jdbc:sqlserver://test:1433;databaseName=test;integratedSecurity=true', :username=>'test', :password=>'test' ) puts "connected" fish = ActiveRecord::Base.connection.execute("SELECT * FROM users") puts "query ok" the code spits out "make connection" and then "connected" but never reaches "query ok" any ideas?

    Read the article

  • In Javascript, is there a technique where I can execute code after a return?

    - by Christopher Altman
    Is there a technique where I can execute code after a return? I want to return a value then reset the value without introducing a temporary variable. My current code is: function(a){ var b; if(b){ var temp = b; //I want to avoid this step b = false; return temp; }else{ b = a; return false; }; }; I want to avoid the temp var. Is that possible? var b holds a value between function calls because it is a memoization styled function.

    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

  • how can I validate column names and count in an List array? C#

    - by Christopher Klein
    I'm trying to get this resolved in .NET 2.0 and unfortunately that is not negotiable. I am reading in a csv file with columns of data that 'should' correspond to a List of tickers in IdentA with some modifications. The csv file columsn would read: A_MSFT,A_CSCO,_A_YHOO,B_MSFT,B_CSCO,B_YHOO,C_MSFT,C_CSCO,C_YHOO IdentA[0]="MSFT" IdentA[1]="CSCO" IdentA[2]="YHOO" The AssetsA array is populated with the csv data AssetsA[0]=0 AssetsA[1]=1.1 AssetsA[2]=0 AssetsA[3]=2 AssetsA[4]=3.2 AssetsA[5]=12 AssetsA[6]=54 AssetsA[7]=13 AssetsA[8]=0.2 The C_ columns are optional but if they exist they all need to exist. All of the suffixes must match the values in IdentA. The values in the csv files all need to be decimal. I'm using a group of 3 as an example, there could be any number of tickers in the IdentA array. Its easy enough to do the first part: for (int x = 0; x < IdentA.Count; x++) { decimal.TryParse(AssetsA[x + IdentA.Count], out currentelections); } So that will get me the first set of values for the A_ columns but how can I get through B_ and C_ ? I can't do something as simple as IdentA.Count*2...

    Read the article

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