Search Results

Search found 21331 results on 854 pages for 'require once'.

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

  • In Lisp, Avoid "Cannot open load file" when using require

    - by Jesse
    I am working on a custom .emacs file that I will be able to use on several different computers. I would like to be able to load a mode if it exists on the system. If it does not exist I would like Emacs to stop showing the error: File error: Cannot open load file, X. For example: (require 'darkroom-mode) Results in: File error: Cannot open load file, darkroom-mode I am using file-exists-p to test if certain other files exist but for this test I would assume I need to search my load-path. I am new to Lisp so this is stumping me.

    Read the article

  • Make xargs execute the command once for each line of input

    - by Readonly
    How can I make xargs execute the command exactly once for each line of input given? It's default behavior is to chunk the lines and execute the command once, passing multiple lines to each instance. From http://en.wikipedia.org/wiki/Xargs: find /path -type f -print0 | xargs -0 rm In this example, find feeds the input of xargs with a long list of file names. xargs then splits this list into sublists and calls rm once for every sublist. This is more efficient than this functionally equivalent version: find /path -type f -exec rm '{}' \; I know that find has the "exec" flag. I am just quoting an illustrative example from another resource.

    Read the article

  • Jasmine DOM test using jasmine jquery with require module

    - by Purushoth
    I am using custom variant of jasmine 2.0 from here https://github.com/erikringsmuth/jasmine2-amd-specrunner. So that testing my require.js based application made possible. Here i have facing problem with using jasmine-jquery. The jasmine object is undefined. $ and window is fine. function (window, jasmine, $) I have reference added jasmine and jquery lib too <script type="text/javascript" src="lib/jasmine.js"></script> <script type="text/javascript" src="lib/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="lib/helpers/jasmine-jquery.js"></script>

    Read the article

  • run the script only once?

    - by fusion
    being new to php and coming from asp.net, i would like to know if there is an equivalent of IsPostBack, which calls a function or a method only once, once the user is logged in. i have a facebook application, in which once the user authorizes the application it should enter his details in the database. this basic stuff should have been done using the post-authorize callback url which facebook pings when the user first authorizes the app, but somehow that is not working; hence i have to do it manually. the issue is that, since i'm checking whether the user exists or not in index.php, i would not like index.php to run this code repeatedly for the same user when the user goes to the homepage every time. any ideas?

    Read the article

  • how to create a backup of a file once the current one is changed using php

    - by SkyLar
    I'm playing around with file info in php and i'm wondering if its possible to do the following: once a file is changed get the contents of the file, then put the contents of the file into another file. kinda like a "backup system" so once you make a change to the file a duplicate one is created, each change to the original file overwrites the duplicate one. i'm trying to do this with storing the time in the db, is this possible? i don't know what there is to test against? more clearly, i would like to do the following: execute a script once a specifeced file is changed on the server

    Read the article

  • Why do properties require explicit typing during compilation?

    - by ctpenrose
    Compilation using property syntax requires the type of the receiver to be known at compile time. I may not understand something, but this seems like a broken or incomplete compiler implementation considering that Objective-C is a dynamic language. The property "comment" is defined with: @property (nonatomic, retain) NSString *comment; and synthesized with: @synthesize comment; "document" is an instance of one of several classes which conform to: @protocol DocumentComment <NSObject> @property (nonatomic, retain) NSString *comment; @end and is simply declared as: id document; When using the following property syntax: stringObject = document.comment; the following error is generated by gcc: error: request for member 'comment' in something not a structure or union However, the following equivalent receiver-method syntax, compiles without warning or error and works fine, as expected, at run-time: stringObject = [document comment]; I don't understand why properties require the type of the receiver to be known at compile time. Is there something I am missing? I simply use the latter syntax to avoid the error in situations where the receiving object has a dynamic type. Properties seem half-baked.

    Read the article

  • Heterogeneous queries require the ANSI_NULLS

    - by Dezigo
    I wrote a trigger. USE [TEST] GO /****** Object: Trigger [dbo].[TR_POSTGRESQL_UPDATE_YC] Script Date: 05/26/2010 08:54:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER TRIGGER [dbo].[TR_POSTGRESQL_UPDATE_YC] ON [dbo].[BCT_CNTR_EVENTS] FOR INSERT AS BEGIN DECLARE @MOVE_TIME varchar(14); DECLARE @MOVE_TIME_FORMATED varchar(20); DECLARE @RELEASE_NOTE varchar(32); DECLARE @CMR_NUMBER varchar(15); DECLARE @MOVE_TYPE varchar(2); SELECT @MOVE_TIME = inserted.move_time ,@MOVE_TYPE = inserted.move_type ,@RELEASE_NOTE = inserted.release_note ,@CMR_NUMBER = inserted.cmr_number FROM inserted IF(@MOVE_TYPE = 'YC') BEGIN SET @MOVE_TIME_FORMATED = SUBSTRING(@MOVE_TIME,1,4) + '-' + SUBSTRING(@MOVE_TIME,5,2) + '-' + SUBSTRING(@MOVE_TIME,7,2) + ' 00:00:00' --UPDATE OpenQuery(POSTGRESQL_SERV,'SELECT visit_cmr,visit_timestamp,visit_pin FROM VISIT') -- SET visit_cmr = @RELEASE_NOTE -- WHERE visit_timestamp = @MOVE_TIME_FORMATED -- AND visit_pin = right(@CMR_NUMBER,5) -- AND visit_cmr IS NULL END SET NOCOUNT ON; END When I have inserted a row,I have get an error **Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.** Then I ofcourse SET SET ANSI_WARNINGS is ON but it`s not work for me. (trigger fo linked server postgresql) I have restarted a server. not work again.

    Read the article

  • Prevent UIGestureRecognizer from firing selector more than once

    - by JK
    I utilize a UILongPressGestureRecognizer in my app. This is a continuous gesture recognizer which means it continuously fires the selector for the target it was initialized with. I would like the selector to be fired only once. I have tried to prevent further selectors being fired by setting the gesture recognizer's enabled property to Note the first time the selector is fired, but this only takes effect after the selector is fired again. How can I ensure the selector is fired only once?

    Read the article

  • Playing Multiple Sounds at Once in Qt

    - by Ben
    I'm trying to play background music along with sound effects using Qt. However, I can't get more than one sound to play at once. For example: QSound::play("Music.wav"); QSound::play("Effect.wav"); When this code is run (on Windows), you can hear Music.wav just start to play, but then it stops and Effect.wav plays. Is there any way to get the two sounds to play at once?

    Read the article

  • Are .dll files loaded once for every program or once for all programs?

    - by Nilbert
    I have a simple small question which someone who knows will be able to answer easily, I searched google but couldn't find the answer. There are many programs running at once on a computer, and my question is: when a program loads a DLL, does it actually load the DLL file or does it find the memory in which the DLL is already loaded? For example, is ws2_32.dll (winsock 2) loaded for every program that uses winsock, or is it loaded once and all programs that use it use the same memory addresses to call the functions?

    Read the article

  • don't display the notification after seeing that once

    - by sairam333
    Hi I don't want to display the any notification service in status bar if i saw one notification service once .For example i am displaying persons who are exceeding the 20 km distance from my location .some persons are displayed.when i saw it once then automatically the icon in the status bar is don't displayed.For this one give me some suggestions .Thanks in advance.

    Read the article

  • Disable email when modifying several bugs at once in bugzilla

    - by Jay Paroline
    Where I work, we use Bugzilla extensively for bug and feature tracking. We take advantage of the built in milestones to help us manage our timelines better, but sometimes priorities shift and milestones need to be rearranged. During this time we use the "change several bugs at once" feature to move them around, but the result is a ton of bugspam for everyone involved (except the person actually doing the changing, of course). Is there any way to easily turn off emails if many bugs are being changed at once?

    Read the article

  • Logging a certain event only once in ruby

    - by Andrew Grimm
    Are there any logging frameworks in ruby that allow you to log a specific event type only once? logger = IdealLogger.new logger.log(:happy_path, "We reached the happy path") # => logs this message logger.log(:happy_path, "We reached the happy path yet again") # => Doesn't log this logger.log(:sad_path, "We've encountered a sad path!") # => logs this message Also, is there a term for the concept of logging a certain event type only once?

    Read the article

  • What happens if two people submit edits at once

    - by Karl Entwistle
    Hi there, This might be a stupid questions but I wanted to know what happens if two users edit some data at once and then both click submit at the same time, I assumed Rails handled requests one after the other and so someone would get an error message but is this correct? Thanks (Once one person has edited data I dont want it to be accessible or editable anymore)

    Read the article

  • upload 2 images at once in codeigniter

    - by sonill
    can anyone plz provide me a simple working code snippet of codeigniter for uploading 2 images at once (through 2 different input field ofcourse). I need 2 images to be uploaded at once, or one after another. and both of the images need to be in different location. I tried to make it myself by calling upload function twice but it returned last images with these extentions: *.jpg.jpg. can anyone help

    Read the article

  • jQuery - Call function once at end of each loop

    - by user668499
    How can I call a function once at the end of an each loop. This alerts 'finished' on each loop, I want it once when the loop has finished. $(function(){ var imgArr=[]; var lis = $('#gallery li') lis.each(function(){ imgArr.push(this.outerHTML); $(this).remove(); alertFun(); }) function alertFun(){ alert('finished'); } })

    Read the article

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