So I have some class starting with
#include <wchar.h>
#include <stdlib.h>
ant there is that function wmain.
What is it different from main function i usualy use in my C classes?
I must have done something wrong. I have a C# project in Visual Studio 2008. All of a sudden I see a lock on my classes and when I hover the class names on the top tab I see the class name as : C:\Myprojects\Oder.cs[Read Only] !
Has something weird like that happened to you before ?
Thanks
What's the fastest way to draw a Hello World on the screen as a GUI in Java,
1- by using the minimum number of classes.
2- with the least byte code executed
2- the JVM tweaks
so when I double click on the Jar file in Windows, the Hello World appears in no time (assuming the Runtime is not already loaded).
I want to read a bunch of text files, by loading them as resources using the context classloader.
URL url = Thread.currentThread()
.getContextClassloader()
.getResource("folder/foo.txt");
Is there some way to get a list of resources whose names match a given pattern? For eg:
URL[] matchingUrls = someLibrary.getMatchingResources("folder/*.txt");
Libraries like Spring can scan the classpath to find classes with a given annotation, so I am wondering if there something similar to load a bunch of resources.
I would like to know which articles or books are good to use OOP concepts in C.
I mean things like using function pointers to emulate classes, strict naming conventions to emulate namespaces, and things like that. Also a reference about how to code in C different types of UML diagrams would be great.
I was working on a project with a colleague and went out for lunch one day. Given that we only spent a few days doing design and no coding, I was surprised to find out that after lunch, he had over 40 files completed (various classes, interfaces, DTOs, etc).
He told me he is just a fast typist but I need to know the real deal. He hasn't been able to sustain that kind of productivity just the initial skeletal code but still, any ideas how he did this?
A spawn off of an existing eclipse product is required for customization for a client. (hence parallel product development)
The intention was to use Eclipse Fragment, but "Fragments are additive, they cannot override content found in the host."
how can we maintain one set of codes in the svn, yet allow customization by overriding some classes?
I have written some classes in a java project and need to use them in jython code. how to go about it? I tried creating a jar of the java project and adding it to java classpath, even then import class_name doesnt work in jython code.
Hello.
I'm tuning documentation generator for internal purpose that generates HTML documentation for C++ classes and methods. Is it any example available of good HTML documentation design? MSDN ( like this ) looks kinda outdated, same is doxygen / javadoc / sphinx results. Anyone ever see an documentation that looks REALLY good?
I have two classes: Cat and DomesticCat, that extends Cat.
I want to select all Cats, but no oneDomesticCat. How to do it using NHibernate criteria API?
Python's equivalent of what I want is:
>>> #C#: Dictionary<int, string> tempDict = ...
>>> tempDict = {i : str(i) for i in range(200000)}
>>> tempDict[5]
'5'
>>>
The example is a bit simplified, but I can modify it myself; do not want to bother you with details of proprietary classes.
How do I dynamically detect what profile/configuration is being used? I know that you can dynamically detect supported classes, but I would be surprised if picking a random class that should only be in a particular profile/configuration were the proper way of doing this.
If you take a look at http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/activedirectoryoperations11132009113015AM/activedirectoryoperations.aspx, there is a huge list of properties for AD in one class.
What is a good way to refactor such a large list of (Related) fields? Would making seperate classes be adequate or is there a better way to make this more manageable?
Thanks
Hello!
I'd like to get the main image for an article, much like Facebook does when you post a link (but without the choosing image part). The data we have to work with is the whole pages HTML as a variable. The page & URL will be different for every time this function runs.
Are there any libraries or classes that are particularly good at getting the main body of content, much like Instapaper that would be of any help?
I am using EF4 with Visual Studio 2010. I have a SQL database already created and all my columns are documented with the Description property in SQL management studio. When I create the edmx in Visual Studio, how can I make it read those descriptions and use them to add comments to my generated classes? I know I can use the Summary and LongDescription in the edmx properties but I'm looking for a way to do this without having to copy and paste every description.
Thanks!
I'd like to embed code from my SVN repository into my website, using PHP. The SVN has public anonymous access, so the PHP code should be fine reading it.
The code on said SVN is java, and so far I've had no luck finding a syntax-highlighter to make the code more readable. Ideally I'd like one that uses CSS classes so that I can change the colors to match the look of the website.
Could someone point me to a PHP library that highlights Java code?
Hi ,
Rarely in the regular codes i encounter the a single colon in classes
for eg:
A::member():b(),c()
{
}
what is the importance of the single colon over here.why is it used here?
is it mandatory sometimes.if so in which cases?
How do I spell a method whose argument can either be an object of a certain type, or nil? You see those all the time in framework classes, but I've just encountered my first instance where it would be useful to create one.
I have existing java code and need to create Design Document based on that.
For starter even if I could get all functions with input / output parameters that will help in overall proces.
Note: There is not commeted documentation on any procedures, function or classes.
Last but not least. Let me know for any good tool which will reduce time required for this phase. As currently we write every flow and related stuffs.
I really appreciate the possibility to define regions in your code, as it improves the readability insanely.
Anyways, I'd like to have everyone using the same convention in all classes (with the predefined order of all regions) like:
Private Fields
Constructors
Class Properties
Event Handlers
etc...
Do you have any proposition how this division could look like (What regions have sense and what names should they have) and in which order should they be defined ?
We have splitted our grails application into several inplace-plugins.
Now we want to have the tests in the same plugin like the classes which they test.
Is it possible to configure our application (e.g. in BuildConfig.groovy) so that the tests in the plugins are executed too when we run "test-app"?
Sometimes (quite a lot, actually) we get a situation in Java where two objects are pointing to the same thing. Now if we serialise these separately it is quite appropriate that the serialised forms have separate copies of the object as it should be possible to open one without the other. However if we now deserialise them both, we find that they are still separated. Is there any way to link them back together?
Example follows.
public class Example {
private static class ContainerClass implements java.io.Serializable {
private ReferencedClass obj;
public ReferencedClass get() {
return obj;
}
public void set(ReferencedClass obj) {
this.obj = obj;
}
}
private static class ReferencedClass implements java.io.Serializable {
private int i = 0;
public int get() {
return i;
}
public void set(int i) {
this.i = i;
}
}
public static void main(String[] args) throws Exception {
//Initialise the classes
ContainerClass test1 = new ContainerClass();
ContainerClass test2 = new ContainerClass();
ReferencedClass ref = new ReferencedClass();
//Make both container class point to the same reference
test1.set(ref);
test2.set(ref);
//This does what we expect: setting the integer in one (way of accessing the) referenced class sets it in the other one
test1.get().set(1234);
System.out.println(Integer.toString(test2.get().get()));
//Now serialise the container classes
java.io.ObjectOutputStream os = new java.io.ObjectOutputStream(new java.io.FileOutputStream("C:\\Users\\Public\\test1.ser"));
os.writeObject(test1);
os.close();
os = new java.io.ObjectOutputStream(new java.io.FileOutputStream("C:\\Users\\Public\\test2.ser"));
os.writeObject(test2);
os.close();
//And deserialise them
java.io.ObjectInputStream is = new java.io.ObjectInputStream(new java.io.FileInputStream("C:\\Users\\Public\\test1.ser"));
ContainerClass test3 = (ContainerClass)is.readObject();
is.close();
is = new java.io.ObjectInputStream(new java.io.FileInputStream("C:\\Users\\Public\\test2.ser"));
ContainerClass test4 = (ContainerClass)is.readObject();
is.close();
//We expect the same thing as before, and would expect a result of 4321, but this doesn't happen as the referenced objects are now separate instances
test3.get().set(4321);
System.out.println(Integer.toString(test4.get().get()));
}
}
Hi, I am trying to set a cookie and also check if it is there, does anybody have any sample code for this? All I found was this, but it would be helpful if I could see an implementation example. http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPCookieStorage_Class/Reference/Reference.html