Search Results

Search found 342 results on 14 pages for 'mv'.

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

  • Laptop drains of quickly with battery

    - by Shyam
    I am a user since years in ubuntu and I have not come across this problem with ubuntu till date. My battery drains off immediately after I unplug my AC power. The options I tried: 1) checked the battery state with : cat /proc/acpi/battery/BAT0/state present: yes capacity state: ok charging state: charged present rate: 0 mA remaining capacity: 392 mAh present voltage: 12476 mV Initially it was showing charging state: charging after 5mins it started displaying as charged. ! Based on that if I remove my AC Power it shows low battery notification. 2) When I run acpi : acpi -b Battery 0: Unknown, 9% The battery state shows as unknown. But initially when we plug-in to AC adapter acpi -b Battery 0: Charging, 9%, 13:04:00 until charged 3) When the check the same with : upower -i /org/freedesktop/UPower/devices/battery_BAT0 native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 vendor: HP power supply: yes updated: Thu Nov 1 16:06:40 2012 (20 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: charging energy: 4.2336 Wh energy-empty: 0 Wh energy-full: 33.1128 Wh energy-full-design: 33.1128 Wh energy-rate: 5.6052 W voltage: 12.474 V time to full: 5.2 hours percentage: 12.7854% capacity: 100% technology: lithium-ion Is the power stats output, It says 5hrs to charge completely, If I charge it even more than 5hrs and unplug the AC power, It again cribs stating LOW BATTERY !! The same thing does not happen with Windows7. Any suggestions/ help will be greatly appreciated.

    Read the article

  • Troubleshooting Your Network with Oracle Linux

    - by rickramsey
    Are you afraid of network problems? I was. Whenever somebody said "it's probably the network," I went to lunch. And hoped that it was fixed by the time I got back. Turns out it wasn't that hard to do a little basic troubleshooting Tech Article: Troubleshooting Your Network with Oracle Linux by Robert Chase You're no doubt already familiar with ping. Even I knew how to use ping. Turns out there's another command that can show you not just whether a system can respond over the network, but the path the packets to that system take. Our blogging platform won't allow me to write the name down, but I can tell you that if you replace the x in this word with an e, you'll have the right command: tracxroute Once you get used to those, you can venture into the realms of mtr, nmap, and netcap. Robert Chase explains how each one can help you troubleshoot the network, and provides examples for how to use them. Robert is not only a solid writer, he is also a brilliant motorcyclist and rides an MV Augusta F4 750. About the Photograph Photo of flowers in San Simeon, California, taken by Rick Ramsey on a ride home from the Sun Reunion in May 2014. - Rick Follow me on: Personal Blog | Personal Twitter   Follow OTN Garage on: Web | Facebook | Twitter | YouTube

    Read the article

  • Recovering from 'grub rescue>' crash

    - by DocSalvage
    I did a dumb thing... I forgot that Ubuntu 10.04 (Lucid) switched to Grub2 which puts a ton of *.mod files (kernel modules) in /boot/grub. I thought they were soundtrack files put there erroneously and moved them. Needless to say, the next reboot was traumatic. I was presented with something I had no memory of ever seeing... a 'grub rescue' prompt. With the help of how-to-fix-error-unknown-filesystem-grub-rescue however, I was able to recover... Discovered that Grub Rescue does not have 'cd', 'cp' or any other filesystem commands except its own variation of 'ls'. So first I had to find the partition with the /boot directory containing vmlinuz... and other boot image files... (failed attempts not shown) grub rescue> ls (hd0,4) (hd0,3) (hd0,2) (hd0,1) grub rescue> ls (hd0,2)/boot ... grub ... initrd.img-2.6.32-33-generic ... vmlinuz-2.6.32-33-generic Then manually boot from 'grub rescue' prompt (no command history either!)... grub rescue> set root=(hd0,2)/boot grub rescue> insmod linux grub rescue> linux (hd0,2)/boot/vmlinuz-2.6.32-33-generic grub rescue> initrd (hd0,2)/boot/initrd.img-2.6.32-33-generic grub rescue> boot This boots and crashes to the BusyBox prompt which DOES have some rudimentary filesystem commnds. Then I moved the *.mod files back to the /boot/grub directory... busybox> cd /boot busybox> mv mod/* grub busybox> reboot The reboot was successful but that was a lot of work. Is there an easier way?

    Read the article

  • Can't start webcam for google video services

    - by wisemonkey
    I've got Ubuntu 11.10 64 bit and have installed the google video chat plugin. However webcam doesn't seem to work (black screen -- no video at all). For cheese it works but shows really bad (black and white kinda) image. Following some link I installed guvcview if I start it then image looks neat. Any suggestions on how can it be fixed? If it helps I've tried the solution: $ sudo mv /opt/google/talkplugin/GoogleTalkPlugin /opt/google/talkplugin/GoogleTalkPlugin.old $ sudo gedit /opt/google/talkplugin/GoogleTalkPlugin and putting following lines in: #!/bin/sh LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /opt/google/talkplugin/GoogleTalkPlugin.old OR #!/bin/sh LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so /opt/google/talkplugin/GoogleTalkPlugin.old Cause I've both files. Finally $sudo chmod +x /opt/google/talkplugin/GoogleTalkPlugin.old I closed and reopened chrome then started gmail tried video call -- black screen :-/ Ok so today finally google+ provided me with trouble shoot link and advised me: The plug-in won't install If you're having trouble installing the plug-in, or are receiving a message asking you to reinstall it, you should check to make sure your configuration is right. To do so simply: Check to make sure the Google Talk Plugin Video Accelerator and Google Talk NPAPI Plugin are enabled. If you're using Chrome you can type about:plugins in your browser to display your plug-ins. Make sure you're not using Internet Explorer 64-bit (this is a browser version that is 64 bit as opposed to 32 bit). Ensure that you don't have any "click to run" extensions enabled. If you're still experiencing this issue after checking your configuration you can follow these steps: Refresh the browser page. Close any running Google Talk plug-in processes. Close all open and running browser processes. Restart your computer. Uninstall and then reinstall the plug-in. Try a different browser such as Google Chrome or Mozilla Firefox. I looked in about:plugins for chrome and firefox: I don't have Google Talk NPAPI Plugin, does that matter? and I thought its installed with google talk plugin or no?

    Read the article

  • Ubuntu 12.10 ATI Driver 12.11 fails after compiz and xorg update

    - by Lukasz W.
    I updated my system via the package manager from Unity and next restart was just blackness. After being here: http://linux.hootip.com/amd-catalyst-12-11-beta-fix-and-installation-the-drivers-on-ubuntu-12-11/ I had the Catalyst 12.11 Beta driver installed. I checked my /var/log/apt/history.log and the update I received was of compiz and xorg packages. I tried to get latest release info, but all I get from their pages are commit info; I can't tell what was n the package update I got served. Anyone knows what was in the latest xorg/compiz release that broke the driver? Which driver should I use now? For completeness this is how I got the system back to boot (probably lame and not elegant): Boot with GRUB selection "More Ubuntu options (or sth like that), From secondary screen select 3.5.0-19 with boot options, When system prompts on stuff you'd like to do, select "root" - Drop to root shell, There: # mount -o remount,rw / # mv /etc/X11/xorg.conf /etc/X11/xorg.conf.failed # /usr/share/ati/fglrx-uninstall.sh # reboot This got be back on my feet.

    Read the article

  • create a .deb Package from scripts or binaries

    - by tdeutsch
    I searched for a simple way to create .deb Packages for things which have no source code to compile (configs, shellscripts, proprietary software). This was quite a problem because most of the package tutorials are assuming you have a source tarball you want to compile. Then I've found this short tutorial (german). Afterwards, I created a small script to create a simple repository. Like this: rm /export/my-repository/repository/* cd /home/tdeutsch/deb-pkg for i in $(ls | grep my); do dpkg -b ./$i /export/my-repository/repository/$i.deb; done cd /export/avanon-repository/repository gpg --armor --export "My Package Signing Key" > PublicKey apt-ftparchive packages ./ | gzip > Packages.gz apt-ftparchive packages ./ > Packages apt-ftparchive release ./ > /tmp/Release.tmp; mv /tmp/Release.tmp Release gpg --output Release.gpg -ba Release I added the key to the apt keyring and included the source like this: deb http://my.default.com/my-repository/ ./ It looks like the repo itself is working well (I ran into some problems, to fix them I needed to add the Packages twice and make the temp-file workaround for the Release file). I also put some downloaded .deb into the repo, it looks like they are also working without problems. But my self created packages didn't... Wenn i do sudo apt-get update, they are causing errors like this: E: Problem parsing dependency Depends E: Error occurred while processing my-printerconf (NewVersion2) E: Problem with MergeList /var/lib/apt/lists/my.default.com_my-repository_._Packages E: The package lists or status file could not be parsed or opened. Has anyone an idea what I did wrong?

    Read the article

  • Materialized View does not import properly when importing on a second instance of a database

    - by marinus
    When I import a database with materialized view mv_mt in just one database (Oracle) everything is ok. create materialized view mv_mt refresh complete next trunc( sysdate ) + 1 as SELECT sysdate, media_type.* from media_type; But when I try to import the same database to a copy in another schema I get the following errors: IMP-00017: following statement failed with ORACLE error 1: "BEGIN DBMS_JOB.ISUBMIT(JOB=438,WHAT='dbms_refresh.refresh(''"ALEXANDRA"" "."MV_MT"'');',NEXT_DATE=TO_DATE('2012-07-02:14:22:36','YYYY-MM-DD:HH24:MI:" "SS'),INTERVAL='sysdate + 1 / 24 / 60 / 6 ',NO_PARSE=TRUE); END;" IMP-00003: ORACLE error 1 encountered ORA-00001: unique constraint (SYS.I_JOB_JOB) violated ORA-06512: at "SYS.DBMS_JOB", line 100 ORA-06512: at line 1 IMP-00017: following statement failed with ORACLE error 23421: "BEGIN dbms_refresh.make('"ALEXANDRA"."MV_MT"',list=null,next_date=null," "interval=null,implicit_destroy=TRUE,lax=FALSE,job=438,rollback_seg=NUL" "L,push_deferred_rpc=TRUE,refresh_after_errors=FALSE,purge_option = 1,par" "allelism = 0,heap_size = 0); END;" IMP-00003: ORACLE error 23421 encountered ORA-23421: job number 438 is not a job in the job queue ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86 ORA-06512: at "SYS.DBMS_IJOB", line 793 ORA-06512: at "SYS.DBMS_REFRESH", line 86 ORA-06512: at "SYS.DBMS_REFRESH", line 62 ORA-06512: at line 1 IMP-00017: following statement failed with ORACLE error 23410: "BEGIN dbms_refresh.add(name='"ALEXANDRA"."MV_MT"',list='"ALEXANDRA"."MV" "_MT"',siteid=0,export_db='ORCL01'); END;" IMP-00003: ORACLE error 23410 encountered ORA-23410: materialized view "ALEXANDRA"."MV_MT" is already in a refresh group ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 ORA-06512: at "SYS.DBMS_IREFRESH", line 484 ORA-06512: at "SYS.DBMS_REFRESH", line 140 ORA-06512: at "SYS.DBMS_REFRESH", line 125 ORA-06512: at line 1 Anyone any ideas? Regards, Marinus

    Read the article

  • GLSL billboard move center of rotation

    - by Jacob Kofoed
    I have successfully set up a billboard shader that works, it can take in a quad and rotate it so it always points toward the screen. I am using this vertex-shader: void main(){ vec4 tmpPos = (MVP * bufferMatrix * vec4(0.0, 0.0, 0.0, 1.0)) + (MV * vec4( vertexPosition.x * 1.0 * bufferMatrix[0][0], vertexPosition.y * 1.0 * bufferMatrix[1][1], vertexPosition.z * 1.0 * bufferMatrix[2][2], 0.0) ); UV = UVOffset + vertexUV * UVScale; gl_Position = tmpPos; BufferMatrix is the model-matrix, it is an attribute to support Instance-drawing. The problem is best explained through pictures: This is the start position of the camera: And this is the position, looking in from 45 degree to the right: Obviously, as each character is it's own quad, the shader rotates each one around their own center towards the camera. What I in fact want is for them to rotate around a shared center, how would I do this? What I have been trying to do this far is: mat4 translation = mat4(1.0); translation = glm::translate(translation, vec3(pos)*1.f * 2.f); translation = glm::scale(translation, vec3(scale, 1.f)); translation = glm::translate(translation, vec3(anchorPoint - pos) / vec3(scale, 1.f)); Where the translation is the bufferMatrix sent to the shader. What I am trying to do is offset the center, but this might not be possible with a single matrix..? I am interested in a solution that doesn't require CPU calculations each frame, but rather set it up once and then let the shader do the billboard rotation. I realize there's many different solutions, like merging all the quads together, but I would first like to know if the approach with offsetting the center is possible. If it all seems a bit confusing, it's because I'm a little confused myself.

    Read the article

  • How do I choose which way to enable/disable, start/stop, or check the status of a service?

    - by Glyph
    If I want to start a system installed service, I can do: # /etc/init.d/some-svc start # initctl start some-svc # service some-svc start # start some-svc If I want to disable a service from running at boot, I can do: # rm /etc/rc2.d/S99some-svc # update-rc.d some-svc disable # mv /etc/init/some-svc.conf /etc/init/some-svc.conf.disabled Then there are similarly various things I can do to enable services for starting at boot, and so on. I'm aware of the fact that upstart is a (relatively) new thing, and I know about how SysV init used to work, and I'm vaguely aware of a bunch of D-Bus nonsense, but what I don't know is how one is actually intended to interface with this stuff. For example, I don't know how to easily determine whether a service is an Upstart job or a legacy SysV thing, without actually reading through the source of its shell scripts extensively. So: if I want to start or stop a service, either at the moment or persistently, which of these tools should I use, and why? If the answer depends on some attribute (like "this service supports upstart") then how do I quickly and easily learn about that attribute of an installed package? Relatedly, are there any user interface tools which can safely and correctly interact with the modern service infrastructure (upstart, and/or whatever its sysv compatibility is)? For example, could I reliably use sysv-rc-conf to determine which services should start?

    Read the article

  • Terminal closing itself after 14.04 upgrade

    - by David
    All was fine in 12.04, in this case I'm using virtualbox in Windows. Last days the warning message about my Ubuntu version no longer being supported was coming up pretty often, so, yesterday I finally decided to upgrade. The upgrading process ran ok, no errors, no warnings. After rebooting the errors started to happen. Just after booting up there were some errors about video, gnome, and video textures (sorry I didn't care in that moment so I don't remember well). Luckly that went away after installing VirtualBox additions. But the big problem here is that I can't use the terminal. It opens Ok when pressing control+alt+t, but most of the commands cause instant closing. For example, df, ls, mv, cd... usually work, although it has closed few times. But 'find' causes instant close. 'apt-get' update kills it too, just after it gets the package list from the sources, when it starts processing them. I've tried xterm, everything works and I have none of that problems. I have tried reinstalling konsole, bash-static, bash-completion, but nothing worked. I have no idea what to do as there is no error message to search for the cause. It seems something related to bash, but that's all I know.

    Read the article

  • Is chroot the right choice for my use case?

    - by Anthony
    Backstory: I am working on setting up a MineCraft server and want to allow admins to have ssh access to the MineCraft server console and appropriate mc server files, but not the whole system. The console provided by the minecraft server is only available to the user that launched the process. In addition, the admins will need terminal access to some basic cli tools such as wget, cp, mv, rm, and a text editor. Plan: I have already setup the ssh aspect of things, requiring pre-shared keys and whatnot. Setup a jailed environment in which all user activity will be contained. Setup user accounts. - The first user account will be the minecraft user. The minecraft user will start the MC server in a multiuser screen session and allow the other admins to attach to it. - Subsequent users should have their own /home directory for normal usage. Setup acl for the appropriate files to allow each user to edit the mc server files. No one will be doing system updates, nor will anyone be installing any programs, so I'll be the only user with sudo. The Issues: I don't want the ssh users to have access to the whole system. Users will still need to use wget or curl to update the mc server files. Is chroot the right tool for this use case, or is there something more appropriate for the job? I have no experience setting up a chroot environment and have found several tools to aid in this process. Jailkit seems to be the most robust, but it's not in the standard repos.

    Read the article

  • Laptop battery charging capacity reduced to 52%

    - by omjaijagdish
    I have been using Ubuntu 11.04 on DELL Inspiron 14R (N5010) laptop for last three months. Before I switch to ubuntu my laptop battery used to give 2.5 hrs to 3 hrs back-up. But since I have been using ubuntu, it has been reduced to 1hr to 1.5 hrs at max. I tried following commands: $ cat /proc/acpi/battery/BAT0/state which gave result as present: yes capacity state: ok charging state: charged present rate: 1 mA remaining capacity: 4400 mAh present voltage: 12407 mV then I tried $ acpi -b the result was.. Battery 0: Unknown, 100% when I gave command as $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 the result was.. native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 model: DELL W7H3N08 serial: 7114 power supply: yes updated: Sat Nov 24 11:25:34 2012 (21 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: fully-charged energy: 48.4748 Wh energy-empty: 0 Wh energy-full: 48.4748 Wh energy-full-design: 48.9595 Wh energy-rate: 0.011017 W voltage: 12.408 V percentage: 100% **capacity: 52.9253%** technology: lithium-ion Someone please let me know, what is going wrong with my laptop? How can I get charging with full capacity?

    Read the article

  • rename file names from lower case to upper case

    - by Adnan
    Hello, I have about 2k of file that are currently in lower case like: file_one.cfr file_two.cfr .... I am searching for a fast way to rename them to upper case so they would be like; FILE_ONE.cfr FILE_TWO.cfr .... If I use from my shell; for i in *; do mv $i `echo $i | tr [:lower:] [:upper:]`; done I can get all file and the file extensions to upper case. But the extension should remain in lowercase, so my approach does not work. Any programming language is welcome.

    Read the article

  • How can I copy files with names containing spaces and UNICODE, when using a shell script?

    - by LOlliffe
    I have a list of files that I'm trying to copy and move (using cp and mv) in a bash shell script. The problem that I'm running into, is that I can't get either command to recognize a huge number of files, seemingly because the filenames contain spaces and/or unicode characters. I couldn't find any switches to decode/re-encode these characters. Instead, for example, if I copy "file name.xml", I get "*.xml" and a script error that the file wasn't found for my result. Does anyone know settings or commands that will deal with these files?

    Read the article

  • How to make automake less ugly?

    - by Brendan Long
    I recently learned how to use automake, and I'm somewhat annoyed that my compile commands went from a bunch of: g++ -O2 -Wall -c fileName.cpp To a bunch of: depbase=`echo src/Unit.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/Unit.o -MD -MP -MF $depbase.Tpo -c -o src/Unit.o src/Unit.cpp &&\ mv -f $depbase.Tpo $depbase.Po Is there any way to clean this up? I can usually easily pick out warning messages, but now the wall of text to read though is 3x bigger and much weirder. I know what my flags are, so making it just says "Compiling xxx.cpp" for each file would be perfect.

    Read the article

  • Problem with pgfplot label

    - by harper
    I want to draw an x-y-diagram with axis labels. Unfortunately the ylabel is misplaced. It looks as depending on the actual data. When the other data line in the sample below is used instead of the upper line, it looks better. How can I move the label to the left or (more desirable) how can I tell pgfplot to do it corectly? % !TEX TS-program = pdflatex % !TEX encoding = UTF-8 Unicode \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[width=13cm,height=8cm, xlabel={I in mA}, ylabel={U in mV}] \addplot[only marks,mark=star] coordinates { % (1.36, -0.0177) (45.38, 0.0273) (74.19, 0.0413) (100.88, 0.0533) (134.80, 0.0683) (195.27, 0.1073) }; \end{axis} \end{tikzpicture} \end{document}

    Read the article

  • can't login to phpmyadmin

    - by user574383
    Hi, i am new at linux but i need phpmyadmin on my centos server. I did this: cd /var/www/html/ (document root of apache) wget http://sourceforge.net/projects/phpmyadmin/path/to/latest/version tar xvfz phpMyAdmin-3.3.9-all-languages.tar.gz mv phpMyAdmin-3.3.9-all-languages phpmyadmin rm phpMyAdmin-3.3.9-all-languages.tar.gz cd phpmyadmin/ cp config.sample.inc.php config.inc.php Ok so then i just got to a webbrowser and go to www.$ip/phpmyadmin and i am presented with a login screen asking for username and password. How can i get these credentials to log in? I'd like to log in as root i guess. But i don't know how to setup a root account and create a password for root using the cli and mysql. Please help? Thanks.

    Read the article

  • Does CodeIgniter have to load view in the final step?

    - by Peter
    I have a function function do_something() { // process $this->load->view('some_view', $data); exec('mv /path/to/folder1/*.mp3 /path/to/folder2/'); } My intention is to move files after outputting the view. But apparently it is done before rendering the view. My question is, does $this->load->view(); have to be the final step in a function? I did a little research, and seems like my question is similar to this topic. Correct?

    Read the article

  • Generate all project dependencies in a single file using gcc -MM flag

    - by Jabez
    Hi all, I want to generate a single dependency file which consists of all the dependencies of source files using gcc -M flags through Makefile. I googled for this solution but, all the solutions mentioned are for generating multiple deps files for multiple objects. DEPS = make.dep $(OBJS): $(SOURCES) @$(CC) -MM $(SOURCEs) > $(DEPS) @mv -f $(DEPS) $(DEPS).tmp @sed -e 's|.$@:|$@:|' < $(DEPS).tmp > $(DEPS) @sed -e 's/.*://' -e 's/\\$$//' < $(DEPS).tmp | fmt -1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $(DEPS) @rm -f $(DEPS).tmp But it is not working properly. Please tell me where i'm making the mistake.

    Read the article

  • Committing file deletions to svn repository whilst ignoring some other local mods

    - by TheJuice
    I have svn repository where I have scheduled some files and folders to be moved in the repository with svn mv. I also have some files that are peers of the files to be moved that have local modifications of which I only want a subset of those files to be committed along with the moves. e.g. the output of svn st would look like: D foo/bar D foo/bar/a.txt D foo/bar/b.txt M foo/exclude.txt M foo/include.txt A foo/whiz/bar A + foo/whiz/bar/c.txt A + foo/whiz/bar/d.txt To commit to the moves to the repository, I would need to perform the commit on foo but that would also commit the modifications to foo/exclude.txt and foo/include.txt. How would I commit only the deletions/additions as a result of the move plus the mods to foo/include.txt whilst excluding foo/exclude.txt? I have a feeling the answer lies with the --depth argument to svn ci but it's not clear to me how it will operate.

    Read the article

  • SED, using variables and in with an array

    - by S1syphus
    What I am trying to do is run the sed on multiple files in the directory Server_Upload, using variables: AB${count} Corresponds, to some variables I made that look like: echo " AB1 = 2010-10-09Three " echo " AB2 = 2009-3-09Foo " echo " AB3 = Bar " And these correspond to each line which contains a word in master.ta, that needs changing in all the text files in Server_Upload. If you get what I mean... great, I have tried to explain it the best I can, but if you are still miffed I'll give it another go as I found it really hard to convey what I mean. cd Server_Upload for fl in *.UP; do mv $fl $fl.old done count=1 saveIFS="$IFS" IFS=$'\n' array=($(<master.ta)) IFS="$saveIFS" for i in "${array[@]}" do sed "s/$i/AB${count}/g" $fl.old > $fl (( count++ )) done It runs, doesn't give me any errors, but it doesn't do what I want, so any ideas?

    Read the article

  • Error: Cannot parse function definition from ' hello()' in Mytest.xs, line 9

    - by Nikole
    Hi I am trying to use perl XS in RHEL 5. but simple programm is giving error.I followed same code as in Example 1 in perldoc perlxstut Can anyone help me in correcting the following error? [root@localhost Mytest]# [root@localhost Mytest]# pwd /home/nikole/perlcode/Mytest [root@localhost Mytest]# ls blib lib MANIFEST Mytest.xs pm_to_blib README Changes Makefile.PL Mytest.c Mytest.xsc ppport.h t [root@localhost Mytest]# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Mytest [root@localhost Mytest]# [root@localhost Mytest]# [root@localhost Mytest]# make /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap Mytest.xs Mytest.xsc && mv Mytest.xsc Mytest.c Error: Cannot parse function definition from ' hello()' in Mytest.xs, line 9 Please specify prototyping behavior for Mytest.xs (see perlxs manual) make: *** [Mytest.c] Error 1 [root@localhost Mytest]# Thanks

    Read the article

  • What is an example of MVC in PHP?

    - by waiwai933
    I'm trying to understand the MVC pattern. Here's what I think MV is: Model: <?php if($a == 2){ $variable = 'two'; } else{ $variable = 'not two'; } $this->output->addContent($variable); $this->output->displayContent(); ?> View: <?php class output{ private $content; public function addContent($var){ $this->content = 'The variable is '.$var; } public function displayContent(){ include 'header.php'; echo $content; include 'footer.php'; } } ?> Is this right? If so, what is the controller?

    Read the article

  • Consolidating files in a single directory before you link them into the final executable

    - by David
    I am working on Solaris 10, Sun Studio 11. I am refactoring some old code, and trying to write unit tests for them. My make file looks like: my_model.o:my_model.cc CC -c my_model.cc -I/../../include -library=stlport4 -instances=extern unit_test: unit_test.o my_model.o symbol_dictionary.o CC -o unit_test unit_test.o my_model.o symbol_dictionary.o -I../../include \ -library=stlport4 -instances=extern unit_test.o: unit_test.cc CC -c unit_test.cc -I/../../include -library=stlport4 -instances=extern symbol_dictionary.o: cd ../../test-fixtures && ($MAKE) symbol_dictionary.o mv ../../test-fixtures/symbol_dictionary.o . In the ../../test-fixtures makefile, I have the following target: symbol_dictionary.o: CC -c symbol_dictionary.cc -I/../../include -library=stlport4 -instances=extern I do the instances=extern because I had linking problems before, and this was the recommended solution. The consequence is in each directory that is being compiled, a SunWS_Cache directory is created to store the template instances. This is the long way to get to this question. Is it a standard practice to consolidate object files in a single directory before you link them?

    Read the article

  • Redirect output from sed 's/c/d/' myFile to myFile

    - by sixtyfootersdude
    I am using sed in a script to do a replace and I want to have the replaced file overwrite the file. Normally I think that you would use this: % sed -i 's/cat/dog/' manipulate sed: illegal option -- i However as you can see my sed does not have that command. I tried this: % sed 's/cat/dog/' manipulate > manipulate But this just turns manipulate into an empty file (makes sense). This works: % sed 's/cat/dog/' manipulate > tmp; mv tmp manipulate But I was wondering if there was a standard way to redirect output into the same file that input was taken from.

    Read the article

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