# **OLD** # [URL=http://s127.photobucket.com/user/yoda3ddd/media/codemap_zps4115ff7e.jpg.html][IMG]http://i127.photobucket.com/albums/p158/yoda3ddd/codemap_zps4115ff7e.jpg[/IMG][/URL] The Data Namespace Core Friend Module Func Public OkButton As Button Public CancelButton As Button Public ProgBar As ProgressBar Private Sub ProgressLoop() Do Func.ProgBar.PerformStep() Threading.Thread.Sleep(1) Loop End Sub #Region "Constants" Public Const DataRoot As String = "C:\AFormData\" Public Const IMG_PATH As String = "C:\AFormData\img" Public Const LoadImage As String = "C:\AFormData\img\codemap_zps4115ff7e.jpg" Public Const LINE_TERMINATOR As String = ">>" Public Const LoadImageX As Integer = 0 Public Const LoadImageY As Integer = 0 Public Const LoadBarFailedMessage As String = "Loading Bar Denied" Public Const ResizeMessage As String = "Current Form Resizing" Public Const NoCommandMsg As String = …

Member Avatar
Member Avatar
+0 forum 6

Hi, I am trying to learn OOP with c++ with the help of Turbo C++ version 3.0 and "C++ Primer Plus" by stephen prata. according to the book, the NEW convention for including the iostream header file in c++ is in the following way: #include<iostream> but it causes an error saying : unable to open include file "IOSTREAM" however the following code works: #include<iostream.h> but it is supposed to be the OLD convention Moreover , according to the book, it is necessary to use the following: using namespace std so that we can use cout and cin directly without having …

Member Avatar
Member Avatar
+0 forum 6

Hi All. For some odd reason it feels like this should be an extremely easy principle but yet I cannot seem to do this properly. I know that there might be other ways to accomplish this but for the sake of my current project, i require this. What i need is to call a method within a class that belongs to the global namespace from within a class that belongs to a defined namespace. <?php $myNsClass = 'myNamespace\someClass'; echo $myNsClass::printHello("John"); class myClass { function sayHello($name) { return 'Hello ' . $name; } } namespace myNamespace { class someClass { function …

Member Avatar
Member Avatar
+0 forum 8

I'm making some "cleanup" changes to my 1st VB.net project that I'm publishing. The project has an "Assembly Name". But I've just realized that the Root Namespace has the default name of "WindowsApplication1". I've got to believe this needs to be changed. How important is the name I put here? Is there any specific "naming convention" that I should use? Is this going to change anything to my project (where it will now be found, it's "file name", etc.)? As always, thanks for the help. Don

Member Avatar
Member Avatar
+0 forum 8

Hi All, I'm having trouble understanding how the spl_autload (and namespaces) should be implemented. I have the following: namespace A\Core; class Controller { } extended by: class SiteController extends \A\Core\Controller { public function __construct() { echo 'Created SiteController!'; } } * I'm not sure if this is the correct/best way to get the class without loading the entire namespace. The autoload class being loaded with spl_autoload_register(array($this,'autload'): private function autoload($className){ if(($pos=strrpos($className,'\'))!==false){ $className=substr($className,$pos+1); } if(isset(self::$_coreClasses[$className])){ require(dirname(__FILE__).self::$_coreClasses[$className]); }elseif(strstr($className,'Controller')){ if(in_array($className.'.php',scandir(self::$_basePath.DIRECTORY_SEPARATOR.'controllers'))){ require(self::$_basePath.DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$className.'.php'); } } } So, here I'm trying to see if a namespace occurs and then I'm getting the class from the $className string. …

Member Avatar
Member Avatar
+0 forum 1

Hi all. Been playing with some autoloading but couldn't get it to work. I'm trying to implement the PSR-4 (project scope) approach, but documentation is sketchy and I'm a bit lost as to the issue. I've read the PHP-Fig docs: http://www.php-fig.org/psr/psr-4/ and an trying to implement a script from the examples file: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md My Directory Structure: -src - Baz - Spotify.php Here's the script (included in my index.php page): /** * An example of a project-specific implementation. * * After registering this autoload function with SPL, the following line * would cause the function to attempt to load the \Foo\Bar\Baz\Qux …

Member Avatar
Member Avatar
+2 forum 3

Hello, So I'm having trouble figuring out what the correct syntax is for a function with a return type that is a template type and is within a namespace. Anyone see anything wrong with the code below? -------.HPP file: #pragma once #ifndef EC_UTIL_H #define EC_UTIL_H #include "../CommonHeaders.hpp" #include "../core/common/APVertex.hpp" #include <QString> class QWidget; namespace EditorCommon { template <class T> T *findAndAssert(QString id, QWidget *root); } #endif #include "ECUtil.hpp" ------------------- .CPP file: #include <QApplication> #include <QWidget> #include <QMessageBox> namespace EditorCommon { template <class T> T *findAndAssert(QString id, QWidget *root) { T *w = root->findChild<T *>(id); if(!w) { QMessageBox::critical(root , QString("Critical Application …

Member Avatar
Member Avatar
+0 forum 1

Hello to all, Please some help with this. I'm newbie to XML, XLS, Xpath, etc. How can I set correctly the reference in the command "for-each select" to avoid issues with this Top node that has namespace? I'm trying to get a XLS stylesheet to get some values. The issue is that the Top node has a colon ":" in its name "doc-master:DOCMASTER1". Searching I've seen that this is named namespaces, where the prefix is doc-master and the local name is DOCMASTER1. To begin practice with something simple I'm trying to get values for BicCode and URMs that are children …

Member Avatar
Member Avatar
+0 forum 14

cout is defined in std namespace and we also include iostream to use cout...i am confused ,please clarify this.where 1)cout is defined 2)where it is declared. and if we are including iostream ,then what is the need of STD::COUT regards,

Member Avatar
Member Avatar
+0 forum 7

I have a final project for C++ class that requires us to demonstrat each thing that we've learned, a list of 24 things that range from using binary numbers, to loops to passing arrays and polymorphism and recursion. What I would really like to try is to make a simple demo program of each of these items in independant programs,and let the user choose and run each program from a menu. I don't quite know how to implement this, but I was wondering if I can use namespaces and put each program choice in main in a separate namespace. I …

Member Avatar
Member Avatar
+0 forum 1

Hello, I noticed that in c++ everything that can be done using a static function in a class could be done by using a public function in the same namespace. Assuming that you bind your classes in a namespace these functions do not take up names in the global namespace. As such I was wondering when to use static functions in classes and when to use public functions. For an example here is the current situation where I cannot decide which to use: class Sprite {// private: //Some image data public: //some functions Sprite &applyPoints(vector<Coord2D> ps,Colour c);//applies the given colour …

Member Avatar
Member Avatar
+0 forum 3

when i compile the below code, it throws me error messages like the namespace does not exist in the current context.. i dont know where is the problem.. pls correct my errors. thanks in advance. using System; using System.Collections; using System.Net.Sockets; namespace venkat public class Nntp : System.Net.Sockets.TcpClient { string message; string response; ArrayList retval=new ArrayList(); public void Connect(string server) { Connect(server,119); response=Response(); if(response.Substring(0,3)!="200") { Console.WriteLine("\n Exception:",response); } } public void DisConnect(string server) { message="QUIT\r\n"; response=Write(message); if(response.SubString(0,3)!="205") { Console.WriteLine("\n Exception:",response); } } public ArrayList GetNewsgroups() { retval=new ArrayList(); message="LIST\r\n"; Write(message); if(response.SubString(0,3)!="215") { Console.WriteLine("\n Exception:",response); } while(true) { response=Response(); if(response==".\r\n" || …

Member Avatar
Member Avatar
+0 forum 4

Hello guys: I am certain if I was not trying slef-teaching C++, that this question would have been answer before. What is the use of [inlinecode]using namespace std;[/inlinecode] ? I am not certain, I just know that when I use [inlinecode]#include<iostream>[/inlinecode] I have to appended. Simple question, but a matter that I need to get to the bottom of it. Thank you , Your rookie programmer GCard

Member Avatar
Member Avatar
+0 forum 16

Hi I have an issue in asp.net using vb code I am using Visual Studio 2012 with MSSQL 2005. I have problem in adding Report viewer, Version=11.0.0.0. I have an error "'ReportViewer' is ambiguous in the namespace ". Please anybody help me to solve this issue maideen

Member Avatar
Member Avatar
+0 forum 2

Given this header // header.h #include <string> namespace company { namespace module { class ProjectConstants { public: static const int CONSTANT1; static const std::string CONSTANT2; }; } } and this source file // header.cpp #include "header.h" using company::module::ProjectConstants; const int ProjectConstants::CONSTANT1 = 10; const std::string ProjectConstants::CONSTANT2("Hello World"); Are ProjectConstants::CONSTANT1 and ProjectConstants::CONSTANT2 declared in the global namespace or not? I am asking this because our project follows a coding standard that requires that the global namespace is not polluted and I thought that this wouldn't do that, however when using static analysis, FlexeLint, it says that the code at lines 7 …

Member Avatar
Member Avatar
+0 forum 2

Gentlemen, I have found a very nice tooltip control on the following link http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6967&lngWId=10 I tried to convert it to vb.net , and the solution works , but with some error . I beleive it is related to the namespace issue. Please check attached file for the C# source code and the vb.net source code. I appreciate your support to define why I am getting these error , and how to solve (guidelines). Thanks so much . Waleed

Member Avatar
Member Avatar
+0 forum 2

I'm setting up a finite state machine structure as a proof of concept to be used in other projects. The states have function pointers that point to actions they are allowed to perform during certain events and transitions. I'm trying to restrict these pointers to be a part of a certain namespace, but the compiler doesn't recognize the namespace. The exact error is " StateAction': is not a class or namespace name. I've whittled out code until just these lines below remain. //In State.h file #pragma once #include "StateAction.h" class CState { public: void addAction(void (StateAction::*funcPtr)()) { m_func = funcPtr; …

Member Avatar
Member Avatar
+0 forum 2

how to get the data from the following `xml`: <HostipLookupResultSet version="1.0.1" xsi:noNamespaceSchemaLocation="http://www.hostip.info/api/hostip-1.0.1.xsd"> <gml:description>This is the Hostip Lookup Service</gml:description> <gml:name>hostip</gml:name> <gml:boundedBy> <gml:Null>inapplicable</gml:Null> </gml:boundedBy> <gml:featureMember> <Hostip> <ip>182.0.0.1</ip> <gml:name>Private</gml:name> <countryName>Private</countryName> <countryAbbrev>PR</countryAbbrev> <!-- Co-ordinates are available as lng,lat --> <ipLocation> <gml:pointProperty><gml:Point srsName="http://www.abc.net/xyz/srs/epsg.xml#4326"> <gml:coordinates>68.7833,30.4</gml:coordinates> </gml:Point></gml:pointProperty> </ipLocation> </Hostip> </gml:featureMember> </HostipLookupResultSet> following is what i was trying: $userIpAddr = "test.xml"; $ipLink= new SimpleXMLElement($userIpAddr, NULL, TRUE); $user_ip = $ipLink->xpath("/HostipLookupResultSet/Hostip/ip"); $user_country = $ipLink->xpath("/HostipLookupResultSet/Hostip/countryName"); foreach($user_ip as $ip) { foreach($user_country as $country) { echo $ip.'<br/>'; echo $country.'<br/>'; } } is this a correct way to access the data?? if isn't then please suggest me the way to access the asked data...

Member Avatar
Member Avatar
+0 forum 3

Hi, I have a problem on getting data from XML file. I am honestly have 0 knowledge on this. Here is the XML data content, i opened the XML file using notepad then pasted here. <?xml version="1.0" encoding="utf-8"?> <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:Test-Form:-myXSD-2012-09-02T13-13-23" solutionVersion="1.0.0.55" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://share.test.com/it/Test%20Form/Forms/template.xsn"?> <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.3"?> <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-09-02T13:13:23" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-US"> <my:group1> <my:txtFirstName>TEST1</my:txtFirstName> <my:txtLastName>TEST2</my:txtLastName> <my:Skills>Chess</my:Skills><my:Skills>Piko</my:Skills><my:Skills>Tumbang preso</my:Skills> </my:group1> </my:myFields> And here is my sql query DECLARE @foo XML SET @foo = '<my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-09-02T13:13:23" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-US"> <my:group1> <my:txtFirstName>Test Name</my:txtFirstName> <my:txtLastName>Test Lastname</my:txtLastName> <my:Skills>Chess</my:Skills><my:Skills>Piko</my:Skills><my:Skills>Tumbang preso</my:Skills> </my:group1> </my:myFields>' SELECT x.value('(my:txtFirstName/text())[1]', 'nvarchar(max)') …

Member Avatar
+0 forum 0

HI, I am have a string and I want to remove <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> from this string.I have tried str_replace but of no use can any one help that how would I remove this problem from my string. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

I'm trying to write a transform to parse an html document and create another html document but I can't seem to use the html tags in the xslt. My html source that I want to apply the transform on looks like this: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body class="3-column"> <div class="centercol"><p>Hello world</p></div> <div class="leftcol"> <div id="menu"> </div> </div> <div class="rightcol"> </div> </body> </html> My XSLT looks like this: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <xsl:template match="/*"> <xsl:value-of select="body/div/p"/> </xsl:template> </xsl:stylesheet> Can anyone help me figure out how to get my xpaths to work with html tags?

Member Avatar
Member Avatar
+0 forum 1

# Introduction to the Issue # I'm currently working on a piece of code that was put together by someone else on my team. All of his logic was in the `index.html` file, so I'm trying to factor it out into a modular library. Part of the reason is that I now need to include an AJAX and UI library and I want to avoid collisions. I'm not a JavaScript programmer by any stretch of the imagination, so I have been working to understand the process of moving the code to separate files. # The Goal # The goal of …

Member Avatar
Member Avatar
+0 forum 8

Im working on applying a schema to an xml document but my editor (exchanger xml) is giving me some errors I can't figure out Ln 35 Col 67 - s4s-elt-invalid-content.1: The content of '#AnonType_inventory' is invalid. Element 'element' is invalid, misplaced, or occurs too often. Ln 16 Col 58 - cvc-elt.1: Cannot find the declaration of element 'xsd:schema'. I've declared my xsd schema in the xsd file and the other error seems like it might be typo but T do not see one. Here is my music.xsd schema document <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="albumIDType"> <xsd:restriction base="xsd:ID"> <xsd:pattern value="JWd{6}" …

Member Avatar
+0 forum 0

Need help with implementing a pure abstract class via inheritance, using namespace to wrap all my classes to avoid conflict with others. I have been able to build and run the code successfully if I remove namespace wrapper from my abstract class and all classes that inherit from my pure abstract class. It seems like Visual Studio 2010 compiler is complaining that despite all classes are in the same namespace, the abstract class's pure abstract method is not implemented. Any help would be much appreciated. [CODE] //IBaseClass.h //namespace MyCustomNamespace //{ class IBaseClass { public: virtual ~IBaseClass() { /*virtual destructor*/ } …

Member Avatar
Member Avatar
+0 forum 8

[url]http://feeds.bbci.co.uk/news/rss.xml[/url] ^^ I'm extracting data from the above website. I can extract most actual elements using the following code: [CODE] $xml="http://feeds.bbci.co.uk/news/rss.xml"; $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); //get elements from "<channel>" $channel=$xmlDoc->getElementsByTagName('channel')->item(0); $channel_title = $channel->getElementsByTagName('title') ->item(0)->childNodes->item(0)->nodeValue; $channel_link = $channel->getElementsByTagName('link') ->item(0)->childNodes->item(0)->nodeValue; $channel_desc = $channel->getElementsByTagName('description') ->item(0)->childNodes->item(0)->nodeValue; [/CODE] ...but I can't read the attributes from <media:thumbnail height="........." width="......." url=".........">. In this particular case I need to read "url" and I think although it will be possible using string manipulation after getting the whole whole code as String, but I can't seem to be able to find any source where to do this in a …

Member Avatar
Member Avatar
+0 forum 9

I am new to python and am making a program with the wxpython module and no matter what I try I get a NameError: global name 'outp' is not defined?? Can someone help? Here is the code, it is fairly complex: [CODE]import wx class jake(wx.Frame): def func1(self,event): global foo foo+="1" global outp outp.append(1) outp=str(outp.strip("[").strip("]")) def func2(self,event): pass def func3(self,event): pass def func4(self,event): pass def func5(self,event): pass def func6(self,event): pass def func7(self,event): pass def func8(self,event): pass def func9(self,event): pass def func0(self,event): pass def decimalfunc(self,event): pass def infofunc(self,event): pass def withdraw(self,event): pass def deposit(self,event): pass def showbalance(self,event): pass def showstatus(self,event): pass def …

Member Avatar
Member Avatar
+0 forum 1

Hello you guys, i'm new to this community and relatively new to c++. right now i have a big problem with namespaces and i'm not able to resolve this issue on my own, so here we go: I want to integrate 2 simmilar projects into my project. they are so simmilar, that they have the same class names, so i had to put them into different namespaces. first i tried to put just one into a specified namespace "os", but that didnt work out, so i put the second one into the namespace "cs": [CODE] #ifndef INTEGRAL_H #define INTEGRAL_H namespace …

Member Avatar
Member Avatar
+0 forum 3

How to create namespaces and put it in a folder . I know how to create namespaces and call that in the same program file . But i want to know how to create a namespaces full of utility classes and put it in a separate file . Just like packages in java .Please explain the methods :)

Member Avatar
Member Avatar
+0 forum 1

[ATTACH]17854[/ATTACH] [ATTACH]17855[/ATTACH] [ATTACH]17856[/ATTACH] Guys I am trying to help a friend of mine with this project they have due in a few days and because I program in Java mainly I am a bit rusty with this. I can not figure out why my getInput function shows up under the AlgolBank namespace but when I build it C says it is not. Can anyone point me in the right direction on this? Thanks so much for help in advance

Member Avatar
Member Avatar
+0 forum 2

I'm trying to compile some code in Visual C# Express. Would someone please have a gander and help me out by giving me a brife explanation of why I'm getting an error "oleDbDataAdapter is not in the current context"? From my understanding (which must be wrong) oleDbDataAdapter is part of System.Data.Oledb context. [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Data.OleDb; namespace WindowsFormsApplication1 { public partial class formProcessor : Form { public formProcessor() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // Put all file names in …

Member Avatar
Member Avatar
+0 forum 1

The End.