Search Results

Search found 19688 results on 788 pages for 'con current'.

Page 61/788 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Is there a way to determine the current Outlook activity level?

    - by dlittau
    I am working on an Outlook 2007 Add-in in C# (VS2008) and we want to send some background email items only when Outlook is not busy doing something else. Is there a .net way to see if Outlook is busy doing other things (perhaps due to other add-ins or the like taking up CPU cycles)? Alternately, is there a way to send emails such that they never appear in the Outbox? We need a method that would not require any additional software be installed. Thanks for any input.

    Read the article

  • Sql Server as logging, best connection practise

    - by ozz
    I'm using SqlServer as logging. Yes this is wrong decision, there are better dbs for this requirement. But I have no other option for now. Logging interval is 3 logs per second. So I've static Logger class and it has static Log method. Using "Open Connection" as static member is better for performance. But what is the best implemantation of it? This is not that I know. public static class OzzLogger { static SqlConnection Con; static OzzLogger() { Con=ne SqlConnection(....); Con.Open(); } public static void Log(....) { Con.ExecuteSql(......); } } UPDATE I asked because of my old information. People say "connection pooling performance is enough". If there is no objection I'm closing the issue :)

    Read the article

  • How do I have my apps dialog box pop up and take focus from the current running app?

    - by simba
    I know this type of thing is looked negatively upon but I write software for people with disabilities and sometimes good gui practices don't make sense. In this case, the user interacts with a assistive interface and under certain conditions, my control app needs to prompt the user with a question. My background process creates a dialog (I'm using wxwidgets wxDialog class) and calls Show(). The dialog box appears but it does not have focus (the application that the user was previously using keeps it). Since my users can't use mice, they can't simply click on the window. I've tried calling show and then followed by SetFocus(HWND) but that doesn't do it. What's the problem? Is this even possible? Window7. I'm thinking that it might have something to do with it being a dialog and not a full window (wxFrame). Any help is greatly appreciated.

    Read the article

  • what is the probability that the next random number will equal current one?

    - by I__
    if i do this in a worksheet: =RAND() i also specified that i want only 2 decimal places and for example let's say that rand() = 0.07 what is the probability that when i call this function again i will get 0.07 ?? i know that ideally if we assume 100% randomness, the answer would be 1/ (10 * 10) because there are only 100 possible combinations, but what would it be according to the way excel generates a random number?

    Read the article

  • Difficulty Inserting from HTML form into MySQL (created in Workbench)

    - by Chaya Cooper
    I created a MySQL database in Workbench 5.2.35 for purposes of storing and using information submitted in html forms but I'm having difficulty inserting records from the html form. The relevant SQL script was saved as Demo2.sql, the schema is C2F, and the table is customer_info. I wasn't sure if that was the problem, so I tried replacing the database name (Demo2) with the schema name, but that didn't work either. My html file includes: form action="insert.php" method="post" The insert.php file states: ?php $con = mysql_connect("localhost","root","****"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("Demo2", $con); $sql="INSERT INTO customer_info(fname, lname, user, password, reminder, answer) VALUES ('$_POST[fname]','$_POST[lname]','$_POST[user]','$_POST[password]','$_POST[reminder]','$_POST[answer]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ? I've also tried INSERT INTO c2f.customer_info(fname, lname, etc. and INSERT INTO 'c2f'.'customer_info'

    Read the article

  • Stop MSVC++ debug errors from blocking the current process?

    - by Mike Arthur
    Any failed ASSERT statements on Windows cause the below debug message to appear and freeze the applications execution. I realise this is expected behaviour but it is running periodically on a headless machine so prevent the unit tests from failing, instead waiting on user input indefinitely. Is there s a registry key or compiler flag I can use to prevent this message box from requesting user input whilst still allowing the test to fail under ASSERT? Basically, I want to do this without modifying any code, just changing compiler or Windows options. Thanks!

    Read the article

  • How can I set paperclip's storage mechanism based on the current Rails environment?

    - by John Reilly
    I have a rails application that has multiple models with paperclip attachments that are all uploaded to S3. This app also has a large test suite that is run quite often. The downside with this is that a ton of files are uploaded to our S3 account on every test run, making the test suite run slowly. It also slows down development a bit, and requires you to have an internet connection in order to work on the code. Is there a reasonable way to set the paperclip storage mechanism based on the Rails environment? Ideally, our test and development environments would use the local filesystem storage, and the production environment would use S3 storage. I'd also like to extract this logic into a shared module of some kind, since we have several models that will need this behavior. I'd like to avoid a solution like this inside of every model: ### We don't want to do this in our models... if Rails.env.production? has_attached_file :image, :styles => {...}, :storage => :s3, # ...etc... else has_attached_file :image, :styles => {...}, :storage => :filesystem, # ...etc... end Any advice or suggestions would be greatly appreciated! :-)

    Read the article

  • I want search a item frome database

    - by vishal
    I want search a item frome database bye date and id but if I want to search only by date or id tahn data are display but if I want to search by both date and id than not both are display but combine both and than display. my code: SqlConnection con = new SqlConnection("Data Source=NODE5-PC;Initial Catalog=hans;Persist Security Info=True;User ID=sa;Password=123"); cmd = new SqlCommand("SELECT UserId, Date, Report FROM Daily_Report WHERE (Date='" + txtdate.Text + "' or UserId='" + txtempid.Text + "') OR (UserId='" + txtempid.Text + "' and UserId='" + txtempid.Text + "')", con); con.Open(); SqlDataReader rdr = cmd.ExecuteReader(); GridView2.DataSource = rdr; GridView2.DataBind(); con.Close();

    Read the article

  • How to check of which user-defined type a current JSON element is during $.each()?

    - by Bob
    I have the following structure for a JSON file: ({condos:[{Address:'123 Fake St.', Lat:'56.645654', Lng:'23.534546'},{... another condo ...},{...}],houses:[{Address:'1 Main Ave.', Lat:'34.765766', Lng:'27.8786674'},{... another house ...}, {...}]}) So, I have a list of condos and houses in one big JSON array. I want to plot them all on my map, but I want to give condos and houses different marker icons( blue marker for condos, green marker for houses ). Problem I have is - figuring out how to distinguish between types of markers when I $.each() through them. How would I use if to check whether I'm working with a condo or a house at the moment? var markers = null; $('#map').gmap(mapOptions).bind('init', function(){ $.post('getMarkers.php', function(json){ markers = json; $.each(markers, function(type, dataMembers) { $.each(dataMembers, function(i, j){ //if house use house.png to create marker $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(parseFloat(Lat), parseFloat(Lng)), 'bounds':true, 'icon':'house.png' } ); //if condo use condo.png $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(parseFloat(Lat), parseFloat(Lng)), 'bounds':true, 'icon':'condo.png' } ); }); }); }); });

    Read the article

  • How to current snapshot of MySQL Table and store it into CSV file(after creating it) ?

    - by Rachel
    I have large database table, approximately 5GB, now I wan to getCurrentSnapshot of Database using "Select * from MyTableName", am using PDO in PHP to interact with Database. So preparing a query and then executing it // Execute the prepared query $result->execute(); $resultCollection = $result->fetchAll(PDO::FETCH_ASSOC); is not an efficient way as lots of memory is being user for storing into the associative array data which is approximately, 5GB. My final goal is to collect data returned by Select query into an CSV file and put CSV file at an FTP Location from where Client can get it. Other Option I thought was to do: SELECT * INTO OUTFILE "c:/mydata.csv" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY "\n" FROM my_table; But I am not sure if this would work as I have cron that initiates the complete process and we do not have an csv file, so basically for this approach, PHP Scripts will have to create an CSV file. Do a Select query on the database. Store the select query result into the CSV file. What would be the best or efficient way to do this kind of task ? Any Suggestions !!!

    Read the article

  • MySql php: check if Row exists

    - by Jeff
    This is probably an easy thing to do but I'm an amateur and things just aren't working for me. I just want to check and see if a row exists where the $lectureName shows. If a row does exist with the $lectureName somewhere in it, I want the function to return "assigned" if not then it should return "available". Here's what I have. I'm fairly sure its a mess. Please help. function checkLectureStatus($lectureName) { $con = connectvar(); mysql_select_db("mydatabase", $con); $result = mysql_query("SELECT * FROM preditors_assigned WHERE lecture_name='$lectureName'"); while($row = mysql_fetch_array($result)); { if (!$row[$lectureName] == $lectureName) { mysql_close($con); return "Available"; } else { mysql_close($con); return "Assigned"; } } When I do this everything return available, even when it should return assigned.

    Read the article

  • cant made mySQL connection

    - by Andika Evangelion Thirteenth S
    I've use following code $con = mysql_connect("localhost","root","");if (!$con) {die('Could not connect: ' . mysql_error());} It's works. but when $db_host='localhost';$db_id='root';$db_pass=''; $con = mysql_connect($db_host,$db_id,$db_pass);if (!$con) {die('Could not connect: ' . mysql_error());} it didn't works, trying to swap ("),('),and empty in mysql_connect() and in $var and vice versa. Any help would be appreciated. Thanks.

    Read the article

  • Is it possible to get the current request that is being served by node.js?

    - by user420504
    I am using express.js. I have a need to be able to log certain request data whenever someone tries to log a message. For this I would like to create a helper method like so function log_message(level, message){ winston.log(level, req.path + "" + message); } I would then use the method like so. exports.index = function(req, res){ log_message("info", "I'm here"); } Note that I am not passing the req object to the log_message function. I want that to be transparently done so that the log_message API user does not need to be aware of the common data that is being logged. Is there a way to achieve this with express.js/node.js. Is the request object available from a global variable of some sort?

    Read the article

  • php/mysql question, retrieving information

    - by chance
    Hey SO, I have a question, pretty new at PHP and MySql but was curious is it possible to display only the most recent column to a table, from a database? I know it is possible to display a list of all information, or if you have just one column of information in your table to display that using the Here is my code for my basic script (just loads 1 column of information) I would like it to only print out the recent column i added to the table $con = mysql_connect ("localhost","username","password"); if (!$con) { die ('Could not connect:' . mysql_error()0; } mysql_select_db("db_name", $con); $result = mysql_query(Select column FROM table"); while($row = mysql_fetch_array($result)) { echo $row['column']; } mysql_close($con); * keep in mind, im not looking for someone to shoot me my code with it completed, though it would be handy, however just giving me the options of what I have to do, or what the script is called would be plentiful enough for my research, thanks!

    Read the article

  • Javascript in php

    - by user506539
    I have a form where user enters category, it gets inserted into db and it has to go to other page to select an image, after selection image id has to get into category table. I am doing some thing like this <?php error_reporting(E_ALL ^ E_NOTICE); $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydocair", $con); $ThirdPartyCategoryName =$_POST['ThirdPartyCategoryName']; $checkformembers = mysql_query("SELECT * FROM thirdpartycategorymaster WHERE ThirdPartyCategoryName = '$ThirdPartyCategoryName'"); if(mysql_num_rows($checkformembers) != 0) { header('location:newcat.php?msg=category exists'); } else { $sql="INSERT INTO thirdpartycategorymaster (ThirdPartyCategoryID, ThirdPartyCategoryName) VALUES ('$_POST[ThirdPartyCategoryID]', '$_POST[ThirdPartyCategoryName]' )"; } if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } mysql_close($con); ?> <?php $res = mysql_query("SELECT ThirdPartyCategoryID FROM thirdpartycategorymaster"); while($row = mysql_fetch_array($res)) { "<script type='text/javascript'> if(window.confirm("Do you want to insert image for category?")) { document.location = "imgcat.php?id="<?php echo row2['ThirdPartyCategoryID']; ?>"" } </script>"; } ?>

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >