Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 65/584 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • When compiling programs to run inside a VM, what should march and mtune be set to?

    - by Russ
    With VMs being slave to whatever the host machine is providing, what compiler flags should be provided to gcc? I would normally think that -march=native would be what you would use when compiling for a dedicated box, but the fine detail that -march=native is going to as indicated in this article makes me extremely wary of using it. So... what to set -march and -mtune to inside a VM? For a specific example... My specific case right now is compiling python (and more) in a linux guest inside a KVM-based "cloud" host that I have no real control over the host hardware (aside from 'simple' stuff like CPU GHz m CPU count, and available RAM). Currently, cpuinfo tells me I've got an "AMD Opteron(tm) Processor 6176" but I honestly don't know (yet) if that is reliable and whether the guest can get moved around to different architectures on me to meet the host's infrastructure shuffling needs (sounds hairy/unlikely). All I can really guarantee is my OS, which is a 64-bit linux kernel where uname -m yields x86_64.

    Read the article

  • How do I set a variable inside a bash for loop?

    - by Isaac Moore
    I need to set a variable inside of a bash for loop, which for some reason, is not working for me. Here is an excerpt of my script: function unlockBoxAll { appdir=$(grep -i "CutTheRope.app" /tmp/App_list.tmp) for lvl in {0..24} key="UNLOCKED_$box_$lvl" plutil -key "$key" -value "1" "$appdir/../Library/Preferences/com.chillingo.cuttherope.plist" 2>&1> /dev/null successCheck=$(plutil -key "$key" "$appdir/../Library/Preferences/com.chillingo.cuttherope.plist") if [ "$successCheck" -eq "1" ]; then echo "Success! " else echo "Failed: Key is $successCheck " fi done } As you can see, I try to write to a variable inside the loop with: key="UNLOCKED_$box_$lvl" But when I do that, I get this: /usr/bin/cutTheRope.sh: line 23: syntax error near unexpected token `key="UNLOCKED_$box_$lvl"' /usr/bin/cutTheRope.sh: line 23: `key="UNLOCKED_$box_$lvl"' What am I not doing right? Is there another way to do this? Please help, thanks.

    Read the article

  • Fixed positioned div with a fixed height and relative or absolute divs inside it with greater height

    - by emilolsson
    Hello I have a problem with IE. I have a fixed div like this: #fixed { position: fixed; top: 0px; left: 0px; z-index: 9998; width: 100%; height: 40px; } Inside this div I want to place another div that has a height that is higher than its holder (higher than 40px). So I put a relative or an absolute div inside it and it works splendid in all browsers except IE, at least IE8. But in IE8 the child div gets cut because of the height of 40px specified for it's holder. Is there any workaround to this problem? I'm starting to get gray hairs..

    Read the article

  • How to show string inside string in different color?

    - by Kishore Kumar
    I have one TextBox and One listbox for searching a collection of data. While searching a text inside a Listbox if that matching string found in anywhere in the list it should show in Green color with Bold. eg. I have string collection like "Dependency Property, Custom Property, Normal Property" if i type in the Search Text box "prop" all the Three with "prop" (only the word Prop) should be in Bold and its color should be in green. any idea how it can be done?. Data inside listbox is represented using DataTemplate.

    Read the article

  • How to test if a string is inside a list of predinfined list of string in oracle pl/sql

    - by drupalspring
    I define a list a string which contains different country codes ( for example , USA ,CHINA ,HK ,JPN) How can I check that if a input variable equal to one of the country of the country list in pl/sql . I use the following code to test it but fail, how can I revise it? declare country_list CONSTANT VARCHAR2(200) := USA,CHINA,HK,JPN; input VARCHAR2(200); begin input := 'JPN'; IF input IN (country_list) DBMS_OUTPUT.PUT_LINE('It is Inside'); else DBMS_OUTPUT.PUT_LINE('It is not Inside'); END IF; end;

    Read the article

  • iPhone SDK - How to display a photo taken with the camera inside a UINavigationController?

    - by dan
    This is my code so far: /* class: myViewController @interface myViewController: UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate> */ - (IBAction) getPicture { UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:YES]; } - (void) imagePickerController:(UIImagePickerController *)thePicker didFinishPickingMediaWithInfo:(NSDictionary *)imageInfo { [[thePicker parentViewController] dismissModalViewControllerAnimated:YES]; UIImage *img = [imageInfo objectForKey:@"UIImagePickerControllerOriginalImage"]; self.myImageView.image = img; } So basically I'm trying to get a photo from the iPhone camera and display it in a UIImageView. This works perfectly fine as long the class myViewController is displayed as a standalone view. If I'm putting the View inside a UINavigationController the UIImageView won't display the image after taking one with the camera. But if I choose a picture from the library everything is fine again. So why does the UIImageView won't display a image taken with the camera inside a UINavigationController?

    Read the article

  • Is it possible get the functionality of namespaces inside a class?

    - by CowKingDeluxe
    I have the following code: Public Class Form1 Private Function Step1_Execute() As Boolean Return Step1_Verify() End Function Private Function Step1_Verify() As Boolean Return True End Function Private Function Step2_Execute() As Boolean Return Step2_Verify() End Function Private Function Step2_Verify() As Boolean Return True End Function End Class What I would like to do is be able to separate the code, similar to the following (which obviously doesn't work): Public Class Form1 Namespace Step1 Private Function Step1_Execute() As Boolean Return Step1_Verify() End Function Private Function Step1_Verify() As Boolean Return True End Function End Namespace Namespace Step2 Private Function Step2_Execute() As Boolean Return Step2_Verify() End Function Private Function Step2_Verify() As Boolean Return True End Function End Namespace End Class I would like the functionality of namespaces inside of a class, as in something that would let me call Step2.Execute() instead of having to put Step2_ in front of a whole bunch of functions. I don't want to have to create separate classes / modules for step1, step2, etc. Is there a way that I can accomplish namespace functionality from inside a class?

    Read the article

  • How do I put a vector inside of a struct in Go?

    - by Brian T Hannan
    I'm trying to put a vector variable inside a struct in Google's Go programming language. This is what I have so far: Want: type Point struct { x, y int } type myStruct struct { myVectorInsideStruct vector; } func main(){ myMyStruct := myStruct{vector.New(0)}; myPoint := Point{2,3}; myMyStruct.myVectorInsideStruct.Push(myPoint); } Have: type Point struct { x, y int } func main(){ myVector := vector.New(0); myPoint := Point{2,3}; myVector.Push(myPoint); } I can get the vector to work in my main function just fine, but I want to encapsulate it inside a struct for easier use.

    Read the article

  • How to write custom SQLite functions in Javascript inside a Webkit browser?

    - by Jay Godse
    I have just learned how to use the SQLite database for local storage in a Webkit web browser (e.g. Google Chrome or Apple Safari) using the Javascript API. For example the "Sticky Notes" application. However, I know that SQLite has a function called sqlite_create_function() that lets you add custom functions to your instance of SQLite on the fly which can then be used inside SQL queries. This function is described at sqlite.org. I also know that you can call an equivalent of this API in Ruby as described here. QUESTION: Can anybody show me how to do this in Javascript - i.e. write a custom function in Javascript that can be bound into the SQLite database at run time to be called by the SQLite engine, and all inside a Webkit browser?

    Read the article

  • How to run a widget inside of an activity in Android?

    - by user220755
    I have a widget built to give the user the chance to choose the date (I did not build it, I am building on top of an open source software). Now, I need to display this widget inside of a class that extends the activity class in Android. Let me show some code. Let us say this is the activity class: public class RandomClass extends Activity { public void onCreate(Bundle savedInstanceState) { // I want to run the widget here when the class is created // (the activity is created) } } The widget i want to run is a widget that lets the user choose the date. I know I code use one of Android's activities but I need to build on top of the code so I have to run it inside of the activity class I created. Sorry if this is not clear, ask any questions and i will be more than glad to answer them and clarify.

    Read the article

  • can i changed for loop index variable inside the loop in Matlab???

    - by shawana
    hi every one. i need to change my loop variable inside the iterationa as ihave to acces array elements in the loop which is changing w.r.t size inside the loop. ashort piece of code is that: que=[]; que=[2,3,4]; global len; len=size(que,2) x=4; for i=1:len if x<=10 que(x)= 5; len=size(que,2) x=x+1; end end que array should print like: 2 3 4 5 5 5 5 5 5 5 but it is printed in such a way: 2 3 4 5 5 5. how shuould it be accomplished in matlab? in visual c++ it happen correctly and print whole array of 10 elements which increases at run time plz reply me if have any ideaabout this as i m new into matlab

    Read the article

  • How to release a string created inside a method in iphone?

    - by Warrior
    I have declared a local string inside the method.I am releasing the string inside the same method.I found my code crashing if release that object.If i dont release the string,code runs successfully.I have called that method in viewdidappear so that method is called while pushing and poping.Nothing gets printed in the console. Here is my code -(void)appendString{ NSString *locStr = [[NSString alloc] initWithString:@""]; for (int i=0;i<[result count]; i++) { locStr=[locStr stringByAppendingFormat:@"%@",[result objectAtIndex:i]]; } [str setString:locStr]; [locStr release]; } I am calling the "appendString" method from "viewDidAppear"."str" is a NSMutable string declared in .h class.How should i release the "locStr" .Please help me out

    Read the article

  • how to put value in Label inside gridview during runtime?

    - by nhoyti
    how to put value in Label inside gridview during runtime? I want to put dynamic values in my label inside gridview during pageload. here's my sample code private void SplitStrings() { List<string> listvalues = new List<string>(); listvalues = (List<string>)Session["mylist"]; string[] strvalues = listvalues.ToArray(); if (listvalues != null) { foreach (string strElement in listvalues) { string[] test = strElement.ToString().Split("|".ToCharArray()); string prodQuantity = test[0].ToString(); foreach (GridView row in gvOrderProducts.Rows) { prodQuantity = ((Label)row.FindControl("lblQuantity")).Text; } } } } i want the lblQuantity label to display the values of quantity in my gridview

    Read the article

  • How to define an angular directive inside an angular directive's link function?

    - by user2316667
    I want to create an angular directive inside of a link function, however; the directive created is not able to be compiled. See this JSFiddle: http://jsfiddle.net/v47uvsj5/5/ Uncommenting this directive in the global space works as expected. app.directive('test', function () { return { templateUrl: 'myform', // wraps script tag with id 'myform' restrict: 'E', require: "^mydir", replace: true, scope: { }, link: function (scope, element, attrs, mydirCtrl) { scope.remove = function () { element.remove(); mydirCtrl.remove(); } } } }); But the exact same code inside the link function fails. The reason I want to do this is because I want the user (who is going to be myself) to be able to provide only a script tag's id via an id attribute to my main directive which will in turn create a 'wrapper' directive with a 'remove' method. This way, in the script tag, all one needs to do is implement the 'remove'.

    Read the article

  • How do I create static instances of a class inside that class?

    - by wehas
    I have a class Color that holds values for the red, green, and blue channels of a color. The class constructor lets you create a new color by specifying values for the three channels. However, for convenience, I would also like to have some "premade" colors available for the programmer. For example instead of having something like DrawRectangle(new Color(1, 0, 0)); you would be able to say DrawRectangle(Color.Red); Where Color.Red is an instance of Color that lives inside the Color class. How can I declare these instances of Color inside the Color class? If there is a name for this type of technique I'd like to know it as I had no idea what search terms to use when I was looking for help online.

    Read the article

  • How to get the class of an input inside a jQuery each loop?

    - by Paul Atkins
    Hi, I have function which appends inputs inside a list item when a link is clicked. I then loop through these inputs using an each loop using the code below. It is working correctly as shown, however instead of using field.name I want to use the class of the input as the array key but when i try to do this the class is shown as undefined. Here is the code I am currently using: var values = {}; $.each($('li :input').serializeArray(), function(i, field) { values[field.name] = field.value; }); Here is the code I have inside the list item once I have appended the hidden inputs using jQuery append: <li><input type="hidden" name="group" class="group" value="2"/><input type="hidden" name="condition" class="condition" value="isany"/><input type="hidden" name="value" class="value" value="1,2"/></li> I can get the name attribute fine but class is always undefined. Could anybody help with this?

    Read the article

  • How to iterate a list inside a list in java?

    - by user2142786
    Hi i have two value object classes . package org.array; import java.util.List; public class Father { private String name; private int age ; private List<Children> Childrens; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public List<Children> getChildrens() { return Childrens; } public void setChildrens(List<Children> childrens) { Childrens = childrens; } } second is for children package org.array; public class Children { private String name; private int age ; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } } and i want to print there value i nested a list inside a list here i am putting only a single value inside the objects while in real i have many values . so i am nesting list of children inside father list. how can i print or get the value of child and father both. here is my logic. package org.array; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class ArrayDemo { public static void main(String[] args) { List <Father> fatherList = new ArrayList<Father>(); Father father = new Father(); father.setName("john"); father.setAge(25); fatherList.add(father); List <Children> childrens = new ArrayList<Children>(); Children children = new Children(); children.setName("david"); children.setAge(2); childrens.add(children); father.setChildrens(childrens); fatherList.add(father); Iterator<Father> iterator = fatherList.iterator(); while (iterator.hasNext()) { System.out.println(iterator.toString()); } } }

    Read the article

  • links for 2010-03-25

    - by Bob Rhubart
    Andy Mulholland: Grasping the single point that is powering a lot of the change "What has changed, and is changing our environment is a reversal of the technology model from a focus on data and the ‘pushing’ of this structured data towards users, to a ‘pull’ model based on users’ abilities to find unstructured data using search." -- Andy Mulholland (tags: enterprisearchitecture cloud) Pat Shepherd: SOA Checklist Is SOA the answer for your particular problem? Pat Shepherd's checklist might help you make the right call. (tags: otn oracle enterprisearchitecture soa)

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >