Daily Archives

Articles indexed Wednesday March 31 2010

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

  • Radeon 5850 Why am I not getting 3 monitors up as a choice ??

    - by Jan
    Ive just bought the top end ATI Radeon card with 2 normal monitor ports and a HDMI. The idea was to continue using my dual screen setup as always and to use the last plug, the HDMI on my TV. I got a new 52 inch HD TV with all the necessary bits. This should work fine. But.. in Display Properties I still get only my 2 monitors up as options. Not the Digital TV. When I unplug 1 monitor and restart the computer, I get the TV and the other monitor. But never all 3 at the same time. Why is this ? Where can I go to tell it that I need all 3 screens at the same time. Also I get a message saying my gfx card also gives sound through the HDMI cable.. But the TV tells me its recieving a sound format that it does not understand. Any ideas on that too while were at it ?

    Read the article

  • Getting gridview column value as parameter for javascript function

    - by newName
    I have a gridview with certain number of columns and the ID column where I want to get the value from is currently set to visible = false. The other column is a TemplateField column (LinkButton) and as the user clicks on the button it will grab the value from the ID column and pass the value to one of my javascript function. WebForm: <script language=javascript> function openContent(contentID) { window.open('myContentPage.aspx?contentID=' + contentID , 'View Content','left=300,top=300,toolbar=no,scrollbars=yes,width=1000,height=500'); return false; } </script> <asp:GridView ID="gvCourse" runat="server" AutoGenerateColumns="False" OnRowCommand="gvCourse_RowCommand" OnRowDataBound="gvCourse_RowDataBound" BorderStyle="None" GridLines="None"> <RowStyle BorderStyle="None" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="lnkContent" runat="server" CommandName="View" CommandArgument='<%#Eval("contentID") %>' Text='<%#Eval("contentName") %>'> </asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="contentID" HeaderText="contentID" ReadOnly="True" SortExpression="contentID" Visible="False" /> <asp:BoundField DataField="ContentName" HeaderText="ContentName" ReadOnly="True" SortExpression="ContentName" Visible="False" /> </Columns> <AlternatingRowStyle BorderStyle="None" /> Code behind: protected void gvCourse_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "View") { intID = Convert.ToInt32(e.CommandArgument); } } protected void gvCourse_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ((LinkButton)e.Row.FindControl("lnkContent")).Attributes.Add("onclick", "return openContent('" + intID + "');"); } } right not i'm trying to get the intID based on user selected item so when the user clicks on the linkbutton it will open a popup window using javascript and the ID will be used as querystring.

    Read the article

  • i integer does not +1 the 1st time

    - by Hwang
    I have a gallery where it will load an image after a previous image is loaded, so every time 'i' will +1 so that it could move to the next image. This code works fine on my other files, but I dunno why it doesn't work for the current file. Normally if I trace 'i' the correct will be 0,1,2,3,4,5,6... etc adding on till the limit, but this files its 'i' repeat the 1st number twice, only it continues to add 0,0,1,2,3,4,5,6...etc The code is completely the same with the other file I'm using, but I don't know why it just doesn't work here. The code does not seems to have any problem. Anyway i can work around this situation? private var i:uint=0; private function loadItem():void { if (i<myXMLList.length()) { loadedPic=myXMLList[i].thumbnails; galleryLoader = new Loader(); galleryLoader.load(new URLRequest(loadedPic)); galleryLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,picLoaded); } else { adjustImage(); } } private function picLoaded(event:Event):void { var bmp=new Bitmap(event.target.content.bitmapData); bmp.smoothing=true; bmpArray.push(bmp); imagesArray[i].addChild(bmp); i++; loadItem(); }

    Read the article

  • problem with jquery : minipulating val() property of element

    - by P4ul
    Hi, Please help! I have some form elements in a div on a page: <div id="box"> <div id="template"> <div> <label for="username">Username</label> <input type="text" class="username" name="username[]" value="" / > <label for="hostname">hostname</label> <input type="text" name="hostname[]" value=""> </div> </div> </div> using jquery I would like to take a copy of #template, manipulate the values of the inputs and insert it after #template so the result would look something like: <div id="box"> <div id="template"> <div> <label for="username">Username</label> <input type="text" class="username" name="username[]" value="" / > <label for="hostname">hostname</label> <input type="text" name="hostname[]" value=""> </div> </div> <div> <label for="username">Username</label> <input type="text" class="username" name="username[]" value="paul" / > <label for="hostname">hostname</label> <input type="text" name="hostname[]" value="paul"> </div> </div> I am probably going about this the wrong way but the following test bit of javascript code run in firebug on the page does not seem to change the values of the inputs. var cp = $('#template').clone(); cp.children().children().each( function(i,d){ if( d.localName == 'INPUT' ){ $(d).val('paul'); //.css('background-color', 'red'); } }); $("#box").append(cp.html()); although if I uncomment "//.css('background-color', 'red');" the inputs will turn red.

    Read the article

  • read a file with both text and binary information in .Net

    - by Yin Zhu
    I need to read binary PGM image files. Its format: P5 # comments nrows ncolumns max-value binary values start at this line. (totally nrows*ncolumns bytes/unsigned char) I know how to do it in C or C++ using FILE handler by reading several lines first and read the binary block. But don't know how to do it in .Net.

    Read the article

  • MINA: Performing synchronous write requests / read responses

    - by Matt Huggins
    I'm attempting to perform a synchronous write/read in a demux-based client application with MINA 2.0 RC1, but it seems to get stuck. Here is my code: public boolean login(final String username, final String password) { // block inbound messages session.getConfig().setUseReadOperation(true); // send the login request final LoginRequest loginRequest = new LoginRequest(username, password); final WriteFuture writeFuture = session.write(loginRequest); writeFuture.awaitUninterruptibly(); if (writeFuture.getException() != null) { session.getConfig().setUseReadOperation(true); return false; } // retrieve the login response final ReadFuture readFuture = session.read(); readFuture.awaitUninterruptibly(); if (readFuture.getException() != null) { session.getConfig().setUseReadOperation(true); return false; } // stop blocking inbound messages session.getConfig().setUseReadOperation(false); // determine if the login info provided was valid final LoginResponse loginResponse = (LoginResponse)readFuture.getMessage(); return loginResponse.getSuccess(); } I can see on the server side that the LoginRequest object is retrieved, and a LoginResponse message is sent. On the client side, the DemuxingProtocolCodecFactory receives the response, but after throwing in some logging, I can see that the client gets stuck on the call to readFuture.awaitUninterruptibly(). I can't for the life of me figure out why it is stuck here based upon my own code. I properly set the read operation to true on the session config, meaning that messages should be blocked. However, it seems as if the message no longer exists by time I try to read response messages synchronously. Any clues as to why this won't work for me?

    Read the article

  • When to use closure?

    - by shahkalpesh
    I have seen samples of closure from - http://stackoverflow.com/questions/36636/what-is-a-closure Can anyone provide simple example of when to use closure? Specifically, scenarios in which closure makes sense? Lets assume that the language doesn't have closure support, how would one still achieve similar thing? Not to offend anyone, please post code samples in a language like c#, python, javascript, ruby etc. I am sorry, I do not understand functional languages yet.

    Read the article

  • retriving hearders in all pages of word

    - by udaya
    Hi I am exporting data from php page to word,, there i get 'n' number of datas in each page .... How to set the maximum number of data that a word page can contain ,,,, I want only 20 datas in a single page This is the coding i use to export the data to word i got the data in word format but the headers are not available for all the pages ex: Page:1 slno name country state Town 1 vivek india tamilnadu trichy 2 uday india kerala coimbatore like this i am getting many details but in my page:2 i dont get the headers like name country state and town....But i can get the details like kumar america xxxx yyyy i want the result to be like slno name country state town n chris newzealand ghgg jkgj Can i get the headers If it is not possible Is there anyway to limit the number of details being displayed in each page //EDIT YOUR MySQL Connection Info: $DB_Server = "localhost"; //your MySQL Server $DB_Username = "root"; //your MySQL User Name $DB_Password = ""; //your MySQL Password $DB_DBName = "cms"; //your MySQL Database Name $DB_TBLName = ""; //your MySQL Table Name $sql = "SELECT (SELECT COUNT(*) FROM tblentercountry t2 WHERE t2.dbName <= t1.dbName and t1.dbIsDelete='0') AS SLNO ,dbName as Namee,t3.dbCountry as Country,t4.dbState as State,t5.dbTown as Town FROM tblentercountry t1 join tablecountry as t3, tablestate as t4, tabletown as t5 where t1.dbIsDelete='0' and t1.dbCountryId=t3.dbCountryId and t1.dbStateId=t4.dbStateId and t1.dbTownId=t5.dbTownId order by dbName limit 0,50"; //Optional: print out title to top of Excel or Word file with Timestamp //for when file was generated: //set $Use_Titel = 1 to generate title, 0 not to use title $Use_Title = 1; //define date for title: EDIT this to create the time-format you need //$now_date = DATE('m-d-Y H:i'); //define title for .doc or .xls file: EDIT this if you want $title = "Country"; /* Leave the connection info below as it is: just edit the above. (Editing of code past this point recommended only for advanced users.) */ //create MySQL connection $Connect = @MYSQL_CONNECT($DB_Server, $DB_Username, $DB_Password) or DIE("Couldn't connect to MySQL:" . MYSQL_ERROR() . "" . MYSQL_ERRNO()); //select database $Db = @MYSQL_SELECT_DB($DB_DBName, $Connect) or DIE("Couldn't select database:" . MYSQL_ERROR(). "" . MYSQL_ERRNO()); //execute query $result = @MYSQL_QUERY($sql,$Connect) or DIE("Couldn't execute query:" . MYSQL_ERROR(). "" . MYSQL_ERRNO()); //if this parameter is included ($w=1), file returned will be in word format ('.doc') //if parameter is not included, file returned will be in excel format ('.xls') IF (ISSET($w) && ($w==1)) { $file_type = "vnd.ms-excel"; $file_ending = "xls"; }ELSE { $file_type = "msword"; $file_ending = "doc"; } //header info for browser: determines file type ('.doc' or '.xls') HEADER("Content-Type: application/$file_type"); HEADER("Content-Disposition: attachment; filename=database_dump.$file_ending"); HEADER("Pragma: no-cache"); HEADER("Expires: 0"); /* Start of Formatting for Word or Excel */ IF (ISSET($w) && ($w==1)) //check for $w again { /* FORMATTING FOR WORD DOCUMENTS ('.doc') */ //create title with timestamp: IF ($Use_Title == 1) { ECHO("$title\n\n"); } //define separator (defines columns in excel & tabs in word) $sep = "\n"; //new line character WHILE($row = MYSQL_FETCH_ROW($result)) { //set_time_limit(60); // HaRa $schema_insert = ""; FOR($j=0; $j<mysql_num_fields($result);$j++) { //define field names $field_name = MYSQL_FIELD_NAME($result,$j); //will show name of fields $schema_insert .= "$field_name:\t"; IF(!ISSET($row[$j])) { $schema_insert .= "NULL".$sep; } ELSEIF ($row[$j] != "") { $schema_insert .= "$row[$j]".$sep; } ELSE { $schema_insert .= "".$sep; } } $schema_insert = STR_REPLACE($sep."$", "", $schema_insert); $schema_insert .= "\t"; PRINT(TRIM($schema_insert)); //end of each mysql row //creates line to separate data from each MySQL table row PRINT "\n----------------------------------------------------\n"; } }ELSE{ /* FORMATTING FOR EXCEL DOCUMENTS ('.xls') */ //create title with timestamp: IF ($Use_Title == 1) { ECHO("$title\n"); } //define separator (defines columns in excel & tabs in word) $sep = "\t"; //tabbed character //start of printing column names as names of MySQL fields FOR ($i = 0; $i < MYSQL_NUM_FIELDS($result); $i++) { ECHO MYSQL_FIELD_NAME($result,$i) . "\t"; } PRINT("\n"); //end of printing column names //start while loop to get data WHILE($row = MYSQL_FETCH_ROW($result)) { //set_time_limit(60); // HaRa $schema_insert = ""; FOR($j=0; $j<mysql_num_fields($result);$j++) { IF(!ISSET($row[$j])) $schema_insert .= "NULL".$sep; ELSEIF ($row[$j] != "") $schema_insert .= "$row[$j]".$sep; ELSE $schema_insert .= "".$sep; } $schema_insert = STR_REPLACE($sep."$", "", $schema_insert); //following fix suggested by Josue (thanks, Josue!) //this corrects output in excel when table fields contain \n or \r //these two characters are now replaced with a space $schema_insert = PREG_REPLACE("/\r\n|\n\r|\n|\r/", " ", $schema_insert); $schema_insert .= "\t"; PRINT(TRIM($schema_insert)); PRINT "\n"; } } ?

    Read the article

  • PHP and MySQL problem?

    - by TaG
    When my code is stored and saved and out putted I keep getting these slashes \\\\\ in my output text. how can I get rid of these slashes? Here is the PHP code. if (isset($_POST['submitted'])) { // Handle the form. require_once '../../htmlpurifier/library/HTMLPurifier.auto.php'; $config = HTMLPurifier_Config::createDefault(); $config->set('Core.Encoding', 'UTF-8'); // replace with your encoding $config->set('HTML.Doctype', 'XHTML 1.0 Strict'); // replace with your doctype $purifier = new HTMLPurifier($config); $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT users.*, profile.* FROM users INNER JOIN contact_info ON contact_info.user_id = users.user_id WHERE users.user_id=3"); $about_me = mysqli_real_escape_string($mysqli, $purifier->purify($_POST['about_me'])); $interests = mysqli_real_escape_string($mysqli, $purifier->purify($_POST['interests'])); if (mysqli_num_rows($dbc) == 0) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"INSERT INTO profile (user_id, about_me, interests) VALUES ('$user_id', '$about_me', '$interests')"); } if ($dbc == TRUE) { $dbc = mysqli_query($mysqli,"UPDATE profile SET about_me = '$about_me', interests = '$interests' WHERE user_id = '$user_id'"); echo '<p class="changes-saved">Your changes have been saved!</p>'; } if (!$dbc) { // There was an error...do something about it here... print mysqli_error($mysqli); return; } } Here is the XHTML code. <form method="post" action="index.php"> <fieldset> <ul> <li><label for="about_me">About Me: </label> <textarea rows="8" cols="60" name="about_me" id="about_me"><?php if (isset($_POST['about_me'])) { echo mysqli_real_escape_string($mysqli, $_POST['about_me']); } else if(!empty($about_me)) { echo mysqli_real_escape_string($mysqli, $about_me); } ?></textarea></li> <li><label for="my-interests">My Interests: </label> <textarea rows="8" cols="60" name="interests" id="interests"><?php if (isset($_POST['interests'])) { echo mysqli_real_escape_string($mysqli, $_POST['interests']); } else if(!empty($interests)) { echo mysqli_real_escape_string($mysqli, $interests); } ?></textarea></li> <li><input type="submit" name="submit" value="Save Changes" class="save-button" /> <input type="hidden" name="submitted" value="true" /> <input type="submit" name="submit" value="Preview Changes" class="preview-changes-button" /></li> </ul> </fieldset> </form>

    Read the article

  • linq: SQL performance on high loaded web applications

    - by Alex
    I started working with linq to SQL several weeks ago. I got really tired of working with SQL server directly through the SQL queries (sqldatareader, sqlcommand and all this good stuff).  After hearing about linq to SQL and mvc I quickly moved all my projects to these technologies. I expected linq to SQL work slower but it suprisongly turned out to be pretty fast, primarily because I always forgot to close my connections when using datareaders. Now I don't have to worry about it. But there's one problem that really bothers me. There's one page that's requested thousands of times a day. The system gets data in the beginning, works with it and updates it. Primarily the updates are ++ @ -- (increase and decrease values). I used to do it like this UPDATE table SET value=value+1 WHERE ID=@I'd It worked with no problems obviously. But with linq to SQL the data is taken in the beginning, moved to the class, changed and then saved. Stats.registeredusers++; Db.submitchanges(); Let's say there were 100 000 users. Linq will say "let it be 100 001" instead of "let it be increased by 1". But if there value of users has already been increased (that happens in my site all the time) then linq will be like oops, this value is already 100 001. Whatever I'll throw an exception" You can change this behavior so that it won't throw an exception but it still will not set the value to 100 002. Like I said, it happened with me all the time. The stas value was increased twice a second on average. I simply had to rewrite this chunk of code with classic ado net. So my question is how can you solve the problem with linq

    Read the article

  • can not be aable to execute my exe while executing c#.net code

    - by bjh Hans
    in my asp.net application i want to an exe file to execute which is from out side but what happens it's start executing but not execute wholy it's stop functioning in between so what's the issue in this whether is it threding problem or falult in my exe what does actuly is i dont't know Pls. help me regrding this issue... i m using c#.net 3.0 platform

    Read the article

  • SSIS Script Component Testing Strategy

    - by Paul Kohler
    This question is in respect to the script component specifically. I am aware of ssisUnit etc… With simple SSIS Scripts Components, it’s sufficient to let basic testing flesh out issues, however I am working with a script that has grown in complexity over time. To better test the functionality I am considering abstracting the script logic into a DLL that gets deployed with the package, and then use the custom component in the script. The advantage is that the function will be more testable etc but it’s one more deployment artefact that needs to be managed. My question is, does anyone know of a better way to test such an SSIS script in a more isolated manner than to run the whole package and examine the output?

    Read the article

  • Using events in an external swf to load a new external swf

    - by wdense51
    Hi I'm trying to get an external swf to load when the flv content of another external swf finishes playing. I've only been using actiosncript 3 for about a week and I've got to this point from tutorials, so my knowledge is limited. This is what I've got so far: Code for External swf (with flv content): import fl.video.FLVPlayback; import fl.video.VideoEvent; motionClip.playPauseButton = player; motionClip.seekBar = seeker; motionClip.addEventListener(VideoEvent.COMPLETE, goNext); function goNext(e:VideoEvent):void { nextFrame(); } And this is the code for the main file: var Xpos:Number=110; var Ypos:Number=110; var swf_MC:MovieClip = new MovieClip(); var loader:Loader = new Loader(); var defaultSWF:URLRequest = new URLRequest("arch_reel.swf"); addChild (swf_MC); swf_MC.x=Xpos swf_MC.y=Ypos loader.load(defaultSWF); swf_MC.addChild(loader); //Btns Universal Function function btnClick(event:MouseEvent):void{ SoundMixer.stopAll(); swf_MC.removeChild(loader); var newSWFRequest:URLRequest = new URLRequest("motion.swf"); loader.load(newSWFRequest); swf_MC.addChild(loader); } function returnSWF(event:Event):void{ swf_MC.removeChild(loader); loader.load(defaultSWF); swf_MC.addChild(loader); } //Btn Listeners motion.addEventListener(MouseEvent.CLICK,btnClick); swf_MC.addEventListener(swf_MC.motionClip.Event.COMPLETE,swf_MC.motionClip.eventClip, returnSWF); I'm starting to get an understanding of how all of this works, but it's all to new to me at the moment, so I'm sure I've approached it from the wrong angle. Any help would be fantastic, as I've been trying at this for a few days now. Thanks

    Read the article

  • PHP blunders with random numbers

    <b>The H Open:</b> "Security expert Andreas Bogk warns that, despite recent PHP improvements, the session IDs of users who are logged into PHP applications remain guessable. Upon close examination, the alleged improvements display frightening weaknesses."

    Read the article

  • Remove server hangs, gets stuck. How to debug?

    - by bibstha
    I have an vps running on VmWare ESX with Ubuntu 8.04 LTS. It has been running smoothly for the past 3 months, however recently we've notices two strange bugs. a. The server hangs, today was second time. The nature of the hang is very strange. I can ping to the server server, it sends back response fine. However all other services like sshd, apache, mysql etc do not respond at all. When working, telnet servername 22 Escape character is '^]'. SSH-2.0-OpenSSH_5.X Debian-5ubuntu1 And other web services would run fine. When its hung, I can make tcp connections to 22 as well as 80 but receive no response at all. telnet servername 22 Escape character is '^]'. How can I debug this problem? Is there any daemons I can run that will periodically log status? Please tell me as to how to proceed with it. b. The another strange problem is that, of lately I am unable to transfer files larger than around 100KB, smaller files of around 1-2 KB works file. scp anotherserver:filename . or wget http://www.example.com/file would get stuck. There is still around 6GB of space remaining, so I don't think that is an issue. Any pointers where I should look into?

    Read the article

  • Understanding the Linux boot process, subsystem initialization, & udev rules?

    - by quack quixote
    I'm creating UDEV rules for automounting external drives on a headless server, much in the same way as Gnome-VFS does automounting during a user session. I'm concerned with the rule's behavior at boot-time. There's a good chance one of these drives will be connected during a boot, and I'd prefer any connected drives get mounted in the right place. The drives might be either USB or Firewire, and they are mounted from a shell script fired off by UDEV on detecting an "add". Here are my questions: When UDEV runs the mount for these devices at boot, will the system be ready to mount it? Or will the script get triggered too early? If it's too early, what's a good way for a script to tell that the system isn't ready yet (so sleep a while before checking again)? The UDEV rule matches ACTION=="add". Does this event even fire at system boot?

    Read the article

  • BOINC permissions issue running as non-admin on Windows PC

    - by sunpech
    I installed BOINC (running World Community Grid) on a PC (running Vista) under an administrator's account. When logged in as a standard user, and BOINC is set to run as a screensaver, it fails to connect and run properly. Only when the program is run as an administrator, does it actually run in the standard user's account. What is the correct way to install and run BOINC for standard users (non-admin) on Windows? -- Not specific to Vista necessarily.

    Read the article

  • Can VMWare Workstation 7.x and Sun VirtualBox 3.1.x co-exist on the same Windows 7 64bit Host togeth

    - by Heston T. Holtmann
    Will installing Sun Virtual Box bash or interfere with my VMWare installtion? I don't need to run VMs from both Virtual-Machine software packages at the same time but I do need to run some older Virtual-Machines from Sun-Virtualbox on the same 64-bit Windows 7 host until I can migrate those VMs to VMWare. Before switching from Linux host to Windows host, I ensured to export the VirtualBox VM to an OVF "appliance" with intentions of importing into VMWare Workstation 7. But VMWare gives me an error stating it can't import it. Background info My old workstation host: 32-bit Ubuntu 9.04 running Sun Virtual Box 3.x hosting Windows-XP VM Guest for Windows Software app development (VS2008, etc) Needs I need to get my original Sun-VBox Windows-XP Guest running on my new Windows 7 Workstation either imported into VMWare or running on the Windows version of Sun-Virtual box (I have the VM-Guest Backed up and copied to the new computer data drive. New workstation host: 64bit Windows 7 running VMWare Workstation 7 to host 32bit Ubuntu 9.10 for linux project work.

    Read the article

  • iphone s/w version 3.1.2 (7D11) not supporting in XCode 3.1.4 SDK 3.1

    - by Shibin Moideen
    Hi, I just updated my iPhone OS to 3.1.2(7D11) but when i tried to debug application in my device its not working. It is showing Code Sign error: Provisioning profile 'AF7973F9-B977-44F5-98C4-0C1976A41B10' can't be found Also in the organizer window its showing "XCode cannot find the software image to install the version" Can anyone help me in solving this.. please help needed Thanks, Shibin

    Read the article

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