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?
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 want to come up with a language syntax. I have read a bit about these three, and can't really see anything that one can do that another can't. Is there any reason to use one over another? Or is it just a matter of preference?
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.
I'm developing a project with two different sites, divided by
language. Maybe I was terribly wrong, but now my directory structure
looks like:
/ruapp/settings.py # SITE_ID = 1
/ruapp/manage.py
/enapp/settings.py # SITE_ID = 2
/enapp/manage.py
/common/urls.py
/common/ # almost every other file
/common/templates/ # templates with {% trans %}
/locale/ # with locales ru-ru and en-us, generated by calling
makemessages from the root of all this structure
How to tell django about the locale? It does not seem like it will
find the /locale/ folder by itself
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 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?
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)
Greeting,
I'm a C# programmer guy. I'm planning to start developing app for iphone but I'm not sure if I should use C# under MonoTouch or just use the native language for iphone OS Objective C.
Is there a different to program for iphone app using C# or Objective C?
Is there limitation using C# to program app for iphone or it can do as much as Objective C can do to develop iphone app?
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.
Could anyone please tell me which HTML/XHTML and CSS versions reached "Recommendation" (not "Candidate Recommendation") status?
I tried to find the documents at http://www.w3.org/TR/tr-status-stds
and they appear to be:
1) "XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)"
2) "Cascading Style Sheets (CSS1) Level 1 Specification"
Please correct me if I'm wrong. These are kinda neanderthal technologies...
i need to automatically change the RadDatePicker from normal calendar to Hijri. the idea is that i need to show a hijri calendar if the users's browser language is set to arabic.
i was able to do this when using a normal calendar but not with telerik RadDatePicker.
any ideas?
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.
After updating to Parsec 3.1 from 2.x, code using many1, such as word = many1 letter fails with
No instance for (Stream s m Char) arising from a use of `letter'
I found a mailing list post claiming that adding {-#LANGUAGE NoMonomorphismRestriction #-} to the top of the source file would solve the problem, but it did not.
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;
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 am assembling different visualization tools that are available in python language. I found the Treemap. (http://pypi.python.org/pypi/treemap/1.05)
Can you suggest some other tools that are available. I am exploring different ways of visualization of web data.
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
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 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.
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 this old computer - P4 2.0ghz, 1.2GB RAM and onboard graphics(no external card), 80GBHDD. It has xubuntu installed on it and it regularly hangs when it takes more system resources for say like graphical programs, too many tabs on firefox etc. It just either hangs the system or shows black screen.
Tested if it was issue of HD but it wasn't because i have used linux livecd and problem is still the same even if I have removed the HD. I have also tested with USB linux (puppy linux and ubuntu linux on 8gb drives). Tested windows XP as well on this HD and results are the same. Tested another HD on this machine, results are still the same with it. System hangs or goes black screen and requires restart.
I thought later it could be thermal heat issue and then applied thermal paste on heatsink but still it fails to work for me. It continues to show symptoms. Another thing which was yet to be tested is changing of CPU fan which was not done because I have not found any fan for old pentium 4 machine in the market. I have to hit online stores (but i am in india and it's hard to find it in online shops which can deliver it to me).
So far I don't see this as HD or Monitor or OS issue because I have tested with other HD and results are the same. So it could be either CPU fan or motherboard? What could be possible issue with the hardware?
Is there a function in Windows API to toggle the "Show hidden files, folders and drives" option in Windows Explorer (Tools Folder Options... View tab).
I know of a related registry key, but changing that would not have immediate effect. The key is: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/Advanced/Folder/Hidden/SHOWALL
Trying to do this from C#, but the question is not language-specific.
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.