Search Results

Search found 5057 results on 203 pages for 'force'.

Page 20/203 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How to force emacs to use \n instead of \r\n

    - by User1
    I have to use windows to write some shell scripts. I decided to use emacs, but I get a weird error when running the script: /bin/bash^M: bad interpreter: No such file or directory Correct me if I'm wrong, but that looks like the shebang ends in \r\n instead of just \n. How can I tell emacs to only write \n? I'm in Shell-script major mode. It's quite surprising this isn't fixed by default.

    Read the article

  • AJAX: Statusbar: force update of UpdatePanel while function executes

    - by John Bourke
    Hi Guys, I have a label inside an update panel which I wouldl ike to use as a status bar. Basically the user clicks a button which executes a main fucntion that performs a series of tasks. I'd like to inform the user as to the state of the function as it progresses e.g.: Stage 1: Retrieving data... Stage 2: Calculating values... Stage 3: Printing values... Stage 4: Done! I've tried updating the updatepanel directly from the function but it only updates the panel at the end of function (stage 4) and shows "Done!" (which I understand is how it should work). I've been looking into timers and threads to try and update the panel seperate to the main function but I thought I'd post here incase anyone has any better ideas? Thanks for any help in advance! John bourkeyo is offline Reply With Quote

    Read the article

  • How to force a node inside tiny mce ?

    - by KutePHP
    Hi All, I'm using tiny mce for my project and want to validate the node inside the tiny mce. On click of a text element, let's say a paragraph with some id, I load editor for the element. But, sometimes if user replaces the whole content, the node and its HTML is lost. I want to retain this node and only the content is removed. The node can be a paragraph or heading or ul or ol. EDIT : I'm providing dummy text such as "Lorem epsum .....". User will be removing this dummy text and add his content. How can I accomplish this ?

    Read the article

  • Force lowercase property names from Json() in ASP.NET MVC

    - by kouPhax
    Given the following class, public class Result { public bool Success { get; set; } public string Message { get; set; } } I am returning one of these in a Controller action like so, return Json(new Result() { Success = true, Message = "test"}) However my client side framework expects these properties to be lowercase success and message. Without actually having to have lowercase property names is that a way to acheive this thought the normal Json function call?

    Read the article

  • Force close error expecting irregulary

    - by user1506019
    I have problem. I created an application which loads random layour from resources and I have problem because program shows random layout and closes , sometimes after 2 times and sometimes after a dozen, and I dont know where is a problem, I tried to run it on my phone and I added in the manifest write_external_storage permission, and still the same error.Please help me, and try to resolve this problem. here is my code in : java : package ka.ka.ka; import java.util.Random; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class KAMASActivity extends Activity implements OnClickListener { Button button1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this); } @Override public void onClick(View v) { int min = 1; int max = 6; int i1=0; Random r = new Random(); i1 = r.nextInt(max - min + 1) + min; if(i1==1){setContentView(R.layout.image1); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this);} if(i1==2){setContentView(R.layout.image2); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this);} if(i1==3){setContentView(R.layout.image3); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this);} if(i1==4){setContentView(R.layout.image4); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this);} if(i1==5){setContentView(R.layout.image5); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this);} if(i1==6){setContentView(R.layout.image6); button1 = (Button) findViewById(R.id.button1) ; button1.setOnClickListener(this); } } Android Manifest : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ka.ka.ka" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="7" /> <uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:icon="@drawable/ikona" android:label="@string/app_name" > <activity android:name=".KAMASActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> And he is logcat : 07-10 10:58:51.062: D/ddm-heap(218): Got feature list request 07-10 10:58:51.311: D/dalvikvm(218): GC freed 506 objects / 46032 bytes in 122ms 07-10 10:59:30.081: D/AndroidRuntime(218): Shutting down VM 07-10 10:59:30.081: W/dalvikvm(218): threadid=3: thread exiting with uncaught exception (group=0x4001b188) 07-10 10:59:30.081: E/AndroidRuntime(218): Uncaught handler: thread main exiting due to uncaught exception 07-10 10:59:30.102: E/AndroidRuntime(218): java.lang.NullPointerException 07-10 10:59:30.102: E/AndroidRuntime(218): at ka.ka.ka.KAMASActivity.onClick(KAMASActivity.java:32) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.View.performClick(View.java:2364) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.View.onTouchEvent(View.java:4179) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.widget.TextView.onTouchEvent(TextView.java:6541) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.View.dispatchTouchEvent(View.java:3709) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 0 7-10 10:59:30.102: E/AndroidRuntime(218): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 07-10 10:59:30.102: E/AndroidRuntime(218): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow. java:1659) 07-10 10:59:30.102: E/AndroidRuntime(218): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.app.Activity.dispatchTouchEvent(Activity.java:2061) 07-10 10:59:30.102: E/AndroidRuntime(218): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.os.Handler.dispatchMessage(Handler.java:99) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.os.Looper.loop(Looper.java:123) 07-10 10:59:30.102: E/AndroidRuntime(218): at android.app.ActivityThread.main(ActivityThread.java:4363) 07-10 10:59:30.102: E/AndroidRuntime(218): at java.lang.reflect.Method.invokeNative(Native Method) 07-10 10:59:30.102: E/AndroidRuntime(218): at java.lang.reflect.Method.invoke(Method.java:521) 07-10 10:59:30.102: E/AndroidRuntime(218): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 07-10 10:59:30.102: E/AndroidRuntime(218): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 07-10 10:59:30.102: E/AndroidRuntime(218): at dalvik.system.NativeStart.main(Native Method) 07-10 10:59:30.121: I/dalvikvm(218): threadid=7: reacting to signal 3 07-10 10:59:30.121: E/dalvikvm(218): Unable to open stack trace file '/data/anr/traces.txt': Permission denied 07-10 10:59:32.562: I/Process(218): Sending signal. PID: 218 SIG: 9

    Read the article

  • Using .htaccess to force https on all requests in Zend MVC

    - by davykiash
    I have been battling with .htaccess to get all the requests to use https on my Zend MVC. What am seeing is that SSL turns "on" and then goes "off" as the page loads. Below is my .htaccess file. SetEnv APPLICATION_ENV production RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} What do I need to adjust to get my https working properly?

    Read the article

  • IComparer for integers and force empty strings to end

    - by paulio
    Hi, I've written the following IComparer but I need some help. I'm trying to sort a list of numbers but some of the numbers may not have been filled in. I want these numbers to be sent to the end of the list at all times.. for example... [EMPTY], 1, [EMPTY], 3, 2 would become... 1, 2, 3, [EMPTY], [EMPTY] and reversed this would become... 3, 2, 1, [EMPTY], [EMPTY] Any ideas? public int Compare(ListViewItem x, ListViewItem y) { int comparison = int.MinValue; ListViewItem.ListViewSubItem itemOne = x.SubItems[subItemIndex]; ListViewItem.ListViewSubItem itemTwo = y.SubItems[subItemIndex]; if (!string.IsNullOrEmpty(itemOne.Text) && !string.IsNullOrEmpty(itemTwo.Text)) { uint itemOneComparison = uint.Parse(itemOne.Text); uint itemTwoComparison = uint.Parse(itemTwo.Text); comparison = itemOneComparison.CompareTo(itemTwoComparison); } else { // ALWAYS SEND TO BOTTOM/END OF LIST. } // Calculate correct return value based on object comparison. if (OrderOfSort == SortOrder.Descending) { // Descending sort is selected, return negative result of compare operation. comparison = (-comparison); } else if (OrderOfSort == SortOrder.None) { // Return '0' to indicate they are equal. comparison = 0; } return comparison; } Cheers.

    Read the article

  • iPhone Application: force landscape mode, strange behaviour...?

    - by David Lawson
    This is a method I use to switch display views, based on a string passed (for example you could pass MainMenuViewController to switch views to a new instance of that class): - (void)displayView:(NSString *)newView { NSLog(@"%@", newView); [[currentView view] removeFromSuperview]; [currentView release]; UIViewController *newView = [[NSClassFromString(newView) alloc] init]; [[newView view] setFrame:CGRectMake(0, 0, 320, 460)]; [self setCurrentView:newView]; [[self view] addSubview:[currentView view]]; } I have my application forced into landscape view (.plist and -shouldRotate), but if you look in the code: [[newView view] setFrame:CGRectMake(0, 0, 320, 460)]; I have to set the frame of the newView to a portrait frame for the view to be displayed correctly - otherwise, for example, a button on the new view can only be pressed in certain parts of the screen (rectangle up the top), unresponsive anywhere else. Even though in all my NIB files they are set to landscape.

    Read the article

  • VB.NET: Force user to use the topmost form

    - by SiliconCelery
    I'm programming a Minesweeper clone in Visual Studio 2010, with VB.NET, as a Windows Form Application, and I'm having trouble with the Game Won and Game Lost forms. When I show those forms, I want the game form to still be visible, so that the player can see where the mines were, but I don't want the game form to be enabled until the Game Won or Game Lost form is closed. Exactly like Windows Minesweeper does when you win or lose. There aren't any obvious properties for this, as far as I can see, and I've had no luck Googling, I don't know what terms to search. Any help is appreciated, thanks.

    Read the article

  • Progressbar: Force element.innerHTML update before javascript sort call

    - by maras
    Hi, what is the best practice for this scenario: 1) User clicks "Sort huge javascript array" 2) Browser shows "Sorting..." through element.innerHTML="Sorting" 3) Browser sorts huge javascript array (100% CPU for several seconds) while displaying "Sorting..." message. 4) Browser shows result. Pseudo code: ... <a href="#" onclick="sortHugeArray();return false">Sort huge array</a> ... function sortHugeArray(){ document.getElementById("progress").innerHTML="Sorting..."; ...do huge sort ... ...render result... document.getElementById("progress").innerHTML=result; } When i do that this way, browser never shows "Sorting...", it freezes browser for several seconds and shows result without noticing user... Thank you for advice.

    Read the article

  • Force VS to use System.[Type] in Code Completion

    - by James
    Is it possible to have Visual Studio code completion use the System.[Type] instead of the keyword. Example: Autocomplete of List<String> myList = completes as: List<String> myList = new List<string>(); whereas, I want: List<String> myList = new List<String>(): This isn't the only example, but hopefully shows what I'm looking for.

    Read the article

  • force exit from readline() function.

    - by Sasun Hambardzumyan
    I am writing program in c++ which runs GNU readline in separate thread. When main thread is exited I need to finish the thread in which readline() function is called. The readline() function is returned only when standart input came (enter pressed). Is there any way to send input to application or explicitly return from readline function? Thanks in advance.

    Read the article

  • How can I force this z-index?

    - by Kyle Sevenoaks
    On euroworker.no/order (add something to the cart with Kjøp and Handlevogn). I have a tooltip that shows the picture of the product when you hover the product name, for some reason it shows above the name, but under other elements, like lines and other product names. JSFiddle of the tooltip code here. And also how can I get the tooltip to appear in the middle? I tried right:50%; but guess that's not right. Thanks.

    Read the article

  • force users to logout

    - by lipkee85
    Currently I have a client and admin webpage. There are multiple users who will login to the client page. While in admin page, when I restored the database inside the admin page, I need to logout all the users who are currently login to the client page. Any ideas how it should be done? My current language using is classic ASP. If it can be done in ASP.NET, its fine too. Thanks.

    Read the article

  • How to apply a force which should not be continuos

    - by sohan
    I have a body which I move with the help of a button,here is what Im doing -(void) step: (ccTime) delta { int steps = 2; CGFloat dt = delta/(CGFloat)steps; for(int i=0; iactiveShapes, &eachShape, nil); cpSpaceHashEach(space-staticShapes, &eachShape, nil); if(MoveBody) { cpFloat movementPadding = 0.1; cpBodyApplyForce(body, cpvmult(ccp( 10, 0), movementPadding), cpvzero); } else cpBodyResetForces(body); } I just want to stop the body moving whenever the condition fails,I am trying to reset all forces to 0 with cpBodyResetForces(body),but this never work,it just keep on moving. can anyone help me how can I stop the body moving?

    Read the article

  • Force blocking read after EAGAIN?

    - by Daniel Trebbien
    I have a file descriptor that is open for reading which may be non-blocking. What I need to do is simply read all data until reaching EOF and write that data to a writable file descriptor. As the process that performs this copying is not "aware" of anything that is going on around it, I don't think that I can do something useful while waiting for data, and I don't want to use a while loop (while errno is not EAGAIN) because I think that it would be wasteful. Is there a way to block or otherwise suspend execution of the copying process until data becomes available?

    Read the article

  • Force Hibernate To Save A Specific POJO

    - by user1695626
    I have some code calling a webservice and it returns an id. I am saving this id in the database using hibernate. I have a filter that opens the session and commits it, rolling back when any exception occurs within the contained code. Since there is no way to get back the id returned by the webservice I would like to save this in the database EVEN if there is an exception that occurred later on in the code. Is there anyway to do this using the same session?

    Read the article

  • How to force a textField to become editable?

    - by Tzur Gazit
    I have a custom tableViewCell with a UITextLabel inside it. When the cell is first displayed, the place holder is shown and then disappears when the user types something in. What I want is to go back to the parent view, and then to the sub view again, and that the field will show the text that the user previously typed. If I set the text field, simply with setText, the textField is not editable. Any idea?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >