Search Results

Search found 6365 results on 255 pages for 'anthony short'.

Page 14/255 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • printing sequence number of a sniffed packet

    - by scatman
    i am using pcap to create a packet sniffer. i have this tcp structure: typedef struct TSP_header{ unsigned short int sport; unsigned short int dport; unsigned int seqnum; unsigned int acknum; unsigned char reserved:4, offset:4; unsigned int tcp_res1:4, //little-endian tcph_hlen:4, //length of tcp header in 32-bit words tcph_fin:1, //Finish flag "fin" tcph_syn:1, //Synchronize sequence numbers to start a connection tcph_rst:1, //Reset flag tcph_psh:1, //Push, sends data to the application tcph_ack:1, //acknowledge tcph_urg:1, //urgent pointer tcph_res2:2; unsigned short int tcph_win; unsigned short int tcph_chksum; unsigned short int tcph_urgptr; }TSP_header; how can i print the sequence number? shou i use htons(sequence_number)?? coz it isn't working this way!!

    Read the article

  • Preon library problem

    - by Kamahire
    I am using preon lib to parse binary data it contain short, int data The structure as follows @BoundNumber(size="32", byteOrder=ByteOrder.BigEndian) public int time;// @BoundString(size="2") public String alphaChar;// 2 byte array @BoundNumber(size="16", byteOrder=ByteOrder.BigEndian) public int code1;//short @BoundNumber(size="16", byteOrder=ByteOrder.BigEndian) public int code2;//short @BoundNumber(size="16", byteOrder=ByteOrder.BigEndian) public int code3;//short @BoundString(size="8") public String firstName;// 8 byte array @BoundString(size="8") public String middleName;// 8 byte array @BoundString(size="8") public String lastName;// 8 byte array @BoundNumber(size="16", byteOrder=ByteOrder.BigEndian) public int code4;//short I am getting correct values for code1, code2, code3 but for code4 it not giving me correct value. It always gives me 0(Zero); When I checked with position of byte array; it shows me correct value. Is there any kind padding require?

    Read the article

  • Firefox 3.5.6 causes entire computer to freeze

    - by Anthony Aziz
    Here's the situation: Environment: Just installed a fresh copy of Win7 Pro 32-bit to NTFS partition on 750GB SATA drive Hardware: E8400 3GHz ASUS P5QL Pro 4GB DDR2 1066 RAM EVGA 9800 GTX+ Plenty of cooling, no problems with hardware before Data is stored on a separate partition, including My Documents No security software is yet installed No extensions installed yet Problem: While using Firefox, sometimes the entire computer will freeze/hang. I get no mouse or keyboard input, can't CTRL+ALT+DEL, no "not responding" indication, just a static image on my display. My drivers are all up to date as far as I'm aware (I just installed this copy of Windows last week). I first noticed this when trying to install Xmarks. I went to the Xmarks site and tried to install and it would freeze. I managed to get it installed (Safe mode and the Mozilla addon site worked), but when I go to configure it (log in, etc), the computer freezes. I don't think it's a matter of usage time or memory issues, because while testing, I browsed wallpaper galleries for about 30 minutes, sometimes as many as 12-15 tabs open at a time, without issue. Sometimes I won't even try to install Xmarks at it will hang. I can install (some) other extensions, the only one I've tried is download status bar (which works). What I've done to try to fix: Restarted (duh) Windows safe mode Completely remove Firefox and install it to a new directory, according to Mozilla's KB (I haven't tried the profile manager, though I assume this does the same thing, except perhaps more thoroughly) Some BIOS changes, including Power options, disabling oveclocking (it was a modest overclock on the CPU, which has run Win7 beta and RC for almost a year now) Memtest Used another Windows user profile, same tragic results I'm STUCK now, with no idea what to do. I'm using Chrome as my main browser at the moment, but that's not something I want to be stuck with. I like Firefox and want to use it. I'm going to try creating a new profile first. One thing I did notice: I started leaving task manager and performance monitor open when anticipating (but dreading) a freeze. firefox.exe had low CPU and low memory, but it looked like overall disk usage was seeing some spikes on the small graph Performance Monitor gives you. I saw on one blog post a fellow using XP moved his Local Settings directory from a separate drive to his main drive, and that solved it, but I don't think my AppData directory is on my D: drive, and that's on the same physical device anyways. Still, something that might be worth trying. I'd extremely appreciate any help. Thanks very much. I really don't want to reinstall Windows from scratch again :( Anthony Aziz

    Read the article

  • User Group Meeting Summary - April 2010

    - by Michael Stephenson
    Thanks to everyone who could make it to what turned out to be an excellent SBUG event.  First some thanks to:  Speakers: Anthony Ross and Elton Stoneman Host: The various people at Hitachi who helped to organise and arrange the venue.   Session 1 - Getting up and running with Windows Mobile and the Windows Azure Service Bus In this session Anthony discussed some considerations for using Windows Mobile and the Windows Azure Service Bus from a real-world project which Hitachi have been working on with EasyJet.  Anthony also walked through a simplified demo of the concepts which applied on the project.   In addition to the slides and demo it was also very interesting to discuss with the guys involved on this project to hear about their real experiences developing with the Azure Service Bus and some of the limitations they have had to work around in Windows Mobiles ability to interact with the service bus.   On the back of this session we will look to do some further activities around this topic and the guys offered to share their wish list of features for both Windows Mobile and Windows Azure which we will look to share for user group discussion.   Another interesting point was the cost aspects of using the ISB which were very low.   Session 2 - The Enterprise Cache In the second session Elton used a few slides which are based around one of his customer scenario's where they are looking into the concept of an Enterprise Cache within the organisation.  Elton discusses this concept and also a codeplex project he is putting together which allows you to take advantage of a cache with various providers such as Memcached, AppFabric Caching and Ncache.   Following the presentation it was interesting to hear peoples thoughts on various aspects such as the enterprise cache versus an out of process application cache.  Also there was interesting discussion around how people would like to search the cache in the future.   We will again look to put together some follow-up activity on this   Meeting Summary Following the meeting all slide decks are saved in the skydrive location where we keep content from all meetings: http://cid-40015ea59a1307c8.skydrive.live.com/browse.aspx/.Public/SBUG/SBUG%20Meetings/2010%20April   Remember that the details of all previous events are on the following page. http://uksoabpm.org/Events.aspx   Competition We had three copies of the Windows Identity Foundation Patterns and Practices book that were raffles on the night, it would be great to hear any feedback on the book from those who won it.   Recording The user group meeting was recorded and we will look to make this available online sometime soon.   UG Business The following things were discussed as general UG topics:   We will change the name of the user group to the UK Connected Systems User Group to we are more inline with other user groups who cover similar topics and we believe this will help us to attract more members.  The content or focus of the user group is not expected to change.   The next meeting is 26th May and can be registered at the following link: http://sbugmay2010.eventbrite.com/

    Read the article

  • Introducing Glimpse – Firebug for your server

    - by Neil Davidson
    Here at Red Gate, we spend every waking hour trying to wow .NET and SQL developers with great products.  Every so often, though, we find something out in the wild which knocks our socks off by taking “ingeniously simple” to a whole new level.  That’s what a little community led by developers Nik Molnar and Anthony van der Hoorn has done with the open source tool Glimpse. Glimpse describes itself as ‘Firebug for the server.’  You drop the NuGet package into your ASP.NET project, and then — like magic* — your web pages will bare every detail of their execution.  Even by our high standards, it was trivial to get running: if you can use NuGet, you’re already there. You get all that lovely detail without changing any code. Our feelings go beyond respect for the developers who designed and wrote Glimpse; we’re thrilled that Nik and Anthony have come to work for Red Gate full-time. They’re going to stay in control of the project and keep doing open source development work on Glimpse.  In the medium term, we’re hoping to make paid-for products which plug into the free open source framework, especially in areas like performance profiling where we already have some deep technology.  First, though, Glimpse needs to get from beta to a v1. Given the breakneck pace of new development, this should only be a month or so away. Supporting an open source project is a first for Red Gate, so we’re going to be working with Nik and Anthony, with the Glimpse community and even with other vendors to figure out what ‘great’ looks like from the a user perspective.  Only one thing is certain: this technology deserves a wider audience than the 40,000 people who have already downloaded it, so please have a look and tell us what you think. You can hear more about what the Glimpse developers think on the Glimpse blog, and there are plenty more technical facts over at our product manager’s blog. If you have any questions or queries, please tweet with the #glimpse hashtag or contact the Glimpse team directly on [email protected]. [*That’s ”magic” in the Arthur C. Clarke “sufficiently advanced technology” sense, of course] Neil Davidson co-founder and Joint CEO Red Gate Software http://twitter.com/neildavidson    

    Read the article

  • Ring in the Holiday with Papercraft Star Wars Snowflakes

    - by Jason Fitzpatrick
    Whether your holiday decorating is begging for a geeky touch (or your nieces and nephews are begging for something to occupy their time while visiting this holiday), Anthony Herrera’s Star Wars themed paper snowflakes are a perfect geeky holiday project. This year’s collection includes Admiral Ackbar, A-Wings, B-Wings, Chewbacca, Ewoks, and more. Be sure to check out the 2011 and 2010 editions, for even more characters. Star Wars Snowflakes 2012 [Anthony Herrera Designs] Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • AJAX Return Problem from data sent via jQuery.ajax

    - by Anthony Garand
    I am trying to receive a json object back from php after sending data to the php file from the js file. All I get is undefined. Here are the contents of the php and js file. data.php <?php $action = $_GET['user']; $data = array( "first_name" = "Anthony", "last_name" = "Garand", "email" = "[email protected]", "password" = "changeme"); switch ($action) { case '[email protected]': echo $_GET['callback'] . '('. json_encode($data) . ');'; break; } ? core.js $(document).ready(function(){ $.ajax({ url: "data.php", data: {"user":"[email protected]"}, context: document.body, data: "jsonp", success: function(data){renderData(data);} }); }); function renderData(data) { document.write(data.first_name); }

    Read the article

  • Why can't I input the integers from a file?

    - by Anthony Glyadchenko
    I'm trying to get this C++ code to input a series of numbers from a text file: int x = 0; cin >> x; ifstream iffer; int numbers[12]; iffer.open("input.txt"); for (int i = 0; i < 12; i++){ iffer >> numbers[i]; } This doesn't seem to work on the Mac. Every cell will equal to 0 regardless of the values in the text file. In other words, the ifstream isn't assigning the numbers. How can I make this work? Is it a Mac issue and if so, how can I get it to work? Thanks! Anthony Glyadchenko

    Read the article

  • How to check a SQL database table to see if a record exists

    - by Anthony
    I have a SQL database that creates a record for every document uploaded by the user to the server. I want to check this table before a user uploads a document to ensure they don't upload a file with name that already exists. I know how to make the connection and make the SqlCommand to query the table for an existing record. But I don't know how to check the record count from the sqlCommand I made. Does that make sense? Using myConnectionCheck As New SqlConnection(myConnectionStringCheck) Dim myCommandCheck As New SqlCommand() myCommandCheck.Connection = myConnectionCheck myCommandCheck.CommandText = "SELECT * FROM Req_Docs WHERE Doc_Name =" & DocName myConnectionCheck.Open() myCommandCheck.ExecuteNonQuery() End Using Thanks in advance, Anthony

    Read the article

  • asp.net: Is it possible to have multiple login forms to access different subfolders?

    - by Anthony
    Hi, Is it possible to have multiple login pages for different folders within an asp.net application? Say I have this structure: /admin /customer /login-admin.aspx /login-customer.aspx I have 2 different login forms. One for the admin people and one for the customers (the forms are different as the customers need to provide extra information on their login page). In the authentication section of the webconfig file (which is at the root of the web app), I can only specify one Login page. So how can I make sure thaf if anyone tries to access a webpage in /admin they will be redirected to /login-admin.aspx and if they try to access a webpage in /customer they will be redirected to /login-customer.aspx ? Thanks, Anthony

    Read the article

  • Flex Mobile : How to skin view?

    - by Anthony
    I would like to know if it's possible to skin view for my Flex mobile application : My ActivityView.as public class ActivityView extends View My ActivityViewSkin.mxml (It skin associated) <?xml version="1.0" encoding="utf-8"?> <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Metadata> [HostComponent("com.corp.views.activity.ActivityView")] ... It's a good way for mobile development ? And how can I use this in this skin : <s:navigationContent> Thank you very much ! Anthony

    Read the article

  • Entity Framework - Condition on one to many join (Lambda)

    - by nirpi
    Hi, I have 2 entities: Customer & Account, where a customer can have multiple accounts. On the account, I have a "PlatformTypeId" field, which I need to condition on (multiple values), among other criterions. I'm using Lambda expressions, to build the query. Here's a snippet: var customerQuery = (from c in context.CustomerSet.Include("Accounts") select c); if (criterions.UserTypes != null && criterions.UserTypes.Count() > 0) { List<short> searchCriterionsUserTypes = criterions.UserTypes.Select(i => (short)i).ToList(); customerQuery = customerQuery.Where(CommonDataObjects.LinqTools.BuildContainsExpression<Customer, short>(c => c.UserTypeId, searchCriterionsUserTypes)); } // Other criterions, including the problematic platforms condition (below) var customers = customerQuery.ToList(); I can't figure out how to build the accounts' platforms condition: if (criterions.Platforms != null && criterions.Platforms.Count() > 0) { List<short> searchCriterionsPlatforms = criterions.Platforms.Select(i => (short)i).ToList(); customerQuery = customerQuery.Where(c => c.Accounts.Where(LinqTools.BuildContainsExpression<Account, short>(a => a.PlatformTypeId, searchCriterionsPlatforms))); } (The BuildContainsExpression is a method we use to build the expression for the multi-select) I'm getting a compilation error: The type arguments for method 'System.Linq.Enumerable.Where(System.Collections.Generic.IEnumerable, System.Func)' cannot be inferred from the usage. Try specifying the type arguments explicitly. Any idea how to fix this? Thanks, Nir.

    Read the article

  • VS 2008 Service Pack 1 problem

    - by Compiler
    Hi, My OPS is XP and service pack 3 installed.I cant install vs2008 service pack1,In log file i see 'Visual C++ 2008 SP1 Design-Time Components for x86 - KB947888' cant be installed. Error code is 1603.Last part of Installation file is here. Returning IDOK. INSTALLMESSAGE_ERROR [Error 1335. The cabinet file 'patch.cab' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package.] [1/12/2009, 10:14:50] (IronSpigot::MsiExternalUiHandler::UiHandler) Returning IDOK. INSTALLMESSAGE_ACTIONSTART [Action 10:14:50: Rollback. Rolling back action:] [1/12/2009, 10:17:29] (IronSpigot::MspInstallerT<class ATL::CStringT<unsigned short,class ATL::StrTraitATL<unsigned short,class ATL::ChTraitsCRT<unsigned short ::PerformMsiOperation) Patch (C:\DOCUME~1\Cem\LOCALS~1\Temp\Microsoft Visual Studio 2008 SP1\VS90sp1-KB945140-X86-ENU.msp; C:\DOCUME~1\Cem\LOCALS~1\Temp\Microsoft Visual Studio 2008 SP1\VC90sp1-KB947888-x86-enu.msp) install failed on product (Microsoft Visual Studio 2008 Professional Edition - ENU). Msi Log: Microsoft Visual Studio 2008 SP1_20090112_100005671-Microsoft Visual Studio 2008 Professional Edition - ENU-MSP0.txt [1/12/2009, 10:17:29] (IronSpigot::MspInstallerT<class ATL::CStringT<unsigned short,class ATL::StrTraitATL<unsigned short,class ATL::ChTraitsCRT<unsigned short ::PerformMsiOperation) MsiApplyMultiplePatches returned 0x643

    Read the article

  • What is the fastest (possibly unsafe) way to read a byte[]?

    - by Aidiakapi
    I'm working on a server project in C#, and after a TCP message is received, it is parsed, and stored in a byte[] of exact size. (Not a buffer of fixed length, but a byte[] of an absolute length in which all data is stored.) Now for reading this byte[] I'll be creating some wrapper functions (also for compatibility), these are the signatures of all functions I need: public byte ReadByte(); public sbyte ReadSByte(); public short ReadShort(); public ushort ReadUShort(); public int ReadInt(); public uint ReadUInt(); public float ReadFloat(); public double ReadDouble(); public string ReadChars(int length); public string ReadString(); The string is a \0 terminated string, and is probably encoded in ASCII or UTF-8, but I cannot tell that for sure, since I'm not writing the client. The data exists of: byte[] _data; int _offset; Now I can write all those functions manually, like this: public byte ReadByte() { return _data[_offset++]; } public sbyte ReadSByte() { byte r = _data[_offset++]; if (r >= 128) return (sbyte)(r - 256); else return (sbyte)r; } public short ReadShort() { byte b1 = _data[_offset++]; byte b2 = _data[_offset++]; if (b1 >= 128) return (short)(b1 * 256 + b2 - 65536); else return (short)(b1 * 256 + b2); } public short ReadUShort() { byte b1 = _data[_offset++]; return (short)(b1 * 256 + _data[_offset++]); } But I wonder if there's a faster way, not excluding the use of unsafe code, since this seems a little bit too much work for simple processing.

    Read the article

  • fmod getWaveData() export to WAVE file help (C++)

    - by eddietree
    I am trying to export the current sound that is being played by the FMOD::System into a WAVE file by calling getWaveData(). I have the header of the wave file correct, and currently trying to write to the wave file each frame like so: const unsigned int samplesPerSec = 48000; const unsigned int fps = 60; const int numSamples = samplesPerSec / fps; float data[2][numSamples]; short conversion[numSamples*2]; m_fmodsys->getWaveData( &data[0][0], numSamples, 0 ); // left channel m_fmodsys->getWaveData( &data[1][0], numSamples, 1 ); // right channel int littleEndian = IsLittleEndian(); for ( int i = 0; i < numSamples; ++i ) { // left channel float coeff_left = data[0][i]; short val_left = (short)(coeff_left * 0x7FFF); // right channel float coeff_right = data[1][i]; short val_right = (short)(coeff_right * 0x7FFF); // handle endianness if ( !littleEndian ) { val_left = ((val_left & 0xff) << 8) | (val_left >> 8); val_right = ((val_right & 0xff) << 8) | (val_right >> 8); } conversion[i*2+0] = val_left; conversion[i*2+1] = val_right; } fwrite((void*)&conversion[0], sizeof(conversion[0]), numSamples*2, m_fh); m_dataLength += sizeof(conversion); Currently, the timing of the sound is correct, but the sample seems clipped way harshly. More specifically, I am outputting four beats in time. When I playback the wave-file, the beats timing is correct but it just sounds way fuzzy and clipped. Am I doing something wrong with my calculation? I am exporting in 16-bits, two channels. Thanks in advance! :) Reference (WAVE file format): http://www.sonicspot.com/guide/wavefiles.html

    Read the article

  • Getting current time in milliseconds

    - by user90293423
    How to get the current time in milliseconds? I'm working on a hacking simulation game and when ever someone connects to another computer/NPC, a login screen popups with a button on the side called BruteForce. When BruteForce is clicked, what i want the program to do is, calculate how many seconds cracking the password is going to take based on the player's CPU speed but that's the easy part. The hard part is i want to enter a character in the password's box every X milliseconds based on a TimeToCrack divided by PasswordLength formula. But since i don't know how to find how many milliseconds have elapsed since the second has passed, the program waits until the CurrentTime is higher than the TimeBeforeTheLoopStarted + HowLongItTakesToTypeaCharacter which is always going to be a second. How would you handle my problems? I've commented the game breaking part. std::vector<QString> hardware = user.getHardware(); QString CPU = hardware[0]; unsigned short Speed = 0; if(CPU == "OMG SingleCore 1.8GHZ"){ Speed = 2; } const short passwordLength = password.length(); /* It's equal to 16 */ int Time = passwordLength / Speed; double TypeSpeed = Time / passwordLength; time_t t = time(0); struct tm * now = localtime(&t); unsigned short EndTime = (now->tm_sec + Time) % 60; unsigned short CurrentTime = 0; short i = passwordLength - 1; do{ t = time(0); now = localtime(&t); CurrentTime = now->tm_sec; do{ t = time(0); now = localtime(&t); }while(now->tm_sec < CurrentTime + TypeSpeed); /* Highly flawed */ /* Do this while your integer value is under this double value */ QString tempPass = password; tempPass.chop(i); ui->lineEdit_2->setText(tempPass); i--; }while(CurrentTime != EndTime);

    Read the article

  • Django cannot find my templatetags, even though it's in INSTALLED_APPS and has a __init__.py

    - by Vivian Short
    I just installed django-compress (http://code.google.com/p/django-compress) into /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/compress. I added 'compress' to INSTALLED_APPS. In my template file, I wrote {% load compressed %}. I got the error: 'compressed' is not a valid tag library: Could not load template library from django.templatetags.compressed, No module named compressed I verified that there is an init.py in compress, as well as in compress/templatetags/. I tried putting the compress directory into PYTHONPATH. I ran python and wrote "import compress" and that worked. Your suggestions would be very appreciated! What else can I try?

    Read the article

  • Rendering a control generates security exception in .Net 4

    - by Jason Short
    I am having a problem with code that worked fine in .Net 2 giving this error under .Net 4. Build (web): Inheritance security rules violated while overriding member: 'Controls.RelatedPosts.RenderControl(System.Web.UI.HtmlTextWriter)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden. This is in DotNetBlogEngine. There were several other security demands in the code that .Net 4 didn't seem to like. I followed some of the advice I found on blogs (and here) and got rid of all the other errors. But this one still eludes me. The Main blogengine core dll is not set for security demands anylonger and is compiled for .Net 4 as well. This error is in the website side attempting to use the dll. There are controls that call a RenderControl method taking an HtmlTextWriter. Apparently the text writer now has some soft of security attributes set on it. Each of the controls implements a custom interface ( public interface ICustomFilter ), there are no security permissions present or demands. The site is running full trust on my local dev machine.

    Read the article

  • Performing Aggregate Functions on Multi-Million Row Tables

    - by Daniel Short
    I'm having some serious performance issues with a multi-million row table that I feel I should be able to get results from fairly quick. Here's a run down of what I have, how I'm querying it, and how long it's taking: I'm running SQL Server 2008 Standard, so Partitioning isn't currently an option I'm attempting to aggregate all views for all inventory for a specific account over the last 30 days. All views are stored in the following table: CREATE TABLE [dbo].[LogInvSearches_Daily]( [ID] [bigint] IDENTITY(1,1) NOT NULL, [Inv_ID] [int] NOT NULL, [Site_ID] [int] NOT NULL, [LogCount] [int] NOT NULL, [LogDay] [smalldatetime] NOT NULL, CONSTRAINT [PK_LogInvSearches_Daily] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY] ) ON [PRIMARY] This table has 132,000,000 records, and is over 4 gigs. A sample of 10 rows from the table: ID Inv_ID Site_ID LogCount LogDay -------------------- ----------- ----------- ----------- ----------------------- 1 486752 48 14 2009-07-21 00:00:00 2 119314 51 16 2009-07-21 00:00:00 3 313678 48 25 2009-07-21 00:00:00 4 298863 0 1 2009-07-21 00:00:00 5 119996 0 2 2009-07-21 00:00:00 6 463777 534 7 2009-07-21 00:00:00 7 339976 503 2 2009-07-21 00:00:00 8 333501 570 4 2009-07-21 00:00:00 9 453955 0 12 2009-07-21 00:00:00 10 443291 0 4 2009-07-21 00:00:00 (10 row(s) affected) I have the following index on LogInvSearches_Daily: /****** Object: Index [IX_LogInvSearches_Daily_LogDay] Script Date: 05/12/2010 11:08:22 ******/ CREATE NONCLUSTERED INDEX [IX_LogInvSearches_Daily_LogDay] ON [dbo].[LogInvSearches_Daily] ( [LogDay] ASC ) INCLUDE ( [Inv_ID], [LogCount]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] I need to pull inventory only from the Inventory for a specific account id. I have an index on the Inventory as well. I'm using the following query to aggregate the data and give me the top 5 records. This query is currently taking 24 seconds to return the 5 rows: StmtText ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SELECT TOP 5 Sum(LogCount) AS Views , DENSE_RANK() OVER(ORDER BY Sum(LogCount) DESC, Inv_ID DESC) AS Rank , Inv_ID FROM LogInvSearches_Daily D (NOLOCK) WHERE LogDay DateAdd(d, -30, getdate()) AND EXISTS( SELECT NULL FROM propertyControlCenter.dbo.Inventory (NOLOCK) WHERE Acct_ID = 18731 AND Inv_ID = D.Inv_ID ) GROUP BY Inv_ID (1 row(s) affected) StmtText ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |--Top(TOP EXPRESSION:((5))) |--Sequence Project(DEFINE:([Expr1007]=dense_rank)) |--Segment |--Segment |--Sort(ORDER BY:([Expr1006] DESC, [D].[Inv_ID] DESC)) |--Stream Aggregate(GROUP BY:([D].[Inv_ID]) DEFINE:([Expr1006]=SUM([LOALogs].[dbo].[LogInvSearches_Daily].[LogCount] as [D].[LogCount]))) |--Sort(ORDER BY:([D].[Inv_ID] ASC)) |--Nested Loops(Inner Join, OUTER REFERENCES:([D].[Inv_ID])) |--Nested Loops(Inner Join, OUTER REFERENCES:([Expr1011], [Expr1012], [Expr1010])) | |--Compute Scalar(DEFINE:(([Expr1011],[Expr1012],[Expr1010])=GetRangeWithMismatchedTypes(dateadd(day,(-30),getdate()),NULL,(6)))) | | |--Constant Scan | |--Index Seek(OBJECT:([LOALogs].[dbo].[LogInvSearches_Daily].[IX_LogInvSearches_Daily_LogDay] AS [D]), SEEK:([D].[LogDay] > [Expr1011] AND [D].[LogDay] < [Expr1012]) ORDERED FORWARD) |--Index Seek(OBJECT:([propertyControlCenter].[dbo].[Inventory].[IX_Inventory_Acct_ID]), SEEK:([propertyControlCenter].[dbo].[Inventory].[Acct_ID]=(18731) AND [propertyControlCenter].[dbo].[Inventory].[Inv_ID]=[LOA (13 row(s) affected) I tried using a CTE to pick up the rows first and aggregate them, but that didn't run any faster, and gives me essentially the same execution plan. (1 row(s) affected) StmtText ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --SET SHOWPLAN_TEXT ON; WITH getSearches AS ( SELECT LogCount -- , DENSE_RANK() OVER(ORDER BY Sum(LogCount) DESC, Inv_ID DESC) AS Rank , D.Inv_ID FROM LogInvSearches_Daily D (NOLOCK) INNER JOIN propertyControlCenter.dbo.Inventory I (NOLOCK) ON Acct_ID = 18731 AND I.Inv_ID = D.Inv_ID WHERE LogDay DateAdd(d, -30, getdate()) -- GROUP BY Inv_ID ) SELECT Sum(LogCount) AS Views, Inv_ID FROM getSearches GROUP BY Inv_ID (1 row(s) affected) StmtText ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |--Stream Aggregate(GROUP BY:([D].[Inv_ID]) DEFINE:([Expr1004]=SUM([LOALogs].[dbo].[LogInvSearches_Daily].[LogCount] as [D].[LogCount]))) |--Sort(ORDER BY:([D].[Inv_ID] ASC)) |--Nested Loops(Inner Join, OUTER REFERENCES:([D].[Inv_ID])) |--Nested Loops(Inner Join, OUTER REFERENCES:([Expr1008], [Expr1009], [Expr1007])) | |--Compute Scalar(DEFINE:(([Expr1008],[Expr1009],[Expr1007])=GetRangeWithMismatchedTypes(dateadd(day,(-30),getdate()),NULL,(6)))) | | |--Constant Scan | |--Index Seek(OBJECT:([LOALogs].[dbo].[LogInvSearches_Daily].[IX_LogInvSearches_Daily_LogDay] AS [D]), SEEK:([D].[LogDay] > [Expr1008] AND [D].[LogDay] < [Expr1009]) ORDERED FORWARD) |--Index Seek(OBJECT:([propertyControlCenter].[dbo].[Inventory].[IX_Inventory_Acct_ID] AS [I]), SEEK:([I].[Acct_ID]=(18731) AND [I].[Inv_ID]=[LOALogs].[dbo].[LogInvSearches_Daily].[Inv_ID] as [D].[Inv_ID]) ORDERED FORWARD) (8 row(s) affected) (1 row(s) affected) So given that I'm getting good Index Seeks in my execution plan, what can I do to get this running faster? Thanks, Dan

    Read the article

  • What's the difference between DI and factory patterns?

    - by Anthony Short
    I have a class which depends on 3 classes, all 3 of which have other classes they rely on. Currently, I'm using a container class to build up all the required classes, inject them into one another and return the application. The simplified version of the container looks something like this: class Builder { private $_options; public function __construct($options) { $this->_options = $options; } public function build() { $cache = $this->getCache(); $response = $this->getResponse(); $engine = $this->getEngine(); return new Application($cache,$response,$engine); } public function getResponse() { $encoder = $this->getResponseEncoder(); $cache = $this->getResponseCache(); return new Response($encoder,$cache); } // Methods for building each object } I'm not sure if this would be classified as FactoryMethod or a DI Container. They both seem to solve the same problem in the same way - They build objects and inject dependencies. This container has some more complicated building methods, like loading observers and attaching them to observable objects. Should factories be doing all the building (loading extensions etc) and the DI container should use these factories to inject dependencies? That way the sub-packages, like Cache, Response etc, can each have their own specialised factories.

    Read the article

  • Word 2010 Style Sets and Multilevel Lists

    - by Stevia
    In Word 2010, how can you create quick style sets that include multilevel lists (include being the operative word)? As background, I have created a set of styles for a long agreement form and assigned them to levels in a certain custom multilevel list. I then also saved those styles as a quick style set called Long Agreement. I have saved those styles in my normal template. That all works fine for assigning styles to a Long Agreement. What I'd like to do next is create a second style set called Short Agreement. I will assign certain styles to that style set. The issue is that I don't see how to tie a different custom multilevel list to those Short Agreement styles. When I click on Change Styles, Short Agreement [style set], and I apply those styles, how can I get it to automatically use the multilevel list that I assign to short agreements?

    Read the article

  • Problems loading controller from url with codeigniter?

    - by Cody Short
    I'm currently in the process of putting up my first website for public use. I am using the codeigniter framework in order to do this, but I am having trouble loading the controllers from the url. I currently have the default codeigniter installment that you download trying to get things to work. The controller welcome is loaded by default, but when I try to load it through the url it doesn't work. I was having the same problem with the site that I had uploaded earlier. The site is located at this link any help on this would be appreciated.

    Read the article

  • Drive still usable if Seatools reports errors?

    - by Rob
    I have a Seagate 3TB Expansion Desktop drive that was part of a Linux RAID 6 array that failed. I eventually did a zero fill both through Seagate DiscWizard and via Linux dd, neither reported errors. When I ran Seatools now, I got: Short DST - Started 5/31/2014 10:04:36 PM Short DST - Pass 5/31/2014 10:05:37 PM Long Generic - Started 5/31/2014 10:15:19 PM Bad LBA: 518242762 Not Repaired (whole bunch of bad LBAs ommited) Bad LBA: 518715255 Not Repaired Long Generic Aborted 6/1/2014 3:12:18 AM i.e. the short test passed, the long test failed. Unfortunately, the drive is out of warranty, so I can't just RMA it. But I hate tossing a drive that can still be used. So, my questions are: If the zero fill succeeded, and the short test passed, can I still use the whole drive? if not, since I'm using LVM on top of RAID, is there a way to tell either of these to just skip the bad area? If not the above, can I just create partitions before and after the part of the drive with the bad LBAs?

    Read the article

  • Word 2010 Style Sets and Multilevel Lists

    - by Stevia
    In Word 2010, how can you create quick style sets that include multilevel lists (include being the operative word)? As background, I have created a set of styles for a long agreement form and assigned them to levels in a certain custom multilevel list. I then also saved those styles as a quick style set called Long Agreement. I have saved those styles in my normal template. That all works fine for assigning styles to a Long Agreement. What I'd like to do next is create a second style set called Short Agreement. I will assign certain styles to that style set. The issue is that I don't see how to tie a different custom multilevel list to those Short Agreement styles. When I click on Change Styles, Short Agreement [style set], and I apply those styles, how can I get it to automatically use the multilevel list that I assign to short agreements?

    Read the article

  • Converting a JD Edwards Date to a System.DateTime

    - by Christopher House
    I'm working on moving some data from JD Edwards to a SQL Server database using SSIS and needed to deal with the way in which JDE stores dates.  The format is CYYDDD, where: C = century, 1 for >= 2000 and 0 for < 2000 YY = the last two digits of the year DDD = the number of the day.  Jan 1 = 1, Dec. 31 = 365 (or 366 in a leap year) The .Net base class library has lots of good support for handling dates, but nothing as specific as the JD Edwards format, so I needed to write a bit of code to translate the JDE format to System.DateTime.  The function is below: public static DateTime FromJdeDate(double jdeDate) {   DateTime convertedDate = DateTime.MinValue;   if (jdeDate >= 30001 && jdeDate <= 200000)   {     short yearValue = (short)(jdeDate / 1000d + 1900d);     short dayValue = (short)((jdeDate % 1000) - 1);     convertedDate = DateTime.Parse("01/01/" + yearValue.ToString()).AddDays(dayValue);   }   else   {     throw new ArgumentException("The value provided does not represent a valid JDE date", "jdeDate");   }   return convertedDate; }  I'd love to take credit for this myself, but this is an adaptation of a TSQL UDF that I got from another consultant at the client site.

    Read the article

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