Ask a Question
Tech Areas
Database (642)
Editors IDEs (664)
Game (7)
Handhelds /PDAs (0)
Installation (0)
Languages (1555)
Multimedia Programming (0)
Project Management (0)
System / Kernel (21)
Theory (0)
Latest Programming Jobs
International Programming & Systems - Oakland, CA International Programming & Systems has partnered with a state run agency 1 day ago
Xyant Technology - Florham Park, NJ ~~~~~~~~~~~~~ * Python * C * UNIX/Linux * network programming (TCP/IP. 1 day ago
Excell Data - Redmond, WA < < Performance testing experience < At least four years of experience with 1 day ago
Programming

Welcome! to the Programming area! Please post your questions or search now!

Subscribe to the Programming forum
2009
0 Responses
0
0
Hello Experts, Please help me to solve these two issues If I wish to know number of cases cleared with no return and case ID count only once. My answer for this question is to set Case ID as Primary key on the main database, so it won't count twice(I take care of that part). Count cases with no return, then saying I have multiple column headers in the main database (table) like Case ID, DEClearedDate, SomaticMCClearedDate, PsycMCClearedDate, DESecondClearedDate, SomaticMCSecondClearedDate, PsycMCSecondClearedDate, DEThirdClearedDate, SomaticMCThirdClearedDate, PsycMCThirdClearedDate, EFourthClearedDate, SomaticMCFourthClearedDate, PsycMCFourthClearedDate. The formula for counting number of cases with no returns: when the case received for the first time, it might go to DEClearedDate Or SomaticMCClearedDate Or PsycMCClearedDate in order to cleared the case and any cases go to DESecondClearedDate, or SomaticMCSecondClearedDate or etc. (any cases pass first time received, ...
Subscribe:
2009
0 Responses
0
0
We are using ORACLE 10g. Now we start having a strange problem with the following query that we have used for a year and never had problem before: we got in-consistency data (sometimes, the returned data is wrong: for example, the “num_pos_with_value” will be only 1 instead of 3 and all other “sum” fields will be only one value instead of sum of 3 records added together..). . If we run it with any specific owner_id or with less output fields, the problem will never happened. This seems like a memory problem to me as our table is getting larger, but I am not sure. .Anyway, may be you can help with this kind of problem. create table temp_op_owner_stats tablespace default_data_large as select h.owner_id, h.perm_owner_id, h_date.rpt_date qtr_end_date, max(h.rpt_date) rpt_date, sum( decode(sign(h.cf_qtr-h_date.rpt_date), -1,0, decode(h.shares, 0, 0, null, 0, 1)) ) num_pos_with_value, sum( decode(sign(h.cf_qtr-h_date.rpt_date), -1,0, decode(h.shares, 0, 0, null, 0, h.value...
Subscribe:
2009
0 Responses
0
0
We are using ORACLE 10g. Now we start having a strange problem with the following query that we have used for a year and never had problem before: we got in-consistency date (sometimes, the returned data is wrong: for example, the “num_pos_with_value” will be only 1 instead of 3 and all other “sum” fields will be only one value instead of sum of 3 records added together..). . If we run it with any specific owner_id or with less output fields, the problem will never happened. This seems like a memory problem to me as our table is getting larger, but I am not sure. .Anyway, may be you can help with this kind of problem. create table temp_op_owner_stats tablespace default_data_large as select h.owner_id, h.perm_owner_id, h_date.rpt_date qtr_end_date, max(h.rpt_date) rpt_date, sum( decode(sign(h.cf_qtr-h_date.rpt_date), -1,0, decode(h.shares, 0, 0, null, 0, 1)) ) num_pos_with_value, sum( decode(sign(h.cf_qtr-h_date.rpt_date), -1,0, decode(h.shares, 0, 0, null, 0, h.value...
Subscribe:
2008
0 Responses
0
0
Is there really any use to keep Perl alive, given all of the new programming languages?
Subscribe:
2008
0 Responses
0
0
My oracle version is 10.2.0.3.0. In Toad I have no problem 1) to create table trg_farinvc as select 2) select * from all_objects where object_name like 'TRG_FARINVC%' 3) drop table TRG_FARINVC PURGE 3) create table trg_farinvc as select --> create table again no problem. 4) drop table TRG_FARINVC PURGE --> everthing is good so far. my script run via sqlplus: declare ..... begin execute immediate 'CREATE TABLE trg_farinvc as select ....'; end; . / run PROBLEM: ORA-00955: name is already used by an existing object
Subscribe:
2008
0 Responses
0
0
How to implement search criteria in actuate...please help
Subscribe:
2008
Guest
7 Responses
0
0
Hi, I have a VBA application that modifies the content of captions and controltip text in another workbook. As the changes are made, the user is able to view the target UserForm after they have made changes to it. I need to be able to prevent the user from clicking on the controls in the target Userforms, as executing the code behind those controls is not applicable to the process of modifying the content. I need to be able to execute some specific code the first time a user clicks anywhere on the form - before they can interact with the controls. That code is likely just to close the form. So I need to know how to trap the mouse click and use it to close the form. Any ideas? Cheers
Subscribe:
2008
Guest
3 Responses
0
0
Below code will run properly. I'm getting a little confused. Don't we need to create getter and setter method to access private variable? Code Snippet: <code>public class AQuestion10{ private int i = 3; private int j = 10; public static void main(String args[]){ AQuestion10 a = new AQuestion10(); a.i = 888; System.out.println(a.i); AQuestion10 aa = new AQuestion10(); aa.i = a.i; System.out.println(aa.i); } } </code>
Subscribe:
2008
Guest
1 Response
0
0
1) Can someone explain why this piece of code can compile successfully even though there are two methods with the same name? 2) Why "String version" is displayed? Code Snippet: <code>public class AQuestion { public void method(Object o){ System.out.println("Object Verion"); } public void method(String s){ System.out.println("String Version"); } public static void main(String args[]){ AQuestion question = new AQuestion(); question.method(null); } } </code>
Subscribe:
2008
Guest
0 Responses
0
0
I've trying to get a response from a separate domain with the folllowing curl script. When I print the result, I get "result is 1" instead of the result content. What am I doing wrong and what do I need to do to get the content into a variable? I know that the other server is getting the Post data and outputting it properly... $ch = curl_init();     curl_setopt($ch,CURLOPT_URL,"someurlthatworks"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($ch); echo ob_get_contents(); echo "result is $result"; curl_close ($ch);
Subscribe:
2008
Guest
0 Responses
0
0
Hi everyone i hope you wont laugh at this question, but I want to get into the right habits. Okay..... With regards to doctypes..................... If we have 2 files: 1 of html, 1 of php extensions.. ---------------------------------------- file1.html             ------------------------------------------ file.php Should the doctype go at the very top of each file type and BEFORE anything else? For example.... ---------------------------------------- file.php doctype then <?php or ------------------------------------------ file.php <?php then doctype And to do with sessions..... ----------------------------------------- file.php doctype <?php session_start I know this might sound really simple, but just want to get into best practices. Thanks guys..
Subscribe:
2008
Guest
1 Response
0
0
I thought an Interface was abstract and could not be instantiated.  Yet I see this code works fine:     [WebMethod]     public PendingEventRecord[] PeekPendingEventRecordsByEventQuery(EventQuery query, Credentials c)     {         IList<PendingEventRecord> records = objectStore.GetEvents(query);         PendingEventRecord[] array = new PendingEventRecord[records.Count];         records.CopyTo(array, 0);         return array;     } records holds the values returned by GetEvents().  I don't see how that can work. Please explain, newbieweb
Subscribe:
2008
Guest
0 Responses
0
0
I am trying to write a php function that prints product totals for individual products depending on how the function is called.  Why does this php function print only the price for the first product and not the others? Code Snippet: <code>function tally_totals() { $product1 = "Candle Holder"; $product2 = "Coffee Table"; $product3 = "Lamp"; if($product1) { $price = 12.95; $tax = 0.8 * $price; $shipping = 0; //free shipping $total1 = $price + $tax + $shipping; echo "<li>" . $product1 . ": $". $price . "</li>"; return $total1; } else if($product2) { $price = 99.50; $tax = 0.8 * $price; $shipping = 0.10 * $price; $total2 = $price + $tax + $shipping; echo "<li>" . $product2 . ": $" . number_format($price,2) . "</li>"; return $total2; } else if($product3) { $price = 42.99; $tax = 0.8 * $price; $shipping = 0.10 * $price; $total3 = $price + $tax + $shipping; echo "<li>" . $product3 . ": $" . $price . "</li>"; return $total3; } } ...
Subscribe:
2008
Guest
0 Responses
0
0
Hi, I want to remove ( &nbsp; ) from string. I tried to use : $todaytopicshort = str_replace("&nbsp;", "", $todaytopic);   it is okay for me but there is another codes such as :         $todaytopicshort = str_replace("&zwnj;", "", $todaytopicshort);         $todaytopicshort = str_replace("%end%", "", $todaytopicshort);         $todaytopicshort = str_replace("&rsquo;", "", $todaytopicshort);         $todaytopicshort = str_replace("&hellip;", "", $todaytopicshort);         $todaytopicshort = str_replace("&zwj;", "", $todaytopicshort);         $todaytopicshort = str_replace("&rlm;", "", $todaytopicshort);         $todaytopicshort = str_replace("&ndash;", "", $todaytopicshort);         $todaytopicshort = str_replace("&frac12;", "", $todaytopicshort);         $todaytopicshort = str_replace("&shy;", "", $todaytopicshort);         $todaytopicshort = str_replace("&rdquo;", "", $todaytopicshort);         $todaytopicshort = str_replace("&ldquo;", "", $todaytopicshort);   it long for me , H...
Subscribe:
2008
Guest
0 Responses
0
0
I'm doing some basic testing with multiple threads and a quad-core processor. In the following code, I do 2 tests: 1) Not multithreaded, it takes ~8.1 seconds 2) 4 threads, each doing 1/4th of the job, takes ~7.6 seconds Shouldn't the gain be a lot better? What's wrong? Code Snippet: <code>unit Unit6; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; Const MSG1 = WM_USER +1; MSG2 = WM_USER +2; MSG3 = WM_USER +3; MSG4 = WM_USER +4; type TForm6 = class(TForm) Button1: TButton; Button2: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form6: TForm6; PF, PC0, PC1: Int64; APF, APC0, APC1: Int64; NThreads: Integer; OldWindowProc : ...
Subscribe:
2008
Guest
3 Responses
0
0
I am in the process of writing a user control. Basically it will display some basic information and will have a link button on it. When this link button is clicked i want to use ajax to display a 'floating' div that will take up most of the page to display a more detailed description of the item in question. I am trying to do something like the code snippet below. So basically when the link button is clicked i want a function that will populate information in the floating div and display it over the rest of the page. This is the first time I have attemptted this so am after any advice you can give on the best way to do it. Also in my code behind I am trying to find write the code for the link button click, but this doesnt seem to be an option, is this bcos it is inside the update panel and if so how to i get around this? Thanks in advance Code Snippet: <code><%@ Control Language="VB" AutoEventWireup="false" CodeFile="CaravanSearchResultIndividualAdve...
Subscribe:
2008
Guest
8 Responses
0
0
Can you please provide a sample code for dynamically adding textboxes in Winforms using C#.net
Subscribe:
2008
Guest
0 Responses
0
0
Hi, I have aspx page with pagination at bottom which show Page 1 ,2 ,3 ..etc. When user selects Page 2 or 3 , user goes to page 2 but stays at bottom of the page. I want after he hits page 2 he should move to top of the page after page refresh. How can i do this. Please help me with this. Thanks!!
Subscribe:
2008
Guest
0 Responses
0
0
I am working with VB.Net 2005 and I am trying to run the line "   dbComp.TableDefs.Refresh()" in my code and I am getting Error: Object reference not set to an instance of an object.  I set the dbcomp as  Public dbComp As DAO.Database...but I think that I forgot to tell it where the database is and what the name of it is. How do I set the DAO to look at the right folder/file? Thanks in advance for your help!
Subscribe:
2008
Guest
0 Responses
0
0
Hi Experts, I'd like a PHP script that will randomly load an image on page refresh, but in sequence without repeating the same image twice. I have a total of 5 images. I read a similar thread on here that explained how to do it in ASP. It appears that I will need to store a cookie on the users machine, holding the images that have already been loaded. I guess this cookie would need to 'reset' somehow so that image #1 will be able to show up again on page refresh #6. I really appreciate any advice.
Subscribe: