Search Results

Search found 5264 results on 211 pages for 'erlang shell'.

Page 8/211 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How do I modify a record in erlang?

    - by Yadira Suazo
    Hi, I need replace the same value for variables {place} and {other_place} in the record op. #op{ action = [walk, from, {place}, to, {other_place}], preconds = [[at, {place}, me], [on, floor, me], [other_place, {place}, {other_place}]], add_list = [[at, {other_place}, me]], del_list = [[at, {place}, me]] } But erlang don´t share variables. Is there any data type for that?

    Read the article

  • Accessing Erlang business layer via REST

    - by Polyn
    For a college project i'm thinking of implementing the business layer in Erlang and then accessing it via multiple front-ends using REST. I would like to avail of OTP features like distributed applications, etc. My question is how do I expose gen_server calls/casts to other applications? Obviously I could make RPC calls via language specific "bridges" like OTP.net or JInterface, but I want a consistent way to access it like REST.

    Read the article

  • [Erlang] Changing working directory

    - by Zbigniew
    Hello, I have Erlang installed on my WinXP machine. Becouse so, I use it by a "werl.exe". The problem is, that I would like to change a default folder that werl starts in. I cannot find option that would let me do that, although I know there must be something like that. Could anybody help ?

    Read the article

  • Returning an error code in Erlang

    - by Zubair
    I'm writing some Erlang code and I'm very unsure whether I should let everything fail fast. One problem I find with fail fast is that for the developer/user the exception generated is pretty meaningless. Any idea what I should return which would not give esoteric and hard to read stack traces?

    Read the article

  • How to resolve broken dependencies of gnome-shell-extensions-user-theme package?

    - by swift
    After unsuccessful upgrade of Gnome3 packages in new Precise Pangolin 64-bit environment I get this error: The following packages have unmet dependencies: gnome-shell-extensions : Conflicts: gnome-shell-extensions-user-theme but 3.2.0-2~webupd8~oneiric is to be installed I tried to remove by running sudo apt-get purge gnome-shell-extensions-user-theme but get this: Package gnome-shell-extensions-user-theme is not installed, so not removed My Gnome Classic profile works well but Gnome3 session can't run. How to resolve this error?

    Read the article

  • Launch ubuntu software center from gnome shell

    - by Daniel Hughes
    I have been playing around with Gnome Shell from ubuntu 9.10. I installed the preview which is available in Ubuntu 9.10 repositories using sudo apt-get install gnome-shell gnome-shell --replace However I can't figure out how to launch Ubuntu Software Center using it. It just appears to be missing. The software center appears fine in normal gnome. How do you launch the Ubuntu Software Center from Gnome Shell. For those of you who are getting confused, Gnome Shell is the next generation user interface for gnome, it is planned for inclusion as default in Gnome 3.0, there is a preview of it in the Ubuntu 9.10 repositories. I am not interested in how to launch Ubuntu Software Center from the terminal or in how to launch it from the normal gnome interface.

    Read the article

  • How to run Windows 7 Explorer shell with Administrator Privileges by default

    - by Barry Kelly
    The Windows 7 shell (Explorer) can be made to run with Administrator privileges by this manual process: Kill Explorer shell by holding down Shift+Ctrl, right-clicking the Shut down button in the Start Menu, and selecting Exit Explorer Start Task Manager with Ctrl+Shift+Esc Elevate Task Manager privileges by going to Processes tab and selecting Show processes from all users Then start up a new instance of the shell by File | Run in Task Manager, typing in explorer, and selecting the Create this task with administrative privileges. After following the above process, the Windows shell will be running with administrative privileges, and any programs it launches will also have administrative privileges. This makes performing tasks that require the privilege far easier, particularly for command-line applications, which usually fail silently or with an Access denied. message rather than giving an opportunity to use UAC to elevate the process's privileges. What I'm interested in, though, is creating an account which uses a privileged shell by default, rather than having to follow this laborious process every time. How can it be done?

    Read the article

  • Run shell script on a command

    - by LinuxPenseur
    Hi, I want to run a shell script when date -s <string> command is used. For example i want to log the command to the file /tmp/user.log by executing the following command in the shell script logger -p user.notice "date -s command executed" -f /tmp/user.log How can run a shell script when date -s <string> is executed on the shell? To make it more general, I want to run my shell script when someone else issues a particular linux command on my system. How to do this?

    Read the article

  • How can I change shell in Ubuntu?

    - by Sanoj
    I have a Ubuntu Server VPS and I want to use /bin/bash/ as my shell. How can I change my shell? I have root access but I don't work as root. So dash is my default shell now. I have read How do I make Bash my default shell on Ubuntu? and chsh seams to be the preferred way to go. But when I type chsh /bin/bash I get this message: chsh: unknown user /bin/bash And if I just type /bin/bash the Bash shell seams to work fine. How to change it?

    Read the article

  • Shell script issue: cron job script to Restart MySQL server when it stops accidentally

    - by Straw Hat
    I have this script, I am using it to setup CRON job to execute this script, so it can check if MySQL service is running; if not then it restart the MySQL service: #!/bin/bash service mysql status| grep 'mysql start/running' > /dev/null 2>&1 if [ $? != 0 ] then sudo service mysql restart fi I have setup cron job as. sudo crontab -e and then added, */1 * * * * /home/ubuntu/mysql-check.sh Problem is that it restart MySQL on every cron job execution.. even if server is running it restart the MySQL service what is correction in the script to do that.

    Read the article

  • Add "not" to if statement in shell script

    - by John Crawford
    I have the following script that should exist if the user does not exist. #check if user currently exists on system if id $User > /dev/null 2>&1 then #user exists no need to exit program echo "blah blah, what a waste of space" else echo "This user does NOT exists. Please create that user before using this script.\n" exit fi My problem is that I would ideally like to place a "not" if that first if statement so that I can trim down my if, else statement. Ideally I would like something like this: if !(id $User > /dev/null 2>&1) then echo "This user does NOT exists. Please create that user before using this script.\n" exit fi

    Read the article

  • Gnome-shell worskpace preview on dual screen

    - by martin
    I'have isntalled gnome3 and I have dual screens(laptop, monitor). Is it possible to see the other monitor in workspace preview in the gnome panel??? I only can see primary monitor, that's why i'm not able to move windows inside the second screen? I've tried to change some settings in dconf , but with no luck. I want to have it like this http://stephen.rees-carter.net/wp-content/uploads/2011/04/Unity-workspace-switcher.png Does anyone have a solution?

    Read the article

  • What does /dev/null mean in the shell?

    - by rishiag
    I've started learning bash scripting by using this guide: http://www.tldp.org/LDP/abs/abs-guide.pdf However I got stuck at the first script: cd /var/log cat /dev/null > messages cat /dev/null > wtmp echo "Log files cleaned up." What do lines 2 and 3 do in Ubuntu (I understand cat)? Is it only for other Linux distributions? After running this script as root, the output I get is Log files cleaned up. But /var/log still contains all the files.

    Read the article

  • Erlang: 2 database on 2 webserver ??

    - by xRobot
    I have created a blogging system with php+postgresql. Now I want to add a web chat ( in REAL TIME for Million of users simultaneously ) where every message is saved in database. I am thinking to use Erlang+Mnesia on a different webserver for this issue. Message's table will be like this: message_id, user_id, message, date user_id should be related with users table in Postgresql database in another webserver. How can I do that without lose performance ? If you have any other creative solutions tell me please ;).

    Read the article

  • Erlang: starting slave node

    - by Zim
    Hi, I'm trying to start erlang slave node on cluster and I receive "bash: erl: command not found" message. Though I have alias for erl. Here is what I actually do: [user@n001 ~]$ erl -rsh ssh -sname n001 Eshell V5.7.5 (abort with ^G) (n001@n001)1> slave:start_link("user@n002", n002, "-rsh ssh"). bash: erl: command not found {error,timeout} (n001@n001)2> Maybe, there is something wrong? Thanks.

    Read the article

  • Erlang list comprehension, traversing two lists and excluding values

    - by ErJab
    I need to generate a set of coordinates in Erlang. Given one coordinate, say (x,y) I need to generate (x-1, y-1), (x-1, y), (x-1, y+1), (x, y-1), (x, y+1), (x+1, y-1), (x+1, y), (x+1, y+1). Basically all surrounding coordinates EXCEPT the middle coordinate (x,y). To generate all the nine coordinates, I do this currently: [{X,Y} || X<-lists:seq(X-1,X+1), Y<-lists:seq(Y-1,Y+1)] But this generates all the values, including (X,Y). How do I exclude (X,Y) from the list using filters in the list comprehension?

    Read the article

  • Tail recursion in Erlang

    - by dagda1
    Hi, I am really struggling to understand tail recursion in Erlang. I have the following eunit test: db_write_many_test() -> Db = db:new(), Db1 = db:write(francesco, london, Db), Db2 = db:write(lelle, stockholm, Db1), ?assertEqual([{lelle, stockholm},{francesco, london}], Db2). And here is my implementation: -module(db) . -include_lib("eunit/include/eunit.hrl"). -export([new/0,write/3]). new() -> []. write(Key, Value, Database) -> Record = {Key, Value}, [Record|append(Database)]. append([H|T]) -> [H|append(T)]; append([]) -> []. Is my implementation tail recursive and if not, how can I make it so? Thanks in advance

    Read the article

  • Erlang code explained

    - by dagda1
    Hi, I am having a bit of trouble getting my head around the following erlang code -module(threesix). -export([quicksort/1]). quicksort(Pivot, Left, Right, []=_Src) -> {Left, Pivot, Right}; quicksort(Pivot, Left, Right, [H|T]=_Src) when H < Pivot -> quicksort(Pivot, [H|Left], Right, T); quicksort(Pivot, Left, Right, [H|T]=_Src) -> quicksort(Pivot, Left, [H|Right], T). quicksort([]) -> []; quicksort([H|T]=_List) -> {Left, Pivot, Right} = quicksort(H, [], [], T), quicksort(Left) ++ [Pivot] ++ quicksort(Right). I am specifically talking about the use of _Src and _List in the parameters. Are these simply for documentation as I cannot see why they are used? Thanks Paul

    Read the article

  • bad_application error starting erlang gen_server application

    - by user313475
    I have written a simple erlang app using gen_server. When starting it with application:start(myapp), I get the following tuple... {error,{bad_application,{application,myapp ... (rest of my application config). There are no other error or warning messages. I have also tried to google examples of how to configure gen_server and also the error itself. I am surprised at how little information there is out there. I could start trying to debug OTP?? Any pointers would be appreciated.

    Read the article

  • Tracing Erlang Functions - Short forms

    - by Roberto Aloi
    As you might know, it's now possible to trace Erlang functions by using the short form: dbg:tpl(Module, Function, x). Instead of the usual: dbg:tpl(Module, Function, dbg:fun2ms(fun(_) -> exception_trace() end)). I'm actually wondering if a similar short form is available for return_trace(). Something like: dbg:tpl(Module, Function, r). Instead of: dbg:tpl(Module, Function, dbg:fun2ms(fun(_) -> return_trace() end)). The source code in the dbg module seems to suggest not: new_pattern_table() -> PT = ets:new(dbg_tab, [ordered_set, public]), ets:insert(PT, {x, term_to_binary([{'_',[],[{exception_trace}]}])}), ets:insert(PT, {exception_trace, term_to_binary(x)}), PT. But I might be wrong. Do you know of any?

    Read the article

  • Erlang message loops

    - by Roger Alsing
    How does message loops in erlang work, are they sync when it comes to processing messages? As far as I understand, the loop will start by "receive"ing a message and then perform something and hit another iteration of the loop. So that has to be sync? right? If multiple clients send messages to the same message loop, then all those messages are queued and performed one after another, or? To process multiple messages in parallell, you would have to spawn multiple message loops in different processes, right? Or did I misunderstand all of it?

    Read the article

  • erlang io:format, and a hanging web application

    - by williamstw
    While I'm learning a new language, I'll typically put lots of silly println's to see what values are where at specific times. It usually suffices because the languages typically have available a tostring equivalent. In trying that same approach with erlang, my webapp just "hangs" when there's a value attempted to be printed that's not a list. This happens when variable being printed is a tuple instead of a list. There's no error, exception, nothing... just doesn't respond. Now, I'm muddling through by being careful about what I'm writing out and as I learn more, things are getting better. But I wonder, is there a way to more reliably to [blindly] print a value to stdout? Thanks, --tim

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >