« first day (1422 days earlier)      last day (3515 days later) » 

6:22 AM
Maybe someone will be interested in this question: cs50.stackexchange.com/q/2551/2290
 
hello every one :)
i have a question,whats diffrence b/w main() and void main() in C language?
bye :(
 
 
10 hours later…
4:56 PM
@Kartik Are we welcome on that site if we're not enrolled in that coarse?
 
5:23 PM
@derobert yeah
 
@SSAURABHH maybe main() is same as int main()
see if you can put a return statement in there
 
through you might not understand the questions since it's about a course
 
is this question too lame for the site.. I am on debian and want to connect the computer to a public IP, no NAT. I want to shut down all servers.. so there's no risk of anybody getting in. What is a good way of doing that? I see these servers on it
22/tcp open ssh
111/tcp open rpcbind
32993/tcp open unknown
others on my LAN can see those
and running nmap on 127.0.0.1 I see 22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
631/tcp open ipp
32993/tcp open unknown
how can I shut those services down?
 
 
3 hours later…
8:13 PM
@SSAURABHH main() is implicitly handled as int main() with a default return value. void main() is non-standard and therefore is not C or C++, so don't use it.
both the C and C++ standards require that main() return an int and take either 0 or 2 arguments of int and an equivalent to char**
@FaheemMitha if you want to see a dreadful language, look at the scripting language GrADS uses. Terrible. If you want to do something complex it is easier to use python bindings to OpenGrADS and do all of your logic in python, passing arrays back and forth to GrADS.
 
@casey I've never heard of GrADS.
What is that?
 
8:55 PM
@FaheemMitha its an analysis program for gridded datasets
handles 5 dimensions (x,y,z, time, ensemble member) easily
 
@casey Is this subject specific? never heard of it
@casey oh
 
analysis and visualization
 
@casey So not subject specific then
 
nope
if you have gridded data in a flat binary file, netCDF, grib, HDF4 or HDF5, GrADS can play with it
 
free software, though.
@casey I don't no. Grids as in actual locations, right?
 
8:59 PM
grids as in an X,Y,Z mesh
both regular or irregular
and yes, it is GPL
though it can handle data for specific ungridded locations
e.g. if you had observational data from randomly located weather stations, it could do certain things with it
but I've only used it for irregular grids
e.g. X,Y,Z have varying dx, dy and dz
 
Right. I think the branch of statistics that deals with such things is called spatial statistics
I don't know anything about that
 
@FaheemMitha I use it to quickly produce diagnostic images like that ^^^
 
Anyway, there is lots of terrible academic software out there. But most of it is not used as widely as R. I assume it's my comments about R that prompted your response.
 
I generally use python now, but when I was working with flat binary files with no metadata, it was a bit easier to work with GrADS
 
@casey I see. Looks good. Ever used SAS?
 
9:10 PM
nope
 
@casey Count yourself fortunate. It's terrible. I'm guessing you've used R. It's hard to avoid.
 
I used it in a stats class, mostly just to confuse the graders who expected excel output :)
 
@casey Good reason. Did it work? :-)
 
but I've managed to otherwise avoid it
 
@casey not a fan, then?
 
9:17 PM
@FaheemMitha I'm just not often in the need of its services
 
@casey ok
 
I do my number crunching in Fortran, my analysis and visualization in python (and occasionally GrADS, gnuplot, IDL, or NCL). If I needed to do more stats oriented stuff I might incorporate R, but I don't need its plotting or other stuff.
I also avoid Matlab like the plague
 
@casey that's very sensible. In this case, is it fair to say you are not a fan? :-)
@casey R has ggplot2, which is something of a killer app. Though the creator appears to have lost interest. There is a python port in the works. Not in Debian yet. But quite active. Have you tried either the R or python versions?
 
9:40 PM
I'm aware of ggplot2 but don't use it. I typically use matplotlib in python
 
@casey Yes, that's another popular choice. Are you aware matplotlib now has a tikz driver?
 
I wasn't aware. I use eps output.
the journals in my field accept latex but they prefer you don't include any packages they didn't already include in their template, and afaik, tikz is not in that list so I never bothered to learn it.
 
@casey if you use LaTeX, give the tikz driver a try.
@casey you can convert to PDF and ship the PDF.
Including the PDFS in the LaTeX output produces very similar results to direct TikZ inclusion in the LaTeX file.
TikZ always produces nice looking plots, and the text is the correct font and size.
I've used TikZ in that fashion.
but not via matplotlib so far. does mpl work well for you?
tikz has this thing called the externalize library that sort of automates this
 
for the most part. Animating plots is sensitive to the version of mpl and I've seen some odd issues with contour and fill on 3d plots
but other than that I don't have any complaints
 
@casey ok
 
9:52 PM
or at least if I did, I've since forgotten them now that all my plotting scripts are in place
 
See eg
8
Q: export Tikz figures to PDF

EagleI am in the process of writing my master thesis and i am using Tikz to generate few graphs. Unfortunately, the input file for the graphs are not so small, so i already faced the problem that space limitation (solved). Nevertheless, it will take a long time to generate those plots. My question is...

@casey if you did what?
oh, complaints about mpl?
 
 
2 hours later…
11:39 PM
darn @Seth, edit the title >:( unix.stackexchange.com/q/153064/41104
 

« first day (1422 days earlier)      last day (3515 days later) »