I've read it's entry in the language reference (Intel's), but I cannot quite grasp what it does. Could someone in layman's terms explain it to me, what it means when it is included in a module ?
Assume you have a vector like so:
v <- c(1,1,1,2,2,2,2,1,1,3,3,3,3)
How can it be best reduced to a data.frame like this?
v.df <- data.frame(value=c(1,2,1,3),repetitions=c(3,4,2,4))
In a procedural language I might just iterate through a loop and build the data.frame as I go, but with a large dataset in R such an approach is inefficient. Any advice?
CheckPara is my OnDataBinding procedure
SqlDataSource1 is ObjectDataSource (it's only confusing name)
Language is Nemerle, but if you know C# you can read it easy
protected virtual CheckPara(_ : object, _ : System.EventArgs) : void
{
foreach(x is Parameter in SqlDataSource1.SelectParameters)
when(x.DefaultValue=="") //Cancel binding
}
so how can I cancel binding when there is not fully configurated ObjectDataSource ?
Or... how can I run binding only when I done with all parameters ?
Hi All,
I am new to programming, and have been given many interviews for jobs, but what I lag is the concepts and skills of general problem solving not respect to any particular programming language.
are there any books or material available which can help me upgrade my programming skills.
looking forward for you guys to share your views.
Thanks a millions..
Kai
Hi to everyone,
I'm studying about programming language's theory and I can't figure out a solid reason to why lazy languages doesn't have mutation?
Does anyone know the reason?
I'm using a game physics library (Box2D) which only supports convex polygon shapes. However, I'd like the level builder to be able to just specify concave polygons without having to worry about that.
So, how can I automatically break apart a concave polygon into convex ones (or even all triangles).
Speed would be cool, but ease of implementation is more important. The breaking apart will only be done on game initialization.
(My language is Flash/ActionScript 3, but that shouldn't matter)
I have played/worked with many different programming languages and Dylan is still one of my favorites.
My question is why did Dylan fail when Objective-C, Ruby and even Scheme have had more success?
Was Dylans performance that much worse than Objective-C that Apple went with it or was purely for social/political reasons.
Hopefully someone from apple will see this question :)
BTW if you have no idea what Dylan is please google Dylan Progrmaming Language.
I just started studying Python using the Python 3.2 Tutorial and on the introduction is written:
By the way, the language is named after the BBC show “Monty Python’s Flying Circus” and has nothing to do with reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged!
But I have to say that I did not understood this part: “Monty Python’s Flying Circus”, I'm Brazilian and even Google Translator don't know how to answer it. Can someone explain me this phrase?
Is there are an easy way to initialize byte array from portion of existing byte array. In C language it is possible to use pointer to say like
char s[10] = new char[10];
char* b = s + 5;
Is it possible to do that in c#, like:
byte[] b = new byte[buffersize];
byte* header = b + 5;
byte* data = b + 25;
If a friend of yours wanted to get into development and didn't have any experience, what would you suggest? What language/resources would you suggest to break into programming? With all of the technologies out right now and buzz words where should one even start explaining this stuff to people?
I want to call a generic method that constrains the input type T to implement two interfaces:
interface IA { }
interface IB { }
void foo<T>(T t) where T : IA, IB { }
How can I fix the last line of
void bar(object obj)
{
if (obj is IA && obj is IB)
{
foo((IA && IB)obj);
}
}
?
Reflection probably allows to do the call, but I would like to stay within the language.
I'm a C# programmer and want to write an Android app. I'm a stubborn curmudgeon and refuse to write Java ever again (after switching to C# six years ago).
Besides Mono and MonoDroid (and writing Java), are there any options for me? Or should I just feel foolish for refusing to returning to my Java roots?
(Please refrain from Java-related vs. C# discussion. I was being rhetorical when I asked about returning to me Java roots.)
This question is similar in spirit to :
http://stackoverflow.com/questions/492178/links-between-personality-types-and-language-technology-preferences
But it is based specifically on indentation (spaces vs tabs and the number of spaces).
The reason I am asking here instead of searching is because I remember seeing a specific document writing about this. If I remember correctly, it also talked about why Linus prefers eight spaces.
What is the best method for communication between Flex and PHP?
In the past, we used AMFPHP with AS2, and it worked great for the most part (advantage of AMFPHP is that it also has a JSON mode that can let you seamlessly use the same remote PHP with either Javascript or Actionscript frontends).
However, it seems like AMFPHP isn't realy maintained anymore. So what do people recommend to replace it? So far, what I've found is:
Zend_AMF (looks too complex for us, we're not using the Zend framework otherwise)
AMFPHP (there were some updated made to support Flex, and it seems fairly stable, but not sure on long-term support)
XML (AS3 has nice XML handling routines, but it's more of a pain on the PHP side)
WebORB (I have no experience with this)
Roll-our-own using JSON or some other data-to-text serialization system (php's serialize(), XML, etc etc)
Mostly I'm leaning towards AMFPHP, even because of the downsides, since that's what I'm used to. Any reason I should consider switching to something else?
I was taking a look on Go language, but I want to know if there is any IDE developed only for it, but that have a GUI design feature, as Visual Studio and Netbeans.
Hello,
How to implement timeout in this code:
Response.Write(@"<script language='javascript'>alert('some alert');</script>");
Response.Redirect(Request.ApplicationPath);
I want to show to user message, and after redirect. But in my solution operations occurs very fast, and alert is not shown.
thanks
Hello
i am using itextsharp
and i am trying to get all the fonts of the given string in pdf file
is this possible
if it can be done in any language i please tell me
Thanks
Is there an open-source alternative to MATLAB's fmincon function for constrained linear optimization? I'm rewriting a MATLAB program to use Python / NumPy / SciPy and this is the only function I haven't found an equivalent to. A NumPy-based solution would be ideal, but any language will do.
I've created a custom binding in WCF for a custom MessageEncoder to allow messages to be written as XML using a wider range of encodings than WCF supports out of the box. The encoder appears to be working and I am able to send and receive messages, but I want to verify that the XML message being written is exactly as required by the service I am trying to consume.
I've turned on message logging for WCF using the diagnostic trace listeners to output the messages sent and received over the wire to a log file. Unfortunately, for calls using my encoder, the message is displayed as ... stream ...
EDIT:
I don't think it's anything to do with my custom encoding. I have experimented with my custom binding a little, switching to using the built-in text encoding and http transport. I still don't get a message body logged in the message trace.
Is there anything that needs to be specified within a custom binding to enable message logging?
I'm looking for a good book on how modern microprocessors are designed and work as I would like to increase my understanding of what makes them tick. Something that covers pipelines, superscalar architectures, caches etc. A book that is suitable for a programmer with several years of experience and has done and understands assembly programming and machine language, so basically not "CPUs for Dummies" or anything such.
What books do people who design today's processors read for instance?
I have a 128-bit unsigned integer A and a 64-bit unsigned integer B. What's the fastest way to calculate A % B - that is the (64-bit) remainder from dividing A by B?
I'm looking to do this in either C or assembly language, but I need to target the 32-bit x86 platform. This unfortunately means that I cannot take advantage of compiler support for 128-bit integers, nor of the x64 architecture's ability to perform the required operation in a single instruction.
What "Hidden Features" of JavaScript do you think every programmer should know?
After having seen the excellent quality of the answers to the following questions I thought it was time to ask it for JavaScript.
Hidden Features of C#
Hidden Features of Java
Hidden Features of ASP.NET
Hidden Features of Python
Hidden Features of HTML
Hidden Features of PHP
Even though JavaScript is arguably the most important Client Side language right now (just ask Google) it's surprising how little most web developers appreciate how powerful it really is.
I have just upgraded to VS 2010, and I have performance problems which I did not have before (in VS 2008).
The most annoying thing is that it freezes while I work in the text editor. Sometimes when it freezes I see that it is saving auto recovery information, but not always.
Almost anything I do gives an unacceptable long delay, like saving, starting to debug, ending debug session, switching between design and code view, and doing WinForms designing.
I have some parts of my home directory on a mapped network drive. I suspect that that might be a part of the problem. Is it possible to configure VS 2010 to use exclusively local disk for its "internal" work perhaps?
Any hints would be appreciated! Has anyone else experienced these kinds of problems?
Hey,
I have just started to study computer sciences at the university where they teach us programming in scheme.
Since i have learned c++ for the last 6 years, scheme appears a little odd to me. But they tell me you can write any program you can write in C or Java with it.
Is anybody really using this language?
I'm having some trouble with switching to the new JS API for a number of things with creating applications within FB, specifically the "Tab".
<!--
function do_perm()
{
Facebook.showPermissionDialog('publish_stream,email,offline_access', null);
}
//-->
This no longer works for me when called via an onclick command. Also, with the new API and an FBML app. How does this exactly work? The documentation is really poor so I am confused when looking at the old wiki, and the new developer site.
Apologies for being pretty vague, but I'm just generally confused with the lack of clear direction with the new API and help would be greatly appreciated.
I'm simply just trying to create a call that prompts for the new style user permission dialog, and oncomplete calls another JS function.