How do you make a Flash movie (using Haxe, or Actionscript code rather than the IDE) that supports multiple languages?
Can you detect the browser's language?
Are there utility classes for managing the strings and selecting the appropriate one based on language?
I'm not sure if this valid C# but hopefully you get the idea. :)
switch (msg.GetType()) {
case ClassA:
// blah
case ClassB:
// blah 2
case ClassC:
// blah 3
}
How would I switch on an object's type but using VB.NET's Select Case?
I'm aware that some might suggest using polymorphism but I'm using a hierarchy of small message classes so that really wouldn't work in my csae.
pls show any example of using Cocoon's 'link_to_add_association' with html_options.
https://github.com/nathanvda/cocoon
Documentation says:
html_options: extra html-options (see link_to) There are two extra options that allow to conrol the placement of the new link-data:
data-association-insertion-node : the jquery selector of the node
data-association-insertion-position : insert the new data before or after the given node.
But i can not understand what to do, if i want insert partial just before my "add element" link. Not just after parent's div begin. This not gonna work:
<%= link_to_add_association "add element", f, :production_years,
:position = "after_all" %
I heard that the Task Parallel Library can be used in a .Net 3.5 project. Is this correct, and if yes, how do I use it? In .Net 4.0, it resides in System.Threading, but when I select .Net 3.5 as the target in Visual Studio 2010, I don't get access to classes like Parallel and the Parallel loops.
I’ve installed a local (per-account) PEAR instance on shared web-hosting. After that I’ve installed PHPUnit. It doesn’t work in command-line mode because PHPUnit classes are not under default include_path that is ".:/usr/local/lib/php".
The same, I think, would happen with local phing and other command-line tools installed via PEAR.
Is there a way to specify per-account include_path value that will contain my local PEAR path "~/pear/php"?
I found out recently that JList (finally!) was "generified" in JDK7.
Why JTree and related classes/interfaces are not changed the same?
It would be a huge improvement. Casting Object is going on one's nerves.
I need to produce my own DecoderFallback and DecoderFallbackBuffer classes to implement some custom stream decoding.
I have found that the stream reader making use of it is calling GetNextChar() repeatedly even when my specilizaed DecoderFallbackBuffer.Remaining property returns 0 to indicate that there no more characters to return.
The end result is that the stream reader gets into an infinite loop.
Why is this happening?
Hello
i have seen [] such brackets in c# very very rarely but when i start to learn asp.net i have seen them many times but still i couldn't understand what they does ?
They are not part of code as using for arrays.For example [webmethods] which is just over the methods or there are some over classes. Are they part of .net or they are just tell something to CLR ? or ?
I have written a large C# app with many methods in many classes.
I'm trying to keep a log of what gets called and how often during my development. (I keep a record in a DB)
Every method is padded with the following calls:
void myMethod()
{
log(entering,args[]);
log(exiting,args[]);
}
Since I want to do this for all my methods, is there a better way to do this then having to replicate those lines of code in every method?
This build warning just started showing up. I'm building for 3.1.3. Not sure what I did to trigger it. Anyone know what it means?!?
CompileXIB Classes/RootViewController.xib
Disabling subview autoresizing is not supported on iPhone OS versions prior to 3.0.
Hi Guys,
I am trying to use jQuery to basically wrap a bunch of CSS modifications via jQuery but on pages where the #IDs or Classes dont exist I get errors ? Like
jQuery(".class").css(random_stuff) is not a function
Any ideas what I can do to either "find" the elements and do nothing or ?
I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it? Maybe through helper methods or classes?
I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.
Working in a medium size project during last 4 months - we
are using JPA and Spring - I'm quite sure that JPA is not
powerfull for projects that requires more than CRUD
screen... Query interface is poor, Hibernate doesn't
respect JPA spec all the time and lot of times I need to use
hibernate classes, annotations and config.
What do you guys think about JPA? Is it not good enough?
I am trying to do webservice (I am quite new in Webservice under java). I am using netbeans.
Axis2 is having problem trying to locate the the xml configuration file for mybatis
Anyone can tell me how to successfully deploy mybatis configuration. Should I manually copy the configuration under .netbeans\6.8\apache-tomcat-6.0.20_base\webapps\axis2\WEB-INF\classes or there is any other setting?
A dual interface in COM is one that is able to be accessed via a DispInterface or via VTable methods.
Now can someone tell me what is exactly what the difference is between the two methods?
I thought that a VTable is a virtual table which holds the pointers to the different functions when implementing a class hierarchy which has virtual functions that can be overridden in child classes. However I do not see how this is related to a dual interface in COM?
A new colleague has just suggested using named HQL queries in Hibernate with annotations (i.e. @NamedQuery) instead of embedding HQL in our XxxxRepository classes.
What I'd like to know is whether using the annotation provides any advantage except for centralising quueries?
In particular, is there some performances gain, for instance because the query is only parsed once when the class is loaded rather than every time the Repository method is executed?
Is there a way to have SvcUtil include the [XmlIgnore] attribute?
we need this attribute in our proxy classes (becuase we have Dictionaries that XmlSerialization does not like), but SvcUtil does not include these attributes in the generated proxies.
Does Visual Studio / Resharper support this? By refactor copy I mean to be able to enter new class name in some dialog, and to have the tool do all the refactoring (renaming) for you. No Copy of ... file names, and no error upon having two classes with same name in the project.
Netbeans does this out-of-the-box :(
I get an error that says
Parse error: syntax error, unexpected
T_PRIVATE in
E:\PortableApps\xampp\htdocs\SN\AC\ACclass.php
on line 6
while trying to run my script. I'm new to classes in PHP and was wondering if someone could point out my error. Here's the code for that part.
<?php
class ac
{
public function authentication()
{
private $plain_username = $_POST['username'];
private $md5_password = md5($_POST['password']);
$ac = new ac();
I am creating some custom exception classes doing the following
class GXException
{
public:
GXException(LPCWSTR pTxt):pReason(pTxt){};
LPCWSTR pReason;
};
class GXVideoException : GXException
{
public:
GXVideoException(LPCWSTR pTxt):pReason(pTxt){};
LPCWSTR pReason;
};
When I created GXVideoException to extend GXException, I get the following error
1>c:\users\numerical25\desktop\intro todirectx\godfiles\gxrendermanager\gxrendermanager\gxrendermanager\gxexceptions.h(14) : error C2512: 'GXException' : no appropriate default constructor available
if i have something like
class square : figure {}
class triangle : figure {}
does that mean that i should never ever use the square and triangle classes but only refer to figure ?
like never do like this:
var x = new square();
I'm looking for some good resources to learn how to implement internal service layer in Zend Framework. This is interesting post, but with no concrete code samples.
Where to put service classes (/application/modules/modulename/services/?);
How to autoload them (custom autoloader?)
Most common services (user, authentication, cart, cache, feed?)
Sample implementations (any github repos?)
Good practices?
Hello,
I started learning DBIx::class and I reach the point where you have to create the Objects that represents tables. Should this classes be created manually ( hard coding all the fields and relationships.....) or there is a way to generate them automatically using the database schema. I read something about loaders, but i did not know where they are really used.
Please advice.
Thanks
I've managed to land two programming jobs so far with a partial college degree. One was an internship/co-op type position that turned full-time, while the other is contract work I've received mainly via circumstance.
I have an interview forthcoming (my roommate works at the company) and they have already asked him why I have not completed my degree. The real reason is purely financial, but I was going to ask the SO community if there was any way I could spin this disadvantage to make it look more favorable.
So, Stack Overflow: How can I look less like a slacker given the circumstances?