Search Results

Search found 871 results on 35 pages for 'rm 1501'.

Page 18/35 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • app icon not showing in iphone simulator

    - by Ben Collins
    I have a 57x57 PNG file in the root of my bundle, and the "Icon file" setting in my .plist file has the correct filename, but when the app is installed to the simulator, the icon is the default grey/white one. I've tried deleting my app from the simulator (both through the simulator and through rm -rf on the app directory from the console), I've tried cleaning my target, and I've tried renaming my app icon, all to no avail. What do I have to do to get the icon showing?

    Read the article

  • How to include clean target in makefile

    - by neversaint
    I have a makefile that looks like this CXX = g++ -O2 -Wall all: code1 code2 code1: code1.cc utilities.cc $(CXX) $^ -o $@ code2: code2.cc utilities.cc $(CXX) $^ -o $@ What I want to do next is to include 'clean target' so that every time I run 'make' it will automatically delete the existing binary files of code1 and code2 before creating the new ones. I tried to put these lines at the very end of the makefile, but it doesn't work clean: rm -f $@ echo Clean done What's the right way to do it?

    Read the article

  • How to use parallel execution in a shell script?

    - by eSKay
    I have a C shell script that does something like this: #!/bin/csh gcc example.c -o ex gcc combine.c -o combine ex file1 r1 <-- 1 ex file2 r2 <-- 2 ex file3 r3 <-- 3 #... many more like the above combine r1 r2 r3 final \rm r1 r2 r3 Is there some way I can make lines 1, 2 and 3 run in parallel instead of one after the another?

    Read the article

  • How do I add a .jar file to the compilation of .java files

    - by Christopher Schroeder
    My makefile is below Also, I would appreciate it if you told me how to move my .class files to ../bin/ JFLAGS = -cp JAR = "RSBot*.jar" JC = javac .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $(JAR) $*.java CLASSES = \ src/Banker.java \ src/Eater.java \ src/Fighter.java \ src/grotgui.java \ src/InventTab.java \ src/Looter.java \ src/Potter.java \ src/W8babyGrotworm.java \ src/Walker.java default: classes classes: $(CLASSES:.java=.class) clean: $(RM) *.class

    Read the article

  • Variable popen calls in C

    - by Bushman
    I'm trying to execute MS-DOS DEL commands inside a Win32 C program, and I already know that system and popen can be used for this. However, the problem is that both require string literals (type const char) for the commands, and I need something like the DOS equivalent of dir ~ | grep -P '/\d{7,8}\.exe$/' | rm, which obviously can't use string literals. Is there some other subprocess function in C that allows for char arrays as arguments for process names?

    Read the article

  • Cannot remove git repository completely

    - by Aleyna
    I have been using git on windows-msysgit. Whenever I try to remove a repository completely either using explorer or using $ git rm -rf ptp/ fatal: Not a git repository (or any of the parent directories): .git it errors out "The data present in the reparse point buffer is invalid" or the fatal error above. What's wrong with me/git? Thanks in advance

    Read the article

  • MVC Entity Framework Model not returning correct data

    - by quagland
    Hi, Run into a strange problem while writing an ASP.NET MVC site. I have a view in my SQL Server database that returns a few date ranges. The view works fine when running the query in SSMS. When the view data is returned by the Entity Framework Model, It returns the correct number of rows but some of the rows are duplicated. Here is an example of what I have done: SQL Server code: CREATE TABLE [dbo].[A]( [ID] [int] NOT NULL, [PhID] [int] NULL, [FromDate] [datetime] NULL, [ToDate] [datetime] NULL, CONSTRAINT [PK_A] PRIMARY KEY CLUSTERED ([ID] ASC)) ON [PRIMARY] go CREATE TABLE [dbo].[B]( [PhID] [int] NOT NULL, [FromDate] [datetime] NULL, [ToDate] [datetime] NULL, CONSTRAINT [PK_B] PRIMARY KEY CLUSTERED ( [PhID] ASC )) ON [PRIMARY] go CREATE VIEW C as SELECT A.ID, CASE WHEN A.PhID IS NULL THEN A.FromDate ELSE B.FromDate END AS FromDate, CASE WHEN A.PhID IS NULL THEN A.ToDate ELSE B.ToDate END AS ToDate FROM A LEFT OUTER JOIN B ON A.PhID = B.PhID go INSERT INTO B (PhID, FromDate, ToDate) VALUES (100, '20100615', '20100715') INSERT INTO A (ID, PhID, FromDate, ToDate) VALUES (1, NULL, '20100101', '20100201') INSERT INTO A (ID, PhID, FromDate, ToDate) VALUES (1, 100, '20100615', '20100715') INSERT INTO B (PhID, FromDate, ToDate) VALUES (101, '20101201', '20101231') INSERT INTO A (ID, PhID, FromDate, ToDate) VALUES (2, NULL, '20100801', '20100901') INSERT INTO A (ID, PhID, FromDate, ToDate) VALUES (2, 101, '20101201', '20101231') So now, if you select all from C, you get 4 separate date ranges In the Entity Framework Model (which I call 'Core'), the view 'C' is added. in MVC Controller: public class HomeController : Controller { public ActionResult Index() { CoreEntities db = new CoreEntities(); var clist = from c in db.C select c; return View(clist.ToList()); } } in MVC View: @model List<RM.Models.C> @{ foreach (RM.Models.C c in Model) { @String.Format("{0:dd-MMM-yyyy}", c.FromDate) <span>-</span> @String.Format("{0:dd-MMM-yyyy}", c.ToDate) <br /> } } When I run all this, it outputs this: 01-Jan-2010 - 01-Feb-2010 01-Jan-2010 - 01-Feb-2010 01-Aug-2010 - 01-Sep-2010 01-Aug-2010 - 01-Sep-2010 When it should do this (this is what the view returns): 01-Jan-2010 - 01-Feb-2010 15-Jun-2010 - 15-Jul-2010 01-Aug-2010 - 01-Sep-2010 01-Dec-2010 - 31-Dec-2010 Also, I've run the SQL profiler over it and according to that, the query being executed is: SELECT [Extent1].[ID] AS [ID], [Extent1].[FromDate] AS [FromDate], [Extent1].[ToDate] AS [ToDate] FROM (SELECT [C].[ID] AS [ID], [C].[FromDate] AS [FromDate], [C].[ToDate] AS [ToDate] FROM [dbo].[C] AS [C]) AS [Extent1] Which returns the correct data So it seems that the entity framework is doing something to the data in the meantime. To me, everything looks fine! Have I missed something? Cheers, Ben

    Read the article

  • Make: how make all hidden files in the current makefile?

    - by HH
    It traverses to bottom dirs for some unknown reason: Errorsome /bin/sh: .??*: not found make[23]: Entering directory `/m/user/files/dir' make clean Makefile all: make clean #The wildcard is the bug. I want to make all hidden files in the current makefile. #It should match .<some char><some char><any char arbitrary times> make $$(.??*) #I want to replace below-like-tihngs with a wildcard above # make .lambda # make .lambda_t clean: -rm .??* .lambda: #do something .lambda_t:

    Read the article

  • Makefile issue with compiling a C++ program

    - by Steve
    I recently got MySQL compiled and working on Cygwin, and got a simple test example from online to verify that it worked. The test example compiled and ran successfully. However, when incorporating MySQL in a hobby project of mine it isn't compiling which I believe is due to how the Makefile is setup, I have no experience with Makefiles and after reading tutorials about them, I have a better grasp but still can't get it working correctly. When I try and compile my hobby project I recieve errors such as: Obj/Database.o:Database.cpp:(.text+0x492): undefined reference to `_mysql_insert_id' Obj/Database.o:Database.cpp:(.text+0x4c1): undefined reference to `_mysql_affected_rows' collect2: ld returned 1 exit status make[1]: *** [build] Error 1 make: *** [all] Error 2 Here is my Makefile, it worked with compiling and building the source before I attempted to put in MySQL support into the project. The LIBMYSQL paths are correct, verified by 'mysql_config'. COMPILER = g++ WARNING1 = -Wall -Werror -Wformat-security -Winline -Wshadow -Wpointer-arith WARNING2 = -Wcast-align -Wcast-qual -Wredundant-decls LIBMYSQL = -I/usr/local/include/mysql -L/usr/local/lib/mysql -lmysqlclient DEBUGGER = -g3 OPTIMISE = -O C_FLAGS = $(OPTIMISE) $(DEBUGGER) $(WARNING1) $(WARNING2) -export-dynamic $(LIBMYSQL) L_FLAGS = -lz -lm -lpthread -lcrypt $(LIBMYSQL) OBJ_DIR = Obj/ SRC_DIR = Source/ MUD_EXE = project MUD_DIR = TestP/ LOG_DIR = $(MUD_DIR)Files/Logs/ ECHOCMD = echo -e L_GREEN = \e[1;32m L_WHITE = \e[1;37m L_BLUE = \e[1;34m L_RED = \e[1;31m L_NRM = \e[0;00m DATE = `date +%d-%m-%Y` FILES = $(wildcard $(SRC_DIR)*.cpp) C_FILES = $(sort $(FILES)) O_FILES = $(patsubst $(SRC_DIR)%.cpp, $(OBJ_DIR)%.o, $(C_FILES)) all: @$(ECHOCMD) " Compiling $(L_RED)$(MUD_EXE)$(L_NRM)."; @$(MAKE) -s build build: $(O_FILES) @rm -f $(MUD_EXE) $(COMPILER) -o $(MUD_EXE) $(L_FLAGS) $(O_FILES) @echo " Finished Compiling $(MUD_EXE)."; @chmod g+w $(MUD_EXE) @chmod a+x $(MUD_EXE) @chmod g+w $(O_FILES) $(OBJ_DIR)%.o: $(SRC_DIR)%.cpp @echo " Compiling $@"; $(COMPILER) -c $(C_FLAGS) $< -o $@ .cpp.o: $(COMPILER) -c $(C_FLAGS) $< clean: @echo " Complete compile on $(MUD_EXE)."; @rm -f $(OBJ_DIR)*.o $(MUD_EXE) @$(MAKE) -s build I like the functionality of the Makefile, instead of spitting out all the arguments etc, it just spits out the "Compiling [Filename]" etc. If I add -c to the L_FLAGS then it compiles (I think) but instead spits out stuff like: g++: Obj/Database.o: linker input file unused because linking not done After a full day of trying and research on google, I'm no closer to solving my problem, so I come to you guys to see if you can explain to me why all this is happening and if possible, steps to solve. Regards, Steve

    Read the article

  • How do you compile without linking in Automake?

    - by MDH
    I am new to Automake and I am attempting to compile without linking. My goal is to generate a simple Makefile as shown below using Automake. CFLAG = -Wall build: Thread.o Thread.o: Thread.cc Thread.h g++ $(CFLAG) -c Thread.cc clean: rm -f *.o My attempt so far has brought me to the following Makefile.ac. noinst_PROGRAMS = thread thread_SOURCES = Thread.cc EXTRA_DIST= Thread.h Does anyone have any advice on how to simulate my original Makefile? Thanks in advance.

    Read the article

  • How to safely let users run arbitrary Ruby code?

    - by igul222
    I realize this sounds a little crazy, but I'm working on a project for which I need a server to run user-provided Ruby code and return the result. I'm looking to prevent something like this: system("rm -rf /") eval("something_evil") # etc... I'm sure there must be some reasonably safe way to do this, as it already exists at places like tryruby.org. Any help is greatly appreciated, thanks!

    Read the article

  • R: Plotting a graph with different colors of points based on advanced criteria

    - by balconydoor
    What I would like to do is a plot (using ggplot), where the x axis represent years which have a different colour for the last three years in the plot than the rest. The last three years should also meet a certain criteria and based on this the last three years can either be red or green. The criteria is that the mean of the last three years should be less (making it green) or more (making it red) than the 66%-percentile of the remaining years. So far I have made two different functions calculating the last three year mean: LYM3 <- function (x) { LYM3 <- tail(x,3) mean(LYM3$Data,na.rm=T) } And the 66%-percentile for the remaining: perc66 <- function(x) { percentile <- head(x,-3) quantile(percentile$Data, .66, names=F,na.rm=T) } Here are two sets of data that can be used in the calculations (plots), the first which is an example from my real data where LYM3(df1) < perc66(df1) and the second is just made up data where LYM3 perc66. df1<- data.frame(Year=c(1979:2010), Data=c(347261.87, 145071.29, 110181.93, 183016.71, 210995.67, 205207.33, 103291.78, 247182.10, 152894.45, 170771.50, 206534.55, 287770.86, 223832.43, 297542.86, 267343.54, 475485.47, 224575.08, 147607.81, 171732.38, 126818.10, 165801.08, 136921.58, 136947.63, 83428.05, 144295.87, 68566.23, 59943.05, 49909.08, 52149.11, 117627.75, 132127.79, 130463.80)) df2 <- data.frame(Year=c(1979:2010), Data=c(sample(50,29,replace=T),75,75,75)) Here’s my code for my plot so far: plot <- ggplot(df1, aes(x=Year, y=Data)) + theme_bw() + geom_point(size=3, aes(colour=ifelse(df1$Year<2008, "black",ifelse(LYM3(df1) < perc66(df1),"green","red")))) + geom_line() + scale_x_continuous(breaks=c(1980,1985,1990,1995,2000,2005,2010), limits=c(1978,2011)) plot As you notice it doesn’t really do what I want it to do. The only thing it does seem to do is that it turns the years before 2008 into one level and those after into another one and base the point colour off these two levels. Since I don’t want this year to be stationary either, I made another tiny function: fun3 <- function(x) { df <- subset(x, Year==(max(Year)-2)) df$Year } So the previous code would have the same effect as: geom_point(size=3, aes(colour=ifelse(df1$Year<fun3(df1), "black","red"))) But it still does not care about my colours. Why does it make the years into levels? And how come an ifelse function doesn’t work within another one in this case? How would it be possible to the arguments to do what I like? I realise this might be a bit messy, asking for a lot at the same time, but I hope my description is pretty clear. It would be helpful if someone could at least point me in the right direction. I tried to put the code for the plot into a function as well so I wouldn’t have to change the data frame at all functions within the plot, but I can’t get it to work. Thank you!

    Read the article

  • How do make dependency generation work for C? (Also..decode this sed/make statement!)

    - by Derek
    Hi all. I have a make build system that I am trying to decipher that someone else wrote. I am getting an error when I run it on a redhat system, but not when I run it on my solaris system. The versions of gmake are the same major revision (one off on minor revision). This is for building a C project, and the make system has a global Makefile.global that is inherited by each directory's local Makefile The Makefile.global has all the targets in it, starting with all: $(LIB) $(BIN) where LIB builds libs and BIN builds binaries. jumping down the targets I have $(LIB) : $(GEN_LIB) $(GEN_LIB) : $(GEN_DEPS) $(GEN_OBJS) $(AR) $(ARFLAGS) $(GEN_LIB) $(GEN_OBJS) $(GEN_DEPS) : @set -e; rm -f $@; \ $(CC) $(CDEP_FLAG) $(CFLAGS) $(INCDIRS) `basename $@ | sed 's/\.d/\.c/' | sed 's,^,$(HOME_SRC)/,'` | sed 's,\(.*\)\.o: ,$(GEN_OBJDIR)/\1.o $@ :,g' > [email protected] ; \ cat [email protected] > $@ ; \ cat [email protected] | cut -d: -f2 | grep '\.h' | sed 's,\.h,.h :,g' >> $@ ; \ rm [email protected] $(GEN_OBJS) : $(CC) $(CFLAGS) $(INCDIRS) -c $(*F).c -lmpi -o $@ I think these are all the relevant targets I need to include to answer my question. Definitions of those variables: CC = icc CDEP_FLAG = -M CFLAGS = various compiler flags ifdef type flags INCDIRS = include directory where all .h files are GEN_OBJDIR = /lib/objs HOME_SRC = . GEN_LIB = lib/$(LIB) GEN_DEPDIR=/lib/deps GEN_DEPS = $(addprefix $(GEN_DEPDIR)/,$(addsuffix .d,$(basename $(OBJS)))) I think this has everything covered you need. Basically self explanatory from the names. Now as best I can tell, this is generating in /lib/deps a .d file that has the object and source dependencies in it. In other words, for the utilities.a library, I will get a utils.o and utils.c dependency stack, all in the file utils.d There is some syntax error that is being generated in that file I think, because I get the following error: ../lib/deps/util.d:25: *** target pattern contains no '%'. Stop. gmake[2]: *** [all] Error 2 gmake[1]: *** [all] Error 2 gmake: *** [all] Error 2 I am not sure if my error is in the dependency generation, or some further down part, like the object generation target? If you need further info, let me know, I will add to post

    Read the article

  • Add a file in a folder with bash

    - by CuriousGeorge
    I have figured out how to remove bad files in my folders but I am wanting to know how to add certain named files to that folder. I want to add something like address.xml I have this and can remove the bad files. for addxml in $(find $DIRECTORY/$directoryname -name address.xml); do rm -v $addxml done I am trying to learn how later down the code I can add a file from another folder no where near the folders that are being edited.

    Read the article

  • Searching subversion history (full text)

    - by rjmunro
    Is there a way to perform a full text search of a subversion repository, including all the history? For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something like "removed unused stuff", and there's loads of checkins like that.

    Read the article

  • access parametrically values of variables inside environments

    - by Apostolos
    Let's say we have one or more environments and variables in them. My question is how we access the values of these variables, parametrically. rm(list = ls()) env1 <- new.env() env1$var1 <- "value1" env2 <- new.env() env2$var2 <- "value2" env <- ls.str(mode="environment") # We get the environments var <- ls.str(eval(parse(text = env[1])))# We get the variables of an environment eval(var[1]) # We fail to get the value of a variable Thank you all, in advance

    Read the article

  • remove the content in directory and subdirectory hierarichally with out distroy the directory structure

    - by user3713876
    In shell script, I want to clear only text files and log files in the following structure with out removing the directory as well as subdirectories | |------bar/ | |---file1.txt |---file2.txt | |---subdir1/ | |---file1.log | |---file2.log | |---subdir2/ |---image1.log |---image2.log I am using rm -rf /bar/* so I am getting the result as follows. |------bar/ but I want the output like following | |------bar/ | | | | |---subdir1/ | | | |---subdir2/ I want to remove only text files or log files or csv with out removing the directory and the subdirectories

    Read the article

  • TS-7800 Hangs on bootup

    - by Reid
    I have a TS-7800, and it typically boots from the SD card inserted in it. When I tried to boot it up today, it hung on the syslog line. I am now having "Read only file system" problems. What has gone wrong? Bootup console: >> Copyright (c) 2008, Technologic Systems >> Booting from SD card... . . . . >> Booting to SD Card... INIT: version 2.86 booting Starting the hotplug events dispatcher: udevd. Synthesizing the initial hotplug events...done. Waiting for /dev to be fully populated...done. mount: can't find / in /etc/fstab or /etc/mtab Cleaning up ifupdown...rm: cannot remove `/etc/network/run/ifstate': Read-only file system Loading kernel modules...done. Checking all file systems... fsck 1.37 (21-Mar-2005) ... done. none on /dev/pts type devpts (rw,gid=5,mode=620) /etc/init.d/rcS: line 39: /tmp/.clean: Read-only file system Setting up networking...done. Setting up IP spoofing protection: rp_filter. Enabling packet forwarding...done. Configuring network interfaces...ifup: failed to open statefile /etc/network/run/ifstate: Read-only file system done. Starting portmap daemon: portmap. /etc/init.d/rcS: line 39: /tmp/.clean: Read-only file system /etc/init.d/rcS: line 24: /var/run/utmp: Read-only file system rm: cannot remove `/var/lib/urandom/random-seed': Read-only file system urandom start: failed. Recovering nvi editor sessions... done. INIT: Entering runlevel: 3 Starting system log daemon: syslogd . Starting kernel log daemon: klogd. Starting MTA: open: Read-only file system touch: cannot touch `/var/lib/exim4/config.autogenerated.tmp': Read-only file system chown: cannot access `/var/lib/exim4/config.autogenerated.tmp': No such file or directory chmod: cannot access `/var/lib/exim4/config.autogenerated.tmp': No such file or directory chmod: changing permissions of `/var/lib/exim4/config.autogenerated': Read-only file system /usr/sbin/update-exim4.conf: line 260: cannot create temp file for here document: Read-only file system /usr/sbin/update-exim4.conf: line 387: /var/lib/exim4/config.autogenerated.tmp: Read-only file system 2002-01-01 01:31:36 Cannot open main log file "/var/log/exim4/mainlog": Read-only file system: euid=0 egid=0 2002-01-01 01:31:36 non-existent configuration file(s): /var/lib/exim4/config.autogenerated.tmp 2002-01-01 01:31:36 Cannot open main log file "/var/log/exim4/mainlog": Read-only file system: euid=0 egid=0 exim: could not open panic log - aborting: see message(s) above Invalid new configfile /var/lib/exim4/config.autogenerated.tmp not installing /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated Starting internet superserver: inetd. Starting OpenBSD Secure Shell server: sshd. Starting NFS common utilities: statdStarting periodic command scheduler: cron/usr/sbin/cron: can't open or create /var/run/crond.pid: Read-only file system . Starting web server (apache2)...(30)Read-only file system: apache2: could not open error log file /var/log/apache2/error.log. Unable to open logs failed! Debian GNU/Linux 3.1 ts7800 ttyS0 ts7800 login:

    Read the article

  • Call to daemon in a /etc/init.d script is blocking, not running in background

    - by tony
    I have a Perl script that I want to daemonize. Basically this perl script will read a directory every 30 seconds, read the files that it finds and then process the data. To keep it simple here consider the following Perl script (called synpipe_server, there is a symbolic link of this script in /usr/sbin/) : #!/usr/bin/perl use strict; use warnings; my $continue = 1; $SIG{'TERM'} = sub { $continue = 0; print "Caught TERM signal\n"; }; $SIG{'INT'} = sub { $continue = 0; print "Caught INT signal\n"; }; my $i = 0; while ($continue) { #do stuff print "Hello, I am running " . ++$i . "\n"; sleep 3; } So this script basically prints something every 3 seconds. Then, as I want to daemonize this script, I've also put this bash script (also called synpipe_server) in /etc/init.d/ : #!/bin/bash # synpipe_server : This starts and stops synpipe_server # # chkconfig: 12345 12 88 # description: Monitors all production pipelines # processname: synpipe_server # pidfile: /var/run/synpipe_server.pid # Source function library. . /etc/rc.d/init.d/functions pname="synpipe_server" exe="/usr/sbin/synpipe_server" pidfile="/var/run/${pname}.pid" lockfile="/var/lock/subsys/${pname}" [ -x $exe ] || exit 0 RETVAL=0 start() { echo -n "Starting $pname : " daemon ${exe} RETVAL=$? PID=$! echo [ $RETVAL -eq 0 ] && touch ${lockfile} echo $PID > ${pidfile} } stop() { echo -n "Shutting down $pname : " killproc ${exe} RETVAL=$? echo if [ $RETVAL -eq 0 ]; then rm -f ${lockfile} rm -f ${pidfile} fi } restart() { echo -n "Restarting $pname : " stop sleep 2 start } case "$1" in start) start ;; stop) stop ;; status) status ${pname} ;; restart) restart ;; *) echo "Usage: $0 {start|stop|status|restart}" ;; esac exit 0 So, (if I have well understood the doc for daemon) the Perl script should run in the background and the output should be redirected to /dev/null if I execute : service synpipe_server start But here is what I get instead : [root@master init.d]# service synpipe_server start Starting synpipe_server : Hello, I am running 1 Hello, I am running 2 Hello, I am running 3 Hello, I am running 4 Caught INT signal [ OK ] [root@master init.d]# So it starts the Perl script but runs it without detaching it from the current terminal session, and I can see the output printed in my console ... which is not really what I was expecting. Moreover, the PID file is empty (or with a line feed only, no pid returned by daemon). Does anyone have any idea of what I am doing wrong ? EDIT : maybe I should say that I am on a Red Hat machine. Scientific Linux SL release 5.4 (Boron) Would it do the job if instead of using the daemon function, I use something like : nohup ${exe} >/dev/null 2>&1 & in the init script ?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >