Search Results

Search found 6502 results on 261 pages for 'dont reinvent the wheel'.

Page 185/261 | < Previous Page | 181 182 183 184 185 186 187 188 189 190 191 192  | Next Page >

  • override the operator overloading in C++ ?

    - by stdnoit
    helo guys i have class call Complex I did operator overloading like such Complex c = a + b; // where a and b are object of Complex class which basically is operator+(Complex& that); but I dont know how to say for example double c = a + 10; //where a is object of Complex class but 10 is integer / double I did define typecasting for a to be double get my IDE says that there are too many operands + and it somehow complains for not being able to "understand" the + it has to be in this format though double c = a + 10; thanks

    Read the article

  • Need help with a LINQ ArgumentOutOfRangeException in C#

    - by Christopher Klein
    Hi there, Hoping this is a nice softball of a question for a friday but I have the following line of code: //System.ArgumentOutOfRangeException generated if there is no matching data currentAnswers = new CurrentAnswersCollection().Where("PARTICIPANT_ID", 10000).Load()[0]; CurrentAnswersCollection is a strongly-typed collection populated by a view going back to my database. The problem of course is that if there is not a corresponding PARTICIPANT_ID = 10000 I get the error message. Is there a better way to write this so that I wouldn't get the error message at all? I just dont know enough about LINQ syntax to know if I can test for the existance first? thanks.

    Read the article

  • Codeigniter Template library, add_js() method

    - by Karl
    using This Template Library when i try and use the add_js() function it errors out. I add the regions $_scripts to the template header file but when i load the page it says undefined variable _scripts. any thoughts? changed <?= $_scripts ?> to <?= (isset($_scripts)) ? $_scripts : “”; ?> and obviously i lose the error but the js file still isnt loading. I did an echo at each step though the add_js() method and the output is correct. I also did an output of $this-js and they both had the corret output. So it gets through the get_js method fine and sets the class variable fine but i dont get anything added to the actual page.

    Read the article

  • Regular Expression .net flavor

    - by user1440109
    Dont ask how this works but currently it does ("^\|(.?)\|*$")....kinda. This removes all extra pipes...part one....I have searched all over no anwser yet. I am using VB2011 beta...asp web form......vb coding though! I want to capture special character pipe (|) which is used to seperate words...i.e. car|truck|van|cycle problem is users lead with, trail with, use multiple, and use spaces before and after...i.e. |||car||truck | van || cycle. another example: george bush|micheal jordon|bill gates|steve jobs <-- this would be correct but when I do remove space it takes correct space out. so I want to get rid of whitespace leading, trailing, any space before | and space after | and only allow one pipe (|)....in between alphanumeric of course.

    Read the article

  • newline character on text area

    - by Prady
    I have a custom field called Current_Address__c which is of datatype textarea. I need to populate this field in the format below. ie a newline char after street and another newline after zip. street City state Zip Country The values of city state zip country etc are been taken from contact object. I dont want to use this as a formula field. So i need to populate it in my controller and display it on my VF page. I am trying to add a newline char by using the code below this.customobj.Current_Address__c = currentStreet + '\\n ' + currentCity + ' ' + currentState + ' ' + currentZIP + '\\n ' + currentCountry ; i had also used \n instead of \n. It still show the field in one line instead of 3 lines

    Read the article

  • Built in raytracing?

    - by acidzombie24
    Relating to this question i was wondering if .NET has any libs (or a function) i can use to detect if one point collides with another. I am not sure what angles i should use but is there some function like this func(point src, rect target, angle, distanceOfVision, listPointOrRectOfWalls) Pretty unlikely but i dont know a formula or how to start. Its a quick and dirty prototype. I am thinking of writing the func about but dropping angle and just make line of sight a rectangle and check if any points is between src and target.

    Read the article

  • Secondary thread causes startup delay

    - by JK
    In my didFinishLaunchingWithOptions method I spawn a thread to perform some maintenance on my core data store. However, this increases the startup time by half a second. The startup view is a tableview which draws its content from the same store. If I let the thread sleep for a second, the startup time improves drastically. I would like to understand why the second thread is blocking/delaying the main thread. Is it because both are trying to access the store (The second thread has its own store coordinator and context) or another reason (e.g. dont spawn threads in didFinishLaunching)?

    Read the article

  • Insert hex string value to sql server image field is appending extra 0

    - by rotary_engine
    Have an image field and want to insert into this from a hex string: insert into imageTable(imageField) values(convert(image, 0x3C3F78...)) however when I run select the value is return with an extra 0 as 0x03C3F78... This extra 0 is causing a problem in another application, I dont want it. How to stop the extra 0 being added? The schema is: CREATE TABLE [dbo].[templates]( [templateId] [int] IDENTITY(1,1) NOT NULL, [templateName] [nvarchar](50) NOT NULL, [templateBody] [image] NOT NULL, [templateType] [int] NULL) and the query is: insert into templates(templateName, templateBody, templateType) values('I love stackoverflow', convert(image, 0x3C3F786D6C2076657273696F6E3D.......), 2) the actual hex string is quite large to post here.

    Read the article

  • DATA REQUEST IN SMALLER CHUNKS?

    - by Googler
    Hi folks, I have developed a windows services to retrieve all response data provided by the EPO webservices. While scrapping the data through internet, after few hours i recieve a error message as: Error: ** Please request bibliographic data in smaller chunks.** Here bibliographic data is one kind of the service provided by the EPO webservice. I hope there is no error with my inputs and the service provided. I dont know what this error means. Is it related to the internet connection or with my webservices? can anyone please help me on what this error actually mean?

    Read the article

  • Why web controls does not have sufficient events like windows application?

    - by Vibin Jith
    Hai , An asp panel contains only 6 events. if they provide a visibilechanged event it may very useful for me. if it is in windows application ,how easy it is.I dont know why thy are not providing all these.This is same as in the case of gridView, button ,etc. just think , I have an Iframe in an asp panel and two buttons. In first time it is invisible .Buttons named first and second respectively. Two another pages One.aspx,two.aspx. These two pages contains each text box. When you click on the First button . I want to set the Iframe src="One.aspx" and display "first" in the textbox on One.aspx. as same in the case , when user clicks Second button. How to do this ?

    Read the article

  • Why does my text has the justify effect when I didnt made it to have this effect (css/php)

    - by linkcool
    Why my text has the justify effect? In my whole site, I make echos and i dont specify a "text-align:justify;" but my text is still justifying. Justify is when you make the browser window smaller, the text moves so it fits in the window. I tryed making something like this: <?php echo "<h1>some stuff.</h1>"; ?> <html> <head> <style> h1 { text-align:center; } etc.... but it just makes the text go in the center and it keeps the justify effect. please help me =[ thanks

    Read the article

  • CSS overflow : list in a div

    - by Felicita
    I have an image gallery and I dont want give an extra class to third list item: <div class="row"> <ul class="rowUl"> <li>ssss</li> <li>ssss</li> <li>ssss</li> </ul> </div> and css .row { width: 620px; clear: both; overflow: hidden; } .rowUl { width: 645px; float: left; } .rowUl li { width: 220px; float: left; } but the third list item drop in other row. How can I solve this without extra class?

    Read the article

  • ORA-12560: TNS:protocol adaptor error after delete one database

    - by malihe
    i have oracle11g desktop. For my project I create 3 databases via configuration assistant tools. Then I delete one of them and after this I have the error: ora-12560. By mistake both of my databases have the same pasword, for example: when i want to connect one of these data bases with system user, i have one pasword and perhaps the databases dont know connect which one. I start all services set oracle_sid=orcl. I run lsnrctl tnsping check tansname.ora & my listener.ora and I logon with sysdba@oracle_sid but i have this error again pleas help me tnx

    Read the article

  • SQLCe local db in temp- path in connectionstring?

    - by Petr
    Hi, I have SQL Ce db in my app, which is included in my app directory. While debugging its OK, but when published and run with setup.exe, it retrieves "file not found" in temporary directory the app is ran from. I would like to run from standard location, but I dont know how to change it. I am using this string: SqlCeConnection connection = new SqlCeConnection("Data Source=database.sdf;Persist Security Info=False;"); When I run setup.exe, the app never starts, stating that in its temporary directory the db file was not found. When I run app.exe, it works. I do not understand it...:( EDIT: I can see that in the VS project settings, there is connection string and there is "Data Source=|DataDirectory|\Database.sdf" The path should be something like local directory? Thanks!

    Read the article

  • Client / Server application for Video BroadCasting on LAN

    - by jbl
    I m much of a newbie to client/server applications and networking.I am currently starting up a project in which we are planning to create an application or something like a website accessible only to clients in that LAN network.We want the server to upload videos so that the clients can view them whenever they want.Also the clients can upload videos.Also we want some kind of registration to provide authentication to avoid bogus videos.Also additional features that can be added on later like comment section,ratings,Groups etc. Basically what we want is to build mini-youtube but with one major difference , we want the application to be LAN based. This is the idea behind the project.But we dont know where to start from as we are new to this stuff and also we have like 1 year to work on the project.Please guide me as to what all softwares i'll be needing to get this working !

    Read the article

  • flash.media.Sound.play takes long time to return

    - by Fire Lancer
    I'm trying to play some sounds in my flash project through action script. However for some reason in my code the call to Sound.play takes from 40ms to over 100ms in extreme cases, which is obviously more than enough to be very noticeable whenever a sound is played. This happens every time a sound is played, not just when that sound is first played, so I dont think its because the Sound object is still loading data or anything like that... At the start I have this to load the sound: class MyClass { [Embed(source='data/test_snd.mp3')] private var TestSound:Class; private var testSound:Sound;//flash.media.Sound public function MyClass() { testSound = new TestSound(); } Then im just using the play method of the sound object to play it later on. testSound.play();//seems to take a long time to return This as far as I can tell is following the same process as other Flash programs I found, however none of them seem to have this problem. Is there something that I've missed that would cause the play() method to be so slow?

    Read the article

  • Using NSUserDefaults to load data depending on which table view cell is pressed

    - by Bad_APPZ
    I want my app to work just like the 'contacts' app on iOS. When a user selects a certain TableViewCell, i want to load certain data. No Matter which cell is pressed, Either "Joseph, Richard, or Shannon", This view comes up: Both of the views look the exact same, but they just display different information. So i guess my question is: How can I programmatically set a key @"cell1" @"cell2", etc... for each cell using NSUserDefaults? But here is the catch, I dont know how many cells will be added, so i cant hard code this, How can I create a key for each table view cell for how ever many is added? Thanks for the help!

    Read the article

  • frame by frame animation not running

    - by abc
    well,i am a newbie to android..and i dont know whats wrong in my code.. this is my xml file <?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android" id="selected" android:oneshot="false"> <item android:drawable="@drawable/w1" android:duration="50" /> <item android:drawable="@drawable/w2" android:duration="50" /> </animation-list> my java file ImageView img = (ImageView)findViewById(R.id.s); img.setBackgroundResource(R.anim.shape_animation); // Get the background, which has been compiled to an AnimationDrawable object. AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground(); // Start the animation (looped playback by default). frameAnimation.start();

    Read the article

  • Force Decimal Regex

    - by babyangel86
    Hi, I'm looking for a regex or a way to format the NumberValidator so that only decimal places are allowed. The domain="real" allows you to put integer values, but I need to force the user to but in 2.0 if they want an integer. This is because they pass through a Castor mapping file, it complains if it gets an integer when it expects a decimal. I dont want to restrict the number of decimal places, just insist that there must be a point, and a number after it. Any help would be much appreciated.

    Read the article

  • Mysql - multiple values and between

    - by realshadow
    Hey, I need to select 10 products and display them. Each product has 3 different prices. The select to get the prices looks like this: SELECT * FROM products_loans WHERE CODE IN('10X15/12', '10X15/Q10-10', '10X15/Q20-10') AND 550 BETWEEN PRICE_FROM AND PRICE_TO; Where 550 is the base price. Now this select returns 3 rows, but I want to modify it so it will return 30 results. I dont like the idea to execute 10 queries at once. I know I can easily achieve that with "OR", but I would like to ask if there is some other more elegant way to this. The select "should" look like this: SELECT * FROM products_loans WHERE KOD IN('10X15/12', '10X15/Q10-10', '10X15/Q20-10') AND (550, 325, 780) BETWEEN CENA_OD AND CENA_DO; Note that there is no "price" column or anything in the table which I could use to do a JOIN and I cant modify the table.

    Read the article

  • java and mysql geting shortest path from to two points

    - by shaharnakash
    hi i have a mysql database that hold id ,name , oneid , twoid , size 1 1 1 2 4 2 2 1 3 1 3 3 2 1 74 4 4 2 4 2 5 5 2 5 12 6 6 4 2 12 7 7 4 6 74 8 8 4 7 12 9 9 3 5 32 10 10 3 8 22 11 11 5 3 66 12 12 5 6 76 13 13 5 9 33 14 14 6 10 11 15 15 6 7 21 16 16 8 3 12 17 17 8 9 10 18 18 9 8 2 19 19 9 10 72 20 20 10 6 31 21 21 10 7 7 22 22 10 9 18 23 23 7 6 8 i want to do Dijkstra algorithm but i cant get the details right if i got the contents to class Conn id ,name , oneid , twoid , size how do i find the path from oneid 1 to twoid 7 and believe me i triad many Dijkstra algorithms so please dont give me only reference

    Read the article

  • No such directory when committing files using CVS from Eclipse

    - by Peter
    Hi all I am using Eclipse solely as a CVS client. Mostly it works very good, but once in a while, when I am right-clicking a file to commit it (a file that it itself says is changed and ready for commit), it tells me "cvs [server aborted]: no such directory `...' But the directory DOES exist?! If I navigate to the folder using tortoise CVS and right click for commit, it works fine? (this is the way I finally have to get those files committed) Has anyone experienced this as well, and more importantly - has anyone solved it? :) I am running Vista on the client PC and the CVS server is a Windows Server 2003 (please dont tell me to just switch to Linux - that is not much help). Thank you very much for your help!

    Read the article

  • Jquery UI Sortable Item Contents

    - by bluedaniel
    So I have this shopping list coded in php and js: http://www.whatcouldicook.com/recipes/planner So people can add, delete or sort the list and thats fine, I dont want multiple lists and instead just have a list item containing a heading tag to represent a new list. All this works and then using serialize I can save the ordering/modifying of the list. I don't know how to get the list contents however as these will be dynamic from the user. All the code is on that url so hopefully you can examine the code there. Thanks everyone

    Read the article

  • How to make an NSURL that contains a | (pipe character)?

    - by aks
    Hi all, I am trying to access google maps' forward geocoding service from my iphone app. When i try to make an NSURL from a string with a pipe in it I just get a nil pointer. NSURL *searchURL = [NSURL URLWithString:@"http://maps.google.com/maps/api/geocode/json?address=6th+and+pine&bounds=37.331689,-122.030731|37.331689,-122.030731&sensor=false"]; I dont see any other way in the google api to send bounds coordinates with out a pipe. Any ideas about how I can do this?

    Read the article

  • TabBar in NavigationController Based iphone app

    - by iPhoneDev
    I have a simple navigation based iPhone app, in which user can navigate form one view to another view. There is only one view which have 4 tab. Each tab loads a a seperate nib with a corresponding controller. Each nib contains a tableview with some other controls for searching/filtering etc. Apprt from this I dont need tabBar in any view. So for ex: Login View Welcome View (With TabBar) user select Setting tab and select any setting option Setting Detail view(WITHOUT tabbar) Back WelcomView( With Tab Bar) I am confused how to add a tab bar in navigation based template where only one view is using tabBar all other uses Navigation I hope you understand my problem. I am new to iphone so any example/link will help a lot. Thanks

    Read the article

< Previous Page | 181 182 183 184 185 186 187 188 189 190 191 192  | Next Page >