Search Results

Search found 133 results on 6 pages for 'kartik patel'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • SQL SERVER – Solution to Puzzle – Simulate LEAD() and LAG() without Using SQL Server 2012 Analytic Function

    - by pinaldave
    Earlier I wrote a series on SQL Server Analytic Functions of SQL Server 2012. During the series to keep the learning maximum and having fun, we had few puzzles. One of the puzzle was simulating LEAD() and LAG() without using SQL Server 2012 Analytic Function. Please read the puzzle here first before reading the solution : Write T-SQL Self Join Without Using LEAD and LAG. When I was originally wrote the puzzle I had done small blunder and the question was a bit confusing which I corrected later on but wrote a follow up blog post on over here where I describe the give-away. Quick Recap: Generate following results without using SQL Server 2012 analytic functions. I had received so many valid answers. Some answers were similar to other and some were very innovative. Some answers were very adaptive and some did not work when I changed where condition. After selecting all the valid answer, I put them in table and ran RANDOM function on the same and selected winners. Here are the valid answers. No Joins and No Analytic Functions Excellent Solution by Geri Reshef – Winner of SQL Server Interview Questions and Answers (India | USA) WITH T1 AS (SELECT Row_Number() OVER(ORDER BY SalesOrderDetailID) N, s.SalesOrderID, s.SalesOrderDetailID, s.OrderQty FROM Sales.SalesOrderDetail s WHERE SalesOrderID IN (43670, 43669, 43667, 43663)) SELECT SalesOrderID,SalesOrderDetailID,OrderQty, CASE WHEN N%2=1 THEN MAX(CASE WHEN N%2=0 THEN SalesOrderDetailID END) OVER (Partition BY (N+1)/2) ELSE MAX(CASE WHEN N%2=1 THEN SalesOrderDetailID END) OVER (Partition BY N/2) END LeadVal, CASE WHEN N%2=1 THEN MAX(CASE WHEN N%2=0 THEN SalesOrderDetailID END) OVER (Partition BY N/2) ELSE MAX(CASE WHEN N%2=1 THEN SalesOrderDetailID END) OVER (Partition BY (N+1)/2) END LagVal FROM T1 ORDER BY SalesOrderID, SalesOrderDetailID, OrderQty; GO No Analytic Function and Early Bird Excellent Solution by DHall – Winner of Pluralsight 30 days Subscription -- a query to emulate LEAD() and LAG() ;WITH s AS ( SELECT 1 AS ldOffset, -- equiv to 2nd param of LEAD 1 AS lgOffset, -- equiv to 2nd param of LAG NULL AS ldDefVal, -- equiv to 3rd param of LEAD NULL AS lgDefVal, -- equiv to 3rd param of LAG ROW_NUMBER() OVER (ORDER BY SalesOrderDetailID) AS row, SalesOrderID, SalesOrderDetailID, OrderQty FROM Sales.SalesOrderDetail WHERE SalesOrderID IN (43670, 43669, 43667, 43663) ) SELECT s.SalesOrderID, s.SalesOrderDetailID, s.OrderQty, ISNULL( sLd.SalesOrderDetailID, s.ldDefVal) AS LeadValue, ISNULL( sLg.SalesOrderDetailID, s.lgDefVal) AS LagValue FROM s LEFT OUTER JOIN s AS sLd ON s.row = sLd.row - s.ldOffset LEFT OUTER JOIN s AS sLg ON s.row = sLg.row + s.lgOffset ORDER BY s.SalesOrderID, s.SalesOrderDetailID, s.OrderQty No Analytic Function and Partition By Excellent Solution by DHall – Winner of Pluralsight 30 days Subscription /* a query to emulate LEAD() and LAG() */ ;WITH s AS ( SELECT 1 AS LeadOffset, /* equiv to 2nd param of LEAD */ 1 AS LagOffset, /* equiv to 2nd param of LAG */ NULL AS LeadDefVal, /* equiv to 3rd param of LEAD */ NULL AS LagDefVal, /* equiv to 3rd param of LAG */ /* Try changing the values of the 4 integer values above to see their effect on the results */ /* The values given above of 0, 0, null and null behave the same as the default 2nd and 3rd parameters to LEAD() and LAG() */ ROW_NUMBER() OVER (ORDER BY SalesOrderDetailID) AS row, SalesOrderID, SalesOrderDetailID, OrderQty FROM Sales.SalesOrderDetail WHERE SalesOrderID IN (43670, 43669, 43667, 43663) ) SELECT s.SalesOrderID, s.SalesOrderDetailID, s.OrderQty, ISNULL( sLead.SalesOrderDetailID, s.LeadDefVal) AS LeadValue, ISNULL( sLag.SalesOrderDetailID, s.LagDefVal) AS LagValue FROM s LEFT OUTER JOIN s AS sLead ON s.row = sLead.row - s.LeadOffset /* Try commenting out this next line when LeadOffset != 0 */ AND s.SalesOrderID = sLead.SalesOrderID /* The additional join criteria on SalesOrderID above is equivalent to PARTITION BY SalesOrderID in the OVER clause of the LEAD() function */ LEFT OUTER JOIN s AS sLag ON s.row = sLag.row + s.LagOffset /* Try commenting out this next line when LagOffset != 0 */ AND s.SalesOrderID = sLag.SalesOrderID /* The additional join criteria on SalesOrderID above is equivalent to PARTITION BY SalesOrderID in the OVER clause of the LAG() function */ ORDER BY s.SalesOrderID, s.SalesOrderDetailID, s.OrderQty No Analytic Function and CTE Usage Excellent Solution by Pravin Patel - Winner of SQL Server Interview Questions and Answers (India | USA) --CTE based solution ; WITH cteMain AS ( SELECT SalesOrderID, SalesOrderDetailID, OrderQty, ROW_NUMBER() OVER (ORDER BY SalesOrderDetailID) AS sn FROM Sales.SalesOrderDetail WHERE SalesOrderID IN (43670, 43669, 43667, 43663) ) SELECT m.SalesOrderID, m.SalesOrderDetailID, m.OrderQty, sLead.SalesOrderDetailID AS leadvalue, sLeg.SalesOrderDetailID AS leagvalue FROM cteMain AS m LEFT OUTER JOIN cteMain AS sLead ON sLead.sn = m.sn+1 LEFT OUTER JOIN cteMain AS sLeg ON sLeg.sn = m.sn-1 ORDER BY m.SalesOrderID, m.SalesOrderDetailID, m.OrderQty No Analytic Function and Co-Related Subquery Usage Excellent Solution by Pravin Patel – Winner of SQL Server Interview Questions and Answers (India | USA) -- Co-Related subquery SELECT m.SalesOrderID, m.SalesOrderDetailID, m.OrderQty, ( SELECT MIN(SalesOrderDetailID) FROM Sales.SalesOrderDetail AS l WHERE l.SalesOrderID IN (43670, 43669, 43667, 43663) AND l.SalesOrderID >= m.SalesOrderID AND l.SalesOrderDetailID > m.SalesOrderDetailID ) AS lead, ( SELECT MAX(SalesOrderDetailID) FROM Sales.SalesOrderDetail AS l WHERE l.SalesOrderID IN (43670, 43669, 43667, 43663) AND l.SalesOrderID <= m.SalesOrderID AND l.SalesOrderDetailID < m.SalesOrderDetailID ) AS leag FROM Sales.SalesOrderDetail AS m WHERE m.SalesOrderID IN (43670, 43669, 43667, 43663) ORDER BY m.SalesOrderID, m.SalesOrderDetailID, m.OrderQty This was one of the most interesting Puzzle on this blog. Giveaway Winners will get following giveaways. Geri Reshef and Pravin Patel SQL Server Interview Questions and Answers (India | USA) DHall Pluralsight 30 days Subscription Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, Readers Contribution, Readers Question, SQL, SQL Authority, SQL Function, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • command binding for ribbon control

    - by kartik
    I'm trying to use the Microsoft ribbon control programatically using C#. Everything is fine but I'm unable to bind the command through the RibbonCommand. Can anyone give me an example of how to do this? My actual code is: Ribbon rbn = new Ribbon(); RibbonTab file = new RibbonTab(); file.Name = "file"; file.Label = "FILE"; RibbonTab edit = new RibbonTab(); edit.Name = "edit"; edit.Label = "Edit"; RibbonGroupPanel rbgp = new RibbonGroupPanel(); RibbonGroup rbg = new RibbonGroup(); RibbonButton rbtn = new RibbonButton(); rbtn.Content = "New"; RibbonCommand rcomnd = new RibbonCommand(); rcomnd.LabelTitle = "NEW"; rcomnd.ToolTipDescription = "THIS IS NEW"; rcomnd.LargeImageSource = imgSource; rcomnd.Execute(rbtn, rbtn); rbtn.IsEnabled = true; //rcomnd.SmallImageSource = imgSource; rcomnd.CanExecute +=new CanExecuteRoutedEventHandler(rcomnd_CanExecute); rcomnd.Executed +=new ExecutedRoutedEventHandler(rcomnd_Executed); CommandBinding cmdb = new CommandBinding(ApplicationCommands.New); cmdb.Command = ApplicationCommands.New; cmdb.Executed +=new ExecutedRoutedEventHandler(cmdb_Executed); CommandBind.Add(cmdb); //rcomnd.Executed += new ExecutedRoutedEventHandler(OnAddNewEntry);*/ rbtn.Click +=new System.Windows.RoutedEventHandler(rbtn_Click); rbtn.Command = rcomnd; But the bindings are not working and the button is not enabled.

    Read the article

  • Stop event bubbling in Javascript

    - by Kartik Rao
    I have a html structure like : <div onmouseover="enable_dropdown(1);" onmouseout="disable_dropdown(1);"> My Groups <a href="#">(view all)</a> <ul> <li><strong>Group Name 1</strong></li> <li><strong>Longer Group Name 2</strong></li> <li><strong>Longer Group Name 3</strong></li> </ul> <hr /> Featured Groups <a href="#">(view all)</a> <ul> <li><strong>Group Name 1</strong></li> <li><strong>Longer Group Name 2</strong></li> <li><strong>Longer Group Name 3</strong></li> </ul> </div> I want the onmouseout event to be triggered only from the main div, not the 'a' or 'ul' or 'li' tags within the div! My onmouseout function is as follows : function disable_dropdown(d) { document.getElementById(d).style.visibility = "hidden"; } Can someone please tell me how I can stop the event from bubbling up? I tried the solutions (stopPropogation etc) provided on other sites, but I'm not sure how to implement them in this context. Any help will be appreciated. Thanks a lot!

    Read the article

  • Retrieve Gmail using Ruby

    - by Kartik Rao
    I need to retrieve emails from my Gmail account using Ruby on Rails. I'm currently using this piece of code, but it gives me a timeout error everytime. require 'net/pop' pop = Net::POP3.new 'mail.isp.com' pop.start '[email protected]', 'password' if pop.mails.empty? puts "No mail." else puts "You have #{pop.mails.length} new messages." puts "Downloading..." pop.mails.each_with_index do|m,i| File.open( "inbox/#{i}", 'w+' ) do|f| f.write m.pop end m.delete end end This is the error I recieve /usr/lib/ruby/1.8/timeout.rb:60:in `new': execution expired (Timeout::Error) from /usr/lib/ruby/1.8/net/protocol.rb:206:in `old_open' from /usr/lib/ruby/1.8/net/protocol.rb:206:in `old_open' from /usr/lib/ruby/1.8/net/pop.rb:438:in `do_start' from /usr/lib/ruby/1.8/net/pop.rb:432:in `start' from script/mail.rb:4 Any help will be appreciated!

    Read the article

  • How to create encrypted Jar file?

    - by Kartik Mistry
    I am working on project that must need to protect data (revealing code is not main problem) files. We are using Java + Netbeans. Is there any facility that will create jar in encrypted format? We are also using sqlite for database - so putting text file in encrypted format is not proper option for us too.

    Read the article

  • document.getElementById not working for <a> tag

    - by Kartik
    hi, I'm very new to js so kindly help me with this. I am trying to add a class to a tag using onClick. The code is as shown below: <a class="gkvSprite" href="#" id="123" onClick="showhide('1')">Click 1</a> <a class="gkvSprite" href="#" id="456" onClick="showhide('2')">Click 2</a> <a class="gkvSprite" href="#" id="789" onClick="showhide('3')">Click 3</a> Now when i click i need to add a class called "selected" for the one i select. I tried using setAttribute and add class of jquery as well but was not successful When i alert the document.getelementbyId(123) it gives out the link. Can someone kindly help me? Thanks in Advance Alloi

    Read the article

  • Character Movement Animation

    - by Kartik Kolluri
    Hi Guys! I've read a lot around everywhere, but wasn't able to make a simple character movement animation. What I have is a PNG file and an associated PLIST file with all the frames for a "walking" animation of a character that I want to run when the user touches the screen. I want to loop that animation and also at the same time, move the character to the right or left. I want to use Cocos2D in doing this. Does anyone have any code pieces or suggestions on how to do that? Thanks in advance!

    Read the article

  • Configure Rails app to retrieve ALL emails from inbox

    - by Kartik Rao
    I'm using the following code to retrieve emails from my Gmail inbox. def get_mail Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) Net::POP3.start('pop.gmail.com', 995, "uname","pass") do |pop| unless pop.mails.empty? pop.each_mail do |mail| email = TMail::Mail.parse(mail.pop) email_obj=EmailedQueries.new email_obj.save_email(email.from,email.subject,email.body_html) end end end end This works just fine, but it retrieves only new mails from the inbox. Instead, I want a seperate function that will retrieve ALL emails from the inbox. This function will be used rarely. I wont be retrieving all mails all the time. Only when necessary. Thanks!

    Read the article

  • Appscript to write iTunes artwork

    - by Kartik Aiyer
    I'm trying to capture artwork from a pict file and embed into a track on iTunes using python appscript. I did something like this: imFile = open('/Users/kartikaiyer/temp.pict','r') data = imFile.read() it = app('iTunes') sel = it.current_track.get() sel.artworks[0].data_.set(data[513:]) I get an error OSERROR: -1731 MESSAGE: Unknown object Similar applescript code looks like this: tell application "iTunes" set the_artwork to read (POSIX file "/Users/kartikaiyer/temp.pict") from 513 as picture set data of artwork 1 of current track to the_artwork end tell I tried using ASTranslate but it never instantiates 'the_artwork' and then throws an error when there is a reference to the_artwork. Can anyone help. I'm new to appscript and python in general.

    Read the article

  • Link to open in a new window, with 2 frames

    - by Kartik Rao
    I will be displaying news feeds from external websites on my website. So i need to open external links in those feeds in a new window, but give the user an option to return to my website. Basically I'm trying to replicate Google Images' technique of opening a link in a window with 2 frames - with the top frame having an option to "Remove Frame" and the bottom frame displaying the content of the link. Also, since the news feed will be dynamic, I don't want to hard-code anything. The code should be used automatically by any link appearing in the news feeds. Any ideas on how to do it?

    Read the article

  • Ajax AsyncFileUpload contains Filename Every time

    - by Kartik Patel
    I have used the Ajax AsyncFileUpload.I have three field. 1.Name 2.Asynchronous File Upload 3.Description 4.Save buttton when I click on Save new Record created.after creating new record when i enter all above details except select the Asynchronous File Upload.However when i click on Save button the Asynchronous File Upload contains the before Asynchronous upload File Name inspite of i didnt select the File from File Upload...How its possible getting confused.. My code is like this i have used master page. <asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server"> <script type="text/javascript" language="javascript"> function UploadComplete() { document.getElementById('<%=lblmsg.ClientID %>').innerHTML = "Image Uploaded Successfully."; } function UploadError() { document.getElementById('<%=lblmsg.ClientID %>').innerHTML = "Image Upload Failed."; } </script> <table> <tr> <td colspan="2"> <h1 style="color: #008000"> Add Project Details</h1> </td> </tr> <tr> <td align="left"> <asp:Label ID="lblProjectName" runat="server" Text="Project Name" Font-Bold="true"></asp:Label> </td> <td align="left"> <asp:TextBox ID="txtProjectName" runat="server" MaxLength="50" Width="150px" ValidationGroup="Save"></asp:TextBox> <asp:RequiredFieldValidator ID="rfvprojectname" runat="server" Text="Project Name is Required." ErrorMessage="Project Name is Required." ControlToValidate="txtProjectName" ForeColor="Red" ValidationGroup="Save"></asp:RequiredFieldValidator> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td align="left"> <asp:Label ID="lblselectimage" runat="server" Text="Select Image" Font-Bold="true"></asp:Label> </td> <td align="left"> <table> <tr> <td> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </cc1:ToolkitScriptManager> <cc1:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnClientUploadComplete="UploadComplete" OnClientUploadError="UploadError" CompleteBackColor="White" Width="350px" UploaderStyle="Traditional" UploadingBackColor="#CCFFFF" ThrobberID="imgLoad" OnUploadedComplete="fileuploadComplete" ClientIDMode="AutoID" EnableViewState="true"/> </td> <td> <asp:Image ID="imgUpload" runat="server" Width="50px" Height="50px" /> </td> </tr> </table> </td> </tr> <tr> <td> </td> <td> <asp:Image ID="imgLoad" runat="server" ImageUrl="~/Images/loading-gif-animation.gif" Width="50px" Height="50px" /> <asp:Label ID="lblmsg" runat="server" ForeColor="Blue" Font-Bold="true"></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="lblDescription" runat="server" Text="Description" Font-Bold="true"></asp:Label> </td> <td align="left"> <asp:TextBox ID="txtDescription" runat="server" MaxLength="1000" Width="300" TextMode="MultiLine" ValidationGroup="Save" Height="100px"></asp:TextBox> <asp:RequiredFieldValidator ID="RfvtxtDescription" runat="server" Text="Project Description is Required." ErrorMessage="Project Description is Required." ControlToValidate="txtDescription" ForeColor="Red" ValidationGroup="Save"></asp:RequiredFieldValidator> </td> </tr> <tr> <td> </td> <td align="left"> <asp:ImageButton ID="btnsave" runat="server" ImageUrl="~/Images/Save.jpg" OnClick="btnSave_Click" Height="37px" ValidationGroup="Save" /> </td> </tr> </table>

    Read the article

  • Issue with maxWorkerThreads and thread count

    - by Kartik M
    I have created an ASP.NET application which creates threads in an infinite loop. I set maxWorkerThreads to 20 in processModel in machine.config. When I checked the Thread count in perfmon there was around 7000 threads created in worker process. In PageLoad() I have: using System.Threading; ... int count = 0; var threadList = new System.Collections.Generic.List<System.Threading.Thread>(); try { while (true) { Thread newThread = new Thread(ThreadStart(DummyCall), 1024); newThread.Start(); threadList.Add(newThread); count++; } } catch (Exception ex) { Response.Write(count + " : " + ex.ToString()); } Function: void DummyCall() { System.Threading.Thread.Sleep(1000000000); } How do I restrict thread creation in ASP.NET with IIS6/7?

    Read the article

  • Trouble with client side validation using Struts 2. Xml based validation rules not recognized.

    - by Kartik
    Hi, This is my first post to ask a question on stack overflow and my issue is that when I don't see a client side validation error message when I don't enter any values for that field even when it is configured as required. The input page is reloaded but no error message is seen. I am not sure what I am doing wrong. Any advice would be greatly appreciated. My scenario is given below: I have a simple form where I have a pull down menu called selection criterion. A value must be selected. If a value is not selected, then the page should reload with configured error message. My input form action_item_search.jsp is given below: <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Action Item Search</title> </head> <body> <s:actionerror/> <s:fielderror /> <s:form action="action_item_search" validate="true"> <s:select label="Search Criterion" name="searchCriterion" list="#{'': 'Select One', 'creatorName':'creator name', assignedTo':'assigned to'}" required="true" /> <s:submit name="search" value="Search"></s:submit> </s:form> </body> I have add validators.xml in my WEB-INF/classes directory of exploded war file as given below: <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator Config 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd"> ActionItemTrackingAction-findByCriteria-validation.xml is given below: <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> You must enter a search criterion. My struts mapping xml: <struts> <constant name="struts.enable.DynamicMethodInvocation" value="false" /> <constant name="struts.devMode" value="true" /> <!-- <include file="example.xml"/> --> <package name="action-item" extends="struts-default"> <action name = "action_item_search_input"> <result name = "success">/action-item-search.jsp</result> </action> <action name="action_item_search" class="gov.nasa.spacebook.ActionItemTrackingAction" method="fetchByCriteria"> <result name = "success">/action-item-result.jsp</result> <result name = "input">/action-item-search.jsp</result> <result name = "error">/action-item-search.jsp</result> </action> </package> My action class public class ActionItemTrackingAction extends ActionSupport { private List<ActionItem> actionItems; public List<ActionItemTracking> getActionItems() { return actionItems; } public void setActionItems(List<ActionItemTracking> actionItems) { this.actionItems = actionItems; } private String searchCriterion; public String getSearchCriterion() { return searchCriterion; } public void setSearchCriterion(final String criterion) { this.searchCriterion = criterion; } public String fetchByCriteria() throws Exception { final ActionItemTrackingService service = new ActionItemTrackingService(); this.actionItems = service.getByField(this.actionItem); return super.execute(); } }

    Read the article

  • https://www.googleapis.com/drive/v2/files/<fileid>/comments?alt=json returned "Not Found" on a file that can't be opened

    - by Kartik Ayyar
    More details as below: https://www.googleapis.com/drive/v2/files/1iNMGIAFXuhS_CO_hnEO0_EJ9PAgT-hXYqWYv0MPGUTI/comments?alt=json returned "Not Found The file is present in drive and shows in drive.changes.list, but can't be opened in Google Drive either. There are two problems here a) the file is somehow corrupt ( it was a document imported into drive, so that failed, but that isn't something I care about for the purposes of this question ) b) The file shows up as existing in some API calls, but calls to read comments with the Drive SDK comments API fail. Here are results from an API call showing how the file does indeed exist: "file": { "kind": "drive#file", "id": "1iNMGIAFXuhS_CO_hnEO0_EJ9PAgT-hXYqWYv0MPGUTI", "etag": "\"o35FABD0TC3H-Up3OL3UA9kEB2w/MTM3MTc2NzU5NzEyNA\"", .... .... "iconLink": "https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png", "title": "<removed>", "mimeType": "application/vnd.google-apps.document", "labels": { "starred": false, "hidden": false, "trashed": true, "restricted": false, "viewed": true },

    Read the article

  • Is it ok to return a reference of a function scope static variable?

    - by kartik
    I wanted to know if that has any ill effects under any circumsatnce. For ex: Ex1: void* func1() { void* p_ref = NULL; //function scope static variable static int var1 = 2; p_ref = &var1; return p_ref; } Ex2: //file scope static variable static int var2 = 2; void* func2() { void* p_ref = NULL; var2 = 3; p_ref = &var2; return p_ref; } So in the above two cases what is the difference apart from the fact that var1 is function scope and var2 is file scope. Thanks in advance.

    Read the article

  • How to calculate checksum?

    - by Patel Rikin
    I m developing instrument driver and i want to know how to calculate checksum of frame. Explanation: Expressed by characters [0-9] and [A-F]. Characters beginning from the character after [STX] and until [ETB] or [ETX] (including [ETB] or [ETX]) are added in binary. The 2-digit numbers, which represent the least significant 8 bits in hexadecimal code, are converted to ASCII characters [0-9] and [A-F]. The most significant digit is stored in CHK1 and the least significant digit in CHK2. This is sample frame : <STX>2Q|1|2^1||||20011001153000<CR><ETX><CHK1><CHK2><CR><LF> and i want to know what is value of chk1 and chk2 and i am new in this so i m totally blank about how to calculate checksum i am not getting above 3rd and 4th point. can any one provide sample code for c#. Please help me.

    Read the article

  • OSX Apache2 Virtual Hosts Proxy Issue

    - by Daven Patel
    I'm using the following httpd-vhosts.conf file to host several sites on my MacBook. Apache Configuration The first two virtual sites (v3.local,ss.local) are giving back the following error messages in the Apache error log: [Thu Aug 30 15:12:04 2012] [error] (61)Connection refused: proxy: HTTP: attempt to connect to [fe80::1]:3002 (localhost) failed [Thu Aug 30 15:12:04 2012] [error] ap_proxy_connect_backend disabling worker for (localhost)] The third site test.local works fine without any issues. I can't seem to find out why the first two sites are responding with the listed issue. What could be causing it and how can it be resolved?

    Read the article

  • Run a command from Windows 7 Start Menu

    - by Abhijeet Patel
    I'm trying to run commands such as "cmd.exe", "appwiz.cpl" etc by typing it in the Search box of the Start Menu in Windows 7 (x86). I'm able to do this just fine in Vista. After typing in "cmd" I notice that I see a link to "Programs" in the start menu so it seems that "cmd" is being recognized but when I click on "Programs" link which is shown,I get the following message. "These files can't be opened. Your internet security settings prevented one or more files from being opened" P.S. - I'm not looking for enabling the "Run" command to show in the Start Menu Any help would be much appreciated

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >