Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 153/604 | < Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >

  • How to specify execution time of x86 and PowerPC instructions?

    - by Goofy
    Hello! I have to approximate execution time of PowerPC and x86 assembler code.I understand that I cannot compute exact it dependson many problems (current processor state - x86 processor dicides internal instructions in microinstructions, memory access time obtainig code from cache of from slower memory etc.). I found some information in Intel Optimizaction reference (APPENDIX C), but it does not provide information about all general purpose instructions. Is there any complete reference about it? What about PowerPC processors? Where can I fund such information?

    Read the article

  • logging in scala

    - by IttayD
    In Java, the standard idiom for logging is to create a static variable for a logger object and use that in the various methods. In Scala, it looks like the idiom is to create a Logging trait with a logger member and mixin the trait in concrete classes. This means that each time an object is created it calls the logging framework to get a logger and also the object is bigger due to the additional reference. Is there an alternative that allows the ease of use of "with Logging" while still using a per-class logger instance? EDIT: My question is not about how one can write a logging framework in Scala, but rather how to use an existing one (log4j) without incurring an overhead of performance (getting a reference for each instance) or code complexity. Also, yes, I want to use log4j, simply because I'll use 3rd party libraries written in Java that are likely to use log4j.

    Read the article

  • How to access SharePoint web part properties?

    - by shannon.stewart
    I have created a feature for SharePoint 2007 that has a web part. I have added a custom property to the web part like so: [Personalizable(PersonalizationScope.Shared)] [WebBrowsable(true)] [Category("My Custom Properties")] [WebDisplayName("ServiceURL")] [WebDescription("The URL for the Wcf service")] public string ServiceURL { get; set; } Along with this web part, I've added a custom page that the web part will have a link to. I would like to reference the web part property from the custom page, but I don't know where these properties are stored. I've tried to access it using the code below, but both property collections don't have any properties stored. SPFeaturePropertyCollection spProperties = SPContext.Current.Site.Features[this.FeatureGuid].Properties; or SPFeaturePropertyCollection spProperties = SPContext.Current.Site.Features[this.FeatureGuid].Definition.Properties; My question is how can I get a reference to the web part property from other pages?

    Read the article

  • Multiple Controls on a Page with Multiple Instances of Javascript

    - by mattdell
    I have created a Web Control in ASP for use in integrating with Telligent CommunityServer. The control is written in ASP with some 10 lines of C# backend for controlling visibility of the UI elements based on permissions, but I'd say 90% of the functionality is straight-up Javascript. The control works beautifully, until you drop two instances of the Control on the same page--since they reference the exact same Javascript functions, only one control works. How can I take this functionality that I have, this 1200 lines of Javascript, and make it so that each instance of the control can reference its each unique instance of Javascript?

    Read the article

  • Seeking References To MSVC 9.0's C++ Standards Compliance

    - by John Dibling
    I "know" (hopefully) that MSVC 9.0 Implements C++ 2003 (ISO/IEC 14882:2003). I am looking for a reference to this fact, and I am also looking for any research that has been done in to how compliant MSVC 9.0 is with that version of the Standard. I have searched for and not been able to find a specific reference from MicroSoft that actually says something to the effect that MSVC implements C++ 2003. Some of the out-of-date documentation says things like "this release achieves roughly 98% compliance" (when referring to MSVC .NET 2003's conformance to C++ 1997). But I want a link to a document from MS that says "MSVC 9.0 implements blah," and another link to an independent group that has tested the conformance of MSVC 9.0. Do you know of any such links?

    Read the article

  • Finding controls inside nested master pages

    - by evanmortland
    I have a master page which is nested 2 levels. It has a master page, and that master page has a master page. When I stick controls in a ContentPlaceHolder with the name "bcr" - I have to find the controls like so: Label lblName =(Label)Master.Master.FindControl("bcr").FindControl("bcr").FindControl("Conditional1").FindControl("ctl03").FindControl("lblName"); Am I totally lost? Or is this how it needs to be done? I am about to work with a MultiView, which is inside of a conditional content control. So if I want to change the view I have to get a reference to that control right? Getting that reference is going to be even nastier! Is there a better way? Thanks

    Read the article

  • What is the difference between NULL in C++ and null in Java?

    - by Stephano
    I've been trying to figure out why C++ is making me crazy typing NULL. Suddenly it hits me the other day; I've been typing null (lower case) in Java for years. Now suddenly I'm programming in C++ and that little chunk of muscle memory is making me crazy. Wikiperipatetic defines C++ NULL as part of the stddef: A macro that expands to a null pointer constant. It may be defined as ((void*)0), 0 or 0L depending on the compiler and the language. Sun's docs tells me this about Java's "null literal": The null type has one value, the null reference, represented by the literal null, which is formed from ASCII characters. A null literal is always of the null type. So this is all very nice. I know what a null pointer reference is, and thank you for the compiler notes. Now I'm a little fuzzy on the idea of a literal in Java so I read on... A literal is the source code representation of a fixed value; literals are represented directly in your code without requiring computation. There's also a special null literal that can be used as a value for any reference type. null may be assigned to any variable, except variables of primitive types. There's little you can do with a null value beyond testing for its presence. Therefore, null is often used in programs as a marker to indicate that some object is unavailable. Ok, so I think I get it now. In C++ NULL is a macro that, when compiled, defines the null pointer constant. In Java, null is a fixed value that any non-primitive can be assigned too; great for testing in a handy if statement. Java does not have pointers, so I can see why they kept null a simple value rather than anything fancy. But why did java decide to change the all caps NULL to null? Furthermore, am I missing anything here?

    Read the article

  • How to convert this foreach loop into Linq code?

    - by a-galkin
    I am new one with Linq and I would like to modify my old c# code to use Linq. The idea of this code to select all tables where it's not set and reference’s field PrimaryTable equal "myTable" foreach (Table table in dbServer.Tables) { if (!table.IsSet) { foreach (Reference refer in table.References) { if (refer.PrimaryTable == "myTable") { tables.Add(table); } } } } After digging in internet I have got this code var q = from table in dbServer.Tables let refers = from refer in table.References where refer.PrimaryTable == "myTable" select refer.ForeignTable where refers.Contains(table.Name) select table; But it does not work at all and I need your help to make it works. Thanks in advance.

    Read the article

  • SForceAPI : unable to find classes listed on API? (Account, Contact, etc)

    - by Firefox
    Hi, API referred : http://www.salesforce.com/us/developer/docs/api/index.htm subsection: reference-standard objects Client side details : partner.wsdl, Axis2 1.5, generated stubs using unpacked option (-u). I was hoping to find some basic objects like Account, Contact, etc (which were listed on above url) so that I can do something like - SObject[] sObjArray = queryResult.getRecords(); for(SObject sObj : sObjArray){ Account acc = [Account] sObj; } [used above approach successfully in another webservice - 'Zuora'] However, I could not find Account class in the generated classes. I guess I am into wrong approach, but atleast I should be finding the classes listed in the reference API. Please help.

    Read the article

  • DbMetal chokes on repeated foreign key references in SQLite - any ideas?

    - by DanM
    I've been struggling to get DbMetal to process my SQLite database. I finally isolated the problem. It won't allow a table to have two foreign key references to the same column. For example, a SQLite database with these two tables will fail: CREATE TABLE Person ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL ); CREATE TABLE Match ( Id INTEGER PRIMARY KEY, WinnerPersonId INTEGER NOT NULL REFERENCES Person(Id), LoserPersonId INTEGER NOT NULL REFERENCES Person(Id) ); I get this error: DbMetal: Sequence contains more than one matching element If I get rid of the second foreign key reference, no error occurs. So, this works: CREATE TABLE Match ( Id INTEGER PRIMARY KEY, WinnerPersonId INTEGER NOT NULL REFERENCES Person(Id), LoserPersonId INTEGER NOT NULL ); But I really need both "person" columns to reference the person table. I submitted a bug report for this, but I could use a workaround in the meantime. Any ideas?

    Read the article

  • Calling methods within same JavaScript class [Prototype]

    - by eldeejay
    I've created a class in Javscript using the prototype Class.Create complete with the initialize function and a few other functions. However, in one of my functions I want to reference another function in the same class, but cannot seem to get the syntax correct. e.g. var sampleClass = Class.create({ initialize: function(){ //do the init work here }, functionA: function(){ //do some more stuff here } functionB: function(){ //Do some stuff functionA() } } I've tried calling functionA() , this.functionA() but nothing works I just get errors. I know how to call the functions externally when the class has been instantiated, but not reference a function from within the class itself. Thanks

    Read the article

  • ASP.NET - Themes and Relative Referencing

    - by user70192
    Hello, I have an ASP.NET application that uses themes. Let's pretend I have a theme named "MySkin". I have a page that is in a sub-directory of my application. When I reference a page that uses "MySkin", I noticed that ASP.NET renders a link element that walks up to the root of the site and then down into the App_Themes directory. Here is an example link element I found in a rendered ASP.NET page: <link href="../../App_Themes/MySkin/theme.css" type="text/css" rel="stylesheet" /> Is there a reason that the rendered link element does not use the following instead: <link href="/App_Themes/MySkin/theme.css" type="text/css" rel="stylesheet" /> Is this a browser compatibility issue or is there another reason? The reason I am asking is because I am rendering my ASP.NET page using Server.Execute and storing the result in a different directory. Because of this, I would prefer to use the second way to reference my theme's css. Thank you!

    Read the article

  • remove registry keys using reg.exe in a batch script

    - by Lex
    I've written this little batch script to help me auto-clean the registries of 300+ identical PC's of some very specific registry keys. It works right up to the point of passing the key variable to the "reg delete %1" command. @echo off C: cd C:\Program Files\McAfee\Common Framework\ framepkg.exe remove=agent /silent setlocal for /F %%c in ('REG QUERY HKLM\SOFTWARE /s^|FIND "HKEY_"^|findstr /L /I /C:"mcafee"') do call :delete %%c endlocal goto :EOF :delete reg delete /f %1 pause Any and all debugging help would be extremely appreciated!

    Read the article

  • In the java DBCP connection pool - what is an idle connection?

    - by Ravenor
    A colleague at work insists that a DBCP idle connection is a connection that has lain unused for 30 minutes. I believe a dbcp idle connection is a connection that is in the pool available to be borrowed, and an active connection is one that is borrowed. Looking through the code I found no reference to 30 minutes or other magic values and a cursory glance through the code for assuring minidle does not show any such logic. If he is correct can you please back that up with a code or documentation reference. For the complete answer I would like it answered for both DBCP 1.1 and 1.6.

    Read the article

  • .NET WebService Security who can see and use.

    - by user295734
    Trying to firgure out how to test the security of a WebService. Is there some way to search a site for webservices? I have 2 applications one has a webservice and the other a reference to that service. I let visual studio build the reference in the App_WebReferences folder. The webservice works, but i started wondering, can anyone access this service from any website? If so, how can i test this? How do you search a site for webservices? Could I use jQuery/JSON code from a simple site to access a webservice? I guess if it is not secure, how do you secure a webservice?

    Read the article

  • What does ER_WARN_FIELD_RESOLVED mean?

    - by VolkerK
    When SHOW WARNINGS after a EXPLAIN EXTENDED shows a Note 1276 Field or reference 'test.foo.bar' of SELECT #2 was resolved in SELECT #1 what exactly does that mean and what impact does it have? In my case it prevents mysql from using what seems to be a perfectly good index. But it's not about fixing that specific query (as it is an irrelevant test). I found http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html butError: 1276 SQLSTATE: HY000 (ER_WARN_FIELD_RESOLVED) Message: Field or reference '%s%s%s%s%s' of SELECT #%d was resolved in SELECT #%d isn't much of an explaination.

    Read the article

  • <transport> tag within the ServicesReferences.ClientConfig

    - by jdiaz
    I've created a WCF service and added it to an existing Silverlight application that I am working on. When I run the silverlight application in debug mode it fails when I reference the WCF web service. Unrecognized element '' in service reference configuration. Note that only a subset of the Windows Communication Foundation configuration functionality is available in Silverlight. After searching around apparently the following line is causing the app to fail: <transport> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> After removing the above lines everything works. What is the issue here? Should I believing this code in and configuring something else?

    Read the article

  • Excel 2003 - ADDRESS() function issues

    - by hairdresser-101
    I finally thought I had found a way to acutally use excel productively but the code that I followed does not appear to work. I'm thinking that the code is very limited and can't do what I want but I thought I'd ask to confirm - maybe it is my function that is the problem. I want to calculate the sum of a row of values for the previous month based on how many days we are into this month (i.e. It is the 20th of April so I want to sum the first 20 days of March to compare against.) =SUM(G4:ADDRESS(ROW(),7+$BR$3,4)) I basically want to SUM(G4:AA4) and have used the address function to return the cell reference AA4 by taking G4 and adding 20 to the column count. ADDRESS(ROW(),7+$BR$3,4) This successfully returns AA7 as expected HOWEVER, when I try to use the returning value in the SUM() function it throws an error... Am I not able to use this reference in my calculation?

    Read the article

  • Referencing a control inside a XSL Template from code behind ?

    - by Mina Samy
    Hi all I have a custom NewItem.aspx that I made by creating a new aspx from the exisiting one I wanted to put a control in a row inside the XSL Template like this <asp:DropDownList ID="ddlSectors" AutoPostBack="true" runat="server" __designer:bind="{ddwrt:DataBind('i',ddlSectors,'SelectedValue','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Sector')}"> </asp:DropDownList> <!--<SharePoint:FormField runat="server" id="ff7{$Pos}" ControlMode="New" FieldName="Sector" __designer:bind="{ddwrt:DataBind('i',concat('ff7',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Sector')}"/>--> <SharePoint:FieldDescription runat="server" id="ff7description{$Pos}" FieldName="Sector" ControlMode="New"/> Now I want to reference ddlSectors from my code library but it always throws an object reference not set to an instatnce of an object. I believe that this is becuase the control is inside the XSL template. so is there any workaround for this ? thanks

    Read the article

  • Silverlight datagrid don't show any data with anonymous query RIA services

    - by user289082
    Hi all! I have an anonymous linq query that I bind to a datagrid, when I debug it brings alright the data but it doesn't show in the datagrid, I suspect that the request to RIA services isn't completed before I bound it to the datagrid. I could use the LoadOperation<() Completed event. But it only works with Defined Entities so how can I do that? For reference here is the last post: http://stackoverflow.com/questions/2403903/linq-query-null-reference-exception Here is the query: var bPermisos = from b in ruc.Permisos where b.IdUsuario == SelCu.Id select new { Id=b.Id, IdUsuario=b.IdUsuario, IdPerfil=b.IdPerfil, Estatus=b.Estatus, Perfil=b.Cat_Perfil.Nombre, Sis=b.Cat_Perfil.Cat_Sistema.Nombre }; I'm a totally newbie sorry if is a very simple question. Thanks!!

    Read the article

  • How can the Kindle be used as a source code reading tool?

    - by Homer6
    I'm a programmer. I want to be a better programmer. I want to read more source code written by other people (especially open source projects). Also, I'd like to be able to have a on-hand searchable reference to all of that source code so that I can pull up reference to structures and snippets. Does anyone know of a way to use the Kindle for this? Has anyone tried? What were your findings? Additionally, does anyone know of a website that indexes all open source source code?

    Read the article

  • CORE DATA objectId changes constantly

    - by mongeta
    Hello, I have some data that I export into an XML file and put in a remote FTP Server. I have to identified each object with a unique attribute, it doesn't matter wich is, but must be persistent always = it can never change. I don't want to create a unique attribute, sequence, serial, etc. I'm using the objectID but every time I use it a get a new reference. I know that before the object has been saved, it has a 'temporal id', but once it's saved, it gets the definitive. I'm not seeing this, never. When I export, just fetch all data and loop, and always I get a new reference: NSURL *objectID = [[personalDataObject objectID] URIRepresentation]; // some of id received for the SAME OBJECT (no changes made, saved, ...) // 61993296 // 62194624 thanks, r. edit I was using %d instead of %@, now the returned data is: x-coredata://F46F3300-8FED-4876-B0BF-E4D2A9D80913/DataEntered/p1 x-coredata://F46F3300-8FED-4876-B0BF-E4D2A9D80913/DataEntered/p2

    Read the article

  • C# Select clause returns system exception instead of relevant object

    - by Kashif
    I am trying to use the select clause to pick out an object which matches a specified name field from a database query as follows: objectQuery = from obj in objectList where obj.Equals(objectName) select obj; In the results view of my query, I get: base {System.SystemException} = {"Boolean Equals(System.Object)"} Where I should be expecting something like a Car, Make, or Model Would someone please explain what I am doing wrong here? The method in question can be seen here: // this function searches the database's table for a single object that matches the 'Name' property with 'objectName' public static T Read<T>(string objectName) where T : IEquatable<T> { using (ISession session = NHibernateHelper.OpenSession()) { IQueryable<T> objectList = session.Query<T>(); // pull (query) all the objects from the table in the database int count = objectList.Count(); // return the number of objects in the table // alternative: int count = makeList.Count<T>(); IQueryable<T> objectQuery = null; // create a reference for our queryable list of objects T foundObject = default(T); // create an object reference for our found object if (count > 0) { // give me all objects that have a name that matches 'objectName' and store them in 'objectQuery' objectQuery = from obj in objectList where obj.Equals(objectName) select obj; // make sure that 'objectQuery' has only one object in it try { foundObject = (T)objectQuery.Single(); } catch { return default(T); } // output some information to the console (output screen) Console.WriteLine("Read Make: " + foundObject.ToString()); } // pass the reference of the found object on to whoever asked for it return foundObject; } } Note that I am using the interface "IQuatable<T>" in my method descriptor. An example of the classes I am trying to pull from the database is: public class Make: IEquatable<Make> { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual IList<Model> Models { get; set; } public Make() { // this public no-argument constructor is required for NHibernate } public Make(string makeName) { this.Name = makeName; } public override string ToString() { return Name; } // Implementation of IEquatable<T> interface public virtual bool Equals(Make make) { if (this.Id == make.Id) { return true; } else { return false; } } // Implementation of IEquatable<T> interface public virtual bool Equals(String name) { if (this.Name.Equals(name)) { return true; } else { return false; } } } And the interface is described simply as: public interface IEquatable<T> { bool Equals(T obj); }

    Read the article

  • how to run line by line in text file - on windows mobile ?

    - by Gold
    hi in WinForm on PC i use to run like this: FileStream FS = null; StreamWriter SW = null; FS = new FileStream(@"\Items.txt", FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); SW = new StreamWriter(FS, Encoding.Default); while (SW.Peek() != -1) { TEMP = (SW.ReadLine()); } but when i try this on Windows-mobile i get error: Error 1 'System.IO.StreamWriter' does not contain a definition for 'Peek' and no extension method 'Peek' accepting a first argument of type 'System.IO.StreamWriter' could be found (are you missing a using directive or an assembly reference?) Error 2 'System.IO.StreamWriter' does not contain a definition for 'ReadLine' and no extension method 'ReadLine' accepting a first argument of type 'System.IO.StreamWriter' could be found (are you missing a using directive or an assembly reference?) how to do it ? thanks

    Read the article

< Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >