Search Results

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

Page 96/584 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • Get updated size of QGraphicsView

    - by onurozcelik
    Hi, In my Qt Application I am dynamically creating QGraphicsView(s) and adding them inside a QGridLayout. When I add first view inside grid, the view covers all the available space inside grid. Then I add second view and there are now two equally sized views inside grid. Then I add third view and there are now three equally sized views inside grid. And so on. How can I get updated size of first view? Below is my trial but I think this is not working. //Definition of viewsPerRow static const int viewsPerRow = 3; void window::newViewRequested() { QGraphicsView *view = new QGraphicsView; view->setVisible(true); viewVector.push_back(view); for(int i = viewGrid->count(); i < viewVector.count(); i++) { viewGrid->addWidget(view,i / viewsPerRow ,i % viewsPerRow); } qDebug()<<viewGrid->cellRect(0,0); }

    Read the article

  • php curly braces into array

    - by David
    Hi, I would like to check a opened .txt file for braces that open and close like below: file { nextopen { //content } } no this is not my own language or anything, but I want to get say the nextopen function and all the contents inside the brackets, and all the stuff from inside the file function and add it to an array if you know what i mean. so all the content inside the braces will be in an array. if you know how to do this please reply.

    Read the article

  • PyLint "Unable to import" error - how to set PYTHONPATH?

    - by Evgeny
    I'm running PyLint from inside Wing IDE on Windows. I have a sub-directory (package) in my project and inside the package I import a module from the top level, ie. __init__.py myapp.py one.py subdir\ __init__.py two.py Inside two.py I have import one and this works fine at runtime, because the top-level directory (from which myapp.py is run) is in the Python path. However, when I run PyLint on two.py it gives me an error: F0401: Unable to import 'one' How do I fix this?

    Read the article

  • @@TRANCOUNT and a current connection

    - by AspOnMyNet
    Assume I connect to SQL server 2008 via SQL Server Management Studio ( SSMS ) and open new window W1 by clicking on New Query tab and write the following inside W1: BEGIN TRANSACTION; If I execute this statement 5 times, and then write (inside W1) SELECT @@TRANCOUNT; , then the value returned will be 5. But if I open another window W2 ( inside the same SSMS instance and thus on the same connection ) and write inside W2 SELECT @@TRANCOUNT; then value returned will be 0. @@TRANCOUNT variable returns the number of active transactions for the current connection. Both W1 and W2 windows were opened on the same connection, so shouldn’t ( according to the above quote ) in both W1 and W2 variable @@TRANCOUNT hold the same value? thanx

    Read the article

  • Update of application Icon in Windows-7 Taskbar

    - by Florian W.
    I have a normal MFC Application with an embedded icon. If I start the application, the icon is shown inside the windows-7 taskbar. But when I change the icon inside the resources, rebuild the application and start it, the taskbar doesn't show the current icon, but the icon from the first run. There is no special code inside the application that does something specific with the windows-7 taskbar. Is there a way, (in C++) to tell the windows-7 taskbar to show the current icon?

    Read the article

  • Loading data in constructors and not in constructors

    - by Richeve S. Bebedor
    I just want to know the difference between loading the data inside the constructor and loading the data outside the constructor but not inside any methods example: Loading inside constructor public class Model{ Object testobject; public Model(){ testobject=new Object(); } } VS example: Loading outside constructor public class Model{ Object testobject=new Object(); public Model(){ } }

    Read the article

  • OUTPUT DID NOT REDIRECT TO THE INTENDED FILE OPENED FOR..

    - by rockyurock
    HELLO ALL, I USED THE BELOW CODE FOR CAPTURING THE OUTPUT (BELOW IN lines) IN A FILE "my_output.txt" BUT FAILED TO CAPTURE. **************output*************** inside value loop ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.16.2 port 5001 connected with 192.168.16.1 port 3189 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 3] 0.0- 5.0 sec 2.14 MBytes 3.61 Mbits/sec 0.369 ms 0/ 1528 (0%) inside value loop3 clue1 clue2 inside value loop4 one iperf completed *************************************** however when i enabled the local *STDOUT; in below code then i could see the above output on command prompt display (ofcourse server is sending some data). could anybody suggest me how can i capture the o/p in a file intended? below is the code i am using .. my $file = 'my_output.txt'; use Win32::Process; print"inside value loop\n"; # redirect stdout to a file #local *STDOUT; open STDOUT, '>', $file or die "can't redirect STDOUT to <$file> $!"; Win32::Process::Create(my $ProcessObj, "D:\\IOT_AUTOMATION_UTILITY\\_SATURDAY_09-04-10\\adb_cmd.bat", "adb shell /data/app/iperf -u -s -p 5001", 0, NORMAL_PRIORITY_CLASS, ".") || die ErrorReport(); #$alarm_time = $IPERF_RUN_TIME+10; #20sec #$ProcessObj->Wait(40); #print"inside value loop2\n"; #sleep $alarm_time; sleep 40; $ProcessObj->Kill(0); sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } /rocky

    Read the article

  • Problems with textarea focus

    - by c0mrade
    My textarea is behaving very strange, when I click inside it .. the cursor appears there when I click, if I click on the middle of the textarea it appears there, and I'd like it to appear on the beginning wherever I click inside, like here on SO when asking question, wherever you click inside textarea it takes your cursor to the topmost left. What can I do to fix this?

    Read the article

  • javascript object access performance

    - by youdontmeanmuch
    In Javascript, when your getting a property of an object, is there a performance penalty to getting the whole object vs only getting a property of that object? Also Keep in mind I'm not talking about DOM access these are pure simple Javascript objects. For example: Is there some kind of performance difference between the following code: Assumed to be faster but not sure: var length = some.object[key].length; if(length === condition){ // Do something that doesnt need anything inside of some.object[key] } else{ var object = some.object[key]; // Do something that requires stuff inside of some.object[key] } I think this would be slower but not sure if it matters. var object = some.object[key]; if(object.length === condition){ // Do something that doesnt need anything inside of some.object[key] } else{ // Do something that requires stuff inside of some.object[key] }

    Read the article

  • How can I build a list of world geo locations and their relative geographical hierarchies?

    - by Nathan Ridley
    I want to build a database of geographical locations and would like to be able to identify locations that fall inside other locations. For example, The Empire State Building is going to have one geo-coordinate, but my database would be able to tell me that it falls inside Manhattan, which falls inside New York City, which is in the state of New York and so forth. I've been looking at OpenStreetMap which seems to have a pretty decent database but as best I can tell, I would need to create a set of polygon structures representing each region and then detect if a coordinate falls inside a given region's polygon. Is there a better way to do this, or is there a data source where all of this has already been calculated?

    Read the article

  • Extend MySQL implementation of PiP Algorithm?

    - by Mike
    I need to make a point in polygon MySQL query. I already found these two great solutions: http://forums.mysql.com/read.php?23,286574,286574 MySQL implementation of ray-casting Algorithm? But these functions can only check if one point is inside a poly. I have a query where the PiP part should only be one part of the query and check for x points inside a polygon. Something like this: $points = list/array/whatever of points in language of favour SELECT d.name FROM data AS d WHERE d.name LIKE %red% // just bla bla // how to do this ? AND $points INSIDE d.polygon AND myWithin( $points, d.polygo ) // or UPDATE I tried it with MBR functions like this: SET @g1 = GeomFromText('Polygon((13.43971 52.55757,13.41293 52.49825,13.53378 52.49574, 13.43971 52.55757))'); SET @g2 = GeomFromText('Point(13.497834 52.540489)'); SELECT MBRContains(@g1,@g2); G2 should NOT be inside G1 but MBR says it is.

    Read the article

  • How do I redirect standard output to a file in Perl? [closed]

    - by rockyurock
    I want to send standard output to the file "my_output.txt" but failed. Here's the output: inside value loop ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.16.2 port 5001 connected with 192.168.16.1 port 3189 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 3] 0.0- 5.0 sec 2.14 MBytes 3.61 Mbits/sec 0.369 ms 0/ 1528 (0%) inside value loop3 clue1 clue2 inside value loop4 one iperf completed *************************************** When I enable the local *STDOUT; in below code then I could see the above output on command prompt display (ofcourse server is sending some data): my $file = 'my_output.txt'; use Win32::Process; print"inside value loop\n"; # redirect stdout to a file #local *STDOUT; open STDOUT, '>', $file or die "can't redirect STDOUT to <$file> $!"; Win32::Process::Create(my $ProcessObj, "D:\\IOT_AUTOMATION_UTILITY\\_SATURDAY_09-04-10\\adb_cmd.bat", "adb shell /data/app/iperf -u -s -p 5001", 0, NORMAL_PRIORITY_CLASS, ".") || die ErrorReport(); #$alarm_time = $IPERF_RUN_TIME+10; #20sec #$ProcessObj->Wait(40); #print"inside value loop2\n"; #sleep $alarm_time; sleep 40; $ProcessObj->Kill(0); sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); }

    Read the article

  • ASP.NET app running in PeopleSoft IFrame - problem

    - by EWizard
    I have a .NET app running inside a Peoplesoft web portal IFrame. What I need to do is get the URL of the portal (parent) that called my .NET app. So far I've tried to get the URL inside my c# code using Request.Url.AbsoluteUri but this is not working. I'm assuming I will have to do this in JavaScript, or is it possible to get the browser's URL inside my c# code? Thanks in advance.

    Read the article

  • WAS Non-HTTP activation - hooking application startup

    - by Mike Tours
    I'm trying to integrate a netTcpBinding based application that is hosted inside WAS with an IoC container (autofac/spring). Unfortunately, when it starts inside WAS and due to the fact that it is not an Http based application, no events are fired inside the Global application class. I need to catch the application domain startup so that I can configure the IoC container. Is there any way to do this when hosting in WAS? I've seen horrible things involving using static classes inside App_Code folders, but I'd like something somewhat more testable and not quite as dirty.

    Read the article

  • SSRS 2005 Keep textbox and textfield together when page break occurs

    - by EKet
    Problem I don't have a details row or anything. I have simply a body and I dragged on textboxes for labeling textfields from my dataset. The problem is when one of the fields has too much data for the current page, it "page-breaks" at the start of the field leaving the textbox (label for the field) behind on the previous page. What I've tried Put the data field and the textbox label a) inside a rectangle - didn't work b) inside a list and the list inside a rectangle - didn't work c) inside a list with keep together property set to TRUE or FALSE - didn't work Question How would I group the textbox and the textfield so that regardless of where the pagebreak happens it includes its label?

    Read the article

  • IPhone SDK - Vibration triggered by Thread

    - by Steblo
    Hi, I'm currently working on an IPhone App that should make the phone vibrate if a special event occurs. The checks to trigger the alert is done in a thread. Unfortunately the phone won't vibrate if I call AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); from inside the thread. (It works fine if I call this in my "viewDidAppear" method). I even tried to do a callback from inside the thead like this: inside Thread: [self performSelectorOnMainThread:@selector(doAlarm) withObject:nil waitUntilDone:true]; -(void)doAlarm { AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); } which has the same result: No vibration on the phone. How do I make the phone vibrate from inside a thread ?? Thanks in advance

    Read the article

  • How to kill a quoted string at point in emacs?

    - by user1350992
    I would like to kill a quoted string in a source file without having to mark the beginning of the string and kill-region, but just by placing the point anywhere inside the quoted string and pressing a shortcut. I tried to write a function in elisp for this, but I figured out that the file would need to be parsed from the beginning up to point to determine whether the point is inside quoted string, and to find the bounds of the quoted string(also handle the \")... But the file is already parsed by font-lock. So now I can find out if I'm inside quoted string: (defun inside-quoted-string? () (interactive) (print (find 'font-lock-doc-face (text-properties-at (point))))) But how do I get the bounds of the string? font-lock knows it, since it nicely highlights it in blue, but how do I get it?

    Read the article

  • Is it more secure to run a desktop app in a applet?

    - by Tom Brito
    Fist of all, when I say "run a desktop app in a applet" I mean do a Applet application that runs off-line, instead of a Desktop application that runs inside a JFrame. The little I know about applets (and maybe something I say is wrong, please correct me) is that applets have all permitions not granted by default. Also, the applets run inside a Sandbox, that does not allow information in or out without explicity permition. So, if I am focused on security in my application, its best to run it inside an applet (off-line, for a desktop application) then inside a JFrame. Is it right?

    Read the article

  • how to organize classes in ruby if they are literal subclasses

    - by RetroNoodle
    I know that title didn't make sense, Im sorry! Its hard to word what I am trying to ask. I had trouble googling it for the same reason. So this isn't even Ruby specific, but I am working in ruby and I am new to it, so bear with me. So you have a class that is a document. Inside each document, you have sentences, and each sentence has words. Words will have properties, like "noun" or a count of how many times they are used in the document, etc. I would like each of the elements, document, sentence, word be an object. Now, if you think literally - sentences are in documents, and words are in sentences. Should this be organized literally like this as well? Like inside the document class you will define and instantiate the sentence objects, and inside the sentence class you will define and instantiate the words? Or, should everything be separate and reference each other? Like the word class would sit outside the sentence class but the sentence class would be able to instantiate and work with words? This is a basic OOP question I guess, and I suppose you could argue to do it either way. What do you guys think? Each sentence in the document could be stored in a hash of sentence objects inside the document object, and each word in the sentence could be stored in a hash of word objects inside the sentence. I dont want to code myself into a corner here, thats why I am asking, plus I have wondered this before in other situations. Thank you!

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >