Daily Archives

Articles indexed Monday June 14 2010

Page 23/108 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Custom UIView using CALayers disappears after 180º rotation or navigation controller pop

    - by Steve Madsen
    I have a created a custom UIView subclass that is exhibiting some strange behavior. It is a spinning wheel selector, and for performance reasons it is drawn entirely into two CALayer instances. The bottom layer is the wheel itself, which is rotated using setAffineTransform: according to touches. The top layer is eye candy. drawRect: is fairly simple. If the control hasn't been drawn yet (or it's been invalidated), it calls a method that creates the images and assigns them to the layer contents property. - (void) drawRect:(CGRect)rect { if (imageLayer == nil) { [self drawIntoImageLayer]; } [self updateWheelRotation]; } When the view controller using this view first appears, everything is fine. There are two instances where the view completely disappears, however: If the device is rotated a full 180°. After a view controller is popped off the navigation stack and the view becomes visible again. drawRect: is not called either time. Interestingly enough, it IS called after a 90° orientation change, and that causes the view to re-appear. How can I ensure that a custom view using CALayers is redrawn properly in these situations?

    Read the article

  • Problem, executing commands in cmd using c#

    - by srk
    I need to execute the below command in command prompt. C:\MySQL\MySQL Server 5.0\bin>mysql -uroot -ppassword < d:/admindb/aar.sql When i do this manually in cmd, i am getting my results. Now i am trying to do this programatically, to execute it in cmd from c# code. I am using the below code to do it. I am not getting any errors and Result !!! When i debug, i get the value of string commandLine as below, "\"C:\\MySQL\\MySQL Server 5.0\\bin\\\" -uroot -ppassword > \"D:/admindb/AAR12.sql" I guess the problem is with this string, passed to cmd. How to solve this ??. public void Execute() { string commandLine = "\"" + MySqlCommandPath + "\"" + " -u" + DbUid + " -p" + DbPwd + " > " + "\"" + Path.Combine(Path_Backup, FileName_Backup + ExcID + ".sql"); System.Diagnostics.ProcessStartInfo PSI = new System.Diagnostics.ProcessStartInfo("cmd.exe"); PSI.RedirectStandardInput = true; PSI.RedirectStandardOutput = true; PSI.RedirectStandardError = true; PSI.UseShellExecute = false; System.Diagnostics.Process p = System.Diagnostics.Process.Start(PSI); System.IO.StreamWriter SW = p.StandardInput; System.IO.StreamReader SR = p.StandardOutput; SW.WriteLine(commandLine); SW.Close(); }

    Read the article

  • error while updating a database in ASP.NET

    - by Viredae
    I am having trouble updating an SQL database, the problem is not that it doesn't update at all, but that particular parameters are being updated while the others are not. here is the code for updating the parameters: string EditRequest = "UPDATE Requests SET Description = @Desc, BJustif = @Justif, Priority = @Priority, Requested_System = @Requested, Request_Status = @Stat WHERE"; EditRequest += " Req_ID=@ID"; SqlConnection Submit_conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["DBConn"].ConnectionString); SqlCommand Submit_comm = new SqlCommand(EditRequest, Submit_conn); Submit_comm.Parameters.AddWithValue("@ID", Request.QueryString["reqid"]); Submit_comm.Parameters.AddWithValue("@Desc", DescBox.Text); Submit_comm.Parameters.AddWithValue("@Justif", JustifBox.Text); Submit_comm.Parameters.AddWithValue("@Priority", PriorityList.SelectedValue); Submit_comm.Parameters.AddWithValue("@Requested", RelatedBox.Text); Submit_comm.Parameters.AddWithValue("@Stat", 1); Submit_conn.Open(); Submit_comm.ExecuteNonQuery(); Submit_comm.Dispose(); Submit_comm = null; Submit_conn.Close(); get_Description(); Page.ClientScript.RegisterStartupScript(this.GetType(), "Refresh", "ReloadPage();", true); this function is called by a button on a pop-up form which shows the parameters content that is being changed in a text box which is also used to submit the changes back to the database, but when I press submit, the parameters which are displayed on the form don't change, I can't find any problem wit the code, even though I've compared it to similar code which is working fine. In case you need to, here is one of the text boxes I'm using to display and edit the content: <asp:TextBox ID="JustifBox" TextMode="MultiLine" runat="server" Width="250" Height="50"></asp:TextBox> What exactly is wrong with the code?

    Read the article

  • Munin fills server memory

    - by danilo
    In the last weeks, it happened several times to me that my vserver (Debian Lenny) was out of RAM (500M) and therefore wasn't able to run apache anymore. When looking at the processes with top, I saw that there were many open munin-limits and munin-cron processes that consumed most of the memory. My guess would be that sometimes Apache temporarily needs more memory, which prevents munin-cron from running. And if munin-cron isn't able to stop itself, it would fill the memory until nothing is left. I don't know whether this guess is true, but could maybe someone know what the problem is and how to prevent it? If necessary I'll remove munin, but I'd prefer to keep it running.

    Read the article

  • Bare-metal virtualisation for the desktop

    - by Andrew Taylor
    Hi, Does anyone have any knowledge about bare-metal virtualisation products? I'm interested in building a new desktop machine for home, I've been looking at the Intel Quad Core processors and I'd like to put 8GB of RAM in there, but, it got me thinking about making the most out of the available resources. I thought if I could get a good 64bit machine, put some bare-metal virtualisation on, then have a primary system, I'd also be able to bring up some extra virtualised systems as and when I needed. I know most of the bare metal systems are designed for the server market, but, is there anything out there that works well for a desktop. What are the caveats? I presume I won't be able to make the most out of any video cards I could buy, what about just getting a decent screen resolution, will this be a problem? I run a single 24" screen. What about DVD/CD writing, is this possible? I'd like to re-rip my CD collection, I was hoping the quad 64Bit goodness would help me out with the encoding. I currently use a Mac and couldn't go back to windows so that leaves Linux, I was thinking a primary OS of ubuntu. Does this make a difference? Thanks Andrew

    Read the article

  • google app engine proxy workaround

    - by Lumpy
    I am trying to build a google app engine app in Java. The app is trying to get information from another site. On my computer I am behind a firewall and need to connect to the site through a proxy. Google app engine does not allow the use of java.net.proxy. Is there a way to configure eclipse so it knows that when I use URL.getContent() my local host will connect to that url through a proxy??

    Read the article

  • SHA1 Using php and .net

    - by josh
    Hi lynn, Can u pls help me for the below issue. I have sha1 value in mssql table (Password is encrypted using algorithm SHA1 which provided in Microsoft .Net library) . I created one php application, in that i need to compare these encrypted value. Thanks

    Read the article

  • sandboxed web parts inside SharePoint 2010

    - by vrajaraman
    Is it possible to develop a web-part in ASP.NET (framework 2.0), to have a sandbox architecture, and deploy those web parts inside Share Point 2010 and/or MOSS 2007 we donot want to use any SharePoint dll reference with web parts we develop. we refer to the url, section at http://msdn.microsoft.com/en-us/library/ee539417.aspx (section Web Parts in Sandboxed Solutions)

    Read the article

  • Symmetric ds issue

    - by gaurav
    Hi , I am using postgresql8.3 and include symmetris ds 1.5.1 in my application.But the replication is done fine for client to server . but the replication is not done from server to client. I am newer to use the symmetric ds .Can anyone plese let me know the checklist of using symmetric ds for cheching that my symmetric ds is well configure or not. Thank You very Much

    Read the article

  • entering data in sql database through asp

    - by sushant
    pass=session("password") Set objIns=server.CreateObject("adodb.connection") objIns.Open session("Psrconnect") inspass="Insert into passwords(pass) values ('&pass&')" objIns.Execute(inspass) i dont know what should be the syntax to pass the value stored in the variable. with this syntax, the value entered in the database is &pass&. can anyone plz help me out?

    Read the article

  • google search engine api not produce exact live search

    - by Bharanikumar
    Hi , The google search engine api not render the first result , Example, function google_search_api($args, $referer = 'http://localhost/test/', $endpoint = 'web'){ $url = "http://ajax.googleapis.com/ajax/services/search/".$endpoint; if ( !array_key_exists('v', $args) ) $args['v'] = '1.0'; $url .= '?'.http_build_query($args, '', '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // note that the referer must be set curl_setopt($ch, CURLOPT_REFERER, $referer); $body = curl_exec($ch); curl_close($ch); //decode and return the response return json_decode($body); } $rez = google_search_api(array( 'q' = 'dl03', )); print_r($rez); the result for the above snippet little differ compare to live google search, the above snippet not render first result , that is in google live search first result not displaying the above snippet , AMy i know, what should i have to do now, Regards

    Read the article

  • which header do i need to send to browser when responding with flash file

    - by user63898
    hello all i build ed simple single threaded web server that i embedded to my application in Qt c++ this server are responding fine with simple html pages , but when i try to response with flash file embedded inside the html all the html string just got printed to the browser my question is what headers and http responses do i need to unable me to serve flash content to the browser Thanks

    Read the article

  • Is SEO knowledge important for web developers?

    - by splattne
    Looking for some SEO (Search engine optimization) questions on Stackoverflow, I saw ambivalent reactions to these questions. Some were closed as "not programming related" or were downvoted, others were answered and got upvoted. It seems that many developers think SEO was something "dirty" or belonged in the realm of spam. IMHO designing for search engines and practising SEO techniques adds important value to the final product like, for example, a good user interface. Should SEO really be left to specialized non-programmers? Shouldn't web developers have profound SEO knowledge? Or is it okay to apply SEO as a post-development process?

    Read the article

  • How to add EAR files in a java console application

    - by Vibhas
    Hi Friends, I want to know how to add an EAR file into a simple java class i.e a standalone application. Let say i have a class Employee package com.Employee; import com.xyz.Workflow//this library is present in EAR file whose method i need to call public class Employee{ public static void main(String[] args) // Wokflow wf = new Workflow(); // ws.initiateWorkflow(); this method needs to be called but for that i need to include this EAR which is given to me from a 3rd party; } Can any one help me the API is in EAR only. Thanks

    Read the article

  • problem in rotate animation

    - by Talha
    Hi..I'm having some problem in rotating image view, I'm using rotate animation to rotate my image view,it works fine the image rotates well,but problem is that after animation completes the image sets back at original position.I want the image stops at position when rotation completes..Please help me I'm totally new to android I've tried so much but can't find solution to stop it.Thanks in advance I need Quick help

    Read the article

  • i frame scroll back problem

    - by muralikalpana
    Can you help me with my problem regarding iframe because whenever the iframe is scrolled till end, and the user clicks a control inside the page within iframe, and page content is on the top of the page, the user needs to scroll up the Iframe just to see the content. Are there any properties that I can set or code that I can do so that the Iframe scrollbar goes back to top whenever an event is triggered inside the form??

    Read the article

  • Update query for Access Database for certain Parameters

    - by nitinkhanna
    Hi, I am using MS Access as a database and using c#, .net for updating some records in it. But it is giving error saying "No value given for one or more required parameters." There are 5 colums in Table and I want to update only 2, for that I have written the query like "update User_DTL set user_role_id = '" + _UserRole + "', auth_id ='" + _authId + "'" + " WHERE Id = '" + _Id + "' "; where _UserRole, _authId, _Id are strings. What may be the error. Do I need to give every parameter in update statement or there is some other way. Thanks

    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

  • jquery image slider with image strip darggin

    - by mehul9595
    Hi, I want to create a image strip slider using jquery. I have used jcarousel plugin for my image gallery and light box plugin to get preview of selected image. Now, my task is when any of the image is selected i can drag to either side. i.e I can select the image and drag to any direction within that image container. If any one can help me on this??? Thanks

    Read the article

  • Best way to do one-to-many "JOIN" in CouchDB

    - by mit
    There are CouchDB documents that are list elements: { "type" : "el", "id" : "1", "content" : "first" } { "type" : "el", "id" : "2", "content" : "second" } { "type" : "el", "id" : "3", "content" : "third" } There is one document that defines the list: { "type" : "list", "elements" : ["2","1"] , "id" : "abc123" } As you can see the third element was deleted, it is no longer part of the list. So it must not be part of the result. Now I want a view that returns the content elements including the right order. The result could be: { "content" : ["second", "first"] } In this case the order of the elements is already as it should be. Another possible result: { "content" : [{"content" : "first", "order" : 2},{"content" : "second", "order" : 1}] } I started writing the map function: map = function (doc) { if (doc.type === 'el') { emit(doc.id, {"content" : doc.content}); //emit the id and the content exit; } if (doc.type === 'list') { for ( var i=0, l=doc.elements.length; i<l; ++i ){ emit(doc.elements[i], { "order" : i }); //emit the id and the order } } } This is as far as I can get. Can you correct my mistakes and write a reduce function? Remember that the third document must not be part of the result. Of course you can write a different map function also. But the structure of the documents (one definig element document and an entry document for each entry) cannot be changed.

    Read the article

  • Static Variables in Overloaded Functions

    - by BSchlinker
    I have a function which does the following: When the function is called and passed a true bool value, it sets a static bool value to true When the function is called and passed a string, if the static bool value is set to true, it will do something with that string Here is my concern -- will a static variable remain the same between two overloaded functions? If not, I can simply create a separate function designed to keep track of the bool value, but I try to keep things simple.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >