Search Results

Search found 6433 results on 258 pages for 'trouble shooting'.

Page 146/258 | < Previous Page | 142 143 144 145 146 147 148 149 150 151 152 153  | Next Page >

  • How do I check the input data type of a variable in C++?

    - by atinesh singh
    i'm atinesh currently started learning c++ but i've one doubt about how to check the data type of input variable in c++. #include<iostream.h> void main() { double a,b; cout<<"Enter two double values"; cin>>a>>b; if() //if condition false then cout<<"data entered is not of double type"; //i'm having trouble for identifying whether data //is double or not how to check please help me }

    Read the article

  • Sound plays multiple times at once

    - by Jr. Mathews
    I'm having trouble with sound in Flash. I may have went about coding the wrong way, because most of my codes are on frames. So, I have these two variables var outsideDay:Sound = new daysong(); var outsideNight:Sound = new nightsong(); And I want to play these songs on a specific frame. However, the sounds play sporadically, like 50 times at once. I think it's because I have other codes that link to the frames with a Enter_Frame function. How can I get the sounds to loop and not play multiple times at once?

    Read the article

  • How do I override a Spring bean definition yet still reference the overriden bean?

    - by Kevin
    I'm attempting to implement a delegate Service provider by overriding the bean definition for the original service with my delegate Service. However, as the name would imply, the delegate Service needs a reference to the original service to delegate calls to. I'm having trouble figuring out how to override the bean definition while using the original bean def without running into a circular reference issue. For example: <!-- Original service def in spring-context.xml --> <bean id="service" class="com.mycompany.Service"/> <!-- Overridden definition in spring-plugin-context.xml --> <bean id="service" class="com.mycompany.DelegatedService"/> <constructor-arg ref="service"/> </bean> Is this possible?

    Read the article

  • How can I get the width/height of a loaded swf's stage in AS2?

    - by loopj
    I'm using MovieClipLoader to load an external as2 swf file into my as2 flash project, and I'm having trouble getting the original stage size of the loaded swf. When I run the following code: var popup:MovieClip = _root.createEmptyMovieClip("popup", 1); var loader:MovieClipLoader = new MovieClipLoader(); var loadHandler:Object = new Object(); loader.addListener(loadHandler); loader.loadClip(url, popup); loadHandler.onLoadInit = function(mc:MovieClip) { trace(mc._width + ", " + mc._height); } I get strange width/height values (mc._width=601.95, mc._height=261.15) when what I actually want is the stage size of the loaded swf file, which in this case I know to be 300px x 250px. Any suggestions appreciated! Thanks

    Read the article

  • Comparing an id to id of different tables rows mysql

    - by jett
    So I am trying to retrieve all interests from someone, and be able to list them. This works with the following query. SELECT *,( SELECT GROUP_CONCAT(interest_id SEPARATOR ",") FROM people_interests WHERE person_id = people.id ) AS interests FROM people WHERE id IN ( SELECT person_id FROM people_interests WHERE interest_id = '.$site->db->clean($_POST['showinterest_id']).' ) ORDER BY lastname, firstname In this one which I am having trouble with, I want to select only those who happen to have their id in the table named volleyballplayers. The table just has an id, person_id, team_id, and date fields. SELECT *,( SELECT GROUP_CONCAT(interest_id SEPARATOR ",") FROM people_interests WHERE person_id = people.id ) AS interests FROM people WHERE id IN ( SELECT person_id FROM people_interests WHERE volleyballplayers.person_id = person_id ) ORDER BY lastname, firstname I just want to make sure that only the people who are in the volleyballplayers table show up, but I am getting an error saying that Unknown column 'volleyballplayers.person_id' in 'where clause' although I am quite sure of the name of table and I know the column is named person_id.

    Read the article

  • MongoDB efficient dealing with embedded documents

    - by Sebastian Nowak
    I have serious trouble finding anything useful in Mongo documentation about dealing with embedded documents. Let's say I have a following schema: { _id: ObjectId, ... data: [ { _childId: ObjectId // let's use custom name so we can distinguish them ... } ] } What's the most efficient way to remove everything inside data for particular _id? What's the most efficient way to remove embedded document with particular _childId inside given _id? What's the performance here, can _childId be indexed in order to achieve logarithmic (or similar) complexity instead of linear lookup? If so, how? What's the most efficient way to insert a lot of (let's say a 1000) documents into data for given _id? And like above, can we get O(n log n) or similar complexity with proper indexing? What's the most efficient way to get the count of documents inside data for given _id?

    Read the article

  • Need help in using Eclipse JEE version to develop a servlet project

    - by michael
    Hi, I have downloaded eclipse jee version (3.5) and I would like to use it to develop a servlet project on tomcat. So I * install tomcat and add it as my server in my eclipse environment. * create a Dynamic Web Project called 'TestServlet' * create a new servlet called 'MainServlet' and then I deploy my project to the tomcat server via eclipse and 'run the server in debug' mode. But when I use the browser to hit 'http://localhost:8080/TestServlet/MainServlet' I see no resource found (that page is generated by Tomcat, so I know my Tomcat is running). Can you please tell me what am I missing? Or how can I trouble shoot my problem? I think it must be some path /name is not set correctly.

    Read the article

  • MATLAB: How do I get 3D coordiantes from a user-click?

    - by John
    I'm using Matlab to create a small chess game for one of my courses this semester. The thing I'm having trouble with is having the user be able to select one of the chess pieces. To simplify things, I'm making it so that the user selects a piece by clicking on the square that the chess piece resides on rather than clicking the piece itself (which I assume would be much more difficult). I know how to get the x and y coordinates of the view-port, but how do I transform these coordinates into 3-space coordinates? I know that there are multiple x,y,z coordinates associated with each view-port coordinate, but I'm only interested in the x,y,z coordinate where z = 0 (since the board itself is in the x,y plane that intersects the z axis where z = 0). Thanks!

    Read the article

  • How to access parent window variables from object

    - by Pickle
    I've got an XHTML 1.1 Strict document that is loading another XHTML 1.1 document in an <object> element (as <iframe> isn't part of the XHTML 1.1 spec). I'm having trouble in IE8 (don't care about 6 or 7) with accessing a javascript variable, Lightbox, in the parent window, from the document loaded in the <object>. In Firefox and everywhere I've seen online, I can just use window.parent.Lightbox. In IE8 however, I get it being undefined. window.parent does give me an object but it doesn't have my Lightbox variable. I've also tried window.Lightbox, window.top.Lightbox, and window.top.document.Lightbox, but all return undefined. I should mention I'm using Javascript to set the data property of the <object> - but I don't see how that could affect anything relevant. What Javascript Fu do I need to do to be able to access my Lightbox variable?

    Read the article

  • Help with setting up panels in Java

    - by Milos
    I'm new to Java awt, so I am having trouble with setting up panels. I have one giant panel, which needs to hold 3 panels inside (photo is attached at the bottom). One will go on top(1), second one will be in the middle(3), and third goes on the bottom(2). Any remaining space has to be divided equally between (1)/(3) and (3)/(2). Also, the middle panel (3) is a table, so GridLayout has to be used. How can I achieve this? Thanks in advance! P.S. I've tried to draw it in MS Paint (http://i45.tinypic.com/2w523ie.jpg)

    Read the article

  • Implement loops for python 3

    - by Alex
    Implement this loop: total up the product of the numbers from 1 to x. Implement this loop: total up the product of the numbers from a to b. Implement this loop: total up the sum of the numbers from a to b. Implement this loop: total up the sum of the numbers from 1 to x. Implement this loop: count the number of characters in a string s. i'm very lost on implementing loops these are just some examples that i am having trouble with-- if someone could help me understand how to do them that would be awesome

    Read the article

  • Illegal offset type

    - by BFTrick
    Hello, I am having trouble uploading a file through php. I check the file type at the beginning of the process and I get an error. This is the error I am getting: Warning: Illegal offset type in /balblabla/DBfunctions.inc.php on line 183 This is the printed out $_FILES var Array ( [Picture] = Array ( [name] = JPG.jpg [type] = image/jpeg [tmp_name] = /tmp/phpHlrNY8 [error] = 0 [size] = 192221 ) ) Here is the segment of code I am using that is giving me issues: function checkFile($file, $type) { if( in_array($_FILES[$file]['type'], $type) ){ // <--- LINE 183 return true; }//if return false; } // end checkFile() This is the line of code that calls the function if( checkFile( $_FILES['Picture'], array("image/jpeg") ) == true ){ //do stuff }// end if I have used this piece of code on dozens of websites on my own server so i am guessing that this is some different configuration option. How can i modify my code so that it works on this different server?

    Read the article

  • Hibernate pluralization

    - by matiasf
    I have A MySQL database currently in production use for a CakePHP application A Java SE application accessing the same database via Hibernate, currently in development. I'm using the Netbeans "automigrate" feature to create the POJO classes and XML files (do I really need the XML files when using annotations?). As the schema is quite complex creating the tables manually is way too much work. Cake expects all DB tables to be pluralized (the Address class is automagically mapped to the addresses table). When running the Netbeans automigration it then does pluralization on the already pluralized table names (I'm getting Addresses.java and setAddresseses() methods). I know I'm asking for trouble running two very different data layers against the same database, but I'd like to know if it's possible to have Netbeans generating the POJO classes in singular form or if there is another (better) way to manage this.

    Read the article

  • Sorting array of structs

    - by mrblippy
    Hi, i am having trouble making a method to sort an array of structs. i am tring to sort them in ascending order based on classcode. any help you could give would be appreciated struct unit { char classcode[4]; char *classname; }; void insertion_sort(struct unit u[], int n) { int j, p; struct unit tmp[1]; for(p = 1; p < n; p++) { tmp[0] = u[p]; for(j = p; j > 0 && (strcmp(tmp[j-1].classcode, tmp[p].classcode) > 0); j--) u[j] = u[j-1]; u[j] = tmp[0]; } }

    Read the article

  • local match kickoff time

    - by Usagi Dreamy
    I'm working on a sports website and need to convert the server's match start time to local match start time. After much googling, I figured the fastest and most accurate way is to get the GMT offset value in JavaScript. The trouble is, I can't pass the GMT offset value to PHP. I've tried using both the PHP session and cookie variables, but both are always empty. The website doesn't require a user account, so there isn't any stored GMT value in the database. I'm trying to auto-detect each user's local timezone every time he/she visits the website, and then calculate the local match start time based on the timezone offset. Can someone please advise me? Thanks.

    Read the article

  • Which faces technology for use with GlassFish 2.1 and NetBeans 6.7?

    - by SteJav
    I'm running GlassFish 2.1 and using NetBeans 6.7. I'd like to create a web interface to my data using JSF 1.2. Trouble is, I'm not sure which 'faces' technology to learn (that includes some good documentation). JBoss/RichFaces seem pretty good on documentation, but I'm using GlassFish. Any thoughts? The choices appear overwhelming: Tomahawk Tobago Trinidad ICEfaces RCFaces Netadvantage WebGalileoFaces QuipuKit BluePrints Woodstock JBoss RichFaces Ajax4jsf ILOG Oracle ADF G4JSF Simplica Backbase jenia4faces VisualWebPack DynaFaces IBM Impl Dinamica Mojarra PrimeFaces jQuery OpenFaces ZK ExtJS Anybody had any experience with any of the above and found the documentation to be clear to a beginner? Being a JSF/Web beginner, I tried some ICEFaces, Mojarra tutorials and had a go at getting RichFaces working with NBeans and GlassFish, but no luck. Lots of XML complaints. I'm clearly missing some huge chunks of configuration, but I can't find any documentation to help me. Any suggestions would be much appreciated :-)

    Read the article

  • How do I obtain the version information for my Windows Service programmatically

    - by user302004
    I need to obtain the version of my Windows service programmatically and store it in a string. Then, I'll append the version to my display name and service name in the ProjectInstaller class. Right now I'm getting an empty string and I'm having trouble debugging my setup project. Here's my current code: string version = null; try { Assembly exeAssembly = Assembly.GetEntryAssembly(); Type attrType = typeof(AssemblyFileVersionAttribute); object[] attributes = exeAssembly.GetCustomAttributes(attrType, false); if (attributes.Length 0) { AssemblyFileVersionAttribute verAttr = (AssemblyFileVersionAttribute)attributes[0]; if (verAttr != null) { version = verAttr.Version; } } } catch { } if (version == null) { version = string.empty; }

    Read the article

  • unable to retract Sharepoint solutions

    - by BeraCim
    Hi all: I am having trouble retracting solutions in SharePoint 2007. I used both the retract solution button and the stsadm command in command line. The timer job was created in both instances, but it never gets run... it just sits in the timer job definition. The Status of the target just said "Retracting (scheduled at m/dd/yyyy MM:SS AM/PM)". I've waited for a long time and nothing happens. Has anyone experienced this before, and does anyone have a solution to this problem? Thanks.

    Read the article

  • Loading and removing images with DOM, Javascript

    - by jesse
    I'm new to DOM and I'm having trouble removing multiple images that I loaded this loads 7 images (1.jpg, 2.jpg, etc..) function loadImages() { for (var i = 1; i < 8; i++ ) { var img = document.createElement("img"); img.src = "images/"+i+".jpg"; var idName = "img"+i+""; document.getElementById(idName).appendChild(img); } } this should remove all of them, but doesn't.. I think it breaks at the removeChild line. function removeImages() { for (var i = 1; i < 8; i++ ) { var idName = "img"+i+""; var d = document.getElementById(idName); d.removeChild(document.getElementById(img)); } } I think I'm doing something fundamentally wrong, because I don't fully understand how this works...

    Read the article

  • Running sites on "localhost" is extremeley slow.

    - by seanxe
    Hello all, Having real trouble using my local host to test sites. It runs extremely slow! Sometimes up to a minute to load a page. I'm using firefox and the sites i'm testing run fine on other developers in my office local machines/ on the production server. I've gone through the normal things :- Disabled IPv6 Not running in debug mood Put the site in the highest app pool (High Isolated) on IIS 6. Taking of firewalls etc. The problem only seems to occur when hitting pages which contain some form of .net code in the code-behind. Appreciate that this a little bit of a vague topic / stab in the dark but would appreciate any sort of advice - it's horrible waiting a minute each refresh to try out a change! Cheers, Sean.

    Read the article

  • MochaUI: 'A is null' when adding columns

    - by Richard John
    I've just downloaded MochaUI, and I'm playing around trying to build an interface. I've successfully created windows, but I'm having trouble when it comes to layouts with columns. I've included all of the libraries in the same order as the demo, and this is in my init code: window.addEvent('domready', function(){ new MochaUI.Column({ id: 'sideColumn1', placement: 'left', width: 200, resizeLimit: [100, 300] }); }); When run, no column is created and I get the error: A is null Does anyone have any ideas? Thanks!

    Read the article

  • Neural Network Basics

    - by Stat Onetwothree
    I'm a computer science student and for this years project, I need to create and apply a Genetic Algorithm to something. I think Neural Networks would be a good thing to apply it to, but I'm having trouble understanding them. I fully understand the concepts but none of the websites out there really explain the following which is blocking my understanding: How the decision is made for how many nodes there are. What the nodes actually represent and do. What part the weights and bias actually play in classification. Could someone please shed some light on this for me? Also, I'd really appreciate it if you have any similar ideas for what I could apply a GA to. Thanks very much! :)

    Read the article

  • SQL statement HAVING MAX(some+thing)=some+thing

    - by Andreas
    I'm having trouble with Microsoft Access 2003, it's complaining about this statement: select cardnr from change where year(date)<2009 group by cardnr having max(time+date) = (time+date) and cardto='VIP' What I want to do is, for every distinct cardnr in the table change, to find the row with the latest (time+date) that is before year 2009, and then just select the rows with cardto='VIP'. This validator says it's OK, Access says it's not OK. This is the message I get: "you tried to execute a query that does not include the specified expression 'max(time+date)=time+date and cardto='VIP' and cardnr=' as part of an aggregate function." Could someone please explain what I'm doing wrong and the right way to do it? Thanks

    Read the article

  • C++ containers on classes, returning pointers

    - by otneil
    Hello, I'm having some trouble to find the best way to accomplish what I have in mind due to my inexperience. I have a class where I need to a vector of objects. So my first question will be: is there any problem having this: vector< AnyType container* and then on the constructor initialize it with new (and deleting it on the destructor)? Another question is: if this vector is going to store objects, shouldn't it be more like vector< AnyTipe* so they could be dynamically created? In that case how would I return an object from a method and how to avoid memory leaks (trying to use only STL)?

    Read the article

  • Is a function kind of like a static method?

    - by lkm
    I'm a java programmer and am trying to understand the difference between a method (java methods) and a function (such as in c++). I used to think that they are the same, just different naming conventions for different programming languages. But now that I know they are not, I am having trouble understanding the difference. I know that a method relates to an instance of a class and has access to class data (member variables), while a function does not (?). So is a function kind of like a static method? See here for explanations I read which led me to think this.

    Read the article

< Previous Page | 142 143 144 145 146 147 148 149 150 151 152 153  | Next Page >