Search Results

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

Page 51/604 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • How can I delete, break, or otherwise convert cross references to simple text in microsoft word 2013

    - by Mr Purple
    Cross referencing figure and table captions is useful while editing a document but can become confude when copying and pasting between large documents. I need to pass my document to a colleague who will collate my document with others and has requested that I remove or delete any cross referencing so that my "correct" cross references do not interfere or get interfered with by any other cross references that may be in my colleagues master collated document. My document will be cut and pasted into the master and no further complicated instructions after that point will be tolerated by my colleague. Is there a simple way to convert my cross references to simple text? I am using microsoft word 2013.

    Read the article

  • Resources about Excel tables and structured references?

    - by jtolle
    I'm new to Excel-post-2000, and I'd like to learn more about how to use tables (formerly lists) and structured references. Can anyone point me to some good treatments of this topic that go beyond the help? (For example, there are numerous full books about just pivot tables. Something like that for using table would be ideal.)

    Read the article

  • Book Recommendations for Technical/Solutions Architecture [closed]

    - by giant_squid
    I wish to learn more about Technical and Solutions Architecture. Specifically, I'm concerned with designing HA, Fault-Tolerant Scalable web-based solutions (enough buzzwords ;-). Its a topic I'm familiar with on a technical level having worked as a sysadmin, but I don't know all the buzzwords Architects use and have to brush up on my UML and diagram techniques. I would like a book that describes what architecture is as a discipline and explores standard design patterns, and some do's and don'ts. Do you have any recommendations? I apologise if this sounds vague, its because I am still learning what Architecture is as a discipline having come from a sysadmin background. To be 100% clear I'm looking for books or websites that give broad overviews of what System Design patterns exist and how the discipline works. Thanks Instead of closing the question maybe you could comment on what exactly about it you don't like.

    Read the article

  • MSBuild: TlbImp error since upgrading to VS 2010

    - by floele
    Hi, since upgrading my project to VS2010, including the use of MSBuild v4 instead of 3.5 (and not making any other changes), I get the following build error and have no clue how to fix it (log from CC.NET): <target name="ResolveComReferences" success="false"> <message level="high"><![CDATA[C:\Programme\Microsoft SDKs\Windows\v7.0A\bin\TlbImp.exe c:\Assemblies\NMSDVDXU.dll /namespace:NMSDVDXLib /machine:X64 /out:obj\x64\Release\Interop.NMSDVDXLib.dll /sysarray /transform:DispRet /reference:c:\Assemblies\Bass.Net.dll /reference:c:\Assemblies\LogicNP.FileView.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Design.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Management.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:C:\WINDOWS\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll ]]></message> <error code="TI0000" file="TlbImp"><![CDATA[A single valid machine type compatible with the input type library must be specified.]]></error> <warning code="MSB3283" file="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" line="1558" column="9"><![CDATA[Die Wrapperassembly für die Typbibliothek "NMSDVDXLib" wurde nicht gefunden.]]></warning> <message level="high"><![CDATA[C:\Programme\Microsoft SDKs\Windows\v7.0A\bin\TlbImp.exe c:\Assemblies\StarBurnX12.dll /namespace:RocketDivision.StarBurnX /machine:X64 /out:obj\x64\Release\Interop.RocketDivision.StarBurnX.dll /sysarray /transform:DispRet /reference:c:\Assemblies\Bass.Net.dll /reference:c:\Assemblies\LogicNP.FileView.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Design.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Management.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:C:\WINDOWS\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll ]]></message> <error code="TI0000" file="TlbImp"><![CDATA[A single valid machine type compatible with the input type library must be specified.]]></error> <warning code="MSB3283" file="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" line="1558" column="9"><![CDATA[Die Wrapperassembly für die Typbibliothek "RocketDivision.StarBurnX" wurde nicht gefunden.]]></warning> </target> Problem: A single valid machine type compatible with the input type library must be specified. It only applies to the x64 build of my project, x86 still works fine. Apparently, it tries to build a x64 interop assembly from the x86 DLL located in "C:\Assemblies". When executing the TlbImp command with the x64 DLL which is located in a different directory, it works fine. However, I don't know how I can configure my project to use different COM references for the x86 and x64 build. The OS on which the project is being compiled is WinXP x86. Building worked fine when using VS2005 + MSBuild 3.5 Any help would be highly appreciated. I tried building the upgraded project with MSBuild v3.5, but that doesn't work either. It complains about unknown NoWarn codes (probably new in 4.0).

    Read the article

  • Why can't I reference child entities with part of the parent entities composite key

    - by tigermain
    I am trying to reference some child entities with part of the parents composite key not all of it, why cant I? This happens when I use the following mapping instead of that which is commented. I get the following error Foreign key in table VolatileEventContent must have same number of columns as referenced primary key in table LocationSearchView <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="JeanieMaster.Domain.Entities" assembly="JeanieMaster.Domain"> <class name="LocationSearchView" table="LocationSearchView"> <composite-id> <key-property name="LocationId" type="Int32"></key-property> <key-property name="ContentProviderId" type="Int32"></key-property> <key-property name="CategoryId" type="Int32"></key-property> </composite-id> <property name="CompanyName" type="String" not-null="true" update="false" insert="false"/> <property name="Description" type="String" not-null="true" update="false" insert="false"/> <property name="CategoryId" type="Int32" not-null="true" update="false" insert="false"/> <property name="ContentProviderId" type="Int32" not-null="true" update="false" insert="false"/> <property name="LocationId" type="Int32" not-null="true" update="false" insert="false"/> <property name="Latitude" type="Double" update="false" insert="false" /> <property name="Longitude" type="Double" update="false" insert="false" /> <bag name="Events" table="VolatileEventContent" where="DeactivatedOn IS NULL" order-by="StartDate DESC" lazy="false" cascade="none"> <key> <column name="LocationId"></column> <column name="ContentProviderId"></column> <!--<column name="LocationId"></column> <column name="ContentProviderId"></column> <column name="CategoryId"></column>--> </key> <one-to-many class="Event" column="VolatileEventContentId"></one-to-many> </bag> </class> </hibernate-mapping> And VolatileEventContent mapping file <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="JeanieMaster.Domain.Entities" assembly="JeanieMaster.Domain"> <class name="Event" table="VolatileEventContent" select-before-update="false" optimistic-lock="none"> <composite-id> <key-property name="LocationId" type="Int32"></key-property> <key-property name="ContentProviderId" type="Int32"></key-property> </composite-id> <property name="Description" type="String" not-null="true" update="false" insert="false"/> <property name="StartDate" type="DateTime" not-null="true" update="false" insert="false" /> <property name="EndDate" type="DateTime" not-null="true" update="false" insert="false" /> <property name="CreatedOn" type="DateTime" not-null="true" update="false" insert="false" /> <property name="ModifiedOn" type="DateTime" not-null="false" update="false" insert="false" /> <many-to-one name="Location" class="Location" column="LocationId" /> <bag name="Artistes" table="EventArtiste" lazy="false" cascade="none"> <key name="VolatileEventContentId" /> <many-to-many class="Artiste" column="ArtisteId" ></many-to-many> </bag> </class> </hibernate-mapping>

    Read the article

  • Null date reference when passing json to MVC Controller

    - by Jake
    I am building an event system that posts data to a google calendar. I am using jquery 1.4.2, fullcalendar 1.4.5, and asp.net MVC 2. I am using a jquery ui modal dialog for the entry system. Jquery ui datepicker for the from and to fields. Select boxes for the time fields. I have tried both string and DateTime formats in the GCalEvent Class for startDate, startTime, endDate and endTime. I am receiving a null reference with the dates passed to the controllers Action method. var gcalevent = { 'eventID': $('#eventID').val(), 'eventURL': $('#eventURL').val(), 'date': { 'startDate': $("#from").val(), 'startTime': $('#eventStartHour option:selected').val() + ":" + $('#eventStartMin option:selected').val() + $('#eventStartAMPM option:selected').val(), 'endDate': $('#to').val(), 'endTime': $('#eventEndHour option:selected').val() + ":" + $('#eventEndMin option:selected').val() + $('#eventEndAMPM option:selected').val() }, 'allDay': $('#chkAllDay').attr('checked'), 'where': $('#eventWhere').val(), 'eventTitle': $('#eventTitle').val(), 'eventDescription': $('#eventDescription').val() }; $.post("/home/AddRepeatingEvent", gcalevent, addEventCallback); public void AddNonRepeatingEvent(Models.GCalEvent gcalevent) { IGCalRepository _gcalrepo; GCalRepository gcalrepo = new GCalRepository(); _gcalrepo = gcalrepo; //_gcalrepo.AddEvent(gcalevent); GetGoogleEventURL(gcalevent.eventID.ToString()); } public enum Days { Sun, Mon, Tue, Wed, Thur, Fri, Sat } public enum DefaultCalendarView { Month, Day, Week } public enum OrderType { First, Second, Third, Fourth, Last } public abstract class RepeatBaseType { } public class GCalEvent { public string title { get; set; } public string description { get; set; } public string where { get; set; } public bool repeated { get; set; } public bool allDay { get; set; } public DefaultCalendarView defaultCalendarView { get; set; } public GCalEventDate date { get; set; } public RepeatBaseType repeatType { get; set; } public string eventID { get; set; } public string eventURL { get; set; } } public class GCalEventDate { public string startDate { get; set; } public string startTime { get; set; } public string endDate {get;set;} public string endTime {get;set;} } internal class Duration { int Days { get; set; } int Hours { get; set; } int Minutes { get; set; } } public class RepeatedDaily: RepeatBaseType { public int Days { get; set; } } public class RepeatedWeekly : RepeatBaseType { public int Weeks { get; set; } public Days[] days { get; set; } } public class RepeatedMonthly : RepeatBaseType { public int Months { get; set; } public RepeatedMonthlyType repeatedMonthlyType { get; set; } } public class RepeatedYearly : RepeatBaseType { public int Years {get;set;} } public abstract class RepeatedMonthlyType { } public class RepeatedMonthlyDayOfWeek : RepeatedMonthlyType { public Days[] DayOfWeek { get; set; } public OrderType orderType { get; set; } } public class RepeatedMonthlyDayOfMonth : RepeatedMonthlyType { public DateTime DayOfMonth { get; set; } } This is the first time i am attempting to use abastract classes. Thank you for your help.

    Read the article

  • null reference expction in the code

    - by LifeH2O
    I am getting NullReferenceException error on "_attr.Append(xmlNode.Attributes["name"]);". namespace SMAS { class Profiles { private XmlTextReader _profReader; private XmlDocument _profDoc; private const string Url = "http://localhost/teamprofiles.xml"; private const string XPath = "/teams/team-profile"; public XmlNodeList Teams{ get; private set; } private XmlAttributeCollection _attr; public ArrayList Team { get; private set; } public void GetTeams() { _profReader = new XmlTextReader(Url); _profDoc = new XmlDocument(); _profDoc.Load(_profReader); Teams = _profDoc.SelectNodes(XPath); foreach (XmlNode xmlNode in Teams) { _attr.Append(xmlNode.Attributes["name"]); } } } } the teamprofiles.xml file looks like <teams> <team-profile name="Australia"> <stats type="Test"> <span>1877-2010</span> <matches>721</matches> <won>339</won> <lost>186</lost> <tied>2</tied> <draw>194</draw> <percentage>47.01</percentage> </stats> <stats type="Twenty20"> <span>2005-2010</span> <matches>32</matches> <won>18</won> <lost>12</lost> <tied>1</tied> <draw>1</draw> <percentage>59.67</percentage> </stats> </team-profile> <team-profile name="Bangladesh"> <stats type="Test"> <span>2000-2010</span> <matches>66</matches> <won>3</won> <lost>57</lost> <tied>0</tied> <draw>6</draw> <percentage>4.54</percentage> </stats> </team-profile> </teams> I am trying to extract names of all teams in an ArrayList. Then i'll extract all stats of all teams and display them in my application. Can you please help me about that null reference exception?

    Read the article

  • Undefined reference to vtable

    - by RyanG
    So, I'm getting the infamously horrible "undefined reference to 'vtable..." error for the following code (The class in question is CGameModule.) and I cannot for the life of me understand what the problem is. At first, I thought it was related to forgetting to give a virtual function a body, but as far as I understand, everything is all here. The inheritance chain is a little long, but here is the related source code. I'm not sure what other information I should provide. My code: class CGameModule : public CDasherModule { public: CGameModule(Dasher::CEventHandler *pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface, ModuleID_t iID, const char *szName) : CDasherModule(pEventHandler, pSettingsStore, iID, 0, szName) { g_pLogger->Log("Inside game module constructor"); m_pInterface = pInterface; } virtual ~CGameModule() {}; std::string GetTypedTarget(); std::string GetUntypedTarget(); bool DecorateView(CDasherView *pView) { //g_pLogger->Log("Decorating the view"); return false; } void SetDasherModel(CDasherModel *pModel) { m_pModel = pModel; } virtual void HandleEvent(Dasher::CEvent *pEvent); private: CDasherNode *pLastTypedNode; CDasherNode *pNextTargetNode; std::string m_sTargetString; size_t m_stCurrentStringPos; CDasherModel *m_pModel; CDasherInterfaceBase *m_pInterface; }; } Inherits from... class CDasherModule; typedef std::vector<CDasherModule*>::size_type ModuleID_t; /// \ingroup Core /// @{ class CDasherModule : public Dasher::CDasherComponent { public: CDasherModule(Dasher::CEventHandler * pEventHandler, CSettingsStore * pSettingsStore, ModuleID_t iID, int iType, const char *szName); virtual ModuleID_t GetID(); virtual void SetID(ModuleID_t); virtual int GetType(); virtual const char *GetName(); virtual bool GetSettings(SModuleSettings **pSettings, int *iCount) { return false; }; private: ModuleID_t m_iID; int m_iType; const char *m_szName; }; Which inherits from.... namespace Dasher { class CEvent; class CEventHandler; class CDasherComponent; }; /// \ingroup Core /// @{ class Dasher::CDasherComponent { public: CDasherComponent(Dasher::CEventHandler* pEventHandler, CSettingsStore* pSettingsStore); virtual ~CDasherComponent(); void InsertEvent(Dasher::CEvent * pEvent); virtual void HandleEvent(Dasher::CEvent * pEvent) {}; bool GetBoolParameter(int iParameter) const; void SetBoolParameter(int iParameter, bool bValue) const; long GetLongParameter(int iParameter) const; void SetLongParameter(int iParameter, long lValue) const; std::string GetStringParameter(int iParameter) const; void SetStringParameter(int iParameter, const std::string & sValue) const; ParameterType GetParameterType(int iParameter) const; std::string GetParameterName(int iParameter) const; protected: Dasher::CEventHandler *m_pEventHandler; CSettingsStore *m_pSettingsStore; }; /// @} #endif

    Read the article

  • perl : Passing hash , array through socket program betwen client and server

    - by pavun_cool
    Hi All . In sockets I have written the client server program . First I tried to send the normal string among them it sends fine . After that I am trying to send the hash and array values from client to server and server to client . When I printing the values using Dumper . It is giving me only reference . What Should I do for getting accessing the actual values in client server . Server Program: use IO::Socket; use strict; use warnings; my %hash = ( "name" => "pavunkumar " , "age" => 20 ) ; my $new = \%hash ; #Turn on System variable for Buffering output $| = 1; # Creating a a new socket my $socket= IO::Socket::INET->new(LocalPort=>5000,Proto=>'tcp',Localhost => 'localhost','Listen' => 5 , 'Reuse' => 1 ); die "could not create $! \n" unless ( $socket ); print "\nUDPServer Waiting port 5000\n"; my $new_sock = $socket->accept(); my $host = $new_sock->peerhost(); while(<$new_sock>) { #my $line = <$new_sock>; print Dumper "$host $_"; print $new_sock $new . "\n"; } print "$host is closed \n" ; Client Program use IO::Socket; use Data::Dumper ; use warnings ; use strict ; my %hash = ( "file" =>"log.txt" , size => "1000kb") ; my $ref = \%hash ; # This client for connecting the specified below address and port # INET function will create the socket file and establish the connection with # server my $port = shift || 5000 ; my $host = shift || 'localhost'; my $recv_data ; my $send_data; my $socket = new IO::Socket::INET ( PeerAddr => $host , PeerPort => $port , Proto => 'tcp', ) or die "Couldn't connect to Server\n"; while (1) { my $line = <stdin> ; print $socket $ref."\n"; if ( $line = <$socket> ) { print Dumper $line ; } else { print "Server is closed \n"; last ; } } I have given my sample program about what I am doing , Can any one tell me what I am doing wrong in this code. And what I need to do for accessing the hash values . Thanks in Advance

    Read the article

  • String Sharing/Reference issue with objects in Delphi

    - by jenakai123
    My application builds many objects in memory based on filenames (among other string based information). I was hoping to optimise memory usage by storing the path and filename separately, and then sharing the path between objects in the same path. I wasn't trying to look at using a string pool or anything, basically my objects are sorted so if I have 10 objects with the same path I want objects 2-10 to have their path "pointed" at object 1's path (eg object[2].Path=object[1].Path); I have a problem though, I don't believe that my objects are in fact sharing a reference to the same string after I think I am telling them to (by the object[2].Path=object[1].Path assignment). When I do an experiment with a string list and set all the values to point to the first value in the list I can see the "memory conservation" in action, but when I use objects I see absolutely no change at all, admittedly I am only using task manager (private working set) to watch for memory use changes. Here's a contrived example, I hope this makes sense. I have an object: TfileObject=class(Tobject) FpathPart: string; FfilePart: string; end; Now I create 1,000,000 instances of the object, using a new string for each one: var x: integer; MyFilePath: string; fo: TfileObject; begin for x := 1 to 1000000 do begin // create a new string for every iteration of the loop MyFilePath:=ExtractFilePath(Application.ExeName); fo:=TfileObject.Create; fo.FpathPart:=MyFilePath; FobjectList.Add(fo); end; end; Run this up and task manager says I am using 68MB of memory or something. (Note that if I allocated MyFilePath outside of the loop then I do save memory because of 1 instance of the string, but this is a contrived example and not actually how it would happen in the app). Now I want to "optimise" my memory usage by making all objects share the same instance of the path string, since it's the same value: var x: integer; begin for x:=1 to FobjectList.Count-1 do begin TfileObject(FobjectList[x]).FpathPart:=TfileObject(FobjectList[0]).FpathPart; end; end; Task Manager shows absouletly no change. However if I do something similar with a TstringList: var x: integer; begin for x := 1 to 1000000 do begin FstringList.Add(ExtractFilePath(Application.ExeName)); end; end; Task Manager says 60MB memory use. Now optimise with: var x: integer; begin for x := 1 to FstringList.Count - 1 do FstringList[x]:=FstringList[0]; end; Task Manager shows the drop in memory usage that I would expect, now 10MB. So I seem to be able to share strings in a string list, but not in objects. I am obviously missing something conceptually, in code or both! I hope this makes sense, I can really see the ability to conserve memory using this technique as I have a lot of objects all with lots of string information, that data is sorted in many different ways and I would like to be able to iterate over this data once it is loaded into memory and free some of that memory back up again by sharing strings in this way. Thanks in advance for any assistance you can offer.

    Read the article

  • null reference exception in the code

    - by LifeH2O
    I am getting NullReferenceException error on "_attr.Append(xmlNode.Attributes["name"]);". namespace SMAS { class Profiles { private XmlTextReader _profReader; private XmlDocument _profDoc; private const string Url = "http://localhost/teamprofiles.xml"; private const string XPath = "/teams/team-profile"; public XmlNodeList Teams{ get; private set; } private XmlAttributeCollection _attr; public ArrayList Team { get; private set; } public void GetTeams() { _profReader = new XmlTextReader(Url); _profDoc = new XmlDocument(); _profDoc.Load(_profReader); Teams = _profDoc.SelectNodes(XPath); foreach (XmlNode xmlNode in Teams) { _attr.Append(xmlNode.Attributes["name"]); } } } } the teamprofiles.xml file looks like <teams> <team-profile name="Australia"> <stats type="Test"> <span>1877-2010</span> <matches>721</matches> <won>339</won> <lost>186</lost> <tied>2</tied> <draw>194</draw> <percentage>47.01</percentage> </stats> <stats type="Twenty20"> <span>2005-2010</span> <matches>32</matches> <won>18</won> <lost>12</lost> <tied>1</tied> <draw>1</draw> <percentage>59.67</percentage> </stats> </team-profile> <team-profile name="Bangladesh"> <stats type="Test"> <span>2000-2010</span> <matches>66</matches> <won>3</won> <lost>57</lost> <tied>0</tied> <draw>6</draw> <percentage>4.54</percentage> </stats> </team-profile> </teams> I am trying to extract names of all teams in an ArrayList. Then i'll extract all stats of all teams and display them in my application. Can you please help me about that null reference exception?

    Read the article

  • "Undefined reference to"

    - by user1332364
    I know that there are a lot of questions somewhat related to this one, but they answers are a bit hard for me to make sense of. I'm receiving the following error for a few different lines of code: C:\Users\Jeff\AppData\Local\Temp\ccAixtmT.o:football.cpp:(.text+0x6f0): undefined reference to `Player::set_values(int, std::string, float)' From these blocks of code: class Player { int playerNum; string playerPos; float playerRank; public: void set_values(int, string, float); float get_rank(){ return playerRank; }; bool operator == (const Player &p1/*, const Player &p2*/) const { if(&p1.playerNum == &playerNum && &p1.playerPos == &playerPos && &p1.playerRank == &playerRank) return true; else return false; }; }; And this being the main function referencing the subclass: int main() { ifstream infile; infile.open ("input.txt", ifstream::in); int numTeams; string command; while(!infile.fail() && !infile.eof()){ infile >> numTeams; string name; Player p; int playNum; string playPos; float playRank; Player all[11]; float ranks[11]; Team allTeams[numTeams]; for(int i=0; i<numTeams; i++){ infile >> name; for(int j=0; j<11; j++){ infile >> playNum; infile >> playPos; infile >> playRank; if(playPos == "QB") p.set_values(playNum, playPos, (playRank*2.0)); else if(playPos == "RB") p.set_values(playNum, playPos, (playRank*1.5)); else if(playPos == "WR") p.set_values(playNum, playPos, (playRank/1.8)); else if(playPos == "TE") p.set_values(playNum, playPos, (playRank*1.1)); else if(playPos == "GD") p.set_values(playNum, playPos, (playRank/2.0)); else if(playPos == "TC") p.set_values(playNum, playPos, (playRank/2.2)); else if(playPos == "CR") p.set_values(playNum, playPos, (playRank/1.2)); all[j] = p; allTeams[i].set_values(all, name); } } infile >> command; if (command == "play"){ int t1; int t2; infile >> t1; infile >> t2; play(allTeams[t1], allTeams[t2]); } else { int t1; int p1; int t2; int p2; swap(allTeams[t1], allTeams[t1].get_player(p1), allTeams[t2], allTeams[t2].get_player(p2)); } } }

    Read the article

  • Object reference not set to an instance of an object- Linked List Example

    - by Zoro Roronoa
    I am seeing following errors : Object reference not set to an instance of an object! Check to determinate if the object is null before calling the method! I'am new with C#,and I made a program for Sorted Linked Lists. Here is the code where the error comes! public void Insert(double data) { Link newLink = new Link(data); Link current = first; Link previous = null; if (first == null) { first = newLink; } else { while (data > current.DData && current != null) { previous = current; current = current.Next; } previous.Next = newLink; newLink.Next = current; } } It says that the current referenc is null while (data current.DData && current != null), but I assigned it current = first; Please Help ! The rest is the complete code of the Program! class Link { double dData; Link next=null; public Link Next { get { return next; } set { next = value; } } public double DData { get { return dData; } set { dData = value; } } public Link(double dData) { this.dData = dData; } public void DisplayLink() { Console.WriteLine("Link : "+ dData); } } class SortedList { Link first; public SortedList() { first = null; } public bool IsEmpty() { return (this.first == null); } public void Insert(double data) { Link newLink = new Link(data); Link current = first; Link previous = null; if (first == null) { first = newLink; } else { while (data > current.DData && current != null) { previous = current; current = current.Next; } previous.Next = newLink; newLink.Next = current; } } public Link Remove() { Link temp = first; first = first.Next; return temp; } public void DisplayList() { Link current; current = first; Console.WriteLine("Display the List!"); while (current != null) { current.DisplayLink(); current = current.Next; } } } class SortedListApp { public void TestSortedList() { SortedList newList = new SortedList(); newList.Insert(20); newList.Insert(22); newList.Insert(100); newList.Insert(1000); newList.Insert(15); newList.Insert(11); newList.DisplayList(); newList.Remove(); newList.DisplayList(); } }

    Read the article

  • javascript to reference input IDs in php loop and pass values back to same input ID

    - by Smudger
    I have a form which is essentially an autocomplete input box. I can get this to work perfectly for a single text box. What I need to do is create unique input boxes by using a php for loop. This will use the counter $i to give each input box a unique name and id. The problem is that the unique value of the input box needs to be passed to the javascript. this will then pass the inputted data to the external php page and return the mysql results. As mentioned I have this working for a single input box but need assistance with passing the correct values to the javascript and returning it to correct input box. existing code for working solution (first row works only, all other rows update first row input box) <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("autocompleteperson.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); } </script> </head> <body> <form name="form1" id="form1" action="addepartment.php" method="post"> <table> <? for ( $i = 1; $i <=10; $i++ ) { ?> <tr> <td> <? echo $i; ?></td> <td> <div> <input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" /> </div> <div class="suggestionsBox" id="suggestions" style="display: none;"> <img src="upArrow.png" style="position: relative; top: -12px; left: 20px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList"> &nbsp; </div> </div> </td> </tr> <? } ?> </table> </body> </html> code for autocompleteperson.php is: $query = $db->query("SELECT fullname FROM Persons WHERE fullname LIKE '$queryString%' LIMIT 10"); if($query) { while ($result = $query ->fetch_object()) { echo '<li onClick="fill(\''.$result->fullname.'\');">'.$result->fullname.'</li>'; } } in order to get it to work for all rows, I include the counter $i in each of the file names as below: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function lookup(inputString<? echo $i; ?>) { if(inputString<? echo $i; ?>.length == 0) { // Hide the suggestion box. $('#suggestions<? echo $i; ?>').hide(); } else { $.post("autocompleteperson.php", {queryString: ""+inputString<? echo $i; ?>+""}, function(data){ if(data.length >0) { $('#suggestions<? echo $i; ?>').show(); $('#autoSuggestionsList<? echo $i; ?>').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString<? echo $i; ?>').val(thisValue); setTimeout("$('#suggestions<? echo $i; ?>').hide();", 200); } </script> </head> <body> <form name="form1" id="form1" action="addepartment.php" method="post"> <table> <? for ( $i = 1; $i <=10; $i++ ) { ?> <tr> <td> <? echo $i; ?></td> <td> <div> <input type="text" size="30" value="" id="inputString<? echo $i; ?>" onkeyup="lookup(this.value);" onblur="fill();" /> </div> <div class="suggestionsBox" id="suggestions<? echo $i; ?>" style="display: none;"> <img src="upArrow.png" style="position: relative; top: -12px; left: 20px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList<? echo $i; ?>"> &nbsp; </div> </div> </td> </tr> <? } ?> </table> </body> </html> The autocomplete suggestion works (although always shown on first row) but when selecting the data always returns to row 1, even if input was on row 5. I have a feeling this has to do with the fill() but not sure? is it due the the autocomplete page code? or does the fill referencing ThisValue have something to do with it. example of this page (as above) can be found here Thanks for the assistance, much appreciated. UPDATE - LOLO <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function lookup(i, inputString) { if(inputValue.length == 0) { // Hide the suggestion box. $('#suggestions' + i).hide(); } else { $.post("autocompleteperson.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions' + i).show(); $('#autoSuggestionsList' + i).html(data); } }); } } // lookup function fill(i, thisValue) { $('#inputString' + i).val(thisValue); setTimeout("$('#suggestions' + i).hide();", 200); } </script> </head> <body> <form name="form1" id="form1" action="addepartment.php" method="post"> <table> <? for ( $i = 1; $i <=10; $i++ ) { ?> <tr> <td> <? echo $i; ?></td> <td> <div> <input type="text" size="30" value="" id="inputString<?php echo $i; ?>" onkeyup="lookup(this.value);" onblur="fill();" /> </div> <div class="suggestionsBox" id="suggestions<? echo $i; ?>" style="display: none;"> <img src="upArrow.png" style="position: relative; top: -12px; left: 20px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList<? echo $i; ?>"> &nbsp; </div> </div> </td> </tr> <? } ?> </table> </body> </html> google chrome catched the following errors: first line on input, second line on loosing focus

    Read the article

  • mappedBy reference an unknown target entity property - hibernate error

    - by tommy
    first, my classes: User package com.patpuc.model; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import com.patpuc.model.RolesMap; @Entity @Table(name = "users") public class User { @Id @Column(name = "USER_ID", unique = true, nullable = false) private int user_id; @Column(name = "NAME", nullable = false) private String name; @Column(name = "SURNAME", unique = true, nullable = false) private String surname; @Column(name = "USERNAME_U", unique = true, nullable = false) private String username_u; // zamiast username @Column(name = "PASSWORD", unique = true, nullable = false) private String password; @Column(name = "USER_DESCRIPTION", nullable = false) private String userDescription; @Column(name = "AUTHORITY", nullable = false) private String authority = "ROLE_USER"; @Column(name = "ENABLED", nullable = false) private int enabled; @OneToMany(mappedBy = "rUser") private List<RolesMap> rolesMap; public List<RolesMap> getRolesMap() { return rolesMap; } public void setRolesMap(List<RolesMap> rolesMap) { this.rolesMap = rolesMap; } /** * @return the user_id */ public int getUser_id() { return user_id; } /** * @param user_id * the user_id to set */ public void setUser_id(int user_id) { this.user_id = user_id; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /** * @return the surname */ public String getSurname() { return surname; } /** * @param surname * the surname to set */ public void setSurname(String surname) { this.surname = surname; } /** * @return the username_u */ public String getUsername_u() { return username_u; } /** * @param username_u * the username_u to set */ public void setUsername_u(String username_u) { this.username_u = username_u; } /** * @return the password */ public String getPassword() { return password; } /** * @param password * the password to set */ public void setPassword(String password) { this.password = password; } /** * @return the userDescription */ public String getUserDescription() { return userDescription; } /** * @param userDescription * the userDescription to set */ public void setUserDescription(String userDescription) { this.userDescription = userDescription; } /** * @return the authority */ public String getAuthority() { return authority; } /** * @param authority * the authority to set */ public void setAuthority(String authority) { this.authority = authority; } /** * @return the enabled */ public int getEnabled() { return enabled; } /** * @param enabled * the enabled to set */ public void setEnabled(int enabled) { this.enabled = enabled; } @Override public String toString() { StringBuffer strBuff = new StringBuffer(); strBuff.append("id : ").append(getUser_id()); strBuff.append(", name : ").append(getName()); strBuff.append(", surname : ").append(getSurname()); return strBuff.toString(); } } RolesMap.java package com.patpuc.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.patpuc.model.User; @Entity @Table(name = "roles_map") public class RolesMap { private int rm_id; private String username_a; private String username_l; //private String username_u; private String password; private int role_id; @ManyToOne @JoinColumn(name="username_u", nullable=false) private User rUser; public RolesMap(){ } /** * @return the user */ public User getUser() { return rUser; } /** * @param user the user to set */ public void setUser(User rUser) { this.rUser = rUser; } @Id @Column(name = "RM_ID", unique = true, nullable = false) public int getRmId() { return rm_id; } public void setRmId(int rm_id) { this.rm_id = rm_id; } @Column(name = "USERNAME_A", unique = true) public String getUsernameA() { return username_a; } public void setUsernameA(String username_a) { this.username_a = username_a; } @Column(name = "USERNAME_L", unique = true) public String getUsernameL() { return username_l; } public void setUsernameL(String username_l) { this.username_l = username_l; } @Column(name = "PASSWORD", unique = true, nullable = false) public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Column(name = "ROLE_ID", unique = true, nullable = false) public int getRoleId() { return role_id; } public void setRoleId(int role_id) { this.role_id = role_id; } } when i try run this on server i have exception like this: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/classes/baseBeans.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: com.patpuc.model.RolesMap.users in com.patpuc.model.User.rolesMap But i don't exaclu know what i'm doing wrong. Can somebody help me fix this problem?

    Read the article

  • Ubuntu is not booting - "No init fount. Try passing init= bootarg." , Install from Windows (Wubi)

    - by Hunzai
    Unbuntu 10.04 installed from Windows 7 (Wubi filesystme), Now Ubuntu is not booting giving this error. Target filesystem doesn't have /sbin/init. No init fount. Try passing init= bootarg. BusyBox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu7) built in shell (ash) Enter 'help' for a list of build in commands (initramfs) The solutions given by folk is like [http://learntoconfigure.wordpress.com/2012/11/29/ubuntu-cannot-boot-no-init-found-try-passing-initbootarg/] Can't solved my problem because Ubuntu is installed from windows and all the drive shows of windows, Can anyone help me? thanks, Hunzai

    Read the article

  • Garbage collection in Perl

    - by srikfreak
    Unlike Java, Perl uses reference count for garbage collection. I have tried searching some previous questions which speak about C++ RAII and smart pointers and Java GC but have not understood how Perl deals with the circular referencing problem. Can anyone explain how Perl's garbage collector deals with circular references? Is there any way to reclaim circular referenced memory which are no longer used by the program or does Perl just ignores this problem altogether?

    Read the article

  • Good JavaScript Books?

    - by jollyjerry
    I find myself using Javascript day to day without a solid understanding of the language. There are some great writeups out there about using specific features of the language, but I'd like a distilled, printed book reference about the language itself. Please list good books that discuss the JavaScript language; not frameworks, usage and quirks.

    Read the article

  • Arrays multiplication

    - by mariO
    How to write arrayt multiplication (multiplicating two matrieces ie 3x3) of arrays of known size in c++ ? What will be the difference using pointers and reference ?

    Read the article

  • How to get ref of an array in PHP 5 ?

    - by Relax
    In php 5, all variable and objects are passed by reference, but i can't get my codes work My codes is: $arrayA = array(); $array = $arrayA; ... if(!in_array(thedata, $array) // if i use & to get ref, got an error here, should i use *$array here? $array[] = thedata; var_dump($arrayA); The result is empty, am i missing something simple?

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >