Right now I am using fread() to read a file, but in other language fread() is inefficient i'v been told. Is this the same in C? If so, how would faster file reading be done?
Are there any snippets to make emacs use the .vim syntax files found in /usr/share/vim/vimfiles/ for coloring text. Many applications like conky have the vim syntax files like "conkyrc.vim" for vim but not for emacs. So is there an easy way to use those files rather than rewriting a new language-mode for each of those available in vimfiles directory.
I'm interested in programming languages well suited for embedded programming.
In particular:
Is it possible to program embedded systems in C++?
Or is it better to use pure C?
Or is C++ OK only if some features of the language (e.g. RTTI, exceptions and templates) are excluded?
What about Java in this domain?
Thanks.
What programming language + web framework combinations supports static type-checking? I'm not scared of functional programming (I'd prefer it), however I'm looking for a mature framework with the bells and whistles we've come to expect. Obviously this includes security and efficiency concerns.
There are more and more programming languages (Scala, Clojure,...) coming out that are made for the Java VM and are therefore compatible with the Java Byte-Code.
I'm beginning to ask myself: Why the Java VM?
What makes it so powerful or popular that there are new programming languages, which seem gaining popularity too, created for it?
Why don't they write a new VM for a new language?
I have a list of items sorted alphabetically:
list = [a,b,c,d,e,f,g,h,i,j]
I'm able to output the list in an html table horizonally like so:
| a , b , c , d |
| e , f , g , h |
| i , j , , |
What's the algorithm to create the table vertically like this:
| a , d , g , j |
| b , e , h , |
| c , f , i , |
I'm using python, but your answer can be in any language or even pseudocode.
Thanks
Has anyone actually used Wt?
Did it work well?
Did you experience certain limitations? Or advantages?
Note:
Please avoid the discussion of whether C++ is suited to be a web development language. I just want to give Wt a try because it seems like a fun thing to do.
I'm looking to pass an anonymous function to another function, but it doesn't seem to be working as I'd like.
I've attached the code, I think it'd give you a better idea what I'd to do.
<script language="javascript" type="text/javascript">
function do_work(success) {
success;
}
do_work(function () {
alert("hello")
});
</script>
Thanks in advance for any help.
Hi,
I often cross this kind of code transformation (or even mathematical transformation)
(python example, but applies to any language)
I've go a function
def f(x):
return x
I use it into another one.
def g(x):
return f(x)*f(x)
print g(2)
leads to 4
But I want to remove the functional dependency, and I change the function g into
def g(f):
return f*f
print g( f(2) )
leads to 4 too
How do you call this kind of transformation, locally turning a function into a scalar ?
Using Objective C, cocoa touch framework.
I have few image files in my iphone application. Some file names are in english and some are in japanese like "????????Icon .png"
I'm creating views programatically and not using IB.
My code is not able to read files with name in japanese language.
How can I get this work done.
I have the command language part sorted out, I'm looking for good sample on how to build a custom console in Cocoa. Need features like copy/paste, command stack, ctrl-z processsing etc. Thanks in advance.
Using Visual Studio 2005
Language: c#
A new to c#
I have software, the software should communicate with gprs devices. So i want to write a protocol, TCP, UDP communication code.
Can any one give some idea for writing a source code and some sample code also.
Hi,
I have been working in Java for the past 4 years and I am currently switching over to Ruby. I am so excited about it and I feel good to finally get a hands on experience on a scripting language first time. The task assigned to me is to first pick a OS of my choice and setup a Ruby in it and study for 2 weeks. I have been developing applications in windows and Linux is not my cup of tea. Some part of me wants to try out Linux but I want to first convince myself whether OS really matters for Ruby development.
If Linux does matter, which distribution can I start looking at?
Please advise.
i need to set up a proxy for cross-domain javascript.
the problem is, i tried the simple fgets() , i discovered, javascripts are ignored and non-functional.
is there a proxy library that handles all these ? it can be in any scripting language.
Is there any API or a jQuery plugin that allow me to highlight a code on my website?
For example
<pre code="c#">
var x = new StringBuilder();
var complex = new Complex();
</pre>
<script type="text/javascript">
$("pre[code]").codehighlight({ language: "c#" });
</script>
Something like that?
I am wondering how it is possible to avoid one socket connection pr. thread in Scala. I have thought a lot about it, but I always end up with some code which is listening for incoming data for each client connection.
The problem is that I want to develop an application which should simultanously handle perhaps a couple of thousand connections. However I will of course not want to create a thread for each connection because of the lack of scalability and context switching.
What would be the "right" way to do this. In my world it should be possible to have one actor for each connection without the need to block one thread per actor.
Java is not my main programming language so I might be asking the obvious.
But is there a simple file-handling library in Java, like in python?
For example I just want to say:
File f = Open('file.txt', 'w')
for(String line:f){
//do something with the line from file
}
Thanks!
consider a standard c# 'function'
public void foo()
{
//some code
}
In c or c++ this is called a 'function' - even if taking no parameters and returning no value. In another language maybe it would be a 'procedure'.
In object orientation speak it would be called a 'method' if a class member.
What would be the correct term to use in c#?
Hi everyone.
I want to search my link on other pages by passing url address.
After passing the url it should return some boolean value which will define the existence of my link.
Preferred language ASP.net/C#
If it is possible, Please help me.
Was discussing over lunch why several ports of languages to the .net framework are prefixed with 'Iron'.
e.g.
IronPython
IronRuby
IronLisp
IronScheme
IronPHP
Anyone out there know?
(language list sourced from http://www.dotnetpowered.com/languages.aspx)
Hello, I am wondering what the uses of C++/CLI is. It seems to me that it is basically C++ running on .Net, am I wrong in this thinking? What is it good for? Why not just use C# or some other truly managed language instead?
When I wrote best I meant:
Speed,
Have an IDE, a debugger,
Compiling to machine code or some other language,
Quality of implemenation and,
Completeness.
I will have publications (news papers), under these publications there will be editions [location and language] and under these there will be offers and offers will have products.
currently i have created all as modules i.e. publication to add / edit /delete publication, edition to add / edit/ update editions and so on. the problem is how can i get list of all publication when I am creating a edition and same way how can i get list of edition and publication when i am creating a offer.
please help/
regards,
saurabh
We are in web era standalone applications are almost gone everyone wants their internet application to run inside browser, programming languages like Ruby, Python and scala are becoming more and more mainstream.
Sometimes I wonder what these programming language offer which make them top choice of IT companies, if I plan to become a freelance web developer is it worth learning C# or Java. I read beginner's book for both of them, but to master any of them require some time investment.
I already know C++ console programming. So shall i learn Qt for c++ or c# first?? I eventually plan to learn both anyways. Also, how long will each one take. The only programming language i know is c++.