Daily Archives

Articles indexed Wednesday June 2 2010

Page 19/120 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Setting up MySQL database

    - by mathew
    I do have single database and near about 11 tables. while my web page is opening informations from these 11 tables will be accessed same time. according to my current settings what I did now is for each table database is opening and closing. say I had given username and password to open databse for each table and close after retrieving information from that table. Is this the right way to do it?? I feel because of this the database is opeing and closing 11 times!!!! Am I right?? is this the right way to do that?? Oh well I do have some tables which update date is differ from others... THanks Mathew

    Read the article

  • Spring Jdbc Template + MySQL = TransientDataAccessResourceException : Invalid Argument Value : Java.

    - by Vanchinathan
    I was using spring jdbc template to insert some data into the database and I was getting this error. Here is my code : JdbcTemplate insert = new JdbcTemplate(dataSource); for(ResultType result : response.getResultSet().getResult()) { Object[] args = new Object[] {result.getAddress(), result.getCity(), result.getState(), result.getPhone(), result.getLatitude(), result.getLongitude(),result.getRating().getAverageRating(), result.getRating().getAverageRating(), result.getRating().getTotalRatings(), result.getRating().getTotalReviews(), result.getRating().getLastReviewDate(), result.getRating().getLastReviewIntro(), result.getDistance(), result.getUrl(), result.getClickUrl(), result.getBusinessUrl(), result.getBusinessClickUrl()}; insert.update("INSERT INTO data.carwashes ( address, city, state, phone, lat, lng, rating, average_rating, total_ratings, total reviews, last_review_date, last_review_intro, distance, url, click_url, business_url, business_click_url, category_id, zipcode_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,96925724,78701)", args); } Quite lengthy code.. but, basically it gets the value from a object and sticks it to a array and passed that array to insert method of jdbc template. Any help will be appreciated.

    Read the article

  • How to call a function from another function in c++?

    - by karikari
    I have this function definition inside my cpp file; LRESULT CRebarHandler::onSetRedraw(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { bHandled=false; if (m_ieVer==6){ if (!m_hWndToolbar) scanForToolbarSlow(); } return S_OK; } My problem is I don't know how to call it from another function inside the same file. I want to call it from this function: void CRebarHandler::setButtonMenu2(){ bool b=false; onSetRedraw(0,0,0,false); <------ is this the correct way? } Must I provide all the 4 values? Can I just send no value? Help me..

    Read the article

  • Updating from svn repository returns "Could not read chunk size" error

    - by Denis
    When updating from subversion repository using tortoise svn client I get error looking like that: Could not read chunk size: An existing connection was forcibly closed by the remote host. It doesn't prevent me from updating, just interrupts update process, so that I have to repeat update several times, before it is complete. What can cause such behaviour and how to fix it?

    Read the article

  • "Access is denied" iFrame IE

    - by Tom
    I have an iframe in b.com which attempts to grab the jQuery library from a.com [my website]. Whenever it does this I get the "Access is Denied" error in both IE7 and IE8. I have checked out Fiddler and it doesnt show that the script is getting blocked - but IE does errors with "Access is Denied" What is causing this prob and how to get around it ? Thx

    Read the article

  • java applet - array checking

    - by Dan
    OK so my code is here: http://www.so.pastebin.com/m7V8rQ2n What I want to know... let's say I have an image which I can redraw on tiles... is there a way to check for future tiles so I DON'T go out of bounds of my already defined tile map? Like if I were at the edge of a map... it would NOT let me go past it? Thanks.

    Read the article

  • how to get inline javascript to fire with jQuery

    - by lloydphillips
    I have a javascript action on a div (asp.net panel) as an onkeypress attribute. This is the default action button on an asp.net Panel control. It contains the following: onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_cp1_ucInvoiceSearch_btnSearch')" For some reason when I change my textbox to a jQuery textbox clicking enter no longer fires this div. Why and how can I hook it back up so when I enter text in the textbox and click enter it fires? Lloyd

    Read the article

  • inheritance from the django user model results in error when changing password

    - by Jerome
    I inherited form the django user model like so: from django.db import models from django.contrib.auth.models import User, UserManager from django.utils.translation import ugettext_lazy as _ class NewUserModel(User): custom_field_1 = models.CharField(_('custom field 1'), max_length=250, null=True, blank=True) custom_field_2 = models.CharField(_('custom field 2'), max_length=250, null=True, blank=True) objects = UserManager() When i go to the admin and add an entry into this model, it saves fine, but below the "Password" field where it has this text "Use '[algo]$[salt]$[hexdigest]' or use the change password form.", if i click on the "change password form' link, it produces this error Truncated incorrect DOUBLE value: '7/password' What can i do to fix this?

    Read the article

  • Should I enter my Office product key before running sysprep?

    - by stickmangumby
    I'm planning on cloning a Windows XP install, and am a little confused about sysprep. I know that it blanks out the XP product key, but what about other software? If I install Office 2007 and enter a product key, then use sysprep and create an image, will I be able to enter a new product key in clones I create from the image? Or will they all have duplicate product keys?

    Read the article

  • How to disable "Attachment Execution Service" in Windows?

    - by netvope
    If I run an executable file downloaded from the Internet, Windows displays a warning that this file can potentially harm my computer. This happens even for files downloaded by Firefox (not just IE.) On networked drive, this seems to slow down program launch time a lot. From Wikipedia, I learned that the feature is called "Attachment Execution Service". How can I completely disable it? If this cannot be done, how can I instruct Firefox not to set the "downloaded" flag on the file?

    Read the article

  • Questions about Wordpress 3.0 RC

    - by Nimbuz
    I'm looking to upgrade my blog from Wordpress 2.5 to 3.0 RC, but I'm not sure if: List item It is stable? It will support existing v2.5 plugins? It will support my custom themes? Or do I have to design them from scratch for 3.0? Many thanks for your help!

    Read the article

  • Best book / content for .NET 3.5

    - by Ram
    Hi, I want to study new .NET 3.5 concepts like WPF, WCF for work as well as for interviews. I am aware of .NET 2 but do not have any detailed knowledge of .NET 3.5 and newly added features in .NET 3.5 and C#. is there any good book/ online resource which would help me?

    Read the article

  • Facebook FBML and frame redirect

    - by user356089
    I have, what is probably a simple flash question. I have a flash countdown clock I am using in an Iframe of a facebook app. At the end of the countdown it fires this off myFlipCountDownClock.onFinish = function() { }; And I can add getURL or whatever. My problem is I need to fire off some facebook specific code. This being This does not work via getURL. My question is how could I pass this line of code? I am not sure what to do here. Any help would be greatly appreciated.

    Read the article

  • Where to put a piece of code in Ruby on Rails?

    - by yuval
    I have a post controller that has many comments. The post model has a field called has_comments which is a boolean (so I can quickly select from the database only posts that have comments). To create a new comment for a post, I use the create action of my comments controller. After I create the comment I need to update my post's has_comments field and set it to true. I can update this field from the create action of my comments controller, but that doesn't seem right - I feel that I should really be using the post's update action, but I'm not sure if it's right to call it (via send?) from the create action of the comments controller. Where should the code for updating the post be? Thank you!

    Read the article

  • openmp sections running sequentially

    - by chi42
    I have the following code: #pragma omp parallel sections private(x,y,cpsrcptr) firstprivate(srcptr) lastprivate(srcptr) { #pragma omp section { //stuff } #pragma omp section { //stuff } } According to the Zoom profiler, two threads are created, one thread executes both the sections, and the other thread simply blocks! Has anyone encountered anything like this before? (And yes, I do have a dual core machine).

    Read the article

  • How to open a selected file in android?

    - by Karthick
    In windows text files are displayed with notepad icon. When we double click the particular file it open’s the notepad and displays the file. Like that I need to open the file from the download folder in android. I have used the intent-filter for register my ics file’s mime type. When I select the file in the download folder it just opens my application only. At that time I need to open / read the selected file. How to do this? I am new to android Can anyone help me?

    Read the article

  • Google Maps API and "rightclick" events on Macs

    - by samc
    Using the Google Maps API (v3), I can create a map and handle normal click events just fine, but when I want to handle rightclick events, it doesn't work on Macs. I assume this is because a rightclick on a Mac is actually converted to a ctrl-click, but the Google Maps API MouseEvent doesn't provide information about modifier keys, so I can't check for the ctrl key. I tried adding an "capture" event listener to the document that converts the click event to a rightclick event. function convertClick(e) { if (e.ctrlKey) { e.button = 2; } } document.addEventListener("click", convertClick, true) I added an alert to verify that the condition is correct, but modifying the event in this way didn't work. So, I decided to have my event handler set a global flag that my click handler could check. If the flag is set, it means ctrl was pressed, so the click handler just invokes the rightclick handler. var ctrl; function captureCtrl(e) { ctrl = e.ctrlKey; } This approach worked great, except for one thing. The ctrl flag gets set for the click after the one that occured when ctrl was pressed. That means the event handler is be called during the bubble phase rather than the capture phase. Could explain why the event modification approach didn't work. So, my question is how can you detect "rightclick" events from Macs with the Google Maps API? I can't be the first person to want to do this. That said, when I right-click on the map on http://maps.google.com from a Windows or Linux machine, I get a popup box with options like "Directions from here...", etc. On a Mac, nothing happens. So, not even the main Google Maps page has solved this problem. ...maybe I am the first person to want to do this.

    Read the article

  • unable to import libxml2mod from the python script

    - by shahjapan
    File "/usr/local/lib/python2.5/site-packages/libxml2.py", line 1, in <module> import libxml2mod ImportError: /usr/local/lib/python2.5/site-packages/libxml2mod.so: undefined symbol:xmlTextReaderSetup >>> import libxml2mod >>> import libxml2 >>> on Python Prompt it works fine !! can anyone has idea why my program is not working from .py file as import is working perfect from python prompt.

    Read the article

  • Load some data from database and hide it somewhere in a web page

    - by kwokwai
    Hi all, I am trying to load some data (which may be up to a few thousands words) from the database, and store the data somewhere in a html web page for comparing the data input by users. I am thinking to load the data to a Textarea under Div tag and hide the the data: <Div id="reference" style="Display:none;"> <textarea rows="2" cols="20" id="database"> html, htm, php, asp, jsp, aspx, ctp, thtml, xml, xsl... </textarea> </Div> <table border=0 width="100%"> <tr> <td>Username</td> <td> <div id="username"> <input type="text" name="data" id="data"> </div> </td> </tr> </table> <script> $(document).ready(function(){ //comparing the data loaded from database with the user's input if($("#data").val()==$("#database").val()) {alert("error");} }); </script> I am not sure if this is the best way to do it, so could you give me some advice and suggest your methods please.

    Read the article

  • How to customize the printing while using Window.print ?

    - by Holicreature
    i want to print a invoice and i use a print.css by media=print and when i change the current stylesheet to print.css i could able to view what i should be printing without the titles and content left aligned. But still while i'm printing there is space in the top and left and its taking up whole a4 sheet and also the whole width of the page.. But i've defined a body width of just 550 px. While i view to print preview, it takes the whole width instead of taking up 1/3 of the width.. My print.css is body { width:550px; height:450px; color:#000000; margin:0; padding:0; word-spacing:1.1pt; font-family : "Times New Roman", Times, serif; font-size : 10px; text-align:left; } a { visibility :hidden; display : none; } input{ display : none; } table { margin: 1px; text-align:left; } #list,#head,#cont,#fotter,#oth,#links,#name,li,ul,ol { display : none; } I'm printing through browser using window.print, so is there any special configuration i need to do...?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >