Search Results

Search found 1066 results on 43 pages for 'silly dg'.

Page 27/43 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • How to warn for the use of unset variables in a korn shell script

    - by Lepu
    Is there any way to throw errors or warnings in a korn shell script to prevent the use of unset variables ? Let's assume I have a temporary folder that I want to remove. TEMP_FILES_DIR='/app/myapp/tmp' rm -Rf $TEMP_FILE_DIR #notice the misspelling How to prevent this kind of mistakes before they actually happen? I know the script should check for file existence and empty string before attempting to remove, this is just a silly example to illustrate a mistake that could have been avoided with some warnings. I don't know if this feature exists in ksh. If it does exist, how do you turn it on?

    Read the article

  • Which data structure(s) to back a Final Fantasy ATB-style queue? (a delay queue)

    - by ZoFreX
    Situation: There are several entities in a simulated environment, which has an artificial notion of time called "ticks", which has no link to real time. Each entity takes it in turns to move, but some are faster than others. This is expressed by a delay, in ticks. So entity A might have a delay of 10, and B 25. In this case the turn order would go: A A B A A I'm wondering what data structure to use. At first I automatically thought "priority queue" but the delays are relative to "current time" which complicates matters. Also, there will be entities with larger delays and it's not unforseeable that the program will run through millions of ticks. It seems silly for an internal counter to be building higher and higher when the delays themselves stay relatively small and don't increase. So how would you solve this?

    Read the article

  • How can I configure Xcode to put '{' where I want it in generated files

    - by djhworld
    I know this is a fairly contentious issue amongst programmers, but when developing I like my IDE to position the opening curly bracket underneath the method/interface/control declaration, for illustrative purposes: - This is how Xcode automatically generates skeleton methods with the { at the end: - -(void) isTrue:(BOOL)input { if(input) { return YES; } else { return NO; } } This is how I like to lay out my code (which I believe is called the Allman style): - -(void) isTrue:(BOOL)input { if(input) { return YES; } else { return NO; } } I'm just wondering if there's any configuration switch in Xcode to enable this style of development? It's really annoying when typing out if/else statements as it tends to auto-complete the else clause with the { at the end of the line which just looks silly if you like developing with them underneath. Or am I being unreasonable? Is Objective-C supposed to adhere to a standard defined by Apple?

    Read the article

  • Can the dirtiness of pages of a mmap be found from userspace?

    - by chrisdew
    Can dirtiness of pages of a (non-shared) mmap be accessed from userspace under linux 2.6.30+? Platform-specific hacks and kludges welcome. Ideally, I'm looking for an array of bits, one per page (4kB?) of the mmap'ed region, which are set if that page has been written to since the region was mmap'ed. (I am aware, that the process doing the writing could keep track of this information - but it seems silly to do so if the kernel is doing it anyway.) Thanks, Chris.

    Read the article

  • Playing around with my Java project in Eclipse... what the crap did I just do?

    - by Daddy Warbox
    I don't even remember how, but somehow I managed to make all of my project's source files hidden in Eclipse's Package and Project Explorer panels. Go figure. 'Show Filtered Children (alt+click)' temporarily reveals the files, and only in Package Explorer can I double-click to reopen them from this view. They go back into hiding after I select another item, though. Plus, now I'm getting other annoyances, such as all of the folded non-hidden items altogether expanding when I click on an item, and the entire folder tree of my project now being shown in these panels (including my .svn subversion folders... which shouldn't be any of Eclipse's business, presently). Long story short, my Package/Project Explorers' just blew up on me, and I want to know how to fix this. Thanks in advance. P.S. What's a good guide I can use to learn my way around this silly contraption, anyway?

    Read the article

  • Multivalue parametres in SSRS- display in the report

    - by pfeffer
    I just started working with SSRS, so this question might seem silly. Anyway, for now I'm trying to avoid multi-valued parameters, because I want my parameters to be able to be NULL. So I'm just passing a comma-separated string of ID values to my stored procedure, and everything works. The problem I encountered is that I want to display the actual values, not IDs, in the report, so that users can see, what filter was used. If that were a multi-valued parameter, I would simply use JOIN function, but now I am out of ideas and would really appreciate some help. Thanks!

    Read the article

  • MySQL User AutoIncrement Permissions Restriction

    - by psayre23
    I have two databases that need to have their auto increment ids on various tables synced. Right now, I have a PHP function that checks the current auto increment id for both tables and then sets the lowest to the highest. If there is a better way to do this, I'm all ears. I really don't want to give the web user alter permissions, as a SQL injection could clear all passwords (or something else silly). Is there any way to restrict a MySQL user to changing auto increment without opening it up to alter statements?

    Read the article

  • How to grab the lines AFTER a matched line in python

    - by toofly
    Hi All, I am an amateur using Python on and off for some time now. Sorry if this is a silly question, but I was wondering if anyone knew an easy way to grab a bunch of lines if the format in the input file is like this: " Heading 1 Line 1 Line 2 Line 3 Heading 2 Line 1 Line 2 Line 3 " I won't know how many lines are after each heading, but I want to grab them all. All I know is the name, or a regular expression pattern for the heading. The only way I know to read a file is the "for line in file:" way, but I don't know how to grab the lines AFTER the line I'm currently on. Hope this makes sense, and thanks for the help!

    Read the article

  • rails gem share_counts GET method on object?

    - by jaqbyte
    created the first rails app! excinting! for two weeks now I did Zombie, rubymonk etc. I love it! I used scaffold form url:string and included the gem share_counts. rails c: f = form.first ShareCounts.twitter f.url works! but... I have trouble to write the controller and the view! For you experienced railies this is probably a silly question, and probably only 5 lines of code, but for me thats a big step learning RoR! I am very thankful if someone could help how I can show the count next to the "url" field. Thank you so much!!! joh

    Read the article

  • How to assign a PHP variable that contains a mixed of PHP and html elements?

    - by Rick
    I have a PHP page that contains html and tags and PHP codes and I am using AJAX to manipulate some data and now I need to spit out the response but I am not sure if it is possible to put the mixed content into a string variable to pass through... Is this possible? For example I need to: $response = "<p>some text--<?php echo $something; ?>"; Thanks... To clear things up, I am not trying to send raw PHP code to clientside as that would be silly and won't be evaluated as it is a server side script. I am just looking for a fast way to put everything into a variable without manually re-doing the whole page stripping out the php open and close tags and echos...etc

    Read the article

  • Access is re-writing - and breaking - my query!

    - by FrustratedWithFormsDesigner
    I have a query in MS Access (2003) that makes use of a subquery. The subquery part looks like this: ...FROM (SELECT id, dt, details FROM all_recs WHERE def_cd="ABC-00123") AS q1,... And when I switch to Table View to verify the results, all is OK. Then, I wanted the result of this query to be printed on the page header for a report (the query returns a single row that is page-header stuff). I get an error because the query is suddenly re-written as: ...FROM [SELECT id, dt, details FROM all_recs WHERE def_cd="ABC-00123"; ] AS q1,... So it's Ok that the round brackets are automatically replaced by square brackets, Access feels it needs to do that, fine! But why is it adding the ; into the subquery, which causes it to fail? I suppose I could just create new query objects for these subqueries, but it seems a little silly that I should have to do that.

    Read the article

  • How to know from a bash script if the user abruptly closes ssh session

    - by Figo
    I have a bash script that acts as the default shell for a user loging in trough ssh. It provides a menu with several options one of wich is sending a file using netcat. The netcat of the embedded linux I'm using lacks the -w option, so if the user closes the ssh connection without ever sending the file, the netcat command waits forever. I need to know if the user abruptly closes the connection so the script can kill the netcat command and exit gracefully. Things I've tried so far: Trapping the SIGHUP: it is not issued. The only signal issued i could find is SIGCONT, but I don't think it's reliable and portable. Playing with the -t option of the read command to detect a closed stdin: this would work if not for a silly bug in the embedded read command (only times out on the first invocation)

    Read the article

  • MPICH2 vs KERRYGHED

    - by user311906
    Hi All right now I am moving first steps in clustering. I installed MPICH2 on my Ubuntu at home and I have a silly question about it. For what I am reading right now it seems that it provides the capability of sending processes to other pcs. I went for this lib just because I set it up very quickly and easily. Compared to MPICH2 , do you know what is the advantage of having a different clustering system like KERRYGHED? It seems that these ones also provide this capability, but the Kernel must be rebuild, so I suppose that it is going to be faster. What other advantages are remarkable for a clustering system like this? Thanks

    Read the article

  • Use content of fieldnames in query..

    - by rokdd
    Hi, i have three mysql tables: Table 456 id | binder | property1 1 | b | hello 2 | b | goodbye 3 | a | bonjour Table binder id | binder | tableid1 | tableid2 1 | a | 23 | 456 2 | b | 21 | 456 3 | c | 45 | 42 Table 21 id | property1 | data.. 1 | goodbye | data about goodbye.. 2 | ciao | data about ciao.. So first i want to select in binder the binder i need to get the tablesname where data is stored. So i need to select table by a fieldname in this case the fieldname is tableid1 and would have the content 21 so that i have to look in 21. AND it should be property 1 from table 456 and table 21 the same... i am using php and already tried with union and subquerys but it seems that i am to silly to prepare such query!

    Read the article

  • Controling images of nodes in a TreeView (C#)

    - by ET
    Hi, I am pretty new with GUI, and I guess that is a silly question, but I am stuck... I am trying to make a folder explorer using TreeView control. now, I added an ImageList with two images - one for a folder and the other for selected folder. I used the 'BeforeExpand' event to change the icon of the current node (folder). The problem is that I dont know how to change it back when the user selects other folder... what event can I use? Maybe I dont use it right... ? Thanks guys :)

    Read the article

  • Writing a script to bypass college login page

    - by gtredcvb
    My college has a silly login page that requires you to download a whole bunch of garbage that a lot of us don't need (Norton Anti-virus, Antispyware software, etc.). We have to have them running to get on the internet on campus. Though, if you are on Linux, or at least set your user-agent to linux, the requirements are gone. We could easily use Firefox with the useragent switcher to bypass this, but it'd be nice to create a script that automates this. How would this be possible? I figure this could be written in python, and could grab the webpage with curl specifying a user agent? How would I go about posting the data back to the servers? Thanks

    Read the article

  • How can I mix command line arguments and filenames for <> in Perl?

    - by Jimmeh
    Consider the following silly Perl program: $firstarg = $ARGV[0]; print $firstarg; $input = <>; print $input; I run it from a terminal like: perl myprog.pl sample_argument And get this error: Can't open sample_argument: No such file or directory at myprog.pl line 5. Any ideas why this is? When it gets to the < is it trying to read from the (non-existent) file, "sample_argument" or something? And why?

    Read the article

  • syntax error, unexpected ',', expecting ')' RoR

    - by McDoku
    I am trying to get a collection select from an another model and I keep getting the above error. Looked everywhere, got rails casts but nothing makes sense. _form.rb <%= f.label :city %><br /> <%= f.collection_select (:share ,:city_id, City.all , :id, :name ) %> It highlights 'form' on the error report <h1>New share</h1> <%= render 'form' %> <%= link_to 'Back', shares_path %> Here are my models... class Share include Mongoid::Document field :name, type: String field :type, type: String field :summary, type: String field :description, type: String field :city, type: String embedded_in :city has_many :category end class City include Mongoid::Document embedded_in :share field :name, type: String field :country, type: String attr_accessible :name, :city_id, :id end Searched everywhere and I cannot figure it out. It must be something silly.

    Read the article

  • how to handle db concurrency in client-server application in C#?

    - by RAJ K
    I am developing an application in C# WPF which will have Client-Server architecture (Client will do products sales billing). I am novice in this area and I asked this question to start my development process. Click here to view question. So, ultimately I have selected MySQl, WCf & WPF. Now I have one silly question. Do i need to handle DB concurrency explicitly in my application (like 3 clients inserting data same time) or MySQl will handle this without any conflict? To accomplish my project i thought, I will create a service in WCf which will do DB queries from client application. Do you have any suggestion to improve my application performance.

    Read the article

  • Using UIImageViews for 'pages' in an iPhone/iPad storybook app?

    - by outtoplayinc
    I'm new to iPhone programming, and well, what seems obvious to me may seem silly to a seasoned coder. I did a few 'switching views' tutorials on Youtube, and basically, they seems to work nicely for adding pages to a storybook type app. You add a UIViewController and associated view for each page. My question is would this become insanely slow, or a memory hog if I continued this method for say....35+ pages? Each page would also have a sound file associated with it that would play narration when a page load and stops when we leave. Basically, think of a powerpoint type app, with sound, possibly animated image elements, next & back buttons. I'm probably thinking of this very simplistically, but that's where my experience is at for the moment. Any insight or tips as to better and or more efficient ways to proceed would be greatly appreciated.

    Read the article

  • Accessing 'data' argument of with() function?

    - by Ken Williams
    Is it possible, in the expr expression of the with() function, to access the data argument directly? Here's what I mean conceptually: > print(df) result qid f1 f2 f3 -1 1 0.0000 0.1253 0.0000 -1 1 0.0098 0.0000 0.0000 1 1 0.0000 0.0000 0.1941 -1 2 0.0000 0.2863 0.0948 1 2 0.0000 0.0000 0.0000 1 2 0.0000 0.7282 0.9087 > with(df, subset(.data, select=f1:f3)) # Doesn't work Of course the above example is kind of silly, but it would be handy for things like this: with(subset(df, f2>0), foo(qid, vars=subset(.data, select=f1:f3))) I tried to poke around with environment() and parent.frame() etc., but didn't come up with anything that worked. Maybe this is really a question about eval(), since that's how with.default() is implemented.

    Read the article

  • Difference between var and Class class in object creation

    - by Divine
    Its a silly question, however shocked to see different behaviors. Learning a lot. Lets say I have two classes below Class A { public void Display() { } } Class B : A { public void Display() { } } Class C : B { public void Display() { } } Class Final { static void Main() { var c = new C(); // B c = new C(); //My doubt is, both of the above gives different results. May I know B c = new C() creates object of B or C? What I understood is, it creates object of B. Then why we say "new C()"? I agree with C c = new C(); But I thought, B b = new C(); creates object of B. Where we use this style? Only when utilizing runtime polymorphism? (Overriding methods)? } }

    Read the article

  • Can you step into specific properties in VS 2010?

    - by cyclotis04
    I know that you can either step into every property or not step into every property, but I would really like to be able to step into a specific property, and not the rest. Is this possible? (I also know I can use keyboard commands, but I'm asking if there's a more permanent solution.) I have a lot of properties and my setters do important things, so it's silly to step over them, but most of my getters are pointless. I'm looking for something like: public string ImportantProperty { get { return _importantProperty; } [DebuggerStepThrough(false)] set { if (this.State != ConnectionState.Closed) throw new InvalidOperationException( "Important Property cannot be changed unless This is closed."); if (ImportantProperty == value) return; _importantProperty = value; OnImportantPropertyChanged(new EventArgs()); } } Unfortunately, I can't find anything that will act like [DebuggerStepThrough(false)] and I must resort to turning off property step-over and putting [DebuggerStepThrough] everywhere I don't want to step-through.

    Read the article

  • Can you recommend wiki, forum, blog & cms plugins for an existing Rails app or should I go the route

    - by Nick Gorbikoff
    Hello. I have an existing Rails internal app, that handles inventory, invoicing, order taking, labeling, data imports/exports, etc, etc. Now I need to add blog, cms, forum and wiki functionality to it. It seems silly to try to roll out my own solutions when there are already some out there. So I was wondering if people could recommend based on their experience: Are there good plugins out there? (Which ones you had experience with?) Would you rather recommend to go the route of engines, and integrate RadiantCMS or similar apps? (please provide recommendations based on your integration experience) Or would you just bite the bullet and roll out your own? Thank you. P.S.: Right now the app is Rails 2.3, but it will get upgraded to Rail 3 in a year, when most gems/plugins that it depends on will be Rails 3 compatible.

    Read the article

  • Optimality of Binary Search

    - by templatetypedef
    Hello all- This may be a silly question, but does anyone know of a proof that binary search is asymptotically optimal? That is, if we are given a sorted list of elements where the only permitted operation on those objects is a comparison, how do you prove that the search can't be done in o(lg n)? (That's little-o of lg n, by the way.) Note that I'm restricting this to elements where the only operation permitted operation is a comparison, since there are well-known algorithms that can beat O(lg n) on expectation if you're allowed to do more complex operations on the data (see, for example, interpolation search). Thanks so much! This has really been bugging me since it seems like it should be simple but has managed to resist all my best efforts. :-)

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >