Search Results

Search found 173 results on 7 pages for 'trans'.

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

  • Query performs poorly unless a temp table is used

    - by Paul McLoughlin
    The following query takes about 1 minute to run, and has the following IO statistics: SELECT T.RGN, T.CD, T.FUND_CD, T.TRDT, SUM(T2.UNITS) AS TotalUnits FROM dbo.TRANS AS T JOIN dbo.TRANS AS T2 ON T2.RGN=T.RGN AND T2.CD=T.CD AND T2.FUND_CD=T.FUND_CD AND T2.TRDT<=T.TRDT JOIN TASK_REQUESTS AS T3 ON T3.CD=T.CD AND T3.RGN=T.RGN AND T3.TASK = 'UPDATE_MEM_BAL' GROUP BY T.RGN, T.CD, T.FUND_CD, T.TRDT (4447 row(s) affected) Table 'TRANSACTIONS'. Scan count 5977, logical reads 7527408, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'TASK_REQUESTS'. Scan count 1, logical reads 11, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 58157 ms, elapsed time = 61437 ms. If I instead introduce a temporary table then the query returns quickly and performs less logical reads: CREATE TABLE #MyTable(RGN VARCHAR(20) NOT NULL, CD VARCHAR(20) NOT NULL, PRIMARY KEY([RGN],[CD])); INSERT INTO #MyTable(RGN, CD) SELECT RGN, CD FROM TASK_REQUESTS WHERE TASK='UPDATE_MEM_BAL'; SELECT T.RGN, T.CD, T.FUND_CD, T.TRDT, SUM(T2.UNITS) AS TotalUnits FROM dbo.TRANS AS T JOIN dbo.TRANS AS T2 ON T2.RGN=T.RGN AND T2.CD=T.CD AND T2.FUND_CD=T.FUND_CD AND T2.TRDT<=T.TRDT JOIN #MyTable AS T3 ON T3.CD=T.CD AND T3.RGN=T.RGN GROUP BY T.RGN, T.CD, T.FUND_CD, T.TRDT (4447 row(s) affected) Table 'Worktable'. Scan count 5974, logical reads 382339, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'TRANSACTIONS'. Scan count 4, logical reads 4547, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table '#MyTable________________________________________________________________000000000013'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 1420 ms, elapsed time = 1515 ms. The interesting thing for me is that the TASK_REQUEST table is a small table (3 rows at present) and statistics are up to date on the table. Any idea why such different execution plans and execution times would be occuring? And ideally how to change things so that I don't need to use the temp table to get decent performance? The only real difference in the execution plans is that the temp table version introduces an index spool (eager spool) operation.

    Read the article

  • ASP.Net MVC - Models and User Controls

    - by cdotlister
    Hi guys, I have a View with a Master Page. The user control makes use of a Model: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BudgieMoneySite.Models.SiteUserLoginModel>" %> This user control is shown on all screens (Part of the Master Page). If the user is logged in, it shows a certain text, and if the user isn't logged in, it offers a login box. That is working OK. Now, I am adding my first functional screen. So I created a new view... and, well, i generated the basic view code for me when I selected the controller method, and said 'Create View'. My Controller has this code: public ActionResult Transactions() { List<AccountTransactionDetails> trans = GetTransactions(); return View(trans); } private List<AccountTransactionDetails> GetTransactions() { List<AccountTransactionDto> trans = Services.TransactionServices.GetTransactions(); List<AccountTransactionDetails> reply = new List<AccountTransactionDetails>(); foreach(var t in trans) { AccountTransactionDetails a = new AccountTransactionDetails(); foreach (var line in a.Transactions) { AccountTransactionLine l = new AccountTransactionLine(); l.Amount = line.Amount; l.SubCategory = line.SubCategory; l.SubCategoryId = line.SubCategoryId; a.Transactions.Add(l); } reply.Add(a); } return reply; } So, my view was generated with this: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.List<BudgieMoneySite.Models.AccountTransactionDetails>>" %> Found <%=Model.Count() % Transactions. All I want to show for now is the number of records I will be displaying. When I run it, I get an error: "The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[BudgieMoneySite.Models.AccountTransactionDetails]', but this dictionary requires a model item of type 'BudgieMoneySite.Models.SiteUserLoginModel'." It looks like the user control is being rendered first, and as the Model from the controller is my List<, it's breaking! What am I doing wrong?

    Read the article

  • smartif tag not working out correctly

    - by 47
    I'm using the smartif tag from this snippet (I'm holding on with regards to upgrading to 1.2) in my template for a certain boolean field like so: {% if payment.extends_membership == "True" %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %} But whatever the value of extends_membership I get only No as the output. What could be the problem?

    Read the article

  • How to resolve user registration and activation email error in Django registration?

    - by user2476295
    So I was just trying to setup a basic user authentication in Django and downloaded a django registration app with templates. Now when I run the server at 127.0.0.1:8000/accounts/register/ I get a basic registration page, I fill in the details and when I click submit I get this error "NoReverseMatch at /accounts/register/" Error during template rendering In template Users/sudhasinha/mysite/mysite/registration/templates/registration/activation_email.txt, error at line 4 'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs. 1 {% load i18n %} 2 {% trans "Activate account at" %} {{ site.name }}: 3 4 http://{{ site.domain }}{**% url registration_activate activation_key %**} 5 6 {% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %} 7 This is what my activation_email.txt looks like: {% load i18n %} {% trans "Activate account at" %} {{ site.name }}: http://{{ site.domain }}{% url registration_activate activation_key %} {% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %} And this is what my registration_form.html looks like: {% extends "base.html" %} {% load i18n %} {% block content %} <form method="post" action="."> {{ form.as_p }} <input type="submit" value="{% trans 'Submit' %}" /> </form> {% endblock %} I have very minimal experience with Django and would appreciate some help to resolve this error. My urls seem to be setup correctly but I will post it if needed. Also pardon my horrible formatting

    Read the article

  • How do I animate UserControl objects using Storyboard and DoubleAnimation?

    - by Neo
    In my WPF application, I have a Canvas object that contains some UserControl objects. I wish to animate the UserControl objects within the Canvas using DoubleAnimation so that they go from the right of the Canvas to the left of the Canvas. This is how I have done it so far (by passing the UserControl objects into the function): private void Animate(FrameworkElement e) { DoubleAnimation ani = new DoubleAnimation() { From = _container.ActualWidth, To = 0.0, Duration = new Duration(new TimeSpan(0, 0, 10), TargetElement = e }; TranslateTransform trans = new TranslateTransform(); e.RenderTransform = trans; trans.BeginAnimation(TranslateTransform.XProperty, ani, HandoffBehavior.Compose); } However, this doesn't allow me to pause the animation, so I have considered using a Storyboard instead to do this, but I'm not sure how to implement this. This has been my attempt so far: private void Animate(FrameworkElement e) { DoubleAnimation ani = new DoubleAnimation() { From = _container.ActualWidth, To = 0.0, Duration = new Duration(new TimeSpan(0, 0, 10), TargetElement = e }; Storyboard stb = new Storyboard(); Storyboard.SetTarget(ani, e); Storyboard.SetTargetProperty(ani, "Left"); stb.Children.Add(ani); stb.Begin(); } Of course, this fails as UserControl doesn't have a Left property. How can I achieve what I'm after? Thanks.

    Read the article

  • Ruby hpricot does not like dash in symbol, is there a workaround?

    - by eakkas
    I am trying to parse an xml file with hpricot. The xml element that I am trying to get has a dash though and hence the issue that I am facing xml <xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1"> <trans-unit> <source>"%0" can not be found. Please try again.</source> <target>"%0" can not be found. Please try again.</target> </trans-unit> </xliff> rb def read_in_xliff(xlf_file_name) stream = open(xlf_file_name) {|f| Hpricot(f)} (stream/:xliff/:'trans-unit').each do |transunit| .......... This does not work because of the dash. If I rename the tag to transunit and edit the symbol reference accordingly everything seems to be fine. I thought using the symbol between quotes should work but hpricot does not seem to like this. Can anyone think of a workaround? Thanks in advance

    Read the article

  • What is the best way to use Guice and JMock together?

    - by Yishai
    I have started using Guice to do some dependency injection on a project, primarily because I need to inject mocks (using JMock currently) a layer away from the unit test, which makes manual injection very awkward. My question is what is the best approach for introducing a mock? What I currently have is to make a new module in the unit test that satisfies the dependencies and bind them with a provider that looks like this: public class JMockProvider<T> implements Provider<T> { private T mock; public JMockProvider(T mock) { this.mock = mock; } public T get() { return mock; } } Passing the mock in the constructor, so a JMock setup might look like this: final CommunicationQueue queue = context.mock(CommunicationQueue.class); final TransactionRollBack trans = context.mock(TransactionRollBack.class); Injector injector = Guice.createInjector(new AbstractModule() { @Override protected void configure() { bind(CommunicationQueue.class).toProvider(new JMockProvider<QuickBooksCommunicationQueue>(queue)); bind(TransactionRollBack.class).toProvider(new JMockProvider<TransactionRollBack>(trans)); } }); context.checking(new Expectations() {{ oneOf(queue).retrieve(with(any(int.class))); will(returnValue(null)); never(trans); }}); injector.getInstance(RunResponse.class).processResponseImpl(-1); Is there a better way? I know that AtUnit attempts to address this problem, although I'm missing how it auto-magically injects a mock that was created locally like the above, but I'm looking for either a compelling reason why AtUnit is the right answer here (other than its ability to change DI and mocking frameworks around without changing tests) or if there is a better solution to doing it by hand.

    Read the article

  • Insert records using ExecuteNonQuery, showing exception that invalid column name

    - by tina
    Hi all, I am using SQL Server 2008. I want to insert records into a table using ExecuteNonQuery, for that I have written: customUtility.ExecuteNonQuery("insert into furniture_ProductAccessories(Product_id, Accessories_id, SkuNo, Description1, Price, Discount) values(" + prodid + "," + strAcc + "," + txtSKUNo.Text + "," + txtAccDesc.Text + "," + txtAccPrices.Text + "," + txtAccDiscount.Text + ")"); & following is ExecuteNonQuery function: public static bool ExecuteNonQuery(string SQL) { bool retVal = false; using (SqlConnection con = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["dbConnect"].ToString())) { con.Open(); SqlTransaction trans = con.BeginTransaction(); SqlCommand command = new SqlCommand(SQL, con, trans); try { command.ExecuteNonQuery(); trans.Commit(); retVal = true; } catch(Exception ex) { //HttpContext.Current.Response.Write(SQL + "<br>" + ex.Message); //HttpContext.Current.Response.End(); } finally { // Always call Close when done reading. con.Close(); } return retVal; } } but it showing exception that invalid column name to Description1 and even it's value which coming from txtAccDesc.Text. I have tried by removing Description1 column, other records are getting inserted successfully. Could you please help me? Thanks.

    Read the article

  • Post JSON array to mvc controller

    - by Yustme
    I'm trying to post a JSON array to a mvc controller. But no matter what i try, everything is 0 or null. I have this table that contains textboxes. I need from all those textboxes it's ID and value as an object. This is my java code: $(document).ready(function () { $('#submitTest').click(function (e) { var $form = $('form'); var trans = new Array(); var parameters = { TransIDs: $("#TransID").val(), ItemIDs: $("#ItemID").val(), TypeIDs: $("#TypeID").val(), }; trans.push(parameters); if ($form.valid()) { $.ajax( { url: $form.attr('action'), type: $form.attr('method'), data: JSON.stringify(parameters), dataType: "json", contentType: "application/json; charset=utf-8", success: function (result) { $('#result').text(result.redirectTo) if (result.Success == true) { return fase; } else { $('#Error').html(result.Html); } }, error: function (request) { alert(request.statusText) } }); } e.preventDefault(); return false; }); }); This is my view code: <table> <tr> <th>trans</th> <th>Item</th> <th>Type</th> </tr> @foreach (var t in Model.Types.ToList()) { { <tr> <td> <input type="hidden" value="@t.TransID" id="TransID" /> <input type="hidden" value="@t.ItemID" id="ItemID" /> <input type="hidden" value="@t.TypeID" id="TypeID" /> </td> </tr> } } </table> This is the controller im trying to receive the data to: [HttpPost] public ActionResult Update(CustomTypeModel ctm) { return RedirectToAction("Index"); } What am i doing wrong?

    Read the article

  • SQL Server replication - Log Reader Agent Read Latency Issue, Please help

    - by envykok
    Hi all, I am facing one transactional replication delay issue on log reader agent. The log reader output is : ********* STATISTICS SINCE AGENT STARTED ************** 02-28-2011 20:12:08 Execution time (ms): 304141 Work time (ms): 304016 Distribute Repl Cmds Time(ms): 303764 Fetch time(ms): 300813 Repldone time(ms): 1826 Write time(ms): 5319 Num Trans: 15500 Num Trans/Sec: 50.984159 Num Cmds: 191639 Num Cmds/Sec: 630.358271 It seems Log Reader Reader-Thread Latency, and I also run 'sp_replcounters' and see more than 20,000 sec replication latency and keep on increasing. I used SQL profiler to monitor sp_replcmds and found sp_replcmds execution time was 11 sec to 15 sec Is it there any way to optimize to make Log Reader read faster from transaction log??? Other information: SQL Server 2008 (SP2) Standard 64 bit

    Read the article

  • How to get tilemap transparency color working with TiledLib's Demo implementation?

    - by Adam LaBranche
    So the problem I'm having is that when using Nick Gravelyn's tiledlib pipeline for reading and drawing tmx maps in XNA, the transparency color I set in Tiled's editor will work in the editor, but when I draw it the color that's supposed to become transparent still draws. The closest things to a solution that I've found are - 1) Change my sprite batch's BlendState to NonPremultiplied (found this in a buried Tweet). 2) Get the pixels that are supposed to be transparent at some point then Set them all to transparent. Solution 1 didn't work for me, and solution 2 seems hacky and not a very good way to approach this particular problem, especially since it looks like the custom pipeline processor reads in the transparent color and sets it to the color key for transparency according to the code, just something is going wrong somewhere. At least that's what it looks like the code is doing. TileSetContent.cs if (imageNode.Attributes["trans"] != null) { string color = imageNode.Attributes["trans"].Value; string r = color.Substring(0, 2); string g = color.Substring(2, 2); string b = color.Substring(4, 2); this.ColorKey = new Color((byte)Convert.ToInt32(r, 16), (byte)Convert.ToInt32(g, 16), (byte)Convert.ToInt32(b, 16)); } ... TiledHelpers.cs // build the asset as an external reference OpaqueDataDictionary data = new OpaqueDataDictionary(); data.Add("GenerateMipMaps", false); data.Add("ResizetoPowerOfTwo", false); data.Add("TextureFormat", TextureProcessorOutputFormat.Color); data.Add("ColorKeyEnabled", tileSet.ColorKey.HasValue); data.Add("ColorKeyColor", tileSet.ColorKey.HasValue ? tileSet.ColorKey.Value : Microsoft.Xna.Framework.Color.Magenta); tileSet.Texture = context.BuildAsset<Texture2DContent, Texture2DContent>( new ExternalReference<Texture2DContent>(path), null, data, null, asset); ... I can share more code as well if it helps to understand my problem. Thank you.

    Read the article

  • How to restore curropted installation?

    - by nightweels
    I have a laptop with dead battery that when there is no current connected to it turns critical so fast and in the energy management in ubuntu, when the battery is critical, there are 2 options: shutdown and hibernate witch is in grey (unclickable), so I have no choice but to chose immediate shutdown, there is no standby even if it is an option in the screen behavior. An immediate shutdown (and I mean by immediate the one that we use when we ended using the computer) happened while I was installing a program called quickly, so after the power was restored, I tried to reinstall the program then I get this translated message: An untreatable error occurred: It seems there is a software error in aptdaemon, the program that lets you install and remove software and any other task related to package management. details: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 968, in simulate trans.unauthenticated = self._simulate_helper(trans) File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 1092, in _simulate_helper return depends, self._cache.required_download, \ File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 235, in required_download pm.get_archives(fetcher, self._list, self._records) SystemError: E:I wasn't able to locate a file for the libpng12-dev package. This might mean you need to manually fix this package.

    Read the article

  • How to parse JSON data from web more faster [closed]

    - by Kaidul Islam Sazal
    I have json inventory inventory.json on the server like this: [ { "body" : "SUV", "color" : { "ext" : "White diamond pearl", "int" : "Taupe" }, "id" : "276181", "make" : "Acura", "miles" : 35949, "model" : "RDX", "pic" : [ { "full" : "http://images1.dealercp.com/90961/000JNBD/001_0292.jpg" } ], "power" : { "drive" : "Front wheel drive", "eng" : "2.3L DOHC PGM-FI 16-VALVE", "trans" : "Automatic" }, "price" : { "net" : 29488 }, "stock" : "6942", "trim" : "AWD 4dr Tech Pkg SUV", "vin" : "5J8TB2H53BA000334", "year" : 2011 }, { "body" : "Sedan", "color" : { "ext" : "Premium white pearl", "int" : "Taupe" }, "id" : "275622", "make" : "Acura", "miles" : 40923, "model" : "TSX", "pic" : [ { "full" : "http://images1.dealercp.com/90961/000JMC6/001_1765.jpg" } ], "power" : { "drive" : "Front wheel drive", "eng" : "2.4L L4 MPI DOHC 16V", "trans" : "Automatic" }, "price" : { "net" : 22288 }, "stock" : "6945", "trim" : "4dr Sdn I4 Auto Sedan", "vin" : "JH4CU2F66AC011933", "year" : 2010 } ] here are two index, There are almost 5000 index like this. I parsed this json like this: var url = "inventory/inventory.json"; $.getJSON(url, function(data){ $.each(data, function(index, item){ //straight-forward loop if(item.year == 2012) { $('#desc').append(item.make + ' ' + item.model + ' ' + '<br/>' + item.price.net + '<br/>' + item.pic[0].full); } }); }); This is working fine.But the problem is that, this searching and fetching process is little bit slow as there are 5000 indexes already and it's increasing day by day. It seems that, it is a straight-forward loop to parse the data and a normal brute-force method. Now I want to know if there any time efiicient way to parse more faster.Any faster method to parse instead of straight-forward loop ?

    Read the article

  • uiview animation used to work on iphone sdk 2.2 and now it doesn't on sdk 3.0

    - by nico
    hello! I have an animation block that worked fine when runnung the app on iphone OS 2.2. Now I compile the same code for iphone OS 3.0 and it doesn't work. UIViewAnimationTransition trans = UIViewAnimationTransitionFlipFromLeft; [UIView beginAnimations: nil context: NULL]; UIView *forview = [[self view] superview]; [UIView setAnimationTransition: trans forView:forview cache: YES]; [UIView setAnimationDuration:1.0]; [[self navigationController] popViewControllerAnimated:NO]; [UIView commitAnimations]; What the code does, it uses the navigation controller to change the top most view, but with the flip transition and not with the built in one. any ideas on what might have change in the sdk or what I'm doing wrong? thanks!!

    Read the article

  • Failed Castle ActiveRecord TransactionScope causes future queries to be invalid

    - by mbp
    I am trying to solve an issue when using a Castle ActiveRecord TransactionScope which is rolled back. After the rollback, I am unable to query the Dog table. The "Dog.FindFirst()" line fails with "Could not perform SlicedFindAll for Dog", because it cannot insert dogMissingName. using (new SessionScope()) { try { var trans = new TransactionScope(TransactionMode.New, OnDispose.Commit); try { var dog = new Dog { Name = "Snowy" }; dog.Save(); var dogMissingName = new Dog(); dogMissingName.Save(); } catch (Exception) { trans.VoteRollBack(); throw; } finally { trans.Dispose(); } } catch (Exception ex) { var randomDog = Dog.FindFirst() Console.WriteLine("Random dog : " + randomDog.Name); } } Stacktrace is as follows: Castle.ActiveRecord.Framework.ActiveRecordException: Could not perform SlicedFindAll for Dog ---> NHibernate.Exceptions.GenericADOException: could not insert: [Mvno.Dal.Dog#219e86fa-1081-490a-92d1-9d480171fcfd][SQL: INSERT INTO Dog (Name, Id) VALUES (?, ?)] ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Name', table 'Dog'; column does not allow nulls. INSERT fails. The statement has been terminated. ved System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) ved System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) ved System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) ved System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) ved System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) ved System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) ved System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) ved System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) ved System.Data.SqlClient.SqlCommand.ExecuteNonQuery() ved NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd) ved NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation) ved NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) --- End of inner exception stack trace --- ved NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) ved NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session) ved NHibernate.Action.EntityInsertAction.Execute() ved NHibernate.Engine.ActionQueue.Execute(IExecutable executable) ved NHibernate.Engine.ActionQueue.ExecuteActions(IList list) ved NHibernate.Engine.ActionQueue.ExecuteActions() ved NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) ved NHibernate.Event.Default.DefaultAutoFlushEventListener.OnAutoFlush(AutoFlushEvent event) ved NHibernate.Impl.SessionImpl.AutoFlushIfRequired(ISet`1 querySpaces) ved NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) ved NHibernate.Impl.CriteriaImpl.List(IList results) ved NHibernate.Impl.CriteriaImpl.List() ved Castle.ActiveRecord.ActiveRecordBase.SlicedFindAll(Type targetType, Int32 firstResult, Int32 maxResults, Order[] orders, ICriterion[] criteria) --- End of inner exception stack trace --- ved Castle.ActiveRecord.ActiveRecordBase.SlicedFindAll(Type targetType, Int32 firstResult, Int32 maxResults, Order[] orders, ICriterion[] criteria) ved Castle.ActiveRecord.ActiveRecordBase.FindFirst(Type targetType, Order[] orders, ICriterion[] criteria) ved Castle.ActiveRecord.ActiveRecordBase.FindFirst(Type targetType, ICriterion[] criteria) ved Castle.ActiveRecord.ActiveRecordBase`1.FindFirst(ICriterion[] criteria)

    Read the article

  • HTTP Headers for Unknown Content-Length

    - by jocull
    I am currently trying to stream content out to the web after a trans-coding process. This usually works fine by writing binary out to my web stream, but some browsers (specifically IE7, IE8) do not like not having the Content-Length defined in the HTTP header. I believe that "valid" headers are supposed to have this set. What is the proper way to stream content to the web when you have an unknown Content-Length? The trans-coding process can take awhile, so I want to start streaming it out as it completes.

    Read the article

  • Visual Studio 2008 macro only works from the Macro IDE, not the Macro Explorer

    - by Cat
    Edit: Creating a new module in the same VSMacros project fixed the problem. The following macro only works if I open the Macro IDE from Visual Studio and run the macro from there. It'd be much more useful if I could just right click the macro from the Macro Explorer from my Visual Studio instance. I must be doing something obviously wrong, but I've never worked with VS macros before. The MessageBox does not appear in either case. Option Strict Off Option Explicit Off Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports System.Diagnostics Imports System.Security.Principal Imports System.Windows.Forms Public Module AttachToSdtProcess Sub AttachToSdtProcess() Try 'If MessageBox.Show("Attach to SDT.exe", "Caption", _ ' MessageBoxButtons.OKCancel) = DialogResult.Cancel Then 'Return 'End If Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default") Dim compName As String = WindowsIdentity.GetCurrent().Name compName = compName.Substring(0, compName.IndexOf("\")) Dim proc2 As EnvDTE80.Process2 = _ dbg2.GetProcesses(trans, compName).Item("TheExecutable.exe") If proc2 Is Nothing Then MessageBox.Show("Could not find TheExecutable.exe") End If proc2.Attach2(dbgeng) Catch ex As System.Exception MsgBox(ex.Message) End Try End Sub End Module

    Read the article

  • Decrease DB requests number from Django templates

    - by Andrew
    I publish discount offers for my city. Offer models are passed to template ( ~15 offers per page). Every offer has lot of items(every item has FK to it's offer), thus i have to make huge number of DB request from template. {% for item in offer.1 %} {{item.descr}} {{item.start_date}} {{item.price|floatformat}} {%if not item.tax_included %}{%trans "Without taxes"%}{%endif%} <a href="{{item.offer.wwwlink}}" >{%trans "Buy now!"%}</a> </div> <div class="clear"></div> {% endfor %} So there are ~200-400 DB requests per page, that's abnormal i expect. In django code it is possible to use select_related to prepopulate needed values, how can i decrease number of requests in template?

    Read the article

  • MySQL - how long to create an index?

    - by user293594
    Can anyone tell me how adding a key scales in MySQL? I have 500,000,000 rows in a database, trans, with columns i (INT UNSIGNED), j (INT UNSIGNED), nu (DOUBLE), A (DOUBLE). I try to index a column, e.g. ALTER TABLE trans ADD KEY idx_A (A); and I wait. For a table of 14,000,000 rows it took about 2 minutes to execute on my MacBook Pro, but for the whole half a billion, it's taking 15hrs and counting. Am I doing something wrong, or am I just being naive about how indexing a database scales with the number of rows?

    Read the article

  • Is there a difference SMO ServerConnection transaction methods versus using the SqlConnectionObject

    - by YWE
    I am using SMO to create databases and tables on a SQL Server. I want to do so in a transaction. Are both of these methods of doing so valid and equivalent: First method: Server server; //... server.ConnectionContext.BeginTransaction(); //... server.ConnectionContext.CommitTransaction(); Second method: Server server; // ... SqlConnection conn = server.ConnectionContext.SqlConnectionObject; SqlTransaction trans = conn.BeginTransaction(); // ... trans.Commit();

    Read the article

  • Can access maven repository from behind proxy, need help.

    - by Digambar Daund
    I am trying to access maven repository from behind proxy. I configured settings.xml correctly (i guess so...) true http username password 12.34.56.78 8080 But still I am error message like... if i dont configure userid/password gets correct error message which is HTTP response code 407 - saying authentication required. But If I configure correct/incorrect proxy authentication it always prints below error message.... Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error trans ferring file: Server redirected too many times (20) Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error trans ferring file: Server redirected too many times (20) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR

    Read the article

  • Getting strange response on calling verifyReceipt to verify an in-app

    - by lostInTransit
    Hi I am making a call to verifyReceipt to validate an in-app purchase but am getting a very strange response (the response is b) The same code worked till some time back. But I stopped the app debugging while the trans was being verified at one point. From there on, the only response I get is b. I checked the code and it has nothing wrong. As I said, the same code worked till I stopped this trans mid-way. Any idea what could be wrong? Thanks.

    Read the article

  • XNA - Mouse coordinates to word space transformation

    - by Gabriel Butcher
    I have a pretty annoying problem. I would like to create a drawing program, using winform + XNA combo. The most important part would be to transform the mouse position into the XNA drawn grid - I was able to make it for the translations, but it only work if I don't zoom in - when I do, the coordinates simply went horrible wrong. And I have no idea what I doing wrong. I tried to transform with scaling matrix, transform with inverse scaling matrix, multiplying with zoom, but none seems to work. In the beginning (with zoom value = 1) the grid starts from (0,0,0) going to (Width, Height, 0). I was able to get coordinates based on this grid as long as the zoom value didn't changed at all. I using a custom shader, with orthographic projection matrix, identity view matrix, and the transformed world matrix. Here is the two main method: internal void Update(RenderData data) { KeyboardState keyS = Keyboard.GetState(); MouseState mouS = Mouse.GetState(); if (ButtonState.Pressed == mouS.RightButton) { camTarget.X -= (float)(mouS.X - oldMstate.X) / 2; camTarget.Y += (float)(mouS.Y - oldMstate.Y) / 2; } if (ButtonState.Pressed == mouS.MiddleButton || keyS.IsKeyDown(Keys.Space)) { zVal += (float)(mouS.Y - oldMstate.Y) / 10; zoom = (float)Math.Pow(2, zVal); } oldKState = keyS; oldMstate = mouS; world = Matrix.CreateTranslation(new Vector3(-camTarget.X, -camTarget.Y, 0)) * Matrix.CreateScale(zoom / 2); } internal PointF MousePos { get { Vector2 mousePos = new Vector2(Mouse.GetState().X, Mouse.GetState().Y); Matrix trans = Matrix.CreateTranslation(new Vector3(camTarget.X - (Width / 2), -camTarget.Y + (Height / 2), 0)); mousePos = Vector2.Transform(mousePos, trans); return new PointF(mousePos.X, mousePos.Y); } } The second method should return the coordinates of the mouse cursor based on the grid (where the (0,0) point of the grid is the top-left corner.). But is just don't work. I deleted the zoom transformation from the matrix trans, as I didnt was able to get any useful result (most of the time, the coordinates was horrible wrong, mostly many thousand when the grid's size is 500x500). Any idea, or suggestion? I trying to solve this simple problem for two days now :\

    Read the article

  • FFmpeg bitrate issue.

    - by user329840
    I'm dealing with a very big issue about bit rate , ffmpeg provide the -b option for the bit rate and for adjustment it provide -minrate and -maxrate, -bufsize but it don't work proper. If i'm giving 256kbps at -b option , when the trans-coding finishes , it provide the 380kbps. How can we achieve the constant bit rate using ffmpeg. If their is +-10Kb it's adjustable. but the video bit rate always exceed by 50-100 kbps. I'm using following command ffmpeg -i "demo.avs" -vcodec libx264 -s 320x240 -aspect 4:3 -r 15 -b 256kb \ -minrate 200kb -maxrate 280kb -bufsize 256kb -acodec libmp3lame -ac 2 \ -ar 22050 -ab 64kb -y "output.mp4" When trans-coding is done, the Media Info show overall bit rate 440kb (it should be 320kb). Is their something wrong in the command. Or i have to use some other parameter? Plz provide your suggestion its very important.

    Read the article

  • Visual Studio Remote Debugging Extensibility

    - by Chris
    I'm trying to attach to a remote machine with code similar to the following: Debugger2 db (Debugger2)dte.Debugger; Transport trans = db.Transports.Item("Default"); Process2 proc2 = (Process2)db.GetProcesses(trans, "MACHINENAME").Item("SERVICENAME"); proc2.Attach2(); I've gotten it to work by logging on through remote desktop and manually starting the debugger, but I have to stay logged in. The problem is, I don't want to stay logged into the remote machine. Is there a way to automatically launch the debugger, similar to what happens when I attach through the IDE?

    Read the article

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