Search Results

Search found 68147 results on 2726 pages for 'context sensitive help'.

Page 10/2726 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • State Pattern - should a state know about its context?

    - by Extrakun
    I am referring to the state pattern as described in this link. In the example class diagram, a context has numerous states. However, it does not show how does a state communicates with a context (perhaps an input in a state has impact on a setting in the context). The two examples on the page shows either passing the context to the state via a function, or storing a reference to the context. Are those advisable? Are there other ways for a state to communicate with a context? Update to an edit: For instance, I am doing a remote control which can have several states. Say, the context has a setting for Volume, and I am in one of the states which allow me to tweak the volume. How should the state communicates with the context that the volume is being changed?

    Read the article

  • Radix sort in java help

    - by endif
    Hi i need some help to improve my code. I am trying to use Radixsort to sort array of 10 numbers (for example) in increasing order. When i run the program with array of size 10 and put 10 random int numbers in like 70 309 450 279 799 192 586 609 54 657 i get this out: 450 309 192 279 54 192 586 657 54 609 Don´t see where my error is in the code. class IntQueue { static class Hlekkur { int tala; Hlekkur naest; } Hlekkur fyrsti; Hlekkur sidasti; int n; public IntQueue() { fyrsti = sidasti = null; } // First number in queue. public int first() { return fyrsti.tala; } public int get() { int res = fyrsti.tala; n--; if( fyrsti == sidasti ) fyrsti = sidasti = null; else fyrsti = fyrsti.naest; return res; } public void put( int i ) { Hlekkur nyr = new Hlekkur(); n++; nyr.tala = i; if( sidasti==null ) f yrsti = sidasti = nyr; else { sidasti.naest = nyr; sidasti = nyr; } } public int count() { return n; } public static void radixSort(int [] q, int n, int d){ IntQueue [] queue = new IntQueue[n]; for (int k = 0; k < n; k++){ queue[k] = new IntQueue(); } for (int i = d-1; i >=0; i--){ for (int j = 0; j < n; j++){ while(queue[j].count() != 0) { queue[j].get(); } } for (int index = 0; index < n; index++){ // trying to look at one of three digit to sort after. int v=1; int digit = (q[index]/v)%10; v*=10; queue[digit].put(q[index]); } for (int p = 0; p < n; p++){ while(queue[p].count() != 0) { q[p] = (queue[p].get()); } } } } } I am also thinking can I let the function take one queue as an argument and on return that queue is in increasing order? If so how? Please help. Sorry if my english is bad not so good in it. Please let know if you need more details. import java.util.Random; public class RadTest extends IntQueue { public static void main(String[] args) { int [] q = new int[10]; Random r = new Random(); int t = 0; int size = 10; while(t != size) { q[t] = (r.nextInt(1000)); t++; } for(int i = 0; i!= size; i++) { System.out.println(q[i]); } System.out.println("Radad: \n"); radixSort(q,size,3); for(int i = 0; i!= size; i++) { System.out.println(q[i]); } } } Hope this is what you were talking about...

    Read the article

  • Anyone willing to help out a javascript n00b? :-)

    - by Splynx
    Since I am asking for a lot, and know it, the following is a wall of text for those who might show some interest and want to know a little before offering their help to me. First a little about my level of programming skills, and a little about what I ask for. Where I'm at: I am not totally new to Javascript, and have dabbled a little with PHP earlier - well have dabbled a lot with PHP in fact, but never got good at it because I program alone. And I have until now never used forums to get help etc. other that searching to see if anyone else had my problem before and what the solution was. So I am not a intuitive or talented programmer, I'm more of a very maticulate programmer and you would be surprised how far you can get with if else... (ok that's a joke hehe). My solutions are usually (I am guessing here) not the best ones - and slow I take it, and the code is usually too long and I have to look up most of the stuff I use (really a lot of it is not done in "freehand"). I have a LOT of experience with HTML and CSS, and have always done well formed markup, as well as I am really into x-browsing and always require that my work validates when it's done. I also worry about optimizing a lot, and work with sprites for images, minimize the number of http requests etc, using H1,H2 etc. where it is logically correct, as well as use the correct elements and not just div span or p it... So because I am a workhorse and very maticulate I can actually pull off some quite "advanced" features, but it's always the basics that bite me in the end. Not fully understanding the syntax and so on usually gives me problems. Have recently discovered jQuery - wich is a lot of fun.... But I want to use it for the DOM node manipulation/handling only. As I mentioned I worry about optimizing, and jQuery used for everything seems... well not optimal, it strikes me as doing it yourself when possible is faster than accesing another script that may take a whole lot of other considerations into perspective when handling your variables and objects (and I am just guessing here since I as explained know nothing). So thats where I'm at... As mentioned I just started with javascript for "real" so I do not have much to show, but at the end of my WOT you can see two unfinisheded scripts I have made so you can see where I'm at roughly - just check out the URL without the /feedback.html for the second example (I am only allowed to post 1 link since I am also a SO n00b) (and for those rushing over to a validation service, remember I wrote "when it's done"...) What I ask for: I am figuring this... I have a piece of code I am working on at the moment, and this little project has taught me a whole lot already, and I have "grown" a lot as a javascript programmer. If I add a whole lot of comments to the script, and explain what it is intended to do, will you then show me where: I am writing incorrect code - making mistakes Where/how my code could be more optimal Where I am just simply being a muppet The code I want to use as the background for the tuition is the one here http://projects.1000monkeys.dk/feedback.html Use firebug and have a quick look see...

    Read the article

  • Scheme homework help

    - by John
    Okay so I have started a new language in class. We are learning Scheme and i'm not sure on how to do it. When I say learning a new language, I mean thrown a homework and told to figure it out. A couple of them have got me stumped. My first problem is: Write a Scheme function that returns true (the Boolean constant #t) ifthe parameter is a list containing n a's followed by n b's. and false otherwise. Here's what I have right now: (define aequalb (lamda (list) (let ((head (car list)) (tail(cdr list))) (if(= 'a head) ((let ((count (count + 1))) (let (( newTail (aequalb tail)))) #f (if(= 'b head) ((let ((count (count - 1))) (let (( newTail (aequalb tail)))) #f (if(null? tail) (if(= count 0) #t #f))))))))))) I know this is completely wrong, but I've been trying so please take it easy on me. Any help would be much appreciated.

    Read the article

  • Prime Numbers Code Help

    - by andrew
    Hello Everybody, I am suppose to "write a Java program that reads a positive integer n from standard input, then prints out the first n prime number." It's divided into 3 parts. 1st: This function will return true or false according to whether m is prime or composite. The array argument P will contain a sufficient number of primes to do the testing. Specifically, at the time isPrime() is called, array P must contain (at least) all primes p in the range 2 p m . For instance, to test m = 53 for primality, one must do successive trial divisions by 2, 3, 5, and 7. We go no further since 11 53 . Thus a precondition for the function call isPrime(53, P) is that P[0] = 2 , P[1] = 3 , P[2] = 5, and P[3] = 7 . The return value in this case would be true since all these divisions fail. Similarly to test m =143 , one must do trial divisions by 2, 3, 5, 7, and 11 (since 13 143 ). The precondition for the function call isPrime(143, P) is therefore P[0] = 2 , P[1] = 3 , P[2] = 5, P[3] = 7 , and P[4] =11. The return value in this case would be false since 11 divides 143. Function isPrime() should contain a loop that steps through array P, doing trial divisions. This loop should terminate when 2 either a trial division succeeds, in which case false is returned, or until the next prime in P is greater than m , in which case true is returned. Then there is the "main function" • Check that the user supplied exactly one command line argument which can be interpreted as a positive integer n. If the command line argument is not a single positive integer, your program will print a usage message as specified in the examples below, then exit. • Allocate array Primes[] of length n and initialize Primes[0] = 2 . • Enter a loop which will discover subsequent primes and store them as Primes[1] , Primes[2], Primes[3] , ……, Primes[n -1] . This loop should contain an inner loop which walks through successive integers and tests them for primality by calling function isPrime() with appropriate arguments. • Print the contents of array Primes[] to stdout, 10 to a line separated by single spaces. In other words Primes[0] through Primes[9] will go on line 1, Primes[10] though Primes[19] will go on line 2, and so on. Note that if n is not a multiple of 10, then the last line of output will contain fewer than 10 primes. The last function is called "usage" which I am not sure how to execute this! Your program will include a function called Usage() having signature static void Usage() that prints this message to stderr, then exits. Thus your program will contain three functions in all: main(), isPrime(), and Usage(). Each should be preceded by a comment block giving it’s name, a short description of it’s operation, and any necessary preconditions (such as those for isPrime().) And hear is my code, but I am having a bit of a problem and could you guys help me fix it? If I enter the number "5" it gives me the prime numbers which are "6,7,8,9" which doesn't make much sense. import java.util.; import java.io.; import java.lang.*; public class PrimeNumber { static boolean isPrime(int m, int[] P){ int squarert = Math.round( (float)Math.sqrt(m) ); int i = 2; boolean ans=false; while ((i<=squarert) & (ans==false)) { int c= P[i]; if (m%c==0) ans= true; else ans= false; i++; } /* if(ans ==true) ans=false; else ans=true; return ans; } ///****main public static void main(String[] args ) { Scanner in= new Scanner(System.in); int input= in.nextInt(); int i, j; int squarert; boolean ans = false; int userNum; int remander = 0; System.out.println("input: " + input); int[] prime = new int[input]; prime[0]= 2; for(i=1; i ans = isPrime(j,prime); j++;} prime[i] = j; } //prnt prime System.out.println("The first " + input + " prime number(s) are: "); for(int r=0; r }//end of main } Thanks for the help

    Read the article

  • Scheme homework problem, need help.

    - by poorStudent
    Okay one of my homework problems is to take a list of lists and return the car of each sublist as a list. I have it to where I can print out the values, but it's not a list. To be honest, I have no clue how to output lists. Here's what I got: (define (car-print alist) (if (null? alist) (newline) (begin (write (car (car alist))) (display " ") (car-print(cdr alist))))) This is a cheap way to do it, perhaps some help on actually solving this problem would be much appreciated. Not necessarily the full answer but steps to get there. Thanks.

    Read the article

  • Asp.net help It gives error in home page only

    - by vikram
    i am new to asp.net. I have uploaded a site in ftp. except default.aspx remaining pages working. when i navigate to home page i.e Default.aspx it shows an error Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /Default.aspx Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082 Please help. I am stuck here itself. Thanks in advance

    Read the article

  • How long is the time frame between context switches on Windows?

    - by mattcodes
    Reading CLR via C# 2.0 (I dont have 3.0 with me at the moment) Is this still the case: If there is only one CPU in a computer, only one thread can run at any one time. Windows has to keep track of the thread objects, and every so often, Windows has to decide which thread to schedule next to go to the CPU. This is additional code that has to execute once every 20 milliseconds or so. When Windows makes a CPU stop executing one thread's code and start executing another thread's code, we call this a context switch. A context switch is fairly expensive because the operating system has to: So circa CLR via C# 2.0 lets say we are on Pentium 4 2.4ghz 1 core non-HT, XP. Every 20 milliseconds? Where a CLR thread or Java thread is mapped to an OS thread only a maximum of 50 threads per second may get a chance to to run? I've read that context switching is very fast in mircoseconds here on SO, but how often roughly (magnitude style guesses) will say a modest 5 year old server Windows 2003 Pentium Xeon single core give the OS the opportunity to context switch? 20ms in the right area? I dont need exact figures I just want to be sure that's in the right area, seems rather long to me.

    Read the article

  • JavaCC: How can I specify which token(s) are expected in certain context?

    - by java.is.for.desktop
    Hello, everyone! I need to make JavaCC aware of a context (current parent token), and depending on that context, expect different token(s) to occur. Consider the following pseudo-code: TOKEN <abc> { "abc*" } // recognizes "abc", "abcd", "abcde", ... TOKEN <abcd> { "abcd*" } // recognizes "abcd", "abcde", "abcdef", ... TOKEN <element1> { "element1" "[" expectOnly(<abc>) "]" } TOKEN <element2> { "element2" "[" expectOnly(<abcd>) "]" } ... So when the generated parser is "inside" a token named "element1" and it encounter "abcdef" it recognizes it as <abc>, but when its "inside" a token named "element2" it recognizes the same string as <abcd>. element1 [ abcdef ] // aha! it can only be <abc> element2 [ abcdef ] // aha! it can only be <abcd> If I'm not wrong, it would behave similar to more complex DTD definitions of an XML file. So, how can one specify, in which "context" which token(s) are valid/expected? NOTE: It would be not enough for my real case to define a kind of "hierarchy" of tokens, so that "abcdef" is always first matched against <abcd> and than <abc>. I really need context-aware tokens.

    Read the article

  • Getting warning about sensitive information that could be disclosed to 3rd parties - Asp.net MVC 2.0

    - by chobo2
    Hi I never gotten this message before I started to use asp.net mvc 2.0 and jquery 1.4. <title>This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.</title> <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br> <b> Exception Details: </b>System.InvalidOperationException: This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.<br><br> So it makes me wondering what sensitive data could be disclosed and if so how to get around this? What I was trying to send back was a rendered string of a partial view(http://www.klopfenstein.net/lorenz.aspx/render-partial-view-to-string-in-asp-net-mvc) and a success msg.

    Read the article

  • Service with intents not working. Help needed

    - by tristan202
    I need help in making my click intents work. I used to have them in my appwidgetprovider, but decided to move them into a service, but I am having trouble getting it to work. Below is the entire code from my intentservice: public class IntentService extends Service { static final String ACTION_UPDATE = "android.tristan.widget.digiclock.action.UPDATE_2"; private final static IntentFilter sIntentFilter; public int layoutID = R.layout.clock; int appWidgetIds = 0; static { sIntentFilter = new IntentFilter(); } @Override public IBinder onBind(Intent intent) { return null; } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); } @Override public void onCreate() { super.onCreate(); registerReceiver(onClickTop, sIntentFilter); registerReceiver(onClickBottom, sIntentFilter); Log.d("DigiClock IntentService", "IntentService Started."); } @Override public void onDestroy() { super.onDestroy(); unregisterReceiver(onClickTop); unregisterReceiver(onClickBottom); } private final BroadcastReceiver onClickTop = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if(intent.getAction().equals("android.tristan.widget.digiclock.CLICK")) { PackageManager packageManager = context.getPackageManager(); Intent alarmClockIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER); String clockImpls[][] = { {"HTC Alarm Clock", "com.htc.android.worldclock", "com.htc.android.worldclock.WorldClockTabControl" }, {"Standar Alarm Clock", "com.android.deskclock", "com.android.deskclock.AlarmClock"}, {"Froyo Nexus Alarm Clock", "com.google.android.deskclock", "com.android.deskclock.DeskClock"}, {"Moto Blur Alarm Clock", "com.motorola.blur.alarmclock", "com.motorola.blur.alarmclock.AlarmClock"} }; boolean foundClockImpl = false; for(int i=0; i<clockImpls.length; i++) { String vendor = clockImpls[i][0]; String packageName = clockImpls[i][1]; String className = clockImpls[i][2]; try { ComponentName cn = new ComponentName(packageName, className); ActivityInfo aInfo = packageManager.getActivityInfo(cn, PackageManager.GET_META_DATA); alarmClockIntent.setComponent(cn); foundClockImpl = true; } catch (NameNotFoundException e) { Log.d("Error, ", vendor + " does not exist"); } } if (foundClockImpl) { Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(50); final RemoteViews views = new RemoteViews(context.getPackageName(), layoutID); views.setOnClickPendingIntent(R.id.TopRow, PendingIntent.getActivity(context, 0, new Intent(context, DigiClock.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), PendingIntent.FLAG_UPDATE_CURRENT)); AppWidgetManager.getInstance(context).updateAppWidget(intent.getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS), views); alarmClockIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(alarmClockIntent); } } } }; private final BroadcastReceiver onClickBottom = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if(intent.getAction().equals("android.tristan.widget.digiclock.CLICK_2")) { PackageManager calendarManager = context.getPackageManager(); Intent calendarIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER); String calendarImpls[][] = { {"HTC Calendar", "com.htc.calendar", "com.htc.calendar.LaunchActivity" }, {"Standard Calendar", "com.android.calendar", "com.android.calendar.LaunchActivity"}, {"Moto Blur Calendar", "com.motorola.blur.calendar", "com.motorola.blur.calendar.LaunchActivity"} }; boolean foundCalendarImpl = false; for(int i=0; i<calendarImpls.length; i++) { String vendor = calendarImpls[i][0]; String packageName = calendarImpls[i][1]; String className = calendarImpls[i][2]; try { ComponentName cn = new ComponentName(packageName, className); ActivityInfo aInfo = calendarManager.getActivityInfo(cn, PackageManager.GET_META_DATA); calendarIntent.setComponent(cn); foundCalendarImpl = true; } catch (NameNotFoundException e) { Log.d("Error, ", vendor + " does not exist"); } } if (foundCalendarImpl) { Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(50); final RemoteViews views2 = new RemoteViews(context.getPackageName(), layoutID); views2.setOnClickPendingIntent(R.id.BottomRow, PendingIntent.getActivity(context, 0, new Intent(context, DigiClock.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), PendingIntent.FLAG_UPDATE_CURRENT)); AppWidgetManager.getInstance(context).updateAppWidget(intent.getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS), views2); calendarIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(calendarIntent); } } }; }; ;}; What am I doing wrong here?

    Read the article

  • C++ help with getline function with ifstream

    - by John
    So I am writing a program that deals with reading in and writing out to a file. I use the getline() function because some of the lines in the text file may contain multiple elements. I've never had a problem with getline until now. Here's what I got. The text file looks like this: John Smith // Client name 1234 Hollow Lane, Chicago, IL // Address 123-45-6789 // SSN Walmart // Employer 58000 // Income 2 // Number of accounts the client has 1111 // Account Number 2222 // Account Number ifstream inFile("ClientInfo.txt"); if(inFile.fail()) { cout << "Problem opening file."; } else { string name, address, ssn, employer; double income; int numOfAccount; getline(inFile, name); getline(inFile, address); // I'll stop here because I know this is where it fails. When I debugged this code, I found that name == "John", instead of name == "John Smith", and Address == "Smith" and so on. Am I doing something wrong. Any help would be much appreciated.

    Read the article

  • Drupal: How can one use Context to trigger a reaction for a Taxonomy Term condition caused by a Vie

    - by jschrab
    What I would like to do is use the Context module to insert $body_classes of my choosing based on a Taxonomy Term condition. Fine, that's what the Context module is for. Seems simple enough IF your content/page source is a node that is involved with the appropriate Terms. However, I have a page generated by Views that has the appropriate Taxonomy Term id that SHOULD trigger the condition but it doesn't. Now I could set my $body_classes in a "preprocess" in template.php but I'd rather avoid that. Is this even possible in Context? Or am I just doing something wrong?

    Read the article

  • Help with shopping cart in javascript

    - by user228390
    Hey guys, I'm having problems with my shopping cart. What I am trying to do is make a function that will add an item the cart and then and function that will view the cart and show the details. But what I have got so far does not do that, it just simply adds and goes straight to view cart. Also I wanted to store the name of each items in different global arrays (name, price and sum) but I can't get it work that way. Can any help me overcome this problem? Edit: I've tried to get it to work by adding some more items and attaching it to another html page, but now the code does not seem to work at all , before it showed the price and total and now I get nothing . javascript code function round_total (c) { var pennies = c * 100; pennies = Math.round(pennies); var strPennies = "" + pennies; var len = strPennies.length; return parseFloat(strPennies.substring(0, len - 2) + "." + strPennies.substring(len - 2, len)); } // End of round_total function. /* Start of generate_page function. */ function generate_page (form) { tax = 0.08; delivery_p = 2.99; var odate = new Date(); var qty = form.quantity.value; var product_v = new String(form.product.value); var total_price = product_v.substr(product_v.indexOf("$") + 1, product_v.length - product_v.indexOf("$")); var price_without_tax = round_total(qty * total_price); var ttax = round_total(price_without_tax * tax); var delivery = round_total(qty * delivery_p); var total_p = round_total(price_without_tax + ttax + delivery); document.writeln("Quantity: " + qty + "<br>"); document.writeln("Price: $" + total_price + "<br>"); document.writeln("Delivery: $" + delivery + "<br>"); document.writeln("Total: $" + total_p + "<br>"); document.writeln("Order placed on: " + odate.toGMTString()); } function calculate() { round_total (c)(); generate_page (form)(); } HTML code: Shopping cart Welcome, Guest Login Sign Up Stay Updated: Subscribe via RSS Email Updates <div id="header"> <div id="branding" class="container"> <h1>The Finest Toy<br /> Store Online</h1> <p class="desc">If you're looking for a toy shop then look no further.<br/> Go on, treat the kids with our huge selection of<br/>online toy shops selling toys for all ages.</p> </div><!-- end branding --> <div id="navigation"> <ul id="menu" class="container"> <li><a href="#">HOME</a></li> <li><a href="#">ABOUT</a></li> <li><a href="#">Online Store</a></li> <li><a href="#">CONTACT</a></li> </ul> </div><!-- end navigation --> </div><!-- end header --> Shopping Cart Nintendo DS Xbox Product: Console £149.99 Console + Games £169.99 Quantity: Product: Console £149.99 Console + Games £169.99 Quantity:     Playstation 3 Wii Product: Console £149.99 Console + Games £169.99 Quantity:   Product: Console £149.99 Console + Games £169.99 Quantity:        <input type="submit" value="Add to cart" name="submit" onClick="cart()";/><input , type="reset" value="Reset" name="reset" Copyright © 2010 shopping cart. Content and Header © |Back to top Do I need to show my CSS as well? (Sorry about the coding its not working properly for me, its not showing up the way it should be)

    Read the article

  • Secret, unlogged, transparent, case-sensitive proxy in IIS6?

    - by Ian Boyd
    Does IIS have a secret, unlogged, transparent, case-sensitive proxy built into it? A file exists on the web-server: GET http://www.stackoverflow.com/javascript/ModifyQuoteArea.js HTTP/1.1 Accept: text/html, application/xhtml+xml, */* Accept-Language: en-US User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: www.stackoverflow.com HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 29246 Date: Mon, 07 Mar 2011 14:20:07 GMT Content-Type: application/x-javascript ETag: "5a0a6178edacb1:1c51" Server: Microsoft-IIS/6.0 Last-Modified: Fri, 02 Tue 2010 17:03:32 GMT Accept-Ranges: bytes X-Powered-By: ASP.NET ... Problem is that a changes made to the file will not get served, the old (i.e. February of last year) version keeps getting served: HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 29246 Date: Mon, 07 Mar 2011 14:23:07 GMT Content-Type: application/x-javascript ETag: "5a0a6178edacb1:1c51" Server: Microsoft-IIS/6.0 Last-Modified: Fri, 02 Tue 2010 17:03:32 GMT Accept-Ranges: bytes X-Powered-By: ASP.NET ... The same old file gets served, even though we've: renamed the file deleted the file restarted IIS The request for this file does not appear in the IIS logs (e.g. C:\WINNT\System32\LogFiles\W3SVC7\) And this only happens from the outside (i.e. the internet). If you issue the request locally on the server, then you will: - get the current file (file there) - 404 (file renamed) - 404 (file deleted) But if i change the case of the requested resource, i.e.: GET http://www.stackoverflow.com/javascript/MoDiFyQuOtEArEa.js HTTP/1.1 Accept: text/html, application/xhtml+xml, */* Accept-Language: en-US User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: www.stackoverflow.com Note: MoDiFyQuOtEArEa.js verses ModifyQuoteArea.js Then i do get the proper file (or get the 404 as i expect if the file is renamed or deleted). But any subsequent changes to the file will not show up until i change the case of the file i'm asking for. Checking the IIS logs all indicate that the (internet) requests are all coming the correct client on the internet (i.e. not from some intermediate proxy). Since the file doesn't exist on the hard drive anymore, i conclude that there is a proxy. The requests serviced from this proxy are not logged in the IIS logs. The requests for new files are logged, and from the client IP, not a proxy IP. The proxy is case sensitivie. This does not sound like something Microsoft, or IIS, would do: - a transparent proxy - case-sensitivie - unlogged - surviving restarts of IIS - surviving in a cache for hours i can't believe that our customer's IIS is doing these things. i'm assuming there is some other transparent proxy in front of IIS. Or, does IIS have a transparent, unlogged, case-sensitive, memory based, proxy, that caches content for at least 7 hours? (Come Monday morning, IIS is serving the correct file, unlogged).

    Read the article

  • Mounting case-sensitive shared folder in VirtualBox

    - by rhettg
    I have an OSX host with a ubuntu VM trying to mount a shared folder. I'm using the options: sudo mount -t vboxsf -o uid=1000,gid=100 pg ~/pg-host The folder mounts fine, however it appears that the mounted directory is case-insensitive, even though my OSX drive is formatted case-sensitive. Are there any options to control this behavior ?

    Read the article

  • Rotate an image in a scaled context

    - by nathan
    Here is my working piece of code to rotate an image toward a point (in my case, the mouse cursor). float dx = newx - ploc.x; float dy = newy - ploc.y; float angle = (float) Math.toDegrees(Math.atan2(dy, dx)); Where ploc is the location of the image i'm rotating. And here is the rendering code: g.rotate(loc.x + width / 2, loc.y + height / 2, angle); g.drawImage(frame, loc.x, loc.y); Where loc is the location of the image and "width" and "height" are respectively the width and height of the image. What changes are needed to make it works on a scaled context? e.g make it works with something like g.scale(sx, sy).

    Read the article

  • Context Menu for add and remove datalist column [migrated]

    - by Kadir Ozgur
    When I right click on Datalist Columns then a context menu appears whose items are add columns, remove column etc. When I removed a column and if I want to remove one more column then it shows me to remove previous column. Everytime, it shows me to remove the previous ones. if (mnu.Name.StartsWith("Rem")) { //getview(); //datalist.Items.Refresh(); //rows.Clear(); //datalist.ItemsSource = rows; int id = listwork.dispidx(util.valint(/*mnu.Name.Substring(3)*/util.valint(mnu.Tag)), ListWork.eArtIdx.dispord); int delid = listwork.delcol(id); GridViewColumnCollection gw = getview().Columns; if (delid >= 0 && delid < gw.Count) gw.RemoveAt(delid); listsortnr = 0; //weil wir ja Colonnen gelöschte haben showsortlist(listwork.querydef.Sortcol); //rows.Clear(); DoRefresh(); }

    Read the article

  • Translating with context

    - by translate
    Is there a way I can see the result of my work while I am translating? It is difficult to translate without context. If I could see how my work will appear while I am doing it, translating is much easier. Edit from Oli: I understand this question to be from somebody who is translating an application. Translators often only have a list of phrases to translate without being able to see where those phrases are used in the app. This person wants a way to quickly locate a string inside an application so they can understand the phrase better and provide the best possible translation.

    Read the article

  • Versioning Java APIs in a non-web context

    - by GAP
    I have modular java application which consists of 40 modules. Some of these modules needs to expose external APIs which other modules or any external integration should be using. The system runs as a desktop application and each module is bundled as a separate jar file. My plan is to bundle the external api as a separate jar. But now the question is: how can I maintain multiple versions of the same API to keep backward compatibility in cases where it can co-exist? Are there any de facto standards on handling APIs versioning out of a web context ?

    Read the article

  • How can I get jQuery $('.class', context) to include context itself if it matches .class?

    - by Jake
    I want to be able to match against all elements in a given context including the context element itself. Here is the code I'm using currently, but it seems inefficient. Is there a better way? Note: I'm using jQ 1.3.2, but I'll upgrade soon so I'm interested in 1.4 solutions too. var context = $('#id'); var filters = '.class1, .class2'; // take context itself if it matches filters $(context).filter(filters) // add anything matching filters inside context .add($(filters, context)) Note: .add($(f,c)) works in jQ 1.3 as .add(f,c) in jQ 1.4

    Read the article

  • Multi-accordion help (CSS issue maybe?)

    - by Josh
    So, I've been trying to develop this multi-accordion news section for this site. It's actually all working, thanks to an insightful plugin. I've modified it a little bit so it works as I want it to, but I've run into two issues, one which is possibly CSS. Issue #1: The idea for the user is that when they view this page, they see all the recent headlines. They can also see who it has been posted by and how many comments have been made to this article. If they wish, they can then click on the headline and the field will expand into the article. They can then either make a comment or view the comments via clicking the View Comments link or clicking the "number of comments" link in the "Posted by..." area (a shortcut to the comments basically). The problem I'm having is if I make the AUTHOR or the "0" comments a link, it breaks the accordion because the accordion uses an A CLASS to open it up. I'm looking for a fix, I've tried making it a H1 or a DIV but that also breaks it. Issue #2: This is a pretty picky one, but when you click the headline it expands, but at least in Firefox (haven't tested it in Chrome yet) the text jumps from the right and to the left, locking in place from which the CSS tells it to (padding-left). I don't know why it's exactly doing that, if anyone has any insight on that, it'd be appreciated. A two-parter to this issue is when you open the Headline to the article and then decide to close the article by clicking on the Headline, parts of the accordion jumps from the darker purple to the light purple before the task is finished. I'm also interested fixing this, but this issue in its entirety are all pretty nit picky things. You can view the demo of the site here: http://www.notedls.com/demo Please if anyone has any advice or fixes, I'd appreciate it, I've been trying to get this all to work to the best of my ability, but I'm clearly no guru or expert. Thanks!

    Read the article

  • Need help making row of buttons consistent

    - by oliverghingold
    I'm making my first website, and I'm trying to make variable-sized buttons so they'll render correctly on low resolution (read: mobile) browsers. Currently I just have the usual rollover image solution (185 pixels wide by 37 tall if anybody cares), but when I preview the site in low resolution it looks, predictably enough, like complete crap (more specifically they don't have room so they arrange vertically instead of horizontally and take up a huge amount of screen real estate). Semi-related, is there a way to overlay text on a button without saving separate images, each with the correct text? Just using a single template for buttons and then deciding what text goes on it as it's needed? tl;dr: I'm trying to get a horizontal lineup of buttons for navigating my website, but I'm a noob and I can't do it right without your generous assistance.

    Read the article

  • How to use more parameters in help-ballon grails-plugin

    - by servicesskurt
    I try to use more of the parameters but could not get it working with <g:helpBalloon title="foo" content="bla" useEvent="['mouseover']" /> should result in <script type="text/javascript"> new HelpBalloon({ title: 'foo', content: 'bla', useEvent: ['mouseover'] }); </script> but useEvent="['mouseover']" seems not to be recognized?! as seen on http://www.beauscott.com/examples/help_balloons/doc/examples.htm

    Read the article

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