Search Results

Search found 8737 results on 350 pages for 'clear'.

Page 8/350 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • MATLAB clear current figure

    - by rlbond
    I want to clear MATLAB's global CurrentFigure property, because I need a plot that I make to not be overwritten if a careless user uses plot without opening a new figure. I tried set(0, 'CurrentFigure', []); But it doesn't seem to work. Is this impossible?

    Read the article

  • i see the file but when i open it nothing is in it in c++ i/o stream and dont know why

    - by user320950
    #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip> using namespace std; int main() { ifstream in_stream; // reads ITEMSLIST.txt ofstream out_stream1; // writes in listWititems.txt ifstream in_stream2; // reads PRICELIST.txt ofstream out_stream3;// writes in listWitprices.txt ifstream in_stream4;// read display.txt ofstream out_stream5;// write showitems.txt double p1=0.0,p2=0.0; int wrong=0; int count =0; char next; in_stream.open("ITEMLIST.txt", ios::in); // list of avaliable items /*if( in_stream.fail() )// check to see if itemlist.txt is open { wrong++; // counts number of errors cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ out_stream1.open("listWititems.txt", ios::out); // list of avaliable items /* if( out_stream1.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ in_stream2.open("PRICELIST.txt", ios::in); /*if( in_stream2.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ out_stream3.open("listWitdollars.txt", ios::out); /*if( out_stream3.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ in_stream4.open("display.txt", ios::in); /*if( in_stream4.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ out_stream5.open("showitems.txt", ios::out); /*if( out_stream5.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; }*/ in_stream.setf(ios::fixed); while(!in_stream.eof()) // reads to end of file and gets p1 which is itemnum, clears and gets next character { in_stream >> p1; cin.clear(); cin >> next; } out_stream1.setf(ios::fixed); while (!out_stream1.eof()) { out_stream1 << p1; cin.clear(); cin >> next; } in_stream2.setf(ios::fixed); in_stream2.setf(ios::showpoint); in_stream2.precision(2); while(!in_stream2.eof()) // reads file to end of file { in_stream2 >> p1 >> p2 >> count; // gets p1,p2, and count which is current total in_stream2 >> p2; p1 += p2; p2++; cin.clear(); // allows more reading cin >> next; return p1, p2; } out_stream3.setf(ios::fixed); out_stream3.setf(ios::showpoint); out_stream3.precision(2); while(!out_stream3.eof()) // reads file to end of file { out_stream3 << p1 << p2 << count; out_stream3 << p2; p1 += p2; p2++; cin.clear(); // allows more reading cin >> next; return p1, p2; } in_stream4.setf(ios::fixed); in_stream4.setf(ios::showpoint); in_stream4.precision(2); while (!in_stream4.eof()) { in_stream4 >> p1 >> p2 >> count; cin.clear(); cin >> next; } out_stream5.setf(ios::fixed); out_stream5.setf(ios::showpoint); out_stream5.precision(2); out_stream5 <<setw(5)<< " itemnum " <<setw(5)<<" price "<<setw(5)<<" curr_total " <<endl; // sends items and prices to receipt.txt out_stream5 << setw(5) << p1 << setw(5) <<p2 << setw(5)<< count; // sends items and prices to receipt.txt out_stream5 << " You have a total of " << wrong++ << " errors " << endl; in_stream.close(); // closing files. out_stream1.close(); in_stream2.close(); out_stream3.close(); in_stream4.close(); out_stream5.close(); system("pause"); }

    Read the article

  • clear all array list data

    - by lolalola
    Hi, Why don't clear all Array list data? Console.WriteLine("Before cleaning:" + Convert.ToString(ID.Count)); //ID.Count = 20 for (int i = 0; i < ID.Count; i++) { ID.RemoveAt(i); } Console.WriteLine("After cleaning:" + Convert.ToString(ID.Count)); //ID.Count = 10 From where 10 data? Maybe there is another special function, which deletes everything?

    Read the article

  • asp net javascript Cache clear

    - by Florim Maxhuni
    I have a website that i did some time ago now they request some new features and i did some changes in some javascript files, but when i publish the clients that use the IE have problems with cache so in they browser they have old version of javascript. How can i clear the client cache so when they visit website they use latest javascript files that i modify.

    Read the article

  • clear properties from stylesheets

    - by jeremydouglas
    I'm wondering if anyone knows of a script to clear all the properties from a css stylesheet, but leave the selectors. For instance: body {background: #000; font-size:10px; width:100%;} becomes: body {} This would be done to the whole stylesheet. Thanks if anyone knows of a script to do this.

    Read the article

  • clear command in my mac os terminal gives the following error

    - by sil
    dyld: Library not loaded: /opt/local/lib/libncursesw.5.dylib Referenced from: /opt/local/bin/clear Reason: image not found Trace/BPT trap This is what my bash_login looks like: export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" export PATH="/usr/local/apache-maven-2.2.1/bin:$PATH" export PATH="~/.gem/ruby/1.8/bin:$PATH" export PATH="/usr/local/mysql/bin:$PATH" export PATH="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:$PATH" export PATH=/opt/local/bin:/opt/local/sbin:$PATH export MANPATH=/opt/local/share/man:$MANPATH

    Read the article

  • Best way to initialise / clear a string variable cocoa

    - by Spider-Paddy
    I have a routine that parses text via a loop. At the end of each record I need to clear my string variables but I read that someString = @"" actually just points to a new string & causes a memory leak. What is the best way to handle this? Should I rather use mutable string vars and use setString:@"" between iterations?

    Read the article

  • 3 column html template - content overflows though there is clear both and height is 100%

    - by MeltingDog
    I have 3 divs within a wrapper: <div id="wrapper"> <div id="leftbar"> Lorem ipsum dolar sit amet </div><!--LEFTBAR--> <div id="middle"> Lorem ipsum dolar sit amet </div><!--middle--> <div id="rightbar"> Lorem ipsum dolar sit amet </div><!--RIGHTBAR--> </div><!--wrapper--> Both 'leftbar' and 'middle' are floating left, whilst 'rightbar' is floating right. 'wrapper' has height:100%; clear:both; set. However, if there is a large amount of text or content in 'middle' it overflows the 'wrapper' div. I am struggling to figure out why this is occurring. My CSS is: #wrapper { width: 1000px; height: 100%; margin:auto; padding: 30px; margin-top: 40px; background-color:#FFF; color:#000; border: 2px solid #828fc4; clear:both; } #leftbar { float:left; width: 150px; min-height: 450px; padding: 5px; } #middle { float:left; height: 100%; width: 580px; padding-left: 20px; padding-right: 20px; border-right: 1px dotted #2B308C; border-left: 1px dotted #2B308C; } #rightbar { float:right; width: 200px; min-height: 450px; padding: 5px; } Any advice is appreciated! EDIT: here is the issue on a test server: http://host.pixelframe.net.au/~pptestco/index.php?id=20

    Read the article

  • Atomikos rollback doesn't clear JPA persistence context?

    - by HDave
    I have a Spring/JPA/Hibernate application and am trying to get it to pass my Junit integration tests against H2 and MySQL. Currently I am using Atomikos for transactions and C3P0 for connection pooling. Despite my best efforts my DAO integration one of the tests is failing with org.hibernate.NonUniqueObjectException. In the failing test I create an object with the "new" operator, set the ID and call persist on it. @Test @Transactional public void save_UserTestDataNewObject_RecordSetOneLarger() { int expectedNumberRecords = 4; User newUser = createNewUser(); dao.persist(newUser); List<User> allUsers = dao.findAll(0, 1000); assertEquals(expectedNumberRecords, allUsers.size()); } In the previous testmethod I do the same thing (createNewUser() is a helper method that creates an object with the same ID everytime). I am sure that creating and persisting a second object with the same Id is the cause, but each test method is in own transaction and the object I created is bound to a private test method variable. I can even see in the logs that Spring Test and Atomikos are rolling back the transaction associated with each test method. I would have thought the rollback would have also cleared the persistence context too. On a hunch, I added an a call to dao.clear() at the beginning of the faulty test method and the problem went away!! So rollback doesn't clear the persistence context??? If not, then who does?? My EntityManagerFactory config is as follows: <bean id="myappTestLocalEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="myapp-core" /> <property name="persistenceUnitPostProcessors"> <bean class="com.myapp.core.persist.util.JtaPersistenceUnitPostProcessor"> <property name="jtaDataSource" ref="myappPersistTestJdbcDataSource" /> </bean> </property> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="true" /> <property name="database" value="$DS{hibernate.database}" /> <property name="databasePlatform" value="$DS{hibernate.dialect}" /> </bean> </property> <property name="jpaProperties"> <props> <prop key="hibernate.transaction.factory_class">com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory</prop> <prop key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup</prop> <prop key="hibernate.connection.autocommit">false</prop> <prop key="hibernate.format_sql">true"</prop> <prop key="hibernate.use_sql_comments">true</prop> </property> </bean>

    Read the article

  • how to clear insufficient space on disk where the following directory resides in teamcity

    - by sam
    I am getting the following message :- Warning: insufficient space on disk where the following directory resides: Z:\TeamCity\.BuildServer\system. Disk space available: 915.53Mb. Please contact your system administrator. I already have executed the build history cleanup command. but this has not done much. Can you please guide what directory under the following path I clear up to make space on disk. This Z:\TeamCity.BuildServer\system path has artifacts, caches, changes, messages directories. Which directory to delete to make space. Many Thanks

    Read the article

  • IE7 float/clear bug

    - by alex
    I am having the weirdest behavior in IE7 on this page. I have a clear: left on #moored that makes sure that #content-container will expand to the height of the float: left'd #content. Of course, Firefox and IE8 do it right. The weird thing though, is in IE7, it appears that #content-container is automatically expanding to contain the #secondary-content, which it shouldn't. Even weirder is when I view with IE8 with developer tools, the boundary boxes seem to show the that the #content-container is the expanding to the height of the #secondary-container, even though the background: #fff tells a different story. The background goes to where it should, and the void is now black. I've Googled a bit and came across heaps of similar float bugs, but I don't think I've found one which offers a fix yet for this circumstance. Can anyone please help me?

    Read the article

  • Clear all class variables between instances

    - by ensnare
    This is probably a stupid question, but what's the best way to clear class variables between instances? I know I could reset each variable individually in the constructor; but is there a way to do this in bulk? Or am I doing something totally wrong that requires a different approach? Thanks for helping ... class User(): def __init__(self): #RESET ALL CLASS VARIABLES def commit(self): #Commit variables to database >>u = User() >>u.name = 'Jason' >>u.email = '[email protected]' >>u.commit() So that each time User is called the variables are fresh. Thanks.

    Read the article

  • Clear Session in ASP.Net

    - by Jignesh
    I want to clear the session on Page unload. Here is a condition : If user goes from Page A to Page B of the same site session must not get cleared. If user close the browser window or Tab(close the site),session must gets cleared. I have tried using AJAX PageMethod to call server-side procedure to remove session from client side script.But the procedure is not getting hit,I have checked it using Breakpoint. server side procedure is in master.cs file I will appreciate your help. Here is code in site.master <body onunload="HandleClose();"> <script type="text/javascript"> function HandleClose() { PageMethods.AbandonSessions(); } and here is a code in master.cs : [System.Web.Services.WebMethod] public static void AbandonSessions() { HttpContext.Current.Session.Abandon(); }

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >