Programming :: Simple C# Using Mono Not Working Properly?
May 13, 2010
I am creating a simple program using C# to print the contents of the todo.txt file once it has run. Problem is when I run the program, I get this warning.
PHP Code:
[code]....
View 12 Replies
ADVERTISEMENT
Apr 27, 2010
Trying to learn python. Going well, but I have run into a minor speed bump. I wrote a simple program to see if Python was set up correctly. Wouldn't you know it, the thing pops open and then closes again. I put raw input fields there to stop the program, but they didn't work. The program is:
Code:
x = raw_input("Please input your name: ")
print "Hello " + x + ". Good to meet you."
raw_input("Press Enter to exit")
And as for python, I have installed the following packages. The program was made in IDLE using Python2.6 I just started learning python a few days ago, so this may be a really small mistake.
View 1 Replies
View Related
May 25, 2010
I just upgraded servers, and I'm now on 'perl v5.8.8 built for i386-linux-thread-multi' and a simple log script doesn't work. I got it changed to
Code:
#!/usr/bin/perl
use strict;
[code]....
View 4 Replies
View Related
Oct 7, 2010
i'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?
View 3 Replies
View Related
Feb 19, 2011
I have a webpage in html that uses <frameset> tag. One of the frames is a Table of Contents (toc.htm) that lists a series of images. The other frame is called 'canvas.htm'. My framset is laid out as follows:
<frameset rows="20%, 80%">
<frame src="./banner_sp.htm" ></frame>
<frameset cols="15, 85">
<frame name="toc" src="./toc.htm" ></frame>
[Code]....
The frameset is created properly and I can load the images manually (i.e. I can access the images from my browser and/or image editing tool). The problem comes when I attempt to access the images from the toc.htm frame. Instead of opening the image in the canvas.htm frame, a new window is displayed in my browser, instead of the image being displayed in the target window (canvas.htm). This happens on all of my browsers (firefox, safari, IE7/8 and Opera) on Windows, debian-linux and OS X 10.5/10.6.
If I change my src attribute (in the canvas frame) to toc.htm, I see the Table of Contents (toc.htm) displayed side-by-side until I click on the first drawing in the list. At this point, the frame 'behaves' half-arsed the way I want it to. I have searched on google till I am blue(er) in the face with no luck.
View 3 Replies
View Related
Apr 14, 2011
I am busy writing this script to get a pixel count of a large batch of images in a directory for a research project. To do this I'm using a loop to get all the images in the directory. To make the whole procedure more user friendly for some colleagues I decided to use zenity, something I haven't yet really worked with. As not to make sure that the users don't have to watch to this blank screen during the actual processing of the images I'm trying to get the zenity progress bar working. So far the progress bar comes up but instead of changing over time it stays "empty" till all the images are processed and then becomes 100% when all images are done. What servers my needs for now, but since I am trying to learn more about zenity I was wondering how I could change the script to get the progress bar properly working? Below is the piece of script I am talking about.
Code:
cd $input #goto path of image directory
(for a in *jpg *JPG *jpeg *JPEG; do
if [ -f "$a" ]; then #was it a image file
b="$a" #set b to $a
convert -resize 1000x1000! ${b} -depth 1 -format %c histogram:info:$b.txt #get pixelcount and write to .txt file
fi
done) | zenity --progress
View 2 Replies
View Related
Apr 20, 2011
basically in the child process iam just calling the ptrace(PTRACE_TRACEME, 0, NULL, NULL) system call but if add this stsyem call rest of the code not working properly. i found the reason basically what happening is when we have ptrace() system call its printing the same variable 3 times i.e its not executing it 3 times but just it is printing 3 times .iam just wondering how it could be possible.
View 1 Replies
View Related
Feb 28, 2010
I would like to know if anyone has run more than one version of mono concurrently. I want to host a Battlefield 2 server with bf2ccd that requires mono 1.1.12. CentOS 5.3 repos provide mono 1.2.4 which is neither new enough nor old enough to support bf2ccd. I have considered compiling a newer version or an older version to accommodate this but I think that the only fully supported version is the 1.1.12 and I want to have the newer mono for other projects. I have used Slackware exclusively up to now and am not familiar with CentOS yet so I would like to avoid compiling if I can. The server is an unmanaged dedicated server so I'm not certain of all of the details. AFAIK it is a standard CentOS 5.3 install.
View 4 Replies
View Related
Aug 24, 2010
So, I have compiled a C# program on Linux using MonoDevelop. When I try to execute the resulting binary, my system tries and fails to run it as a windows executable, with wine. Wine gives me the following message:
$ ~/bin/MyMonoApp
wine: Install the Windows version of Mono to run .NET executables
~/bin/MyMonoApp: command not found
I can only convince it to run by explicitly calling mono:
$ mono ~/bin/MyMonoApp
So, how can I make this the default, so I don't have to explicitly call mono every time?
View 1 Replies
View Related
Mar 4, 2010
I been trying to load one applcation is using .NET Framework 2.0. I went to Mircosoft to get the .NET 2.0 and attempting to install it but got a error. I look it up in the internet. Many topic point out that I have to install Mono to get it to work. I went to Ubuntu Software Center to get Mono, only one that I am unsure of is "MonoDevelop". But i installed it anyway and it still not helping. So I went to google to find info on how to install Mono on my Karmic. Found this, [URL] They point out that Ubuntu do have Mono pre-installed but they are using the old version, So I have to update it. By following those terminal command to get Mono installed. Then I got to the end and it said to check if Mono is installed. It comfirmed that it is there. So I went to install NET. 2.0, it still having error to install. I check what the error signature, it said something about Visual Studio setup.exe
I thought to try to open the applcation that is using .NET 2.0, it still have error. How I able to get it to work?
View 2 Replies
View Related
May 5, 2010
I installed Mono Develop on Ubuntu 10.04 X86 . What I found when I tried to design a GUI using the GTK designer is that the tool box which houses GUI widgets does not appear. Is there any fix or solution to this?
View 1 Replies
View Related
Nov 18, 2010
How can I create packages for Windows7 and Linux using C# in mono-develop ? Will the packet be directly installed under Windows7 ?
View 1 Replies
View Related
Nov 28, 2013
I have a machine where I dabble a bit with mono and .NET in my spare time. It's running Jessie and upgraded mono to 3.0.6 from 2.x and MonoDevelop to 4.0.
Rebuilt my webapp after upping the target platform to Mono .NET 4.5 and it works fine in the debugger.
When copying the app to the production folder (on the same machine) it will no longer start and apache's error log says:
Code: Select allSystem.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionA
ttribute' from assembly 'System.Web'.
at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono
.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0
at Mono.WebServer.ApplicationServer.GetApplicationForPath (System.String vhost, Int32 p
ort, System.String path, Boolean defaultToRoot) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:GetApplication
ForPath (string,int,string,bool)
[Code] ....
I understand from posts like this one: [URL] .....
...that Microsoft moved the ExtensionAttribute from System.Core.dll to mscorlib.dll in .NET 4.5. And that a [TypeForwardedTo] attribute is supposed to make this transparent.
I get this - but have no clue to how to make my webapp work? It does so under the debugger so it obviously does some magic.
View 2 Replies
View Related
Jun 22, 2011
I installed Redhat Enterprise 3 on one of my servers. In my haste I didn't properly partition both Hard Drives and only properly partitioned one of them. Thus now I have
/dev/sdb1 478711768 137858256 316536328 31% /
/dev/sda1 101089 15346 80524 17% /boot
Where /dev/sda1 is actually a 80 GB hard drive. Is there anyway I can safely and easily repartition the unpartitioned space without causing a huge mess? I have a very important Oracle database on /dev/sdb1 and thus I want to be able to back it up on the second disk. I can create a partition on that drive?
View 2 Replies
View Related
Apr 11, 2011
I need help as I am not proficient with Linux C++ Programming. There are two parts which I need to do in the coding provided below.
1. Produce the program so it can output the word "Hey there!" and wait two minute and print the word "See you later!".
2. Produce the program that will output the text "Cool" every 20 seconds by setting a periodic task.
Quote:
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk("Hey there!
[Code]...
View 3 Replies
View Related
Feb 12, 2011
im trying to build a simple program for my C programming class, this is the source code
#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;
[Code]...
i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?
View 5 Replies
View Related
Apr 25, 2011
I had a problem with apache2 and getting .htaccess working. I have done some things and i believe its working the ErrorDocument command is anyway. I believe there may be some problems with the rewrites though.Im trying to take a urlhttp://localhost/showthread/123and make it display whats on http://localhost/index.php?showthread=123The rewrite rule is Quote:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^showthread/([^/.]+)/?$ index.php?showthread=$1 [L]
[code]....
View 8 Replies
View Related
Mar 18, 2011
i first noticed when i tried to get mono via sudo apt-get install mono i got the error
[Code]...
E: Package 'mono' has no installation candidate then i tried to get it through the software center and i noticed the software center wasn't opening.... so i tried searching to find if someone else had the proroblem, they did, one solution was to reinstall python but if i open syapitic software i get the error
[Code]...
View 6 Replies
View Related
Feb 23, 2010
I've installed mono developer, but when I want to make debug I got this message : Build failed. ApplicationName='/usr/bin/gmcs', CommandLine='"@/tmp/tmp17a7a5e2.tmp"', CurrentDirectory= ...
View 1 Replies
View Related
Mar 26, 2011
How to create a simple Makefile using C....
View 3 Replies
View Related
Feb 16, 2011
This is my sub;
Code:
sub projName
{
print "Enter project name: " ;
$PROJ = <STDIN>;
print "";
[code]....
I can call this routine and it works fine when I enter a valid name for $PROJ. If I enter an invalid name it goes to the else block and prints the statement. However, it does not call itself. Instead the script just exits.I've googled 'perl recursive subroutines' and the example don't appear to be doing anything different.
View 4 Replies
View Related
Nov 7, 2010
I have been looking at: ut a lot of it is to do with files and numerical comparisonswhat would be the bash equivalent of:if (http isin $2) { do something }
View 2 Replies
View Related
Nov 4, 2009
I am trying to create a function that takes a pair of a high and a low limit, and returns an arbitrary number between them. Below is my attempt to create a function that accomplishes this by checking to see if they are equal, and if not, subtracts a very small number from the high limit and returns the result.
View 2 Replies
View Related
Dec 19, 2010
Xsane is no doubt wonderfully competent, but far too complicated for casual use.
But I am having a problem with Simple Scan, in that I can't seem to get selected resolutions to have any effect.
A typical A4 mainly-text document I am playing with, ends up as:
My Epson V200 scanner allows normal resolution selection with Xsane or with Epson's iscan application.
View 1 Replies
View Related
Mar 22, 2011
This is probably hopelessly ambitious as I'm not a C or C++ programmer (I normally like to stick to scripting languages like BASH or Perl). Basically I'm looking on good advice to get me started with writing a Application Dock with the functionality of the OSX dock but without the overly flamboyant graphics that have characterised the Linux versions.At the moment the closest I've found to what I would like is bbdock. However it falls well short of the functionality of what I would like.
What bbdock does is read a file to create an icon for the openbox dock/fluxbox slit/wmaker whatever that launches an application when first clicked, shows an little arrow when the application is running, and brings the application to the fore when clicked once running.Here's a screenshot of it doing just that.The drawback to bbdock is that it doesn't really look for running applications, only those launched from bbdock. So for example it wont notice if I've launched an instance of pcmanfm from the openbox menu. And therefore it obviously also doesn't add icons for other applications that are running.
What I would like to be able to do is detect new running applications and add a bbdock icon for them. Also to detect if an application already with a shortcut has been run and update it's status to show it's open. Probably have an up and down arrow to move the icons up and down when there are too many to fit on the screen. None of the above needs fancy animation. The fade to gray effect used by bbdock is quite nice and could probably be augmented with a fade in and out to grey to represent another action, say fading to grey and back when launching and greyed when iconified.So, my question is what do I need to get started doing this? Am I best using the pretty outdated bbdock wmaker dockapp style? What functions and libraries am I likely to need to achieve the effects I want? Are there any examples of how to monitor running applications (well windows and figure out what constitutes a new application) that I could look at for inspiration. Is there anyone who's into C++ for linux who would be interested in helping me out to get this small project working?
View 8 Replies
View Related
Apr 1, 2011
have a simple script for comparing two directories. I want to list all differences between this directories.
here is my function for compare:
function comp
{
for i in $1/*; do
if [ ! -e "$2/${i##*/}" ]; then
echo $i
[Code]....
in my script these two files are equal(my script ignored last time modified)
View 5 Replies
View Related
Apr 13, 2010
I want to create simple webcam effects filters. I am only interested in doing relatively simple image processing like blurring or averaging the color. I would like to create the filters in either C or Python.
So before I dive into using Gstreamer or V4L I wanted to ask the forum if they have had any experience with webcam development?
View 2 Replies
View Related
Mar 10, 2010
I have this daemon I'm writing in Python, but I still a Python n00b. I've coded the part of the daemon that does the work, but not the part that receives messages. I need a simple system so that other processes on the same (Linux) computer can occasionally send text-string messages to the daemon (without needing to stay running all the time themselves). Once in the past we did something similar by (mis)using pyliblo to listen for OSC messages coming in on a certain port. That option isn't as workable here because the pyliblo interface (as near as I can tell) requires you to know in advance specifically what messages you are expecting, and forward them to specified functions, rather than just allowing you to generically process incoming messages as you see fit.
View 1 Replies
View Related
Dec 16, 2010
I made a string key-value mapping struct in C, and functions to add and remove entries. I would also like to write a function to read in this file format:
Code:
key: value
another: another value
[code]...
View 14 Replies
View Related
Nov 5, 2010
i am trying to do something very simple like a header and a footer for my first perl programs, what iam trying to do is that when i create a file in vim: lets say hello.pl , i would like that file to have already this in its header:
#!/usr/bin/perl
and this on the footer:
print "
";
so that i dont have to type everytime #!/usr etc i tried to do it this way but i get weird vim errors: header is a file that contains the header and footer $ vim hello.pl;header > is there another way to do it as a function in bash or some other one liner command?
View 1 Replies
View Related