Search Results

Search found 34176 results on 1368 pages for 'project types'.

Page 111/1368 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • Different types for declaring pointer variables

    - by viswanathan
    Consider the below 2 declarations. appears next to the datatype and not next to variable char* ptr1, * ptr2, * ptr3; //all 3 are pointers appears next to the variable and not next to datatype char *ptr1,*ptr2,*ptr3; //again al 3 are pointers Is there any difference in intepretation between the 2 declarations. I know there is no difference in the variables. What is the rationale behind introducing void pointers?

    Read the article

  • C# Interop.Word Adding an Image from project resource folder

    - by iamnobody
    Hi guys. Having some image problem with Interop.Word and C#. I want to add an image in the header of the document that I am going to generate. I have this code working perfectly section.Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Shapes.AddPicture(@"C:\Logo.jpg", ref x, ref x, ref x, ref x, ref x, ref x, ref x); Problem is that I can't have "C:\Logo.jpg" in the code since after publishing the project, there would most probably be no Logo.jpg in the C folder of the user. The image is already in my project's resource folder. I've used Image.FromFile("Logo.jpg") before but .AddPicture requires a string and not an image. Any ideas? Any help would be greatly appreciated. Thanks! -- edit -- Saw this over the net: string anyPath = @"C:\logo.jpg"; Properties.Resources.logo.Save(anyPath); section.Headers.[...].Shapes.AddPicture(anyPath, ... but then I still get a generic error in GDI+ or ExternalException was unhandled.

    Read the article

  • Two types of products using ubercart..?

    - by Satya
    Hi, I am working on a website which sells books and journals. My problem is the books will be sold our directly where as in the case of journals case the journals, they can be subscribed for the whole year / per issue or per chapter also. Can i have both of them as products using ubercart in the same site? Thanks & Regards, Satya.

    Read the article

  • ReSharper: find derived types constructor usages points

    - by Roman
    I have some base class ControlBase and many derived classes which also have derived classes... ControlBase and derived classes have parameterless constructor. How can I easily find all derived classes constructor invocation points? ReSharper find usages on ControlBase constructor shows only usages of this base class constructor but not derived classes constructors. Thanks.

    Read the article

  • Types questions in ANSI C

    - by shaharg
    Hi, I having few questions about typed in ANSI C: 1. what's the difference between "\x" in the beginning of a char to 0x in the beginning of char (or in any other case for this matter). AFAIK, they both means that this is hexadecimal.. so what's the difference. when casting char to (unsigned), not (unsigned char) - what does it mean? why (unsigned)'\xFF' != 0xFF? Thanks!

    Read the article

  • WCF returning custom types

    - by Gena Verdel
    Hi. I'm a newbie to WCF, trying to perform relatively simple task. I'm trying to return list of objects read from the database but cannot overcome some really annoying exceptions. The question is very simple? What's wrong with the picture? [ServiceContract] public interface IDBService { [OperationContract] string Ping(string name); [OperationContract] InitBDResult InitBD(); } public InitBDResult InitBD() { _dc = new CentralDC(); InitBDResult result = new InitBDResult(); result.ord = _dc.Orders.First(); return result; } [DataContract] public class InitBDResult { //[DataMember] //public List<Order> Orders { get; set; } [DataMember] public Order ord { get; set; } }

    Read the article

  • Strange behavior with large Object Types

    - by Peter Lang
    I recognized that calling a method on an Oracle Object Type takes longer when the instance gets bigger. The code below just adds rows to a collection stored in the Object Type and calls the empty dummy-procedure in the loop. Calls are taking longer when more rows are in the collection. When I just remove the call to dummy, performance is much better (the collection still contains the same number of records): Calling dummy: Not calling dummy: 11 0 81 0 158 0 Code to reproduce: Create Type t_tab Is Table Of VARCHAR2(10000); Create Type test_type As Object( tab t_tab, Member Procedure dummy ); Create Type Body test_type As Member Procedure dummy As Begin Null; --# Do nothing End dummy; End; Declare v_test_type test_type := New test_type( New t_tab() ); Procedure run_test As start_time NUMBER := dbms_utility.get_time; Begin For i In 1 .. 200 Loop v_test_Type.tab.Extend; v_test_Type.tab(v_test_Type.tab.Last) := Lpad(' ', 10000); v_test_Type.dummy(); --# Removed this line in second test End Loop; dbms_output.put_line( dbms_utility.get_time - start_time ); End run_test; Begin run_test; run_test; run_test; End; I tried with both 10g and 11g. Can anyone explain/reproduce this behavior?

    Read the article

  • Maven (EJB) project with client and server artifacts

    - by Cornel Masson
    Here's my variation on the "multiple artifacts from Maven build" question: I'm porting from Ant to Maven. My application is an EJB server that is packaged as an EAR, but it also exposes a client JAR for use by other client apps. This jar contains the EJB interfaces, facade class and some helpers. I know that the Maven way is to have one artifact per project (POM); however, both artifacts (server EAR and client JAR) need to be built from the same source tree - server and client share, for example, the EJB and 'home' interfaces. How do I do this in Maven? Do I have one project containing two POMs, say server-pom.xml & client-pom.xml? I was thinking I could also have a parent POM (pom.xml) that can be used to build both client and server with one foul swoop? However, the lifecycles diverge after the 'package' phase, since the server has to go through assembly (tar/gzip), while the client is done after 'package' and can simply be installed into the repository. Any advice/experience on the best way to approach this?

    Read the article

  • Sad logic on types

    - by user2972231
    Code base is littered with code like this: BaseRecord record = // some BaseRecord switch(record.source()) { case FOO: return process((FooRecord)record); case BAR: return process((BarRecord)record); case QUUX: return process((QuuxRecord)record); . . // ~25 more cases . } and then private SomeClass process(BarRecord record) { } private SomeClass process(FooRecord record) { } private SomeClass process(QuuxRecord record) { } It makes me terribly sad. Then, every time a new class is derived from BaseRecord, we have to chase all over our code base updating these case statements and adding new process methods. This kind of logic is repeated everywhere, I think too many to add a method for each and override in the classes. How can I improve this?

    Read the article

  • Problem with "moveable-only types" in VC++ 2010

    - by Luc Touraille
    I recently installed Visual Studio 2010 Professional RC to try it out and test the few C++0x features that are implemented in VC++ 2010. I instantiated a std::vector of std::unique_ptr, without any problems. However, when I try to populate it by passing temporaries to push_back, the compiler complains that the copy constructor of unique_ptr is private. I tried inserting an lvalue by moving it, and it works just fine. #include <utility> #include <vector> int main() { typedef std::unique_ptr<int> int_ptr; int_ptr pi(new int(1)); std::vector<int_ptr> vec; vec.push_back(std::move(pi)); // OK vec.push_back(int_ptr(new int(2)); // compiler error } As it turns out, the problem is neither unique_ptr nor vector::push_back but the way VC++ resolves overloads when dealing with rvalues, as demonstrated by the following code: struct MoveOnly { MoveOnly() {} MoveOnly(MoveOnly && other) {} private: MoveOnly(const MoveOnly & other); }; void acceptRValue(MoveOnly && mo) {} int main() { acceptRValue(MoveOnly()); // Compiler error } The compiler complains that the copy constructor is not accessible. If I make it public, the program compiles (even though the copy constructor is not defined). Did I misunderstand something about rvalue references, or is it a (possibly known) bug in VC++ 2010 implementation of this feature?

    Read the article

  • Iterative printing over two data types in Python

    - by old Ixfoxleigh
    I often browse freely-available art on the web. Actually, I can't think of a better use for the internet than to turn it into a gigantic art gallery. When I encounter a set of pieces I quite like, I download them all to my hard drive. wget makes that easy, especially in combination with Python's print function, and I use this all the time to make a list of URLs that I then wget. Say I need to download a list of jpegs that run from art0 to art100 in the directory 'art,' I just tell python for i in range(0,101): print "http://somegallery/somedirectory/art", i So, this is probably a fairly simple operation in Python, and after a find-and-replace to remove whitespace, it's just a matter of using wget -i, but in days before I knew any Python I'd slavishly right-click and save. Now I've got a bunch of files from Fredericks & Freiser gallery in New York that all go a(1-14), b(1-14), c(1-14), etc., up to the letter g. I could do that in 7 goes, and it would take me less time than it took to write this SO question. That said, I want to deepen my knowledge of Python. So, given the letters a-g, how do I print a mapping of each letter to the integers 1-14?

    Read the article

  • Duplicate C# web service proxy classes generated for Java types

    - by Sergey
    My question is about integration between a Java web service and a C# .NET client. Service: CXF 2.2.3 with Aegis databinding Client: C#, .NET 3.5 SP1 For some reason Visual Studio generates two C# proxy enums for each Java enum. The generated C# classes do not compile. For example, this Java enum: public enum SqlDialect { GENERIC, SYBASE, SQL_SERVER, ORACLE; } Produces this WSDL: <xsd:simpleType name="SqlDialect"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="GENERIC" /> <xsd:enumeration value="SYBASE" /> <xsd:enumeration value="SQL_SERVER" /> <xsd:enumeration value="ORACLE" /> </xsd:restriction> </xsd:simpleType> For this WSDL Visual Studio generates two partial C# classes (generated comments removed): [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="SqlDialect", Namespace="http://somenamespace")] public enum SqlDialect : int { [System.Runtime.Serialization.EnumMemberAttribute()] GENERIC = 0, [System.Runtime.Serialization.EnumMemberAttribute()] SYBASE = 1, [System.Runtime.Serialization.EnumMemberAttribute()] SQL_SERVER = 2, [System.Runtime.Serialization.EnumMemberAttribute()] ORACLE = 3, } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3082")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://somenamespace")] public enum SqlDialect { GENERIC, SYBASE, SQL_SERVER, ORACLE, } The resulting C# code does not compile: The namespace 'somenamespace' already contains a definition for 'SqlDialect' I will appreciate any ideas...

    Read the article

  • Converting c pointer types

    - by bobbyb
    I have a c pointer to a structre type called uchar4 which looks like { uchar x; uchar y; uchar z; uchar w; } I also have data passed in as uint8*. I'd like to create a uchar* pointing to the data at the uint8* so I've tried doing this: uint8 *data_in; uchar4 *temp = (uchar4*)data_in; However, the first 8 bytes always seem to be wrong. Is there another way of doing this?

    Read the article

  • How to invoke make install for one subdirectory of Qt project

    - by chalup
    I'm working on custom library and I wish users could just use it by adding: CONFIG += mylib to their pro files. This can be done by installing mylib.prf file to %QTDIR%/mkspec/features. I've checked out in Qt Mobility project how to create and install such file, but there is one thing I'd like to do differently. If I correctly understood the pro/pri files of Qt Mobility, inside the example projects they don't really use CONFIG += mobility, instead they add QtMobility sources to include path and share the *.obj directory with main library project. For my library I'd like to have examples that are as independent projects as possible, i.e. projects that can be compiled from anywhere once MyLib is compiled and installed. I have following directory structure: mylib | |- examples |- src |- tests \- mylib.pro It seems that the easiest way to achieve what I described above is creating mylib.pro like this: TEMPLATE = subdirs SUBDIRS += src SUBDIRS += examples tests:SUBDIRS += tests And somehow enforce invoking "cd src && make install" after building src. What is the best way to do this? Of course any other suggestions for automatic library deployment before examples compilation are welcome.

    Read the article

  • How to structure this Symfony web project?

    - by James William
    I am new to Symfony and am not sure how to best structure my web project. The solution must accommodate 3 use cases: Public access to www.mydomain.com for general use Member only access to member.mydomain.com Administrator access to admin.mydomain.com All three virtual hosts point to the Symfony /web directory Questions: Is this 3 separate applications in my Symfony project (e.g. "frontend", "backend" and "admin" or "public", "member", "admin")? Is this a good approach if there is to be some duplicate code (e.g. generating a member list would be common across all 3 applications, but presented differently)? How would I route to the various applications based on the subdomain when a user accesses *.mydomain.com? Where in Symfony should this routing logic be placed? Or, is this one application with modules for each of the above use cases? EDIT: I do not have access to httpd.conf in apache to specify a default page for virtual hosts. I can only specify a directory for each subdomain using the hostin provider's cPanel.

    Read the article

  • Lambda expressions and nullable types

    - by Mathew
    I have two samples of code. One works and returns the correct result, one throws a null reference exception. What's the difference? I know there's some magic happening with capturing variables for the lambda expression but I don't understand what's going on behind the scenes here. int? x = null; bool isXNull = !x.HasValue; // this works var result = from p in data.Program where (isXNull) select p; return result.Tolist(); // this doesn't var result2 = from p in data.Program where (!x.HasValue) select p; return result2.ToList();

    Read the article

  • Serialization of generic types - GWT

    - by sarav
    I have an interface like this public interface IField<T> extends IsSerializable { public String getKey(); public void setKey(String name); public T getValue(); public void setValue(T role); } And a class like this public class FieldImpl<T> implements IField<T> { private String key; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public T getValue() { return value; } public void setValue(T value) { this.value = value; } private T value; public FieldImpl() { } public FieldImpl(String key, T value) { super(); this.key = key; this.value = value; } } When I try to compile I'm getting [ERROR] In order to produce smaller client-side code, 'Object' is not allowed; please use a more specific type (reached via server.sdk.model.IField) What is the cause for this? Is there any place I can read about GWT's generics support?

    Read the article

  • Restrict allowed file upload types PHP

    - by clang1234
    Right now I have a function which takes my uploaded file, checks the extension, and if it matches an array of valid extensions it's processed. It's a contact list importer. What I need to figure out is how to be sure that file (in this case a .csv) is actually what it says it is (ex. not an excel file that just got renamed as a .csv). Our servers run PHP 5.2.13 Here's the current validation function I have public static function validateExtension($file_name,$ext_array) { $extension = strtolower(strrchr($file_name,".")); $valid_extension="FALSE"; if (!$file_name) { return false; } else { if (!$ext_array) { return true; } else { foreach ($ext_array as $value) { $first_char = substr($value,0,1); if ($first_char <> ".") { $extensions[] = ".".strtolower($value); } else { $extensions[] = strtolower($value); } } foreach ($extensions as $value) { if ($value == $extension) { $valid_extension = "TRUE"; } } if ($valid_extension==="TRUE") { return true; } else { return false; } } } }

    Read the article

  • LINQ - group specific types of classes

    - by Nelson
    This question is similar to http://stackoverflow.com/questions/2835192/linq-group-one-type-of-item but handled in a more generic way. I have a List that has various derived classes. I may have something like this: List<BaseClass> list = new List<BaseClass>() { new Class1(1), new Class2(1), new Class1(2), new Class3(1), new Class2(2), new Class4(1), new Class3(2) }; I am trying to use LINQ to semi-sort the list so that the natural order is maintained EXCEPT for certain classes which have base.GroupThisType == true. All classes with GroupThisType should be grouped together at the place that the first class of the same type occurs. Here is what the output should be like: List<BaseClass> list = new List<BaseClass>() { new Class1(1), new Class1(2), new Class2(1), new Class3(1), new Class3(2) new Class2(2), new Class4(1), };

    Read the article

  • How to use anonymous types with Netflix OData API

    - by obautista
    If I create this collection: IEnumerable<_TITLE> _titles = null; How can I set the result set from Netflix in this expression: _titles = from t in Titles where t.Id == "ApUFq" select new {t, t.Cast} I am getting: Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Collections.Generic.IEnumerable<_Title'. An explicit conversion exists (are you missing a cast?) I understand it's because I am using an anonymous type. _TITLE is a custom complex object I create that exposes a subset of Netflix properties. If I add "_TITLE" in front the of the "new" it says that my object does not implement IENUMBERABLE. If then _TITLE implements IENUMBERABLE, it says _TITLE does not contain a definition for ADD and still getting conversion error. Basically, I want to set the _TITLE properties with the data returned from Netflix. I have defined _TITLE to contain the fields I need, plus a collection of PERSON (for Cast).

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >