Daily Archives

Articles indexed Wednesday June 9 2010

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

  • Simulating a mouse button click in Windows

    - by Ncarlson
    Hi everyone, I'm writing Remote Desktop clone in C++ using QT. So far I'm able to move the mouse cursor around fine. QT has a nice setPos function for that. However, I'm a bit lost as to what API/Library to use for simulating mouse button clicks. One method I'm aware of is to send the WM_(event) to a window using the window's HWND. However, I was hoping there was a more salient method for taking complete control over a mouse. Is there any other way to tell the operating system that the left mouse button has been clicked? Thanks.

    Read the article

  • mod_rewrite one url to another url without changing source url

    - by Dr. DOT
    Is it possible to do a mod_rewrite from one url to another without changing what appears in the address bar? Example: Source URL is http://domain1.com/news Target URL is http://domain2.com/news I want to render pages from http://domain2.com/news/ but have http://domain1.com/news appear in the address bar. Is this possible? I've got this directive, but the URL in the address bar changes (which I don't want to happen): RewriteRule ^(.*)$ http://domain2.com/news/ [L,NC]

    Read the article

  • jQuery slideable divs with floated images how to make the right size.

    - by Malachi
    I am relatively new to using jQuery and I have a problem with creating some sliding tabs to work with images that are floated inside. http://www.dur.ac.uk/malachi.soord/jin/ The above page demonstrates the problem I am facing - click on the about tab and you will notice that the image that is inside is floated to the right - which I know is not taken into consideration when jQuery is calculates the height of each div tab with: $("#content > div").each (function() { $(this).css("height", $(this).height()); }); Is there a work around which could be used to allow me to take this into consideration? or is there a better way to achieve what I am trying to achieving.

    Read the article

  • How to compress CSS/JS in VS2010 Web Deployment Build Template?

    - by RPM1984
    Hi all, We've recently upgraded from VS2008 - VS2010 (and hence upgrading from Web Deployment Project to proper deployment project). Obviously what's new in VS2010 web deployments is the introduction of Workflow as the build process template. Previously, we used a MSBuild task in the WDP to execute the Yahoo YUI Javascript/CSS compression module to minify/compress javascript and css files. Has anyone managed to accomplish this task with Visual Studio 2010? I have seen the new "SquishIt" compressor created by Justin Etheridge, but its not ideal as it "squishes" on the fly (e.g on Application_Start - Global.ascx) - which means you still have to push out all the uncompressed files to your web server before squishing. In the Workflow designer - i can see a toolbox item called "MSBuild" - just dont know how to use it to accomplish what i want. Been searching high and wide, no-one seems to know how. Surely someone out there has done this.

    Read the article

  • sql server doesn’t exist or access denied

    - by kareemsaad
    I had Win7 in my pc and I installed 2vmware .One of them (VM) had Win XP and I installed on It SQL 2000 and visual studio 2008.and other I installed Win XP and I installed on it SQL 2005 and visual studio 2008. and when I run SQL2000 this error appear sql server doesn't exist or access denied Pleas verify sql server is running ........

    Read the article

  • Vantec NexStar NAS Encloser - Writing large files

    - by peter
    Hi, I have one of these 'Vantec NexStar LX - NST-475LX-BK' drive enclosures. It is a NAS drive. When I write a file to the device using eSata, or a SMB share I cannot write files over 2GB. I think this is because the drive is formatted with FAT32. But when I access the device using FTP it doesn't matter. I can write files of any size. E.g. I wrote one on there last night which was 30GB. Does this make any sense? Why? I guess the most important thing for me is data integrity.

    Read the article

  • SQL SERVER – Fastest Way to Restore the Database

    - by pinaldave
    A few days ago, I received following email: “Pinal, We are in an emergency situation. We have a large database of around 80+ GB and its backup is of 50+ GB in size. We need to restore this database ASAP and use it; however, restoring the database takes forever. Do you think a compressed backup would solve our problem? Any other ideas you got?” First of all, the asker has already answered his own question. Yes; I have seen that if you are using a compressed backup, it takes lesser time when you try to restore a database. I have previously blogged about the same subject. Here are the links to those blog posts: SQL SERVER – Data and Page Compressions – Data Storage and IO Improvement SQL SERVER – 2008 – Introduction to Row Compression SQL SERVER – 2008 – Introduction to New Feature of Backup Compression However, if your database is very large that it still takes a few minutes to restore the database even though you use any of the features listed above, then it will really take some time to restore the database. If there is urgency and there is no time you can spare for restoring the database, then you can use the wonderful tool developed by Idera called virtual database. This tool restores a certain database in just a few seconds so it will readily be available for usage. I have in depth written my experience with this tool in the article here SQL SERVER – Retrieve and Explore Database Backup without Restoring Database – Idera virtual database. Let me know your experience in this scenario. Have you ever needed your database backup restored very quickly, what did you do in that scenario. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, Readers Question, SQL, SQL Authority, SQL Backup and Restore, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Change windows hostname from command line

    - by Joe
    This question is related to http://stackoverflow.com/questions/54989/change-windows-hostname-from-command-line, but I'm in a different situation. The netdom tool will not work on a computer not joined to a domain. I've tried setting the hostname from the registry, but I was wondering if there was another way from the command-line.

    Read the article

  • How to add indexes to MySQL tables?

    - by Michael
    I've got a very large MySQL table with about 150,000 rows of data. Currently, when I try and run SELECT * FROM table WHERE id = '1'; the code runs fine as the ID field is the primary index. However, recently for a development in the project, I have to search the database by another field. For example SELECT * FROM table WHERE product_id = '1'; This field was not previously indexed, however, I've added it as an index but when I try to run the above query, the results is very slow. An EXPLAIN query reveals that there is no index for the product_id field when I've already added one and as a result the query takes any where from 20 minutes to 30 minutes to return a single row. EDIT: My full EXPLAIN results are: | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+----------------------+------+---------+------+------+------------------+ | 1 | SIMPLE | table | ALL | NULL | NULL | NULL | NULL | 157211 | Using where | +----+-------------+-------+------+----------------------+------+---------+------+------+------------------+

    Read the article

  • DISQUS - filtering the recent-comments list when using disqus on two seperate resources on the same

    - by stephemurdoch
    I'm using Disqus comments on my site. Users can comment on blog posts or on podcasts. So I have a page that lists all the blog-posts and one listing all of my podcasts. I'm using the combo-widget to display the most recent comments on each of these two pages. But I only want recent blog-post comments to show up in the list on the blog index page and likewise for podcasts. At the moment, the combo-widget lists all the comments, regardless of whether or not they were left on a blog post or a podcast... Is Disqus even built to be used in this way? [Site built with rails and I'm using norman's disqus plugin, although I doubt it matters...]

    Read the article

  • Parsing dictionary entries with regex

    - by Brandon
    I'm trying to pull data from Jim Breen's WWWJDIC. The raw data returned has a lot of information delimited in several different formats. The data pulled in the example below is from here: http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1ZUJ%E5%85%88%E7%94%9F ?? [????] /(n) (1) teacher/master/doctor/(suf) (2) with names of teachers, etc. as an honorific/(P)/ Should I use a regex?

    Read the article

  • Determine if a specific activity in an application can be launched...

    - by Justin
    Applications can have any number of launchable activities. I know how to get the list of these activities via PackageManager. Is there a way to determine which activities can be launched via startActivity? For example, the Documents To Go app has different activities that will start Word, Excel, Powerpoint, PDF, etc... I am able to launch all o these just fine. However, it also contains some activities that I am not able to launch with startActivity... If I attempt to do this I get a SecurityException. I want to be able to determine which activities I can safely launch and which I cannot so I only present the user with a list of activities that I can safely launch from within my application... Is this possible?

    Read the article

  • Rails MVC Best Practices for Website Modules

    - by Randuin
    I am just beginning to build my Rails application and thus far I've followed a RESTful design and it's proven much easier to understand and organize the code and structure of the application. I have things like posts and comments. However for the front page. I want to display all the latest posts but also may be in the sidebar display things such as Latest Comments and Latest events. What's the best way to go about this while maintaining the RESTful philosophy?

    Read the article

  • Am I understanding premature optimization correctly?

    - by Ed Mazur
    I've been struggling with an application I'm writing and I think I'm beginning to see that my problem is premature optimization. The perfectionist side of me wants to make everything optimal and perfect the first time through, but I'm finding this is complicating the design quite a bit. Instead of writing small, testable functions that do one simple thing well, I'm leaning towards cramming in as much functionality as possible in order to be more efficient. For example, I'm avoiding multiple trips to the database for the same piece of information at the cost of my code becoming more complex. One part of me wants to just not worry about redundant database calls. It would make it easier to write correct code and the amount of data being fetched is small anyway. The other part of me feels very dirty and unclean doing this. :-) I'm leaning towards just going to the database multiple times, which I think is the right move here. It's more important that I finish the project and I feel like I'm getting hung up because of optimizations like this. My question is: is this the right strategy to be using when avoiding premature optimization?

    Read the article

  • Displaying bitmaps in relative positions

    - by JonF
    I'd like to put a couple images on a surfaceview. I understand that the screen sizes of android devices can vary, so I don't think I can just use an x y position or I might end up placing it off different screens. Say I want to put two boxes in the center of the screen, a blue one and a red one. The blue one is to the left of the red one. How can I accomplish that while accounting for different screen sizes?

    Read the article

  • Editable, growable DataGrid that retains values on postback and updates underlying DataTable

    - by jlstrecker
    I'm trying to create an ASP.NET/C# page that allows the user to edit a table of data, add rows to it, and save the data back to the database. For the table of data, I'm using a DataGrid whose cells contain TextBoxes or CheckBoxes. I have a button for adding rows (which works) and a button for saving the data. However, I'm quite stuck on two things: The TextBoxes and CheckBoxes should retain their values on postback. So if the user edits a TextBox and clicks the button to add more rows, the edits should be retained when the page reloads. However, the edits should not be saved to the database at this point. When the user clicks the save button, or anytime before, the DataTable underlying the DataGrid needs to be updated with the values of the TextBoxes and CheckBoxes so that the DataTable can be sent to the database. I have a method that does this, but I can't figure out when to call it. Any help getting this to work, or suggestions of alternative user interfaces that would behave similarly, would be appreciated.

    Read the article

  • Eta/Eta-squared routines in R

    - by aL3xa
    Apart from graphical estimation of linearity (gaze-at-scatterplot method), which is utilized before applying some technique from GLM family, there are several ways to do this estimation arithmetically (i.e. without graphs). Right now, I'll focus on Fisher's eta-squared - correlation ratio: arithmetically, it's equal to squared Pearson's r (coef. of determination: R2) if relationship between two variables is linear. Hence, you can compare values of eta and r and make an assessment about type of relation (linear or not). It provides an information about percent of variance in the dependent variable explained (linearly or not) by the independent variable. Therefore, you can apply it when linearity assumptions are not met. Simply stated: is there a routine for eta/eta-squared in R?

    Read the article

  • HTML input type="submit" doubles row height in table

    - by FelixM
    I have a HTML table where some rows have a button like this: <td > <form action="..." method="GET"> <input type="submit" value="..."/> </form> </td> The rows with the input have about twice the height of other rows that have otherwise similar data. When I remove the just the input, the row height goes back to normal. I have the same behavior in Firefox and IE. Is there any way I can have normal row height AND the button?

    Read the article

  • Repeatedly execute a stored procedure

    - by manivineet
    I have a situation where I need to repeatedly execute a stored procedure Now this procedure (spMAIN) has a cursor inside which looks for a value from a table as T1,which has the following structure ID Status ---- -------- 1 New 2 New 3 success 4 Error now the cursor looks for all rows with a status of 'New' Now while processing , if that instance of the cursor encounters an error, another SP say spError needs to be called, the 'Status' column in T1 needs to be updated to 'Error' and spMAIN needs to be called again which again repeats the process, looking for rows with 'new' how do I do it? Also, also, while we are at it, what if an SP has other SPs inside it and if any of those SP raises an error, same thing needs to be done, the T1 table needs to be updated ('Error') and spMAIN needs to be called again. can you also recommend something ? here's some code ALTER PROC zzSpMain AS BEGIN DECLARE @id INT BEGIN TRY IF EXISTS ( SELECT * FROM dbo.zzTest WHERE istatus = 'new' ) BEGIN DECLARE c CURSOR FOR SELECT id FROM zztest WHERE istatus = 'new' OPEN c FETCH NEXT FROM c INTO @id WHILE @@FETCH_STATUS = 0 BEGIN PRINT @id IF @id = 2 BEGIN UPDATE zztest SET istatus = 'error' WHERE id = @id RAISERROR ( 'Error occured', 16, 1 ) END UPDATE zztest SET istatus = 'processed' WHERE id = @id FETCH NEXT FROM c INTO @id END CLOSE c DEALLOCATE c END END TRY begin CATCH EXEC zzSpError END CATCH END

    Read the article

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