Search Results

Search found 4827 results on 194 pages for 'alert'.

Page 12/194 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Validating textboxes and checkboxes then add the values of those checkboxes

    - by TiTi Nguyen
    I am very new to Javascript. I am running to a problem and don't know how to solve it. Could you please help? Basically, I want to create some textboxes and checkboxes in a form. Then I have to validate those fields, and add the values of the checkboxes if they are selected. One of the textboxes asking for how many semesters attended, and 3 checkboxes with value of 100, 1000, and 750. Whichever checkbox is selected, it should multiply its value to the number of semesters attended. For example if the first two checkboxes are selected then totalCost = (100+1000)* semester. Here is my code: User Name: <label>User Address: <input type = "text" id ="address" size = "30"/></label> <br/><br/> <label> User E-mail address: <input type = "text" id ="email" size = "30"/></label> <br/><br/> <label> User Phone number: <input type = "text" id ="phone" size = "30"/></label> <br/><br/> <label> User area code: <input type = "text" id ="area" size = "30"/></label> <br/><br/> <label> User SSN: <input type = "text" id ="ssn" size = "30"/></label> <br/><br/> <label> User Birthday: <input type = "text" id ="birthday" size = "30"/></label> <br/><br/> <label> Number of semester attended: <input type = "text" id ="semester" size = "3"/></label> <br/><br/> <label><input type="checkbox" id="box_book" value="100"/>Books $100 per semester</label> <br/> <label><input type="checkbox" id="box_tuition" value="1000"/>Tuition $1000 per semester</label> <br/> <label><input type="checkbox" id="box_room" value="750"/>Room and Board $750 per semester</label> <br/> <input type="reset" id="reset"/> <input type="submit" id="submit" onclick="checking()"/> <p/> </form> function checking() { var name=document.forms["myForm"]["name"].value; var address=document.forms["myForm"]["address"].value; var email=document.forms["myForm"]["email"].value; var atpos=email.indexOf("@"); var dotpos=email.lastIndexOf("."); var phone=document.forms["myForm"]["phone"].value; var area=document.forms["myForm"]["area"].value; var ssn=document.forms["myForm"]["ssn"].value; var birth=document.forms["myForm"]["birthday"].value; var semester=document.forms["myForm"]["semester"].value; var boxBook = document.forms["myForm"]["box_book"].value; var boxTuition = document.forms["myForm"]["box_tuition"].value; var boxRoom = document.forms["myForm"]["box_room"].value; if (name==null || name=="") { alert("Please fill in your name."); return false; } if (address==null || address=="") { alert("Please fill in your address."); return false; } if (atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length) { alert("The email (" + email + ") is not a valid e-mail address. Please reenter your email address."); return false; } if(phone.length!=10) { alert("Phone number entered in incorrect form. Please reenter phone number in the correct form which contains 10 numbers."); return false; } if (area==null || area=="") { alert("Please fill in the area code"); return false; } if(ssn.length!=9) { alert("SSN entered in incorrect form. Please reenter SSN."); return false; } if (birth==null || birth=="") { alert("Please fill in your date of birth."); return false; } if (semester==null || semester=="") { alert("How many semester have you attended?"); return false; } if (document.getElementById("box_book").checked == false && document.getElementById("box_tuition").checked == false && document.getElementById("box_room").checked == false) { alert("You must select one of the checkboxes"); return false; } if (document.getElementById("box_book").checked ==true) { var subcost = boxBook; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_book").checked == true && document.getElementById("box_tuition").checked == true) { var subcost = boxBook + boxTuition; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_book").checked == true && document.getElementById("box_tuition").checked == true && document.getElementById("box_room").checked == true) { var subcost = boxBook + boxTuition + boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_tuition").checked ==true) { var subcost = boxTuition; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_tuition").checked == true && document.getElementById("box_room").checked == true) { var subcost = boxTuition + boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_room").checked ==true) { var subcost = boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_book").checked == true && document.getElementById("box_room").checked == true) { var subcost = boxBook + boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } else return false; } When I hit the submit button, nothing happens!! Please help.

    Read the article

  • AlertDialog Input Text

    - by soclose
    Hi, I'd like to use AlertDialog as a pin code or password dialog. Here is my code - AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Login"); alert.setMessage("Enter Pin :"); // Set an EditText view to get user input final EditText input = new EditText(this); alert.setView(input); alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String value = input.getText().toString(); Log.d( TAG, "Pin Value : " + value); return; } }); alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub return; } }); alert.show(); How to code that all input text will appear like ' * '

    Read the article

  • How do I bind a jQuery Tools overlay event to an existing overlay?

    - by Paul
    Say when the page loads, this code runs: jQuery(document).ready(function($){ $('#overlay').overlay( api: true ); }); How would I bind an event to it? I've tried: $('#overlay').onBeforeLoad( function(){ alert('Hi'); }); $('#overlay').bind( 'onBeforeLoad', function(){ alert('Hi'); }); var api = $('#overlay').data('overlay'); api.onBeforeLoad(function(){ alert('Hi') }); When I do: alert(api.getContent().attr('id')); An alert pops up with '#overlay' inside. When the overlay is open and I run: alert(api.isOpened()); An alert pops up with 'false' inside. Thanks in advance.

    Read the article

  • Why do escape characters break my Telerik call to ResponseScripts.Add(string)?

    - by David
    this displays the expected javascript alert message box: RadAjaxManager1.ResponseScripts.Add("alert('blahblahblah');"); while these does not: RadAjaxManager1.ResponseScripts.Add("alert('blahblah \n blahblahblah');"); RadAjaxManager1.ResponseScripts.Add("alert('blahblah \r blahblahblah');"); RadAjaxManager1.ResponseScripts.Add("alert('blahblah \r\n blahblahblah');"); RadAjaxManager1.ResponseScripts.Add("alert('blahblah \n\t blahblahblah');"); RadAjaxManager1.ResponseScripts.Add(@"alert('blahblah \n blahblahblah');"); string message = "blahblahblah \n blahblahblah"; RadAjaxManager1.ResponseScripts.Add(message); I can't find any documentation on escape characters breaking this. I understand the single string argument to the Add method can be any script. No error is thrown, so my best guess is malformed javascript.

    Read the article

  • jquery: .attr() fails for child element

    - by user984003
    I'm going crazy staring at this. I need to change the attribute of an element, something which I have done many times before. But it fails. Now I can't even get jquery to show me the attribute that it has. Does it have to do with what is returned by find()? var c = new_photo_div.find('[class = photo]')[0]; alert(c); alert(new_photo_div.attr('class')); alert(c.attr('class')); The first alert correctly identifies the element: Object HTMLImageElement The second alert correctly gives me the class of new_photo_div. The third alert fails. No alert. I think it should say: photo

    Read the article

  • PHP Form - Empty input enter this text - Validation

    - by James Skelton
    No doubt very simple question for someone with php knowledge. I have a form with a datepicker, all is fine when a user has selected a date the email is send with: Date: 2012 04 10 But i would like if the user has skipped this and left blank (as i have not made this required) to send as: Date: Not Entered (<-- Or something) Instead at the minute of course it reads: Date: Form input <input type="text" class="form-control" id="datepicker" name="datepicker" size="50" value="Date Of Wedding" /> This is the validator $(document).ready(function(){ //validation contact form $('#submit').click(function(event){ event.preventDefault(); var fname = $('#name').val(); var validInput = new RegExp(/^[a-zA-Z0-9\s]+$/); var email = $('#email').val(); var validEmail = new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/); var message = $('#message').val(); if(fname==''){ showError('<div class="alert alert-danger">Please enter your name.</div>', $('#name')); $('#name').addClass('required'); return;} if(!validInput.test(fname)){ showError('<div class="alert alert-danger">Please enter a valid name.</div>', $('#name')); $('#name').addClass('required'); return;} if(email==''){ showError('<div class="alert alert-danger">Please enter an email address.</div>', $('#email')); $('#email').addClass('required'); return;} if(!validEmail.test(email)){ showError('<div class="alert alert-danger">Please enter a valid email.</div>', $('#email')); $('#email').addClass('required'); return;} if(message==''){ showError('<div class="alert alert-danger">Please enter a message.</div>', $('#message')); $('#message').addClass('required'); return;} // setup some local variables var request; var form = $(this).closest('form'); // serialize the data in the form var serializedData = form.serialize(); // fire off the request to /contact.php request = $.ajax({ url: "contact.php", type: "post", data: serializedData }); // callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('.contactWrap').show( 'slow' ).fadeIn("slow").html(' <div class="alert alert-success centered"><h3>Thank you! Your message has been sent.</h3></div> '); }); // callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // log the error to the console console.error( "The following error occured: "+ textStatus, errorThrown ); }); }); //remove 'required' class and hide error $('input, textarea').keyup( function(event){ if($(this).hasClass('required')){ $(this).removeClass('required'); $('.error').hide("slow").fadeOut("slow"); } }); // show error showError = function (error, target){ $('.error').removeClass('hidden').show("slow").fadeIn("slow").html(error); $('.error').data('target', target); $(target).focus(); console.log(target); console.log(error); return; } });

    Read the article

  • Get the Information You Need. Delivered.

    - by Get Proactive Customer Adoption Team
    Untitled Document Don’t Take Chances with Alerts—Get Hot Topics When Oracle Support publishes an alert, how do you find out about it? I can see any number of ways you might stumble onto an alert that you need. For example, if you are visiting My Oracle Support in search of answers under the Knowledge tab and happen to notice, and click on, the Alert tab the under the Knowledge Article region, you might see an alert listed for one of the products you use. There are other ways… like subscribing to one of the Oracle Blogs and finding the alert in your RSS feed because the blogger decided to write up that topic for the latest post. I’m sure your colleagues sometimes pass on critical alerts for your products, I hope, giving you the information before you needed it. Well, no matter how you learn about an alert, the important point is that you get the correct information in a timely way. Right? I must admit, the ‘magic’ required to find out via these methods makes me nervous. Rather than leave it to chance, I think you need a more reliable way to stay informed and receive alerts for your products when Oracle publishes them. You may not be aware of it, but there is a better way. Oracle Premier Support Customers can leverage the “Hot Topics E-Mail.” You select the products and topics that interest you. Based on your choices, the system sends you the support related information when Oracle Support publishes it. This way you and I can both relax, knowing you’ll have ready access to the alerts you need, and enjoy the breadth of support related information you choose to subscribe to. This can include recently updated Knowledge base articles, new bugs, and product news. If I’ve convinced you, you will want to know how to set up and subscribe to the Hot Topics E-Mail. The complete guide, Doc ID 793436.1, is waiting for you. Follow the instructions in the document, and you will always stay on top of the latest information from Oracle Support.

    Read the article

  • ORA-03113 in code. In addition, TNS-12535 and ORA-03137 in alert file

    - by user1348107
    I've got an exception that contain ORA-03113: (SiPPSS.GetPrintWorkDirectDetail) - ERR:ORA-03113: end-of-file on communication channel Process ID: 7448 Session ID: 30 Serial number: 9802 ?????:12110937 ????:T855 Oracle.DataAccess.Client.OracleException ORA-03113: end-of-file on communication channel Process ID: 7448 Session ID: 30 Serial number: 9802 ?? Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) ?? Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) ?? Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) ?? Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) ?? System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) ?? SiPPSS.VSireiMeisaiDsTableAdapters.V_SIREI_MEISAITableAdapter.FillByRunningNoAndProcNo(V_SIREI_MEISAIDataTable dataTable, String RUNNING_NO, String PROC_NO) ?? C:\SVM\trunk\SiPPSSServer\Server\Dao\View\VSireiMeisaiDs.Designer.vb:? 386 ?? SiPPSS.GetPrintWorkDirectDetail.Execute(BLogicParam param) ?? C:\SVM\trunk\SiPPSSServer\Server\BLogic\Screen\Printing\Rprt0701\GetPrintWorkDirectDetail.vb:? 105 In this case, the oracle alert log as beblow: Fatal NI connect error 12170. VERSION INFORMATION: TNS for 64-bit Windows: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Time: 01-11?-2012 13:50:45 Tracing not turned on. Tns error struct: ns main err code: 12535 TNS-12535: TNS: ??????·???????? ns secondary err code: 12560 nt main err code: 505 TNS-00505: ??????????? nt secondary err code: 60 nt OS err code: 0 Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.41.102.53)(PORT=1794)) Thu Nov 01 13:54:17 2012 Thread 1 cannot allocate new log, sequence 1880 Private strand flush not complete Current log# 1 seq# 1879 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1880 (LGWR switch) Current log# 2 seq# 1880 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thu Nov 01 13:54:21 2012 Archived Log entry 1118 added for thread 1 sequence 1879 ID 0xe48db805 dest 1: Thu Nov 01 14:40:12 2012 Thread 1 cannot allocate new log, sequence 1881 Private strand flush not complete Current log# 2 seq# 1880 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1881 (LGWR switch) Current log# 3 seq# 1881 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thu Nov 01 14:40:16 2012 Archived Log entry 1119 added for thread 1 sequence 1880 ID 0xe48db805 dest 1: Thu Nov 01 15:27:42 2012 Thread 1 cannot allocate new log, sequence 1882 Private strand flush not complete Current log# 3 seq# 1881 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thread 1 advanced to log sequence 1882 (LGWR switch) Current log# 1 seq# 1882 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thu Nov 01 15:27:46 2012 Archived Log entry 1120 added for thread 1 sequence 1881 ID 0xe48db805 dest 1: Thu Nov 01 16:23:48 2012 Thread 1 cannot allocate new log, sequence 1883 Private strand flush not complete Current log# 1 seq# 1882 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1883 (LGWR switch) Current log# 2 seq# 1883 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thu Nov 01 16:23:52 2012 Archived Log entry 1121 added for thread 1 sequence 1882 ID 0xe48db805 dest 1: Thu Nov 01 17:05:50 2012 Thread 1 cannot allocate new log, sequence 1884 Private strand flush not complete Current log# 2 seq# 1883 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1884 (LGWR switch) Current log# 3 seq# 1884 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thu Nov 01 17:05:55 2012 Archived Log entry 1122 added for thread 1 sequence 1883 ID 0xe48db805 dest 1: Thu Nov 01 17:26:52 2012 Fatal NI connect error 12170. VERSION INFORMATION: TNS for 64-bit Windows: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Time: 01-11?-2012 17:26:52 Tracing not turned on. Tns error struct: ns main err code: 12535 TNS-12535: TNS: ??????·???????? ns secondary err code: 12560 nt main err code: 505 TNS-00505: ??????????? nt secondary err code: 60 nt OS err code: 0 Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.41.102.62)(PORT=1286)) Thu Nov 01 17:27:16 2012 Fatal NI connect error 12170. VERSION INFORMATION: TNS for 64-bit Windows: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Time: 01-11?-2012 17:27:16 Tracing not turned on. Tns error struct: ns main err code: 12535 TNS-12535: TNS: ??????·???????? ns secondary err code: 12560 nt main err code: 505 TNS-00505: ??????????? nt secondary err code: 60 nt OS err code: 0 Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.41.102.62)(PORT=1285)) Thu Nov 01 18:08:39 2012 Thread 1 advanced to log sequence 1885 (LGWR switch) Current log# 1 seq# 1885 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thu Nov 01 18:08:40 2012 Archived Log entry 1123 added for thread 1 sequence 1884 ID 0xe48db805 dest 1: Thu Nov 01 19:33:21 2012 Thread 1 cannot allocate new log, sequence 1886 Private strand flush not complete Current log# 1 seq# 1885 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1886 (LGWR switch) Current log# 2 seq# 1886 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thu Nov 01 19:33:25 2012 Archived Log entry 1124 added for thread 1 sequence 1885 ID 0xe48db805 dest 1: Thu Nov 01 20:32:25 2012 Thread 1 cannot allocate new log, sequence 1887 Private strand flush not complete Current log# 2 seq# 1886 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1887 (LGWR switch) Current log# 3 seq# 1887 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thu Nov 01 20:32:29 2012 Archived Log entry 1125 added for thread 1 sequence 1886 ID 0xe48db805 dest 1: Thu Nov 01 21:13:07 2012 Thread 1 advanced to log sequence 1888 (LGWR switch) Current log# 1 seq# 1888 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thu Nov 01 21:13:08 2012 Archived Log entry 1126 added for thread 1 sequence 1887 ID 0xe48db805 dest 1: Thu Nov 01 22:00:00 2012 Setting Resource Manager plan SCHEDULER[0x3006]:DEFAULT_MAINTENANCE_PLAN via scheduler window Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter Thu Nov 01 22:00:00 2012 Starting background process VKRM Thu Nov 01 22:00:00 2012 VKRM started with pid=32, OS id=4048 Thu Nov 01 22:00:59 2012 Thread 1 cannot allocate new log, sequence 1889 Private strand flush not complete Current log# 1 seq# 1888 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1889 (LGWR switch) Current log# 2 seq# 1889 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thu Nov 01 22:01:03 2012 Archived Log entry 1127 added for thread 1 sequence 1888 ID 0xe48db805 dest 1: Thu Nov 01 22:32:36 2012 Thread 1 advanced to log sequence 1890 (LGWR switch) Current log# 3 seq# 1890 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thu Nov 01 22:32:37 2012 Archived Log entry 1128 added for thread 1 sequence 1889 ID 0xe48db805 dest 1: Thu Nov 01 22:33:18 2012 Errors in file d:\oracle\diag\rdbms\siporex\siporex\trace\siporex_ora_11884.trc (incident=101313): ORA-03137: TTC protocol internal error : [12333] [8] [49] [50] [] [] [] [] Incident details in: d:\oracle\diag\rdbms\siporex\siporex\incident\incdir_101313\siporex_ora_11884_i101313.trc Thu Nov 01 22:33:21 2012 Trace dumping is performing id=[cdmp_20121101223321] Thu Nov 01 22:40:43 2012 Thread 1 cannot allocate new log, sequence 1891 Private strand flush not complete Current log# 3 seq# 1890 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thread 1 advanced to log sequence 1891 (LGWR switch) Current log# 1 seq# 1891 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thu Nov 01 22:40:47 2012 Archived Log entry 1129 added for thread 1 sequence 1890 ID 0xe48db805 dest 1: Thu Nov 01 23:47:30 2012 Thread 1 cannot allocate new log, sequence 1892 Private strand flush not complete Current log# 1 seq# 1891 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1892 (LGWR switch) Current log# 2 seq# 1892 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thu Nov 01 23:47:34 2012 Archived Log entry 1130 added for thread 1 sequence 1891 ID 0xe48db805 dest 1: Fri Nov 02 00:49:31 2012 Thread 1 cannot allocate new log, sequence 1893 Private strand flush not complete Current log# 2 seq# 1892 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1893 (LGWR switch) Current log# 3 seq# 1893 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Fri Nov 02 00:49:35 2012 Archived Log entry 1131 added for thread 1 sequence 1892 ID 0xe48db805 dest 1: Fri Nov 02 01:43:12 2012 Thread 1 cannot allocate new log, sequence 1894 Private strand flush not complete Current log# 3 seq# 1893 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thread 1 advanced to log sequence 1894 (LGWR switch) Current log# 1 seq# 1894 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Fri Nov 02 01:43:17 2012 Archived Log entry 1132 added for thread 1 sequence 1893 ID 0xe48db805 dest 1: Fri Nov 02 01:52:51 2012 Errors in file d:\oracle\diag\rdbms\siporex\siporex\trace\siporex_ora_6124.trc (incident=101273): ORA-03137: TTC protocol internal error : [12333] [4] [80] [82] [] [] [] [] Incident details in: d:\oracle\diag\rdbms\siporex\siporex\incident\incdir_101273\siporex_ora_6124_i101273.trc Fri Nov 02 01:52:54 2012 Trace dumping is performing id=[cdmp_20121102015254] Fri Nov 02 02:00:00 2012 Clearing Resource Manager plan via parameter Fri Nov 02 02:43:37 2012 Thread 1 cannot allocate new log, sequence 1895 Private strand flush not complete Current log# 1 seq# 1894 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1895 (LGWR switch) Current log# 2 seq# 1895 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Fri Nov 02 02:43:41 2012 Archived Log entry 1133 added for thread 1 sequence 1894 ID 0xe48db805 dest 1: Fri Nov 02 04:46:18 2012 Thread 1 cannot allocate new log, sequence 1896 Private strand flush not complete Current log# 2 seq# 1895 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1896 (LGWR switch) Current log# 3 seq# 1896 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Fri Nov 02 04:46:22 2012 Archived Log entry 1134 added for thread 1 sequence 1895 ID 0xe48db805 dest 1: Fri Nov 02 04:51:41 2012 Errors in file d:\oracle\diag\rdbms\siporex\siporex\trace\siporex_ora_4048.trc (incident=101425): ORA-03137: TTC protocol internal error : [12333] [4] [67] [85] [] [] [] [] Incident details in: d:\oracle\diag\rdbms\siporex\siporex\incident\incdir_101425\siporex_ora_4048_i101425.trc Fri Nov 02 04:51:44 2012 Trace dumping is performing id=[cdmp_20121102045144] Fri Nov 02 05:54:44 2012 Thread 1 cannot allocate new log, sequence 1897 Private strand flush not complete Current log# 3 seq# 1896 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thread 1 advanced to log sequence 1897 (LGWR switch) Current log# 1 seq# 1897 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Fri Nov 02 05:54:48 2012 Archived Log entry 1135 added for thread 1 sequence 1896 ID 0xe48db805 dest 1: Fri Nov 02 07:00:34 2012 Thread 1 cannot allocate new log, sequence 1898 Private strand flush not complete Current log# 1 seq# 1897 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1898 (LGWR switch) Current log# 2 seq# 1898 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Fri Nov 02 07:00:38 2012 Archived Log entry 1136 added for thread 1 sequence 1897 ID 0xe48db805 dest 1: Fri Nov 02 08:32:41 2012 Thread 1 cannot allocate new log, sequence 1899 Private strand flush not complete Current log# 2 seq# 1898 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1899 (LGWR switch) Current log# 3 seq# 1899 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Fri Nov 02 08:32:45 2012 Archived Log entry 1137 added for thread 1 sequence 1898 ID 0xe48db805 dest 1: Fri Nov 02 09:48:57 2012 Thread 1 advanced to log sequence 1900 (LGWR switch) Current log# 1 seq# 1900 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Fri Nov 02 09:48:58 2012 Archived Log entry 1138 added for thread 1 sequence 1899 ID 0xe48db805 dest 1: Fri Nov 02 10:18:15 2012 Thread 1 cannot allocate new log, sequence 1901 Private strand flush not complete Current log# 1 seq# 1900 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1901 (LGWR switch) Current log# 2 seq# 1901 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Fri Nov 02 10:18:19 2012 Archived Log entry 1139 added for thread 1 sequence 1900 ID 0xe48db805 dest 1: Fri Nov 02 10:22:58 2012 Thread 1 cannot allocate new log, sequence 1902 Private strand flush not complete Current log# 2 seq# 1901 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Thread 1 advanced to log sequence 1902 (LGWR switch) Current log# 3 seq# 1902 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Fri Nov 02 10:23:02 2012 Archived Log entry 1140 added for thread 1 sequence 1901 ID 0xe48db805 dest 1: Fri Nov 02 10:27:38 2012 Thread 1 cannot allocate new log, sequence 1903 Checkpoint not complete Current log# 3 seq# 1902 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thread 1 cannot allocate new log, sequence 1903 Private strand flush not complete Current log# 3 seq# 1902 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO03.LOG Thread 1 advanced to log sequence 1903 (LGWR switch) Current log# 1 seq# 1903 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Fri Nov 02 10:27:45 2012 Archived Log entry 1141 added for thread 1 sequence 1902 ID 0xe48db805 dest 1: Fri Nov 02 10:32:27 2012 Thread 1 cannot allocate new log, sequence 1904 Checkpoint not complete Current log# 1 seq# 1903 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 cannot allocate new log, sequence 1904 Private strand flush not complete Current log# 1 seq# 1903 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO01.LOG Thread 1 advanced to log sequence 1904 (LGWR switch) Current log# 2 seq# 1904 mem# 0: D:\ORACLE\ORADATA\SIPOREX\REDO02.LOG Fri Nov 02 10:32:34 2012 Archived Log entry 1142 added for thread 1 sequence 1903 ID 0xe48db805 dest 1: Fri Nov 02 10:35:42 2012 Errors in file d:\oracle\diag\rdbms\siporex\siporex\trace\siporex_ora_15856.trc (incident=101353): ORA-03137: TTC protocol internal error : [12333] [8] [49] [50] [] [] [] [] Incident details in: d:\oracle\diag\rdbms\siporex\siporex\incident\incdir_101353\siporex_ora_15856_i101353.trc Fri Nov 02 10:35:44 2012 Trace dumping is performing id=[cdmp_20121102103544] I don't know main reason of this issue as well as how to fixing it. Please help me.

    Read the article

  • Issues dismissing keyboard conditionally

    - by Chris
    I have an app that has a username and password field. I want to validate the input before the the user is allowed to stop editing the field. To do that, I'm using the textFieldShouldEndEditing delegate method. If the input doesn't validate I display a UIAlertView. This approach works as advertised - the user cannot leave the field if the input doesn't validate. To have the done button on the keyboard dismiss the keyboard, I call resignFirstResponder on the textfield. The issue I have is the alert is being called twice. How do I keep the alert from showing twice? edit for clarification What is happening is that the alert appears, then another alert appears. I then have to dismiss both windows to fix the input. Here is the textFieldShouldEndEditing method -(BOOL)textFieldShouldEndEditing:(UITextField *)textField { NSLog(@"function called %@",textField); if([textField.text length] == 0) { return YES; } if(textField == userName) { if([self userNameValidated:textField.text]) { NSLog(@"name validated"); NSString *tempDonerName = [[NSString alloc] initWithString:(@"%@",userName.text)]; //[[NSUserDefaults standardUserDefaults] setObject:tempDonerName forKey:@"name"]; [tempDonerName release]; return YES; } else { NSLog(@"name did not validate"); UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid Username",@"Invalid Username title") message:NSLocalizedString(@"Please make sure there are no apostrophes,spaces in the username, and that the username is less than 12 characters",@"Invalid username message") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK",@"OK Text") otherButtonTitles:nil]; [alert show]; [alert release]; return NO; } } else if (textField == userPin) { if([self userPinValidated:textField.text]) { NSLog(@"pin validated"); //NSString *tempDonerPin = [[NSString alloc] initWithString:(@"%@",userPin.text)]; //[[NSUserDefaults standardUserDefaults] setObject:tempDonerPin forKey:@"pin"]; //[tempDonerPin release]; return YES; } else { NSLog(@"pin did not validate"); UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid Password",@"Invalid Pin title") message:NSLocalizedString(@"Please make sure there are no apostrophes in the password",@"Invalid password message") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK",@"OK Text") otherButtonTitles:nil]; [alert show]; [alert release]; return NO; } }else { NSLog(@"code validate - shouldn't get called"); return YES; } }

    Read the article

  • How to create nested directories in PhoneGap

    - by Stallman
    I have tried on this, but this didn't satisfy my request at all. I write a new one: var file_system; var fs_root; window.requestFileSystem(LocalFileSystem.PERSISTENT, 1024*1024, onInitFs, request_FS_fail); function onInitFs(fs) { file_system= fs; fs_root= file_system.root; alert("ini fs"); create_Directory(); alert("ini fs done."); } var string_array; var main_dir= "story_repository/"+ User_Editime; string_array= new Array("story_repository/",main_dir, main_dir+"/rec", main_dir+"/img","story_repository/"+ User_Name ); function create_Directory(){ var start= 0; var path=""; while(start < string_array.length) { path = string_array[start]; alert(start+" th created directory " +" is "+ path); fs_root.getDirectory ( path , {create: true, exclusive: false}, function(entry) { alert(path +"is created."); }, create_dir_err() ); start++; }//while loop }//create_Directory function create_dir_err() { alert("Recursively create directories error."); } function request_FS_fail() { alert("Failed to request File System "); } Although the directories are created, the it sends me ErrorCallback:"alert("Recursively create directories error.");" Firstly, I don't think this code will work since I have tried on this: This one failed: window.requestFileSystem( LocalFileSystem.PERSISTENT, 0, //request file system success callback. function(fileSys) { fileSys.root.getDirectory( "story_repository/"+ dir_name, {create: true, exclusive: false}, //Create directory story_repository/Stallman_time. function(directory) { alert("Create directory: "+ "story_repository/"+ dir_name); //create dir_name/img/ fileSys.root.getDirectory { "story_repository/"+ dir_name + "/img/", {create: true, exclusive: false}, function(directory) { alert("Create a directory: "+ "story_repository/"+ dir_name + "/img/"); //check. //create dir_name/rec/ fileSys.root.getDirectory { "story_repository/"+ dir_name + "/rec/", {create: true, exclusive: false}, function(directory) { alert("Create a directory: "+ "story_repository/"+ dir_name + "/rec/"); //check. //Go ahead. }, createError } //create dir_name/rec/ }, createError } //create dir_name/img }, createError); }, //Create directory story_repository/Stallman_time. createError()); } I just repeatedly call fs.root.getDirectory only but it failed. But the first one is almost the same... 1. What is the problem at all? Why does the first one always gives me the ErrorCallback? 2. Why can't the second one work? 3. Does anyone has a better solution?(no ErrorcallBack msg) ps: I work on Android and PhoneGap 1.7.0.

    Read the article

  • Using a variable name in XMLHttpRequest

    - by Paul
    Hi All, I am using jQuery and trying to load a variable in place of a named xml file. My Code: $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#theForm').ajaxForm(function(responseXML2) { var myxml = responseXML2; alert(responseXML2); displayResult(); }); }); function loadXMLDoc(dname) { if (window.XMLHttpRequest) { alert("loading xmlhttprequest"); xhttp=new XMLHttpRequest(); } else { alert("loading activeX"); xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } alert("bottom load"); xhttp.open("GET",dname,false); xhttp.send(); return xhttp.responseXML; } function displayResult() { alert("setting vars"); alert("displayResult called"); //xml=loadXMLDoc(responseXML2); //tried this and the line below, among others xml=responseXML2; alert("xmlDocLoaded"); xsl=loadXMLDoc("xslt-test.xsl"); alert("XSLloaded"); // code for IE if (window.ActiveXObject) { alert("IE"); ex=xml.transformNode(xsl); document.getElementById("ieiresponse").innerHTML=ex; } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { alert("notIE"); xsltProcessor=new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); resultDocument = xsltProcessor.transformToFragment(xml,document); document.getElementById("ieiresponse").appendChild(resultDocument); } } In the code above I want to have: //xml=loadXMLDoc(responseXML2); //tried this and the line below, among others xml=responseXML2; instead of a named file: xsl=loadXMLDoc("example.xml"); When I run through the code, it works if I name the file, but when I use the variable, (which does show up in alerts, so is being pulled), it stops the code at the above line (placing the variable as the xml file) Any help would be much appreciated! Thank you in advance.

    Read the article

  • Set iPhone Style Location Based Alerts On Your Android Device With Google Now

    - by Gopinath
    Location based alerts of iPhone are very useful. You can set an alert to popup as soon as you reach a specific location like “Pickup milk and eggs” when I’m near a grocery store. This feature was missing in Android for a long time, but last week at Google I/O conference Google released an update to Google Now which supports location based alerts. To setup a location based alert 1. Launch Google Now 2. Type or say add reminder 3. By default it shows time based alert interface, switch it location based by touching Location icon 4. Set reminder text, choose a location and touch Set reminder 5. Your alert is set now and as soon as you are close by the specified location, you’ll see an alert on your device. This is a nice feature and I’m using it quite often for the past couple of days.  There are couple of things missing from the current version of Google Now location based alerts– recurring alerts and ability to set alerts on leaving a specific location. It is not possible to recur location based alerts. You will be alerted only once as soon as you reach the location and it is not possible to repeat the alert next time you visit the location. Lets say you want to be reminded to say hi to friend’s parents whenever you are travelling close by their home. It does not work. The second missing feature is something basic and some how Google did not incorporate in their first iteration. Lets say you are at office now and you want to set up alert to pickup flowers when you leave office. Sounds like a simple use case for location based alerts right? But there is no way to set this type of alerts. Google Now alerts you as soon as you reach a location, but not when you leave a location. Do you have an Android that supports Google Now? If so what are your thoughts on location based alerts?

    Read the article

  • UIAlertView -show causing a memory leak

    - by Erik
    I'm relatively new to iPhone Development, so this may be my fault, but it goes against what I've seen. :) I think that I'm creating a UIAlertView that lives just in this vaccuum of the 'if' statement. NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; if(!data) { // Add an alert UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Unable to contact server" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; NSLog(@"retain count before show: %i", alert.retainCount); [alert show]; NSLog(@"retain count before release: %i", alert.retainCount); [alert release]; NSLog(@"retain count after release: %i", alert.retainCount); return nil; } However, the console logs baffle me. retain count before show: 1 retain count before release: 6 retain count after release: 5 I've tried also adding: alert = nil; after the release. That makes the retain count 0, but I still show a leak. And if it helps, the leak's Responsible Frame is UIKeyboardInputManagerClassForInputMode. I'm also using OS 4 Beta 3. So anyone have any ideas how a local UIAlertView's retain count would increment itself by 5 when calling -show? Thanks for your help!

    Read the article

  • NSData-AES Class Encryption/Decryption in Cocoa

    - by David Schiefer
    hi, I am attempting to encrypt/decrypt a plain text file in my text editor. encrypting seems to work fine, but the decrypting does not work, the text comes up encrypted. I am certain i've decrypted the text using the word i encrypted it with - could someone look through the snippet below and help me out? Thanks :) Encrypting: NSAlert *alert = [NSAlert alertWithMessageText:@"Encryption" defaultButton:@"Set" alternateButton:@"Cancel" otherButton:nil informativeTextWithFormat:@"Please enter a password to encrypt your file with:"]; [alert setIcon:[NSImage imageNamed:@"License.png"]]; NSSecureTextField *input = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)]; [alert setAccessoryView:input]; NSInteger button = [alert runModal]; if (button == NSAlertDefaultReturn) { [[NSUserDefaults standardUserDefaults] setObject:[input stringValue] forKey:@"password"]; NSData *data; [self setString:[textView textStorage]]; NSMutableDictionary *dict = [NSDictionary dictionaryWithObject:NSPlainTextDocumentType forKey:NSDocumentTypeDocumentAttribute]; [textView breakUndoCoalescing]; data = [[self string] dataFromRange:NSMakeRange(0, [[self string] length]) documentAttributes:dict error:outError]; NSData*encrypt = [data AESEncryptWithPassphrase:[input stringValue]]; [encrypt writeToFile:[absoluteURL path] atomically:YES]; Decrypting: NSAlert *alert = [NSAlert alertWithMessageText:@"Decryption" defaultButton:@"Open" alternateButton:@"Cancel" otherButton:nil informativeTextWithFormat:@"This file has been protected with a password.To view its contents,enter the password below:"]; [alert setIcon:[NSImage imageNamed:@"License.png"]]; NSSecureTextField *input = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)]; [alert setAccessoryView:input]; NSInteger button = [alert runModal]; if (button == NSAlertDefaultReturn) { NSLog(@"Entered Password - attempting to decrypt."); NSMutableDictionary *dict = [NSDictionary dictionaryWithObject:NSPlainTextDocumentType forKey:NSDocumentTypeDocumentOption]; NSData*decrypted = [[NSData dataWithContentsOfFile:[self fileName]] AESDecryptWithPassphrase:[input stringValue]]; mString = [[NSAttributedString alloc] initWithData:decrypted options:dict documentAttributes:NULL error:outError];

    Read the article

  • Asp.net MVC jQuery Ajax calls to JsonResult return no data

    - by Maslow
    I have this script loaded on a page: (function() { window.alert('bookmarklet started'); function AjaxSuccess(data, textStatus, xmlHttpRequest) { if (typeof (data) == 'undefined') { return alert('Data is undefined'); } alert('ajax success' + (data || ': no data')); } function AjaxError(xmlHttpRequest, textStatus, errorThrown) { alert('ajax failure:' + textStatus); } /*imaginarydevelopment.com/Sfc*/ var destination = { url: 'http://localhost:3041/Bookmarklet/SaveHtml', type: 'POST', success: AjaxSuccess, error: AjaxError, dataType: 'text',contentType: 'application/x-www-form-urlencoded' }; if (typeof (jQuery) == 'undefined') { return alert('jQuery not defined'); } if (typeof ($jq) == 'undefined') { if (typeof ($) != 'undefined') { $jq = $; } else { return alert('$jq->jquerify not defined'); } } if ($jq('body').length <= 0) { return alert('Could not query body length'); } if ($jq('head title:contains(BookmarkletTest)').length > 0) { alert('doing test'); destination.data = { data: 'BookmarkletTestAjax' }; $jq.ajax(destination); return; } })(); when it is run locally in VS2008's cassini the ajax success shows the returned string from Asp.net MVC, when it is run remotely the ajax success data is null. Here's the controller method that is firing both locally and when run remotely: [AcceptVerbs(HttpVerbs.Post | HttpVerbs.Get)] public string SaveHtml(string data) { var path = getPath(Server.MapPath); System.IO.File.WriteAllText(path,data); Console.WriteLine("SaveHtml called"); Debug.WriteLine("SaveHtml called"); //return Json(new { result = "SaveHtml Success" }); return "SaveHtml Success"; } Once i have it working I was going to remove the GET, but currently accessing the SaveHtml method directly from the webbrowser produces the expected results when testing. So there's something wrong in my javascript I believe, because when I step through there with chrome's developer tools, I see the data is null, and the xmlHttpRequest doesn't appear to have the expected result in it anywhere either. I'm loading jquery via http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js

    Read the article

  • Problem with function calls [javascript]

    - by Samuel
    <script language="javascript"> function toggle(id) { alert('call'); if (document.getElementById(id).style.display == "none") { alert('now visible'); document.getElementById(id).style.display = ""; } else { alert('now invisible'); document.getElementById(id).style.display = "none"; } } </script> </head> <body onload="toggle('image1');alert('test_body');toggle('image2')"> <script language="javascript"> alert('test_pre_function'); toggle('image1'); alert('test_after_function'); toggle('image2'); </script> Looks like a lot of code but it's pretty simple so i think most of you won't have troubles with it. toggle() should toggle the display status of divs containing images. When the user enters the site the divs should hide, when everything is loaded the divs should show up. (onload) Strangely enough, the funtion in the body (not in the body tag) only work half, i get and alert 'test_pre_function' and i get an alert 'call' (out of the function), but that's it. The code in the body tag runs just fine. I find this weird because it's supposed to do exactly the same twice and one time it runs, another time not, so i guess i must have made some stupid mistake. Thanks for any help!

    Read the article

  • Alert visualization recipe: Get out your blender, drop in some sp_send_dbmail, Google Charts API, add your favorite colors and sprinkle with html. Blend till it’s smooth and looks pretty enough to taste.

    - by Maria Zakourdaev
      I really like database monitoring. My email inbox have a constant flow of different types of alerts coming from our production servers with all kinds of information, sometimes more useful and sometimes less useful. Usually database alerts look really simple, it’s usually a plain text email saying “Prod1 Database data file on Server X is 80% used. You’d better grow it manually before some query triggers the AutoGrowth process”. Imagine you could have received email like the one below.  In addition to the alert description it could have also included the the database file growth chart over the past 6 months. Wouldn’t it give you much more information whether the data growth is natural or extreme? That’s truly what data visualization is for. Believe it or not, I have sent the graph below from SQL Server stored procedure without buying any additional data monitoring/visualization tool.   Would you like to visualize your database alerts like I do? Then like myself, you’d love the Google Charts. All you need to know is a little HTML and have a mail profile configured on your SQL Server instance regardless of the SQL Server version. First of all, I hope you know that the sp_send_dbmail procedure has a great parameter @body_format = ‘HTML’, which allows us to send rich and colorful messages instead of boring black and white ones. All that we need is to dynamically create HTML code. This is how, for instance, you can create a table and populate it with some data: DECLARE @html varchar(max) SET @html = '<html>' + '<H3><font id="Text" style='color: Green;'>Top Databases: </H3>' + '<table border="1" bordercolor="#3300FF" style='background-color:#DDF8CC' width='70%' cellpadding='3' cellspacing='3'>' + '<tr><font color="Green"><th>Database Name</th><th>Size</th><th>Physical Name</th></tr>' + CAST( (SELECT TOP 10                             td = name,'',                             td = size * 8/1024 ,'',                             td = physical_name              FROM sys.master_files               ORDER BY size DESC             FOR XML PATH ('tr'),TYPE ) AS VARCHAR(MAX)) + '</table>' EXEC msdb.dbo.sp_send_dbmail @recipients = '[email protected]', @subject ='Top databases', @body = @html, @body_format = 'HTML' This is the result:   If you want to add more visualization effects, you can use Google Charts Tools https://google-developers.appspot.com/chart/interactive/docs/index which is a free and rich library of data visualization charts, they’re also easy to populate and embed. There are two versions of the Google Charts Image based charts: https://google-developers.appspot.com/chart/image/docs/gallery/chart_gall This is an old version, it’s officially deprecated although it will be up for a next few years or so. I really enjoy using this one because it can be viewed within the email body. For mobile devices you need to change the “Load remote images” property in your email application configuration.           Charts based on JavaScript classes: https://google-developers.appspot.com/chart/interactive/docs/gallery This API is newer, with rich and highly interactive charts, and it’s much more easier to understand and configure. The only downside of it is that they cannot be viewed within the email body. Outlook, Gmail and many other email clients, as part of their security policy, do not run any JavaScript that’s placed within the email body. However, you can still enjoy this API by sending the report as an email attachment. Here is an example of the old version of Google Charts API, sending the same top databases report as in the previous example but instead of a simple table, this script is using a pie chart right from  the T-SQL code DECLARE @html  varchar(8000) DECLARE @Series  varchar(800),@Labels  varchar(8000),@Legend  varchar(8000);     SET @Series = ''; SET @Labels = ''; SET @Legend = ''; SELECT TOP 5 @Series = @Series + CAST(size * 8/1024 as varchar) + ',',                         @Labels = @Labels +CAST(size * 8/1024 as varchar) + 'MB'+'|',                         @Legend = @Legend + name + '|' FROM sys.master_files ORDER BY size DESC SELECT @Series = SUBSTRING(@Series,1,LEN(@Series)-1),         @Labels = SUBSTRING(@Labels,1,LEN(@Labels)-1),         @Legend = SUBSTRING(@Legend,1,LEN(@Legend)-1) SET @html =   '<H3><font color="Green"> '+@@ServerName+' top 5 databases : </H3>'+    '<br>'+    '<img src="http://chart.apis.google.com/chart?'+    'chf=bg,s,DDF8CC&'+    'cht=p&'+    'chs=400x200&'+    'chco=3072F3|7777CC|FF9900|FF0000|4A8C26&'+    'chd=t:'+@Series+'&'+    'chl='+@Labels+'&'+    'chma=0,0,0,0&'+    'chdl='+@Legend+'&'+    'chdlp=b"'+    'alt="'+@@ServerName+' top 5 databases" />'              EXEC msdb.dbo.sp_send_dbmail @recipients = '[email protected]',                             @subject = 'Top databases',                             @body = @html,                             @body_format = 'HTML' This is what you get. Isn’t it great? Chart parameters reference: chf     Gradient fill  bg - backgroud ; s- solid cht     chart type  ( p - pie) chs        chart size width/height chco    series colors chd        chart data string        1,2,3,2 chl        pir chart labels        a|b|c|d chma    chart margins chdl    chart legend            a|b|c|d chdlp    chart legend text        b - bottom of chart   Line graph implementation is also really easy and powerful DECLARE @html varchar(max) DECLARE @Series varchar(max) DECLARE @HourList varchar(max) SET @Series = ''; SET @HourList = ''; SELECT @HourList = @HourList + SUBSTRING(CONVERT(varchar(13),last_execution_time,121), 12,2)  + '|' ,              @Series = @Series + CAST( COUNT(1) as varchar) + ',' FROM sys.dm_exec_query_stats s     CROSS APPLY sys.dm_exec_sql_text(plan_handle) t WHERE last_execution_time > = getdate()-1 GROUP BY CONVERT(varchar(13),last_execution_time,121) ORDER BY CONVERT(varchar(13),last_execution_time,121) SET @Series = SUBSTRING(@Series,1,LEN(@Series)-1) SET @html = '<img src="http://chart.apis.google.com/chart?'+ 'chco=CA3D05,87CEEB&'+ 'chd=t:'+@Series+'&'+ 'chds=1,350&'+ 'chdl= Proc executions from cache&'+ 'chf=bg,s,1F1D1D|c,lg,0,363433,1.0,2E2B2A,0.0&'+ 'chg=25.0,25.0,3,2&'+ 'chls=3|3&'+ 'chm=d,CA3D05,0,-1,12,0|d,FFFFFF,0,-1,8,0|d,87CEEB,1,-1,12,0|d,FFFFFF,1,-1,8,0&'+ 'chs=600x450&'+ 'cht=lc&'+ 'chts=FFFFFF,14&'+ 'chtt=Executions for from' +(SELECT CONVERT(varchar(16),min(last_execution_time),121)          FROM sys.dm_exec_query_stats          WHERE last_execution_time > = getdate()-1) +' till '+ +(SELECT CONVERT(varchar(16),max(last_execution_time),121)     FROM sys.dm_exec_query_stats) + '&'+ 'chxp=1,50.0|4,50.0&'+ 'chxs=0,FFFFFF,12,0|1,FFFFFF,12,0|2,FFFFFF,12,0|3,FFFFFF,12,0|4,FFFFFF,14,0&'+ 'chxt=y,y,x,x,x&'+ 'chxl=0:|1|350|1:|N|2:|'+@HourList+'3:|Hour&'+ 'chma=55,120,0,0" alt="" />' EXEC msdb.dbo.sp_send_dbmail @recipients = '[email protected]', @subject ='Daily number of executions', @body = @html, @body_format = 'HTML' Chart parameters reference: chco    series colors chd        series data chds    scale format chdl    chart legend chf        background fills chg        grid line chls    line style chm        line fill chs        chart size cht        chart type chts    chart style chtt    chart title chxp    axis label positions chxs    axis label styles chxt    axis tick mark styles chxl    axis labels chma    chart margins If you don’t mind to get your charts as an email attachment, you can enjoy the Java based Google Charts which are even easier to configure, and have much more advanced graphics. In the example below, the sp_send_email procedure uses the parameter @query which will be executed at the time that sp_send_dbemail is executed and the HTML result of this execution will be attached to the email. DECLARE @html varchar(max),@query varchar(max) DECLARE @SeriesDBusers  varchar(800);     SET @SeriesDBusers = ''; SELECT @SeriesDBusers = @SeriesDBusers +  ' ["'+DB_NAME(r.database_id) +'", ' +cast(count(1) as varchar)+'],' FROM sys.dm_exec_requests r GROUP BY DB_NAME(database_id) ORDER BY count(1) desc; SET @SeriesDBusers = SUBSTRING(@SeriesDBusers,1,LEN(@SeriesDBusers)-1) SET @query = ' PRINT '' <html>   <head>     <script type="text/javascript" src="https://www.google.com/jsapi"></script>     <script type="text/javascript">       google.load("visualization", "1", {packages:["corechart"]});        google.setOnLoadCallback(drawChart);       function drawChart() {                      var data = google.visualization.arrayToDataTable([                        ["Database Name", "Active users"],                        '+@SeriesDBusers+'                      ]);                        var options = {                        title: "Active users",                        pieSliceText: "value"                      };                        var chart = new google.visualization.PieChart(document.getElementById("chart_div"));                      chart.draw(data, options);       };     </script>   </head>   <body>     <table>     <tr><td>         <div id="chart_div" style='width: 800px; height: 300px;'></div>         </td></tr>     </table>   </body> </html> ''' EXEC msdb.dbo.sp_send_dbmail    @recipients = '[email protected]',    @subject ='Active users',    @body = @html,    @body_format = 'HTML',    @query = @Query,     @attach_query_result_as_file = 1,     @query_attachment_filename = 'Results.htm' After opening the email attachment in the browser you are getting this kind of report: In fact, the above is not only for database alerts. It can be used for applicative reports if you need high levels of customization that you cannot achieve using standard methods like SSRS. If you need more information on how to customize the charts, you can try the following: Image Based Charts wizard https://google-developers.appspot.com/chart/image/docs/chart_wizard  Live Image Charts Playground https://google-developers.appspot.com/chart/image/docs/chart_playground Image Based Charts Parameters List https://google-developers.appspot.com/chart/image/docs/chart_params Java Script Charts Playground https://code.google.com/apis/ajax/playground/?type=visualization Use the above examples as a starting point for your procedures and I’d be more than happy to hear of your implementations of the above techniques. Yours, Maria

    Read the article

  • Penetration testing with Nikto, unknown results found

    - by heldrida
    I've scanned my new webserver and I'm surprised to find that in the results there's programs that I never installed. This is a fresh new install of Ubuntu 12.04 and just installed Php 5.3, mysql, fail2ban, apache2, git, a few other things. Not sure if related, but I've got Wordpress installed but this doesn't have anything to do with myphpnuke does it? I'd like to understand why am I getting this results ? + OSVDB-27071: /phpimageview.php?pic=javascript:alert(8754): PHP Image View 1.0 is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. + OSVDB-3931: /myphpnuke/links.php?op=search&query=[script]alert('Vulnerable);[/script]?query=: myphpnuke is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. + OSVDB-3931: /myphpnuke/links.php?op=MostPopular&ratenum=[script]alert(document.cookie);[/script]&ratetype=percent: myphpnuke is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. + /modules.php?op=modload&name=FAQ&file=index&myfaq=yes&id_cat=1&categories=%3Cimg%20src=javascript:alert(9456);%3E&parent_id=0: Post Nuke 0.7.2.3-Phoenix is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. + /modules.php?letter=%22%3E%3Cimg%20src=javascript:alert(document.cookie);%3E&op=modload&name=Members_List&file=index: Post Nuke 0.7.2.3-Phoenix is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. + OSVDB-4598: /members.asp?SF=%22;}alert('Vulnerable');function%20x(){v%20=%22: Web Wiz Forums ver. 7.01 and below is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. + OSVDB-2946: /forum_members.asp?find=%22;}alert(9823);function%20x(){v%20=%22: Web Wiz Forums ver. 7.01 and below is vulnerable to Cross Site Scripting (XSS). http://www.cert.org/advisories/CA-2000-02.html. Thanks for looking!

    Read the article

  • Apache fails to start after WHM easyapache update

    - by Vigrond
    Tryin to get some light shed on this issue Running CentOS I upgraded Apache using easyapache to 2.2 All was well I then used WHM to update Mysql to 5.5 This succeeded but now Apache will not start. The error log was reporting things like [Sun Apr 15 00:44:57 2012] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Sun Apr 15 02:27:30 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec) [Sun Apr 15 02:27:30 2012] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sun Apr 15 02:27:30 2012] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Sun Apr 15 02:27:30 2012] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Sun Apr 15 02:27:30 2012] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Sun Apr 15 02:27:30 2012] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Sun Apr 15 02:27:30 2012] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Sun Apr 15 02:27:30 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 configured -- resuming normal operations [Sun Apr 15 02:27:30 2012] [alert] Child 4063 returned a Fatal error... Apache is exiting! So I tried to recompile using easyapache again, but easyapache just hangs I tried with base php settings - and it always gets stuck on "bf804000-bf819000 rw-p 7ffffffe9000 00:00 0 [stack]" At this point in cpanel the status says "create srm.conf and access.conf for mod_frontpage" I have tried things like rpm --rebuilddb yum clean all yum update with no luck. I'm kind of running out of ideas, and wondering if anyone could point me to the right direction.

    Read the article

  • How to get selected item of a singlechoice Alert Dialog?

    - by Pentium10
    I have this code to show a dialog with singlechoice(radio) options. AlertDialog ad = new AlertDialog.Builder(this) .setCancelable(false) .setIcon(R.drawable.alert_dialog_icon) .setTitle(R.string.choose_one) .setSingleChoiceItems(seq, pos,null) .setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() { public void onClick( DialogInterface dialog, int whichButton) { // dialog dismissed } }).create(); How do I get the choice that has been selected?

    Read the article

  • How can I script an alert for when my Amazon Web Service usage goes above a certain amount?

    - by frabcus
    We're using S3, SimpleDB and SQS on quite a complicated project. I'd like to be able to automatically track their usage, to be sure we don't suddenly spend large amounts of money when we didn't intend to (perhaps because of a bug). Is there a way of reading the usage figures of all Amazon Web Services and/or the current real time dollar cost of an account from a script? Or any service or script which provides alerts based on that?

    Read the article

  • Alert on moving to a different page of a grid when user changes contents of textboxes in a Grid

    - by Ashish Gupta
    In a ASP.NET application I have a paging RadGrid which shows up textbox in each row. Outside the grid, there is an OK button to save the content of all the textbox. If user changes text in any one or more of the textbox and without clicking on the "OK" button, tries to move to a different page number (of the grid by clicking on the page number), he should be prompted for confirmation of save or cancel the changes. I am guessing that one can write a Javascript function which would look for any form input control (textbox in my case) and detect changes and If there are changes, would prompt the user. However, I am not sure where I can call this function from? Any suggestion on this or a better way to achieve this would be appreciated. I am using RadGrid but I guess this should be applicable to GridView as well.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >