Search Results

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

Page 76/584 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • Missing WM_PAINT when hosting a WPF control inside a winforms application.

    - by Boris
    Hi All, Consider the following scenario: 1) Create a winforms application with an empty form. 2) Create a WPF usercontrol in the same project which is just the default control with background changed to blue. <UserControl x:Class="WindowsFormsApplication2.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300" Background="Blue"> <Grid> </Grid> </UserControl> 3) Build the project 4) Add the control to your form (an ElementHost is added and the control is added inside it). 5) Run the application (everything looks nice) 6) Start Spy++, click find window (Control+F) and move the cursor onto the WPF control (the blue square) Something strange happens, the control gets a WM_ERASEBKGND message but no WM_PAINT message so now it is white. You can resize the form, hide the form behind other windows and the WPF control will not get rendered. There is an image of the scenario here: http://img260.imageshack.us/img260/2296/wmpaint.png This is a simplified example of the situation I have in the actual application. Please tell me what is the best way to resolve this issue such that the WPF control renders itself correctly. I would like a solution that can be incorporated into a large application with many controls on the form. Thank you very much in advance, Boris

    Read the article

  • How can I display a language according to the user's browser's language inside this code?

    - by janoChen
    How can I display a language according to the user's browser's language inside this mini-framework for my multilingual website? Basically, it has to display the default language of the user if there's no cookies. Example of index.php: (rendered output) <h2><?php echo l('tagline_h2'); ?></h2> common.php: (controller of which language to output) <?php session_start(); header('Cache-control: private'); // IE 6 FIX if(isSet($_GET['lang'])) { $lang = $_GET['lang']; // register the session and set the cookie $_SESSION['lang'] = $lang; setcookie("lang", $lang, time() + (3600 * 24 * 30)); } else if(isSet($_SESSION['lang'])) { $lang = $_SESSION['lang']; } else if(isSet($_COOKIE['lang'])) { $lang = $_COOKIE['lang']; } else { $lang = 'en'; } //use appropiate lang.xx.php file according to the value of the $lang switch ($lang) { case 'en': $lang_file = 'lang.en.php'; break; case 'es': $lang_file = 'lang.es.php'; break; case 'tw': $lang_file = 'lang.tw.php'; break; case 'cn': $lang_file = 'lang.cn.php'; break; default: $lang_file = 'lang.en.php'; } //translation helper function function l($translation) { global $lang; return $lang[$translation]; } include_once 'languages/'.$lang_file; ?> Example of /languages/lang.en.php: (where multilingual content is being stored) <?php $lang = array( 'tagline_h2' => '...',

    Read the article

  • How can I put double quotes inside a string within an ajax JSON response from php?

    - by karlthorwald
    I receive a JSON response in an Ajax request from the server. This way it works: { "a" = "1", "b" = "hello 'kitty'" } But I did not succeed in putting double quotes around kitty. When I convert " to \x22 in the Ajax response, it is still interpreted as " by JavaScript and I cannot parse the JSON. Should I also escape the \ and unescape later (which would be possible)? How to do this? Edit: I am not sure if i expressed it well: I want this string inside of "b" after the parse: hello "kitty" If necessary I could also add an additional step after the parse to convert "b", but I guess it is not necessary, there is a more elegant way so this happens automatically? Edit2: The ajax page is generated by php. I tried several things now to create the value of b, all result in JSON parse error on the page: $b = 'hello "kitty"'; // no 1: //$b = str_replace('"',"\x22",$b); // or no 2: // $b = addslashes($b); // or no 3: //$b = str_replace('"','\"',$b); // or no 4: $b = str_replace('"','\\"',$b); echo '"b" : "' . $b . '"';

    Read the article

  • how to initialize and implement the matrix inside the function in objective-C?

    - by Rajendra Bhole
    Hi, I want to develop an application in which i want to be initialize the matrix for manipulation. The code as follows, struct pixel { Byte r, g, b,a; int count; }; (NSInteger) processImage1: (UIImage*) image { struct pixel* pixels = (struct pixel*) calloc(1, image.size.width * image.size.height * sizeof(struct pixel)); if (pixels != nil) { // Create a new bitmap CGContextRef context = CGBitmapContextCreate( (void*) pixels, image.size.width, image.size.height, 8, image.size.width * 4, CGImageGetColorSpace(image.CGImage), kCGImageAlphaPremultipliedLast ); if (context != NULL) { // Draw the image in the bitmap CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, image.size.width, image.size.height), image.CGImage); NSUInteger numberOfPixels = image.size.width * image.size.height; while (numberOfPixels &gt; 0) { if (pixels->r == 254 || pixels->g == 77 || pixels->b==254) { numberOfRedPixels++; } pixels++; numberOfPixels--; } CGContextRelease(context); } free(pixels); } return 1; } I want to implement the matrix inside the function of - (NSInteger) processImage1: (UIImage*) image {} The matrix should have be row = image.size.width and column = image.size.height.

    Read the article

  • Why can't I access elements inside an XML file with XPath in XML::LibXML?

    - by John
    I have an XML file, part of which looks like this: <wave waveID="1"> <well wellID="1" wellName="A1"> <oneDataSet> <rawData>0.1123975676</rawData> </oneDataSet> </well> ... more wellID's and rawData continues here... I am trying to parse the file with Perl's libXML and output the wellName and the rawData using the following: use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file('/Users/johncumbers/Temp/1_12-18-09-111823.orig.xml'); my $xc = XML::LibXML::XPathContext->new( $doc->documentElement() ); $xc->registerNs('ns', 'http://moleculardevices.com/microplateML'); my @n = $xc->findnodes('//ns:wave[@waveID="1"]'); #xc is xpathContent # should find a tree from the node representing everything beneath the waveID 1 foreach $nod (@n) { my @c = $nod->findnodes('//rawData'); #element inside the tree. print @c; } It is not printing out anything right now and I think I have a problem with my Xpath statements. Please can you help me fix it, or can you show me how to trouble shoot the xpath statements? Thanks.

    Read the article

  • ZF2: How to get Zend\Navigation inside custom router?

    - by Katan87
    I have custom router and I have to get access to Zend\Navigation inside this custom router. I was googling, asking and searching and no results :/ All I need is to find nodes with 'link' param using Zend\Navigation in my AliasSegment::match function. Here is my module.config.php: 'navigation' => array( // The DefaultNavigationFactory we configured in (1) uses 'default' as the sitemap key 'default' => array( // And finally, here is where we define our page hierarchy 'account' => array( 'label' => 'Account', 'route' => 'node', 'pages' => array( 'home' => array( 'label' => 'Dashboard', 'route' => 'node', 'params' => array( 'id' => '1', 'link' => '/about/gallery' ), ), 'login' => array( 'label' => 'Sign In', 'route' => 'node', 'params' => array( 'id' => '1', 'link' => '/signin' ), ), 'logout' => array( 'label' => 'Sign Out', 'route' => 'node', ), ), ), ), ), [...] 'service_manager' => array( 'factories' => array( 'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', 'Navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory', ), ), [...] And here is my AliasSegment class: namespace Application\Controller; use Traversable; use Zend\Mvc\Router\Exception; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\RequestInterface as Request; use Zend\Mvc\Router\Http; class AliasSegment extends \Zend\Mvc\Router\Http\Segment { public function match(Request $request, $pathOffset = null) { //Here i need to have access to Zend\Navigation return parent::match($request, $pathOffset); } }

    Read the article

  • Running a GWT application (including Applets) inside an IFRAME from an ASP.NET 3.5 app?

    - by Jay Stevens
    We are looking at integrating a full-blown GWT (Google Web Toolkit 2.0) application with an existing ASP.NET 3.5 application. My first gut reaction is that this is a horrible frankenstein idea. However, the customer has insisted that we use this application developed by a third-party. I have almost NO CONTROL over the development of the GWT app. My first thought is to actually attempt to embed this in an iFrame. Because GWT is running under Tomcat/Jakarta, it is hosted on a different server from the .NET app so the iFrame src will be to a URL on the other machine. I need to utilize our own ASP.NET authorization scheme to restrict access to the embedded GWT application. The GWT app also uses embedded java applets, which don't seem to be working right now inside the iframe. The GWT app makes calls to a backend server (using GWT-RPC?). Any major problems with this approach that anyone can see? Will GWT work on an iframe while hosted on a different machine? NOTE: SIMPLY ADDING A DIV WITH THE SAME NAME DOES NOT WORK FOR THIS!

    Read the article

  • How can I alter an external variable from inside my AJAX?

    - by tmedge
    I keep on having these same two problems. I have been trying to use Remy Sharp's wonderful tagSuggest plugin, and it works great. Until I try to use an AJAX call to get tags from my database. My setGlobalTags() works great, with my defined myTagList at the top of the function. What I want to do is set myTagList equal to the result from my AJAX. My problem is that I can neither call setGlobalTags() from inside my success or error functions, nor actually alter the original myTagList. Also, I keep on having this other issue as well. I keep this code in my Master page, and my AJAX returns 'success' on almost every page. I only (and always) get the error alert when I navigate to a page that actually contains something of id="ParentTags". I don't see why this is happening, because my $('#ParentTags').tagSuggest(); is definitely after my AJAX call. I realize that this is probably just some dumb conventions error, but I am new to this and I'm here to learn from you guys. Thanks in advance! $(function() { var myTagList = ['test', 'testMore', 'testALot']; $.ajax({ type: "POST", url: 'Admin/GetTagList', dataType: 'json', success: function(resultTags) { myTagList = resultTags; alert(myTagList[0]); setGlobalTags(myTagList); }, error: function() { alert('Error'); setGlobalTags(myTagList); } }); setGlobalTags(myTagList); $('#ParentTags').tagSuggest(); });

    Read the article

  • how to find a control inside ItemsPanelTemplate in wpf?

    - by kakopappa
    I am trying to access a Grid inside the DataTemplate while the ItemsControl is binded by ItemsSource. this is the full XMAL code, How do i find a certain element from outside? for (int i = 0; i < allViewControl.Items.Count; i++) { var container = allViewControl.ItemContainerGenerator.ContainerFromItem(allViewControl.Items[i]) as FrameworkElement; var grid = allViewControl.ItemTemplate.FindName("grid", container) as DataGrid; } i found this always returning null ? <ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> <ItemsControl x:Name="allViewControl" Focusable="False" HorizontalContentAlignment="Center" Grid.IsSharedSizeScope="true" ItemsSource="{Binding AllClassCharacters}" ItemTemplate="{StaticResource CharacterViewModelTemplate}" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Extensions:AnimatedWrapPanel IsItemsHost="true" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </ScrollViewer> <DataTemplate x:Key="CharacterViewModelTemplate" DataType="{x:Type ViewModel:CharacterViewModel}"> <Grid x:Name="grid" Width="200" Height="Auto" MinHeight="115" Margin="1" MinWidth="130" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Background="#66000000" > <Grid.RowDefinitions> <RowDefinition Height="70"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <ProgressBar x:Name="playerProgressBar" VerticalAlignment="Top" Background="Transparent" Height="5" Width="Auto" Value="0" Visibility="Collapsed" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan ="2" Grid.RowSpan="2" Foreground="White" BorderThickness="0" Style="{DynamicResource ProgressBarStyle1}" /> </Grid>

    Read the article

  • How to center list tags inside an unordered list?

    - by Jack
    How can list tags that are given a display:block and are floated left, be centered inside an unordered list. The HTML: <div id="navigation"> <ul> <li>Home</li> <li>About Us</li> <li>Contact</li> <li>News</li> <li>Events</li> <li>Video</li> <li>Photos</li> </ul> </div><!-- navigation --> The CSS: #navigation { border: 3px solid orange; overflow: hidden; } #navigation ul { list-style-type: none; text-align: center; } #navigation ul li { float: left; display: block; padding: 10px 8px; border: 1px solid green; }

    Read the article

  • Getting all objects with a certain element inside a collection of strings with criteria API.

    - by Jens Jansson
    Hey. I'm trying to build a Hibernate Criteria query to find entities that have a specific element inside a collection. We can take as an example a Book -object that looks like this: public class Book { private Long id; private String title; private Set<String> authors = new HashSet<String>(); } The entity is mapped like this: <class name="Book" table="Book"> <id name="id" column="BOOK_ID"> <generator class="native"/> </id> <property name="title"/> <set name="authors" table="Book_Authors"> <key column="BOOK_ID"/> <element type="string" column="AUTHORS"/> </set> </class> Now I would like to find out which books are written by Matt. With pure SQL I can do a query like this: String author = "Matt"; String query = "SELECT * FROM Book " + "WHERE BOOK_ID IN " + "(SELECT BOOK_ID FROM Book_Authors " + "WHERE authors = :author )"; List<Book> result = session.createSQLQuery(query) .addEntity(Book.class) .setParameter("author", author) .list(); This works all good and well, and I get out all books that Matt has been a part of writing. The project I work in, however, uses the Criteria API instead of raw SQL, and I haven't found a way to express the same query in that form. I've taken a look on the Restrictions API and the closest I've found is Restions.in(propertyName, collection) but that works the other way around (one value in object, many values to match against). Any ideas?

    Read the article

  • How do I swallow the dropdown behavior inside an Expander.Header?

    - by Peter Seale
    Hello, I would like to prevent an Expander from expanding/collapsing when users click inside the header area. This is basically the same question as Q 1396153, but I'd appreciate a more favorable answer :) Is there a non-invasive way to do this? I am not sure exactly how to attach behavior to the Expander.Header content to prevent mouseclicks. I'm willing to float in content outside the expander itself via a fixed grid layout, but I'm not keen on the solution. Ideas? XamlPad sample XAML: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Expander> <Expander.Header><TextBlock>When I click this text, I don't want to trigger expansion/collapse! Only when I click the expander button do I want to trigger an expand/collapse!</TextBlock></Expander.Header> <Grid Background="Red" Height="100" Width="100" > </Grid> </Expander> </Page>

    Read the article

  • How to check whether a CGPoint is inside a UIImageView?

    - by Horace Ho
    In touchesBegan: CGPoint touch_point = [[touches anyObject] locationInView:self.view]; There are tens of UIImageView around, stored in a NSMutableArray images. I'd like to know is there a built-in function to check if a CGPoint (touch_point) is inside one of the images, e.g.: for (UIImageView *image in images) { // how to test if touch_point is tapped on a image? } Thanks Follow up: For unknown reason, pointInside never returns true. Here is the full code. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; touch_point = [touch locationInView:self.view]; for (UIImageView *image in piece_images) { if ([image pointInside:touch_point withEvent:event]) { image.hidden = YES; } else { image.hidden = NO; } NSLog(@"image %.0f %.0f touch %.0f %.0f", image.center.x, image.center.y, touch_point.x, touch_point.y); } } although I can the two points are sometimes identical in the NSLog output ... I also tried: if ([image pointInside:touch_point withEvent:nil]) the result is the same. never returns a true. To eliminate the chance of anything goes with with the images. I tried the following: if (YES or [image pointInside:touch_point withEvent:event]) all images are hidden ater the first click on screen.

    Read the article

  • Is there a way to increase the efficiency of shared_ptr by storing the reference count inside the co

    - by BillyONeal
    Hello everyone :) This is becoming a common pattern in my code, for when I need to manage an object that needs to be noncopyable because either A. it is "heavy" or B. it is an operating system resource, such as a critical section: class Resource; class Implementation : public boost::noncopyable { friend class Resource; HANDLE someData; Implementation(HANDLE input) : someData(input) {}; void SomeMethodThatActsOnHandle() { //Do stuff }; public: ~Implementation() { FreeHandle(someData) }; }; class Resource { boost::shared_ptr<Implementation> impl; public: Resource(int argA) explicit { HANDLE handle = SomeLegacyCApiThatMakesSomething(argA); if (handle == INVALID_HANDLE_VALUE) throw SomeTypeOfException(); impl.reset(new Implementation(handle)); }; void SomeMethodThatActsOnTheResource() { impl->SomeMethodThatActsOnTheHandle(); }; }; This way, shared_ptr takes care of the reference counting headaches, allowing Resource to be copyable, even though the underlying handle should only be closed once all references to it are destroyed. However, it seems like we could save the overhead of allocating shared_ptr's reference counts and such separately if we could move that data inside Implementation somehow, like boost's intrusive containers do. If this is making the premature optimization hackles nag some people, I actually agree that I don't need this for my current project. But I'm curious if it is possible.

    Read the article

  • How can I clear viewstate of a dropdownlist inside a usercontrol? Should I?

    - by tbilly
    I have a web user control with a dropdownlist inside of it. When the usercontrol's databind event is called, it automatically fires the dropdownlists databind event. In the dropdownlist's ondatabound event handler an 'other' option is appended to the end of the dropdownlist. The usercontrol is loaded multiple times, depending on selection of other controls on the page. When the page loads initially, there are no items in the usercontrol except the 'other' option. Then when I call the user control's databind event the control reloads, with 4 items plus the 'other' option. The text for the first item in the list is the 'other' option's text, not what it should be. I've stepped through the databound event of the dropdownlist and have found that all items are loading correctly. It appears that the dropdownlist's viewstate is the culprit, that the dropdownlist's original item[1] text is overwriting the new text. I've tried disabling viewstate on the dropdownlist, but then it wouldn't load at all. Should I try to clear the dropdownlist's viewstate? How do I do that? Any suggestions would be greatly appreciated.

    Read the article

  • is it better to test if a function is needed inside or outside of it?

    - by b0x0rz
    what is the best practice? call a function then return if you test for something, or test for something then call? i prefer the test inside of function because it makes an easier viewing of what functions are called. for example: protected void Application_BeginRequest(object sender, EventArgs e) { this.FixURLCosmetics(); } and private void FixURLCosmetics() { HttpContext context = HttpContext.Current; if (!context.Request.HttpMethod.ToString().Equals("GET", StringComparison.OrdinalIgnoreCase)) { // if not a GET method cancel url cosmetics return; }; string url = context.Request.RawUrl.ToString(); bool doRedirect = false; // remove > default.aspx if (url.EndsWith("/default.aspx", StringComparison.OrdinalIgnoreCase)) { url = url.Substring(0, url.Length - 12); doRedirect = true; } // remove > www if (url.Contains("//www")) { url = url.Replace("//www", "//"); doRedirect = true; } // redirect if necessary if (doRedirect) { context.Response.Redirect(url); } } is this good: if (!context.Request.HttpMethod.ToString().Equals("GET", StringComparison.OrdinalIgnoreCase)) { // if not a GET method cancel url cosmetics return; }; or should that test be done in Application_BeginRequest? what is better? thnx

    Read the article

  • PHP: how to access variables inside a function that have been declared outside of it?

    - by Chris
    Please, I am very new and have not been confronted with OOP and all this related stuff, which I guess may be related to this issue (public, private, ...). So, any help and suggestions are very appreciated! :) At the very beginning of each page I include a file that starts the SESSION etc, lets call it session.php. In this file session.php, I include a file that contains a function, let's call it function1.php, because I need the function to be available in session.php. However, later in the main page I also include function2.php which needs to access variables set in session.php, so I additionally tried to include session.php in function2.php. The problem is that an error occurs as function1 will be declared multiple times... Fatal error: Cannot redeclare function1() (previously declared in ... So, what would be a more elegant and clean(er) solution for this? How could you solve it? Basically, I'd need to access variables inside a function that have been included in the main page before... Thank you very much in advance!

    Read the article

  • How to apply different CSS style to child elements as they occur inside one another?

    - by Starx
    For example my HTML is this <ul> <li>Sample 1</li> <li>Sample 2 <ul> <li>Sub 1</li> <li>Sub 2</li> <li>Sub 3 <ul> <li>Grandsub 1</li> <li>Grandsub 2</li> <li>Grandsub 3 <ul> <li>verySub 1</li> <li>verySub 2</li> </ul> </li> </ul> </li> </ul> </li> <li>Sample 3</li> </ul> I want to use different styles on every child <UL> without defining any class or id on them. I dont know how many child <ul> might occur inside one another so inline css will not to the job Is this possible?

    Read the article

  • How: Start an Activity inside a Thread and use finish() to get back.

    - by Kirk Becker
    Hello, I am programming a game on android. I'm using a Thread while calling a Surface View class to update and draw my game. Inside the update I wanted to start an activity based on if the game has just started and this would launch my MENUS. My Thread for the most part.. while (myThreadRun) { Canvas c = null; try { gameTime = System.currentTimeMillis(); c = myThreadSurfaceHolder.lockCanvas(null); synchronized (myThreadSurfaceHolder) { // Update Game. myThreadSurfaceView.onUpdate(); // Draw Game. myThreadSurfaceView.onDraw(c); You can see there where I am updating the game... here is onUpdate(); protected void onUpdate() { // Test if menu needs to be displayed. while (thread.getMenu()) { // Test if menu activity has been started. if (thread.getMenuRunning() == false) { Intent menuIntent = new Intent(this.getContext(), MyMenu.class); ((Activity) cxt).startActivityForResult(menuIntent, 1); thread.setMenuRunning(true); } } I am using a while loop because if I didn't use it the thread just keeps going. Basically I just don't know how to implement my menus using a thread as a game loop. Everywhere I look it seems like that's best practice. In my menu activity I just display the menu layout and a few buttons and when the person wants to start the game it uses finish() to go back to my thread where they play the game. I am very new to this so any insight will be helpful, Thanks

    Read the article

  • Is there a way to detect elements inside a parent element?

    - by Starx
    I would like to detect all the elements insides a parent element and still check if the child has child elements and detect them also. For Example: <div id="first"> <div id='second1'></div> <div id='second2'> <div id='third1'></div> <div id='third2'> <div id='fourth1'></div> <div id='fourth2'></div> </div> <div id='third3'></div> </div> <div id='second3'></div> <div id='second4'></div> </div> I want to know the list of all the id inside the #first and check each child if it has its child and keep this on going until I have complete list of all element.

    Read the article

  • Ubuntu 12.04 doesn't recgonize m CPU correctly

    - by Nightshaxx
    My computer is running ubuntu 12.04 (64bit), and I have a AMD Athlon(tm) X4 760K Quad Core Processor which is about 3.8ghz (and an Radeon HD 7770 GPU). Yet, when I type in cat /proc/cpuinfo - I get: processor : 0 vendor_id : AuthenticAMD cpu family : 21 model : 19 model name : AMD Athlon(tm) X4 760K Quad Core Processor stepping : 1 microcode : 0x6001119 cpu MHz : 1800.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 16 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1 bogomips : 7599.97 TLB size : 1536 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro processor : 1 vendor_id : AuthenticAMD cpu family : 21 model : 19 model name : AMD Athlon(tm) X4 760K Quad Core Processor stepping : 1 microcode : 0x6001119 cpu MHz : 1800.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 2 apicid : 17 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1 bogomips : 7599.97 TLB size : 1536 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro processor : 2 vendor_id : AuthenticAMD cpu family : 21 model : 19 model name : AMD Athlon(tm) X4 760K Quad Core Processor stepping : 1 microcode : 0x6001119 cpu MHz : 1800.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 18 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1 bogomips : 7599.97 TLB size : 1536 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro processor : 3 vendor_id : AuthenticAMD cpu family : 21 model : 19 model name : AMD Athlon(tm) X4 760K Quad Core Processor stepping : 1 microcode : 0x6001119 cpu MHz : 1800.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 3 cpu cores : 2 apicid : 19 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1 bogomips : 7599.97 TLB size : 1536 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro The important part of all this being, cpu MHz : 1800.000 which indicates that I have only 1.8ghz of processing power, which is totally wrong. Is it something with drivers or Ubuntu?? Also, will windows recognize all of my processing power? Thanks! (NOTE: My cpu doesn't have intigrated graphics

    Read the article

  • Eclipse Indigo very slow on Kubuntu 12.04

    - by herom
    hello fellow ubuntu users! I have a really big problem with my Eclipse Indigo running on Kubuntu 12.04 32bit, Dell Vostro 3500, Intel(R) Core(TM) i5 CPU M480 @ 2.67 (as cat /proc/cpuinfo said). It has 4GB RAM. cat /proc/cpuinfo brings up the following: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz stepping : 5 microcode : 0x2 cpu MHz : 1197.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid bogomips : 5319.85 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz stepping : 5 microcode : 0x2 cpu MHz : 1197.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 4 initial apicid : 4 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid bogomips : 5319.88 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz stepping : 5 microcode : 0x2 cpu MHz : 1197.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 1 initial apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid bogomips : 5319.88 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz stepping : 5 microcode : 0x2 cpu MHz : 1197.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 5 initial apicid : 5 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid bogomips : 5319.88 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: java -version brings the following: java version "1.7.0_04" Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode) it's the Oracle Java, not OpenJDK. I try to develop an Android application for GoogleTV and Eclipse is this slow, that it can't follow my typing (extreme lagging!!), but this issue makes it almost impossible! here is my eclipse.ini file: -startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.100.v20110505 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 512m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -Declipse.p2.unsignedPolicy=allow -Xms256m -Xmx512m -Xss4m -XX:PermSize=128m -XX:MaxPermSize=384m -XX:CompileThreshold=5 -XX:MaxGCPauseMillis=10 -XX:MaxHeapFreeRatio=70 -XX:+CMSIncrementalPacing -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+UseFastAccessorMethods -XX:ReservedCodeCacheSize=64m -Dcom.sun.management.jmxremote has anybody faced the same problems? can anybody help me on this problem? it's really urgent as I'm sitting here at my company and am not able to do anything productive...

    Read the article

  • How to call function that inside JQuery Plugin From outside the plugin?

    - by CaTz
    hi, i am using textarea elastic plugin JQuery. this is the plugin (function(jQuery){ jQuery.fn.extend({ elastic: function() { // We will create a div clone of the textarea // by copying these attributes from the textarea to the div. var mimics = [ 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'fontSize', 'lineHeight', 'fontFamily', 'width', 'fontWeight']; return this.each( function() { // Elastic only works on textareas if ( this.type != 'textarea' ) { return false; } var $textarea = jQuery(this), $twin = jQuery('<div />').css({'position': 'absolute','display':'none','word-wrap':'break-word'}), lineHeight = parseInt($textarea.css('line-height'),10) || parseInt($textarea.css('font-size'),'10'), minheight = parseInt($textarea.css('height'),10) || lineHeight*3, maxheight = parseInt($textarea.css('max-height'),10) || Number.MAX_VALUE, goalheight = 0, i = 0; // Opera returns max-height of -1 if not set if (maxheight < 0) { maxheight = Number.MAX_VALUE; } // Append the twin to the DOM // We are going to meassure the height of this, not the textarea. $twin.appendTo($textarea.parent()); // Copy the essential styles (mimics) from the textarea to the twin var i = mimics.length; while(i--){ $twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString())); } // Sets a given height and overflow state on the textarea function setHeightAndOverflow(height, overflow){ curratedHeight = Math.floor(parseInt(height,10)); if($textarea.height() != curratedHeight){ $textarea.css({'height': curratedHeight + 'px','overflow':overflow}); } } // This function will update the height of the textarea if necessary function update() { // Get curated content from the textarea. var textareaContent = $textarea.val().replace(/&/g,'&amp;').replace(/ /g, '&nbsp;').replace(/<|>/g, '&gt;').replace(/\n/g, '<br />'); var twinContent = $twin.html(); if(textareaContent+'&nbsp;' != twinContent){ // Add an extra white space so new rows are added when you are at the end of a row. $twin.html(textareaContent+'&nbsp;'); // Change textarea height if twin plus the height of one line differs more than 3 pixel from textarea height if(Math.abs($twin.height()+lineHeight/3 - $textarea.height()) > 3){ var goalheight = $twin.height()+lineHeight/3; if(goalheight >= maxheight) { setHeightAndOverflow(maxheight,'auto'); } else if(goalheight <= minheight) { setHeightAndOverflow(minheight,'hidden'); } else { setHeightAndOverflow(goalheight,'hidden'); } } } } // Hide scrollbars $textarea.css({'overflow':'hidden'}); // Update textarea size on keyup $textarea.keyup(function(){ update(); }); $textarea.focus(function(){ update(); }); // And this line is to catch the browser paste event $textarea.live('input paste',function(e){ setTimeout( update, 250); }); // Run update once when elastic is initialized update(); }); } }); })(jQuery); How can i call from the outside of the plugin to the update function that is inside?

    Read the article

  • Issues loading Jquery (Galleria) script from inside an i-frame (beginner javascript?)

    - by 103188530284789248582
    Hello, first of all - I'm not entirely new to javascript, but am not fluent in it as I am with html and css, and am especially new to jQuery... so please excuse me if this questions seems easy or obvious, but after days of google I still have no solution to the problem... using jQuery 1.4.2.min, jQuery-ui-1.8.1 .... the site in question: http://homecapture.ca/sets/project_index.html The scenario: I have a tabbed menu generated from an unordered list, when a menu item is clicked it reveals an iframe which links to the page containing an image gallery. I am using jQuery UI tabs for the tabbed menu, and the galleries to which I'm linking are jQuery Galleria pages, automatically generated with Jalbum. The problem: The galleria plug-in only works normally from inside of the containing iframe in Chrome, has inconsistent behaviour in IE8 (seems to work in my local copy, but won't load properly online), and is not loaded properly in Firefox. Instead of displaying a thumbnail area and the first large image, the Galleria page shows the first thumbnail only, then when it is clicked the image it links to, but if you right-click and go Back, the iframe content shows up as a properly rendered Galleria page. Jalbum generates more script in the < head of the page in addition to linking to jquery and the galleria plug-in. All of it seems to be in charge of the gallery navigation , and I have relocated it to the < body of the page, in an effort to make it load after the parent page scripts, and together with the gallery content. At this point I am not sure what else I could do to solve the problem, without digging around in all or some of the library and pluging .js files (which I am not knowledgeable enough to do without some pointers). Has anyone dealt with a similar issue? I'm seeing some solutions for manipulating iframe content from a parent page with jQuery on here, is that what I should be researching instead? Thanks in advance for all the help! ps. I tried posting some code, but it seems I do not have enough 'reputation' for things to work right on here either :)

    Read the article

  • Why can't I put a jquery-ui progressbar inside a div with fixed position?

    - by Matthew
    I started the source from this progressbar example, and it works fine. My only change was to set the width of the progressbar to "20%". <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#progressbar").progressbar({ value: 37 }).css({ width : "20%"}); }); </script> </head> <body style="font-size:62.5%;"> <div id="progressbar"></div> </body> </html> I then put the progressbar inside another div, and used css to fix that div in the upper-right-hand corner. <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <style type="text/css"> #testContainer { position : fixed; top : 6; right : 6; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#progressbar").progressbar({ value: 37 }).css({ width : "20%"}); }); </script> </head> <body style="font-size:62.5%;"> <div id="testContainer"> <div id="progressbar"></div> </div> </body> </html> The progressbar becomes a slim vertical line on the left side of the screen. What am I doing wrong? I'm new to web development in general, and jquery in particular, so please forgive me if this is a stupid question.

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >