Search Results

Search found 5378 results on 216 pages for 'spell checking'.

Page 5/216 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Checking if an object is inside bounds of an isometric chunk

    - by gopgop
    How would I check if an object is inside the bounds of an isometric chunk? for example I have a player and I want to check if its inside the bounds of this isometric chunk. I draw the isometric chunk's tiles using OpenGL Quads. My first try was checking in a square pattern kind of thing: e = object; this = isometric chunk; if (e.getLocation().getX() < this.getLocation().getX()+World.CHUNK_WIDTH*World.TILE_WIDTH && e.getLocation().getX() > this.getLocation().getX()) { if (e.getLocation().getY() > this.getLocation().getY() && e.getLocation().getY() < this.getLocation().getY()+World.CHUNK_HEIGHT*World.TILE_HEIGHT) { return true; } } return false; What happens here is that it checks in a SQUARE around the chunk so not the real isometric bounds. Image example: (THE RED IS WHERE THE PROGRAM CHECKS THE BOUNDS) What I have now: Desired check: Ultimately I want to do the same for each tile in the chunk. EXTRA INFO: Till now what I had in my game is you could only move tile by tile but now I want them to move freely but I still need them to have a tile location so no matter where they are on the tile their tile location will be that certain tile. then when they are inside a different tile's bounding box then their tile location becomes the new tile. Same thing goes with chunks. the player does have an area but the area does not matter in this case. and as long as the X and Y are inside the bounding box then it should return true. they don't have to be completely on the tile.

    Read the article

  • Collision checking problem on a Tiled map

    - by nosferat
    I'm working on a pacman styled dungeon crawler, using the free oryx sprites. I've created the map using Tiled, separating the floor, walls and treasure in three different layers. After importing the map in libGDX, it renders fine. I also added the player character, for now it just moves into one direction, the player cannot control it yet. I wanted to add collision and I was planning to do this by checking if the player's new position is on a wall tile. Therefore as you can see in the following code snippet, I get the tile type of the appropriate tile and if it is not zero (since on that layer there is nothing except the wall tile) it is a collision and the player cannot move further: final Vector2 newPos = charController.move(warrior.getX(), warrior.getY()); if(!collided(newPos)) { warrior.setPosition(newPos.x, newPos.y); warrior.flip(charController.flipX(), charController.flipY()); } [..] private boolean collided(Vector2 newPos) { int row = (int) Math.floor((newPos.x / 32)); int col = (int) Math.floor((newPos.y / 32)); int tileType = tiledMap.layers.get(1).tiles[row][col]; if (tileType == 0) { return false; } return true; } The character only moves one tile with this code: If I reduce the col value by two it two more tiles. I think the problem will be around indexing, but I'm totally confused because the zero in the coordinate system of libGDX is in the bottom left corner of the screen, and I don't know the tiles array's indexing is similair or not. The size of the map is 19x21 tiles and looks like the following (the starting position of the player is marked with blue:

    Read the article

  • Problem with SAT collision detection overlap checking code

    - by handyface
    I'm trying to implement a script that detects whether two rotated rectangles collide for my game, using SAT (Separating Axis Theorem). I used the method explained in the following article for my implementation in Google Dart. 2D Rotated Rectangle Collision I tried to implement this code into my game. Basically from what I understood was that I have two rectangles, these two rectangles can produce four axis (two per rectangle) by subtracting adjacent corner coordinates. Then all the corners from both rectangles need to be projected onto each axis, then multiplying the coordinates of the projection by the axis coordinates (point.x*axis.x+point.y*axis.y) to make a scalar value and checking whether the range of both the rectangle's projections overlap. When all the axis have overlapping projections, there's a collision. First of all, I'm wondering whether my comprehension about this algorithm is correct. If so I'd like to get some pointers in where my implementation (written in Dart, which is very readable for people comfortable with C-syntax) goes wrong. Thanks! EDIT: The question has been solved. For those interested in the working implementation: Click here

    Read the article

  • Checking if an Unloaded Collection Contains Elements

    - by Ricardo Peres
    If you want to know if an unloaded collection in an entity contains elements, or count them, without actually loading them, you need to use a custom query; that is because the Count property (if the collection is not mapped with lazy=”extra”) and the LINQ Count() and Any() methods force the whole collection to be loaded. You can use something like these two methods, one for checking if there are any values, the other for actually counting them: 1: public static Boolean Exists(this ISession session, IEnumerable collection) 2: { 3: if (collection is IPersistentCollection) 4: { 5: IPersistentCollection col = collection as IPersistentCollection; 6:  7: if (col.WasInitialized == false) 8: { 9: String[] roleParts = col.Role.Split('.'); 10: String ownerTypeName = String.Join(".", roleParts, 0, roleParts.Length - 1); 11: String ownerCollectionName = roleParts.Last(); 12: String hql = "select 1 from " + ownerTypeName + " it where it.id = :id and exists elements(it." + ownerCollectionName + ")"; 13: Boolean exists = session.CreateQuery(hql).SetParameter("id", col.Key).List().Count == 1; 14:  15: return (exists); 16: } 17: } 18:  19: return ((collection as IEnumerable).OfType<Object>().Any()); 20: } 21:  22: public static Int64 Count(this ISession session, IEnumerable collection) 23: { 24: if (collection is IPersistentCollection) 25: { 26: IPersistentCollection col = collection as IPersistentCollection; 27:  28: if (col.WasInitialized == false) 29: { 30: String[] roleParts = col.Role.Split('.'); 31: String ownerTypeName = String.Join(".", roleParts, 0, roleParts.Length - 1); 32: String ownerCollectionName = roleParts.Last(); 33: String hql = "select count(elements(it." + ownerCollectionName + ")) from " + ownerTypeName + " it where it.id = :id"; 34: Int64 count = session.CreateQuery(hql).SetParameter("id", col.Key).UniqueResult<Int64>(); 35:  36: return (count); 37: } 38: } 39:  40: return ((collection as IEnumerable).OfType<Object>().Count()); 41: } Here’s how: 1: MyEntity entity = session.Load(100); 2:  3: if (session.Exists(entity.SomeCollection)) 4: { 5: Int32 count = session.Count(entity.SomeCollection); 6: //... 7: }

    Read the article

  • Checking timeouts made more readable

    - by Markus
    I have several situations where I need to control timeouts in a technical application. Either in a loop or as a simple check. Of course – handling this is really easy, but none of these is looking cute. To clarify, here is some C# (Pseudo) code: private DateTime girlWentIntoBathroom; girlWentIntoBathroom = DateTime.Now; do { // do something } while (girlWentIntoBathroom.AddSeconds(10) > DateTime.Now); or if (girlWentIntoBathroom.AddSeconds(10) > DateTime.Now) MessageBox.Show("Wait a little longer"); else MessageBox.Show("Knock louder"); Now I was inspired by something a saw in Ruby on StackOverflow: Now I’m wondering if this construct can be made more readable using extension methods. My goal is something that can be read like “If girlWentIntoBathroom is more than 10 seconds ago” 1st attempt if (girlWentIntoBathroom > (10).Seconds().Ago()) MessageBox.Show("Wait a little longer"); else MessageBox.Show("Knock louder"); So I wrote an extension for integer that converts the integer into a TimeSpan public static TimeSpan Seconds(this int amount) { return new TimeSpan(0, 0, amount); } After that, I wrote an extension for TimeSpan like this: public static DateTime Ago(this TimeSpan diff) { return DateTime.Now.Add(-diff); } This works fine so far, but has a great disadvantage. The logic is inverted! Since girlWentIntoBathroom is a timestamp in the past, the right side of the equation needs to count backwards: impossible. Just inverting the equation is no solution, because it will invert the read sentence as well. 2nd attempt So I tried something new: if (girlWentIntoBathroom.IsMoreThan(10).SecondsAgo()) MessageBox.Show("Knock louder"); else MessageBox.Show("Wait a little longer"); IsMoreThan() needs to transport the past timestamp as well as the span for the extension SecondsAgo(). It could be: public static DateWithIntegerSpan IsMoreThan(this DateTime baseTime, int span) { return new DateWithIntegerSpan() { Date = baseTime, Span = span }; } Where DateWithIntegerSpan is simply: public class DateWithIntegerSpan { public DateTime Date {get; set;} public int Span { get; set; } } And SecondsAgo() is public static bool SecondsAgo(this DateWithIntegerSpan dateAndSpan) { return dateAndSpan.Date.Add(new TimeSpan(0, 0, dateAndSpan.Span)) < DateTime.Now; } Using this approach, the English sentence matches the expected behavior. But the disadvantage is, that I need a helping class (DateWithIntegerSpan). Has anyone an idea to make checking timeouts look more cute and closer to a readable sentence? Am I a little too insane thinking about something minor like this?

    Read the article

  • Type checking and recursive types (Writing the Y combinator in Haskell/Ocaml)

    - by beta
    When explaining the Y combinator in the context of Haskell, it's usually noted that the straight-forward implementation won't type-check in Haskell because of its recursive type. For example, from Rosettacode [1]: The obvious definition of the Y combinator in Haskell canot be used because it contains an infinite recursive type (a = a -> b). Defining a data type (Mu) allows this recursion to be broken. newtype Mu a = Roll { unroll :: Mu a -> a } fix :: (a -> a) -> a fix = \f -> (\x -> f (unroll x x)) $ Roll (\x -> f (unroll x x)) And indeed, the “obvious” definition does not type check: ?> let fix f g = (\x -> \a -> f (x x) a) (\x -> \a -> f (x x) a) g <interactive>:10:33: Occurs check: cannot construct the infinite type: t2 = t2 -> t0 -> t1 Expected type: t2 -> t0 -> t1 Actual type: (t2 -> t0 -> t1) -> t0 -> t1 In the first argument of `x', namely `x' In the first argument of `f', namely `(x x)' In the expression: f (x x) a <interactive>:10:57: Occurs check: cannot construct the infinite type: t2 = t2 -> t0 -> t1 In the first argument of `x', namely `x' In the first argument of `f', namely `(x x)' In the expression: f (x x) a (0.01 secs, 1033328 bytes) The same limitation exists in Ocaml: utop # let fix f g = (fun x a -> f (x x) a) (fun x a -> f (x x) a) g;; Error: This expression has type 'a -> 'b but an expression was expected of type 'a The type variable 'a occurs inside 'a -> 'b However, in Ocaml, one can allow recursive types by passing in the -rectypes switch: -rectypes Allow arbitrary recursive types during type-checking. By default, only recursive types where the recursion goes through an object type are supported. By using -rectypes, everything works: utop # let fix f g = (fun x a -> f (x x) a) (fun x a -> f (x x) a) g;; val fix : (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b = <fun> utop # let fact_improver partial n = if n = 0 then 1 else n*partial (n-1);; val fact_improver : (int -> int) -> int -> int = <fun> utop # (fix fact_improver) 5;; - : int = 120 Being curious about type systems and type inference, this raises some questions I'm still not able to answer. First, how does the type checker come up with the type t2 = t2 -> t0 -> t1? Having come up with that type, I guess the problem is that the type (t2) refers to itself on the right side? Second, and perhaps most interesting, what is the reason for the Haskell/Ocaml type systems to disallow this? I guess there is a good reason since Ocaml also will not allow it by default even if it can deal with recursive types if given the -rectypes switch. If these are really big topics, I'd appreciate pointers to relevant literature. [1] http://rosettacode.org/wiki/Y_combinator#Haskell

    Read the article

  • Error while installing spellchecker for LibreOffice

    - by nixnotwin
    When I run this command: sudo apt-get install aspell aspell-en dictionaries-common hunspell-en-us myspell-en-us I get the following error: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: hunspell-en-us : Conflicts: myspell-en-us but 1:3.2.1-2ubuntu1 is to be installed I used this guide to install LibreOffice.

    Read the article

  • Can No Longer Find Firefox Spell Check Personal Database in Firefox 3

    - by Volomike
    I have Ubuntu Linux 8.04 LTS with Firefox 3.6.3. Unfortunately it is super easy to accidentally click Add To Dictionary on a word you do not want added into one's personal dictionary used in Firefox. How do I remove the word 'intsead' out of it? I tried some tutorials on the web that said to find ~/.mozilla/*.default/persdict.dat, but I could not see one. As well, others have complained that this file no longer exists in Firefox 3.

    Read the article

  • Word Spell Check pops up hidden and "freezes" my App

    - by Refracted Paladin
    I am using Word's Spell Check in my in house WinForm app. My clients are all XP machines with Office 2007 and randomly the spell check suggestion box pops up behind the App and makes everything "appear" frozen as you cannot get at it. Suggestions? What do other people do to work around this or stop it altogether? Thanks Below is my code, for reference, though I am doubtful that this has anything to do with my code but I'll take anything. public class SpellCheckers { public string CheckSpelling(string text) { Word.Application app = new Word.Application(); object nullobj = Missing.Value; object template = Missing.Value; object newTemplate = Missing.Value; object documentType = Missing.Value; object visible = false; object optional = Missing.Value; object savechanges = false; app.ShowMe(); Word._Document doc = app.Documents.Add(ref template, ref newTemplate, ref documentType, ref visible); doc.Words.First.InsertBefore(text); Word.ProofreadingErrors errors = doc.SpellingErrors; var ecount = errors.Count; doc.CheckSpelling(ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional); object first = 0; object last = doc.Characters.Count - 1; var results = doc.Range(ref first, ref last).Text; doc.Close(ref savechanges, ref nullobj, ref nullobj); app.Quit(ref savechanges, ref nullobj, ref nullobj); Marshal.ReleaseComObject(doc); Marshal.ReleaseComObject(app); Marshal.ReleaseComObject(errors); return results; } } And I call it from my WinForm app like so -- public static void SpellCheckControl(Control control) { if (IsWord2007Available()) { if (control.HasChildren) { foreach (Control ctrl in control.Controls) { SpellCheckControl(ctrl); } } if (IsValidSpellCheckControl(control)) { if (control.Text != String.Empty) { control.BackColor = Color.FromArgb(180, 215, 195); control.Text = Spelling.CheckSpelling(control.Text); control.Text = control.Text.Replace("\r", "\r\n"); control.ResetBackColor(); } } } }

    Read the article

  • Spell check in winforms

    - by j-t-s
    In my win forms c# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where i can send a request or something and it tells me whether or not the word i sent was spelled correctly. Preferred but not required: The ability for that online sevrice to also send back suggestions.

    Read the article

  • nutch spell checker | nutch navigation filter

    - by Sascha
    Hello, i am try to configure the nutch 1.0 search engine. First i need to integrate a spell checker or somthing like this, is there a plugin available? My next question is, how to rule out html tag like "", so that navigation is not a part of the index? thanks for all answers

    Read the article

  • Free en-GB dictionary for spell check in Silverlight

    - by Craig Shearer
    I'm trying to use the Vectorlight spell checker for Silverlight. The demo code comes with the en-US.dic file, but I'm trying to find a compatible one for British English. I have found one here but it doesn't work. The format seems similar to the en-US one, but it just doesn't work (i.e. it doesn't suggest any words).

    Read the article

  • spell checker: ignore CamelCaseWords

    - by David Oneill
    Is there a way to get the spell checker to properly check camel cased words? "ThisIsSpelledRightly" would be marked as spelled correctly, but "ThisIsNottSpeledRihgt" would be flagged? I use Xubuntu and firefox. I tried asking this over on superuser, but it got ignored.

    Read the article

  • Spell check in c#

    - by j-t-s
    Hi all In my win forms c# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where i can send a request or something and it tells me whether or not the word i sent was spelled correctly. Preferred but not required: The ability for that online sevrice to also send back suggestions. Thank you :)

    Read the article

  • Grails - Link checking as part of a continuous integration.

    - by Reverend Gonzo
    So, we have a grails app set up with a Hudson CI build process. We're running unit tests, integration tests, and about to set up Selenium for some functional tests as well. However, are there any good ways of fully testing a sites links to make sure nothing has broken in a release. I know there's link checkers in general, but I'd like to have it be a part of the build process, so a build outright fails if something isn't right.

    Read the article

  • Installing MySQL-Ruby on Linux and Ruby 1.9.2

    - by Klam
    I am having an absurdly difficult time getting MySQL-Ruby to install on RedHat 4 using Ruby 1.9.2. I am behind a company proxy that prevents pretty much any package tool from connecting to external repositories so "gem install mysql" isn't going to cut it. I have tried installing the mysql-ruby gem locally but it fails with a mysterious: $gem install mysql-2.8.1.gem Building native extensions. This could take a while... ERROR: Error installing mysql-2.8.1.gem: ERROR: Failed to build gem native extension. /ns/local/apps/internal/SWS/MetricsPublisher/ruby/bin/ruby extconf.rb checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. I have also tried building the module myself by following the included readme. The results: $ruby extconf.rb --with-mysql-include=/path_to_my_sql_headers/mysql/include/ --with-mysql-lib=/path_to_my_sql_lib/mysql/lib/ checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Does anybody have any ideas? Quite frankly, I don't even care if MySQL-Ruby specifically works, I just want ANY means of connecting to a MySQL DB through a ruby call in ruby 1.9. Thanks.

    Read the article

  • On checking kernel parms HP-UX & Oracle 10.2

    - by [email protected]
    Hi,Just did this little script for a customer wanting to investigate if the kernel parameters of their HP-UX machines fits or not the Oracle 10.2 specifications ( looks like someone checked the "User Verified" at database installation time on some prerequisites)Just want to share ( its in Spanish)Hope it helps!--L Normal 0 21 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ### ### check_kernel_parms.sh ### ### ### ###    NAME ###      check_kernel_parms.sh ### ###    DESCRIPTION ###      Comprueba los parametros de kernel ### ###    NOTES ###     Valido para versiones de SO HP-UX y Oracle 10.2 ###     ### ###    MODIFIED   (MM/DD/YY) ###    lvelasco    05/20/10 - Creacion     V_DATE=`/usr/bin/date +%Y%m%d_%H%M%S` if [ "${1}" != 'sin_traza' ]; then   V_FICHERO_LOG=`dirname $0`/`basename $0`.${V_DATE}.log   exec 4>&1   tee ${V_FICHERO_LOG} >&4 |&   exec 1>&p 2>&1 fi   echo "${V_DATE}- check_params.sh *******************************************" echo "Comenzado ejecucion de chequeo de parametros de kernel en maquina `hostname`" echo "****************************************************************************"   UX_VERS=`uname -a | awk '{print $3}'` KCTUNE=/usr/sbin/kctune MEM_TOTAL_MB=`./check_mem` <-- This should return the physical mem of the machine on bytes MEM_TOTAL=$((MEM_TOTAL_MB*1024))     NPROC=$(${KCTUNE} | grep nproc | grep -v '(nproc' | grep -v *nproc | awk '{print $2}') if [ ${NPROC} -lt 4096 ] then        echo "[FAILED] Information: El parametro nproc con valor actual ${NPROC} debe tener una valor superior a 4096" else        echo "[OK] Information: El parametro nproc con valor actual ${NPROC} debe tener una valor superior a 4096" fi     KSI_ALLOC_MAX_T=$(${KCTUNE} | grep ksi_alloc | awk '{print $2}') KSI_ALLOC_MAX=$((NPROC*8)) if [ ${KSI_ALLOC_MAX_T} -lt ${KSI_ALLOC_MAX} ] then        echo "[FAILED] Information: El parametro ksi_alloc_max con valor actual ${KSI_ALLOC_MAX_T} debe tener una valor superior a ${KSI_ALLOC_MAX}" else        echo "[OK] Information: El parametro ksi_alloc_max con valor actual ${KSI_ALLOC_MAX_T} debe tener una valor superior a ${KSI_ALLOC_MAX}" fi       EXECUTABLE_STACK=$(${KCTUNE} | grep executable_stack | awk '{print $2}') if [ ${EXECUTABLE_STACK} -ne 0 ] then        echo "[FAILED] Information: El parametro executable_stack con valor actual ${EXECUTABLE_STACK} debe tener una valor igual a 0" else        echo "[OK] Information: El parametro executable_stack con valor actual ${EXECUTABLE_STACK} debe tener una valor igual a 0" fi       MAX_THREAD_PROC=$(${KCTUNE} | grep max_thread_proc | awk '{print $2}') if [ ${MAX_THREAD_PROC} -lt 1024 ] then        echo "[FAILED] Information: El parametro max_thread_proc con valor actual ${MAX_THREAD_PROC} debe tener una valor superior a 1024" else        echo "[OK] Information: El parametro max_thread_proc con valor actual ${MAX_THREAD_PROC} debe tener una valor superior a 1024" fi     MAXDSIZ=$(${KCTUNE} | grep 'maxdsiz ' | awk '{print $2}') if [ ${MAXDSIZ} -lt 1073741824 ] then        echo "[FAILED] Information: El parametro maxdsiz con valor actual ${MAXDSIZ} debe tener una valor superior a 1073741824" else        echo "[OK] Information: El parametro maxdsiz con valor actual ${MAXDSIZ} debe tener una valor superior a 1073741824" fi     MAXDSIZ_64BIT=$(${KCTUNE} | grep maxdsiz_64bit | awk '{print $2}') if [ ${MAXDSIZ} -lt 2147483648 ] then        echo "[FAILED] Information: El parametro maxdsiz_64bit con valor actual ${MAXDSIZ_64BIT} debe tener una valor superior a 2147483648" else        echo "[OK] Information: El parametro maxdsiz_64bit con valor actual ${MAXDSIZ_64BIT} debe tener una valor superior a 2147483648" fi   MAXSSIZ=$(${KCTUNE} | grep 'maxssiz ' | awk '{print $2}') if [ ${MAXSSIZ} -lt 134217728 ] then        echo "[FAILED] Information: El parametro maxssiz con valor actual ${MAXSSIZ} debe tener una valor superior a 134217728" else        echo "[OK] Information: El parametro maxssiz con valor actual ${MAXSSIZ} debe tener una valor superior a 134217728" fi     MAXSSIZ_64BIT=$(${KCTUNE} | grep maxssiz_64bit | awk '{print $2}') if [ ${MAXSSIZ} -lt 1073741824 ] then        echo "[FAILED] Information: El parametro maxssiz_64bit con valor actual ${MAXSSIZ} debe tener una valor superior a 1073741824" else        echo "[OK] Information: El parametro maxssiz_64bit con valor actual ${MAXSSIZ} debe tener una valor superior a 1073741824" fi     MAXUPRC_T=$(${KCTUNE} | grep maxuprc | awk '{print $2}') MAXUPRC=$(((NPROC*9)/10)) if [ ${MAXUPRC_T} -lt ${MAXUPRC} ] then        echo "[FAILED] Information: El parametro maxuprc con valor actual ${MAXUPRC_T} debe tener una valor superior a ${MAXUPRC}" else        echo "[OK] Information: El parametro maxuprc con valor actual ${MAXUPRC_T} debe tener una valor superior a ${MAXUPRC}" fi   MSGMNI=$(${KCTUNE} | grep msgmni | awk '{print $2}') if [ ${MSGMNI} -lt ${NPROC} ] then        echo "[FAILED] Information: El parametro msgni con valor actual ${MSGMNI} debe tener una valor superior a ${NPROC}" else        echo "[OK] Information: El parametro msgni con valor actual ${MSGMNI} debe tener una valor superior a ${NPROC}" fi     if [ ${UX_VERS} = "B.11.23" ] then        MSGSEG=$(${KCTUNE} | grep msgseg | awk '{print $2}')        if [ ${MSGSEG} -lt 32767 ]        then        echo "[FAILED] Information: El parametro msgseg con valor actual ${MSGSEG} debe tener una valor superior a 32767"        else        echo "[OK] Information: El parametro msgseg con valor actual ${MSGSEG} debe tener una valor superior a 32767"        fi fi   MSGTQL=$(${KCTUNE} | grep msgtql | awk '{print $2}') if [ ${MSGTQL} -lt ${NPROC} ] then        echo "[FAILED] Information: El parametro msgtql con valor actual ${MSGTQL} debe tener una valor superior a ${NPROC}" else        echo "[OK] Information: El parametro msgtql con valor actual ${MSGTQL} debe tener una valor superior a ${NPROC}" fi       if [ ${UX_VERS} = "B.11.23" ] then        NFILE_T=$(${KCTUNE} | grep nfile | awk '{print $2}')        NFILE=$((15*NPROC+2048))        if [ ${NFILE_T} -lt ${NFILE} ]        then        echo "[FAILED] Information: El parametro nfile con valor actual ${NFILE_T} debe tener una valor superior a ${NFILE}"        else        echo "[OK] Information: El parametro nfile con valor actual ${NFILE_T} debe tener una valor superior a ${NFILE}"        fi fi     NFLOCKS=$(${KCTUNE} | grep nflocks | awk '{print $2}') if [ ${NFLOCKS} -lt ${NPROC} ] then        echo "[FAILED] Information: El parametro nflocks con valor actual ${NFLOCKS} debe tener una valor superior a ${NPROC}" else        echo "[OK] Information: El parametro nflocks con valor actual ${NFLOCKS} debe tener una valor superior a ${NPROC}" fi   NINODE_T=$(${KCTUNE} | grep ninode | grep -v vx | awk '{print $2}') NINODE=$((8*NPROC+2048)) if [ ${NINODE_T} -lt ${NINODE} ] then        echo "[FAILED] Information: El parametro ninode con valor actual ${NINODE_T} debe tener una valor superior a ${NINODE}" else        echo "[OK] Information: El parametro ninode con valor actual ${NINODE_T} debe tener una valor superior a ${NINODE}" fi     NCSIZE_T=$(${KCTUNE} | grep ncsize | awk '{print $2}') NCSIZE=$((NINODE+1024)) if [ ${NCSIZE_T} -lt ${NCSIZE} ] then        echo "[FAILED] Information: El parametro ncsize con valor actual ${NCSIZE_T} debe tener una valor superior a ${NCSIZE}" else        echo "[OK] Information: El parametro ncsize con valor actual ${NCSIZE_T} debe tener una valor superior a ${NCSIZE}" fi     if [ ${UX_VERS} = "B.11.23" ] then        MSGMAP_T=$(${KCTUNE} | grep msgmap | awk '{print $2}')        MSGMAP=$((MSGTQL+2))        if [ ${MSGMAP_T} -lt ${MSGMAP} ]        then        echo "[FAILED] Information: El parametro msgmap con valor actual ${MSGMAP_T} debe tener una valor superior a ${MSGMAP}"        else        echo "[OK] Information: El parametro msgmap con valor actual ${MSGMAP_T} debe tener una valor superior a ${MSGMAP}"        fi fi   NKTHREAD_T=$(${KCTUNE} | grep nkthread | awk '{print $2}') NKTHREAD=$((((NPROC*7)/4)+16)) if [ ${NKTHREAD_T} -lt ${NKTHREAD} ] then        echo "[FAILED] Information: El parametro nkthread con valor actual ${NKTHREAD_T} debe tener una valor superior a ${NKTHREAD}" else        echo "[OK] Information: El parametro nkthread con valor actual ${NKTHREAD_T} debe tener una valor superior a ${NKTHREAD}" fi     SEMMNI=$(${KCTUNE} | grep semmni | grep -v '(semm' | awk '{print $2}') if [ ${SEMMNI} -lt ${NPROC} ] then        echo "[FAILED] Information: El parametro semmni con valor actual ${SEMMNI} debe tener una valor superior a ${NPROC}" else        echo "[OK] Information: El parametro semmni con valor actual ${SEMMNI} debe tener una valor superior a ${NPROC}" fi     SEMMNS_T=$(${KCTUNE} | grep semmns | awk '{print $2}') SEMMNS=$((SEMMNI+2)) if [ ${SEMMNS_T} -lt ${SEMMNI} ] then        echo "[FAILED] Information: El parametro semmns con valor actual ${SEMMNS_T} debe tener una valor superior a ${SEMMNS}" else        echo "[OK] Information: El parametro semmns con valor actual ${SEMMNS_T} debe tener una valor superior a ${SEMMNS}" fi   SEMMNU_T=$(${KCTUNE} | grep semmnu | awk '{print $2}') SEMMNU=$((NPROC-4)) if [ ${SEMMNU_T} -lt ${SEMMNU} ] then        echo "[FAILED] Information: El parametro semmnu con valor actual ${SEMMNU_T} debe tener una valor superior a ${SEMMNU}" else        echo "[OK] Information: El parametro semmnu con valor actual ${SEMMNU_T} debe tener una valor superior a ${SEMMNU}" fi     if [ ${UX_VERS} = "B.11.23" ] then        SEMVMX=$(${KCTUNE} | grep msgseg | awk '{print $2}')        if [ ${SEMVMX} -lt 32767 ]        then        echo "[FAILED] Information: El parametro semvmx con valor actual ${SEMVMX} debe tener una valor superior a 32767"        else        echo "[OK] Information: El parametro semvmx con valor actual ${SEMVMX} debe tener una valor superior a 32767"        fi fi     SHMMNI=$(${KCTUNE} | grep shmmni | awk '{print $2}') if [ ${SHMMNI} -lt 512 ] then        echo "[FAILED] Information: El parametro shmmni con valor actual ${SHMMNI} debe tener una valor superior a 512" else        echo "[OK] Information: El parametro shmmni con valor actual ${SHMMNI} debe tener una valor superior a 512" fi     SHMSEG=$(${KCTUNE} | grep shmseg | awk '{print $2}') if [ ${SHMSEG} -lt 120 ] then        echo "[FAILED] Information: El parametro shmseg con valor actual ${SHMSEG} debe tener una valor superior a 120" else        echo "[OK] Information: El parametro shmseg con valor actual ${SHMSEG} debe tener una valor superior a 120" fi   VPS_CEILING=$(${KCTUNE} | grep vps_ceiling | awk '{print $2}') if [ ${VPS_CEILING} -lt 64 ] then        echo "[FAILED] Information: El parametro vps_ceiling con valor actual ${VPS_CEILING} debe tener una valor superior a 64" else        echo "[OK] Information: El parametro vps_ceiling con valor actual ${VPS_CEILING} debe tener una valor superior a 64" fi   SHMMAX=$(${KCTUNE} | grep shmmax | awk '{print $2}') if [ ${SHMMAX} -lt ${MEM_TOTAL} ] then         echo "[FAILED] Information: El parametro shmmax con valor actual ${SHMMAX} debe tener una valor superior a ${MEM_TOTAL}" else         echo "[OK] Information: El parametro shmmax con valor actual ${SHMMAX} debe tener una valor superior a ${MEM_TOTAL}" fi exit 0  

    Read the article

  • Checking out the Helios IIS Owin Web Server Host

    - by Rick Strahl
    During last week's MVP summit Microsoft showed a new light weight, Owin host called Helios, that can run directly on the IIS core without using the ASP.NET Runtime. It's light weight and fast, and offers a glimpse into where Microsoft is heading for building a more nimble and componentized runtime that is bound to be more flexible and agile. In this post I describe how to set up Helios to play around with and some of the implications it brings.

    Read the article

  • Checking if your SIMPLE databases need a log backup

    - by Fatherjack
    Hopefully you have read the blog by William Durkin explaining why your SIMPLE databases need a log backup in some cases. There is a SQL Server bug that means in some cases databases are marked as being in SIMPLE RECOVERY but have a log wait type that shows they are not properly configured. Please read his blog for the full explanation and a great description of how to reproduce the issue. As part of our (William happens to be my Boss) work to recover our affected databases I wrote this small PowerShell script to quickly check our servers for databases that needed the attention that William details.  cls $Servers = “Server01″,”Server02″,”etc”,”etc” foreach($Server in $Servers){ write-host “************” $server “****************”     $server = New-Object Microsoft.sqlserver.management.smo.server $Server     foreach($db in $Server.databases){         $db | where {$_.RecoveryModel -eq “Simple” -and $_.logreusewaitstatus -ne “nothing”} | select name, LogReuseWaitStatus     } } If you get any results from this query then you should consult Williams blog for the details on what action you should take. This script does give out false positives if in some circumstances depending on how busy your databases are. Hopefully this will let you check your servers quickly and if you find any problems you can reference Williams blog to understand what you need to do.

    Read the article

  • "Serious errors found HF checking the drive for /home" After Moving /home to external HFSplus partition

    - by Arctic Shadow
    I just installed Mac OS X 10.7 "Lion" and Ubuntu 11.10 on my MacBook Pro. Using these instructions: tuxation.com/creating-home-partition-mac-linux.html . After changing the location of my home folder to the new location, it gives me the error in the title, and my username no longer appears in the login screen. Using the "Other" option with my username seems to make it try to log in, but the screen quickly flashes between blank and a shell before kicking me back to the login screen without notice. I'm trying to share my home folder between Mac OS X and Ubuntu, using an hfsplus partition (unjournaled) between the two. The home partition seems to mount fine as /home, and I am able to modify it under Ubuntu. Below is the line I've added to fstab: /dev/sda3 /home hfsplus defaults 0 1 I should also note that I changed my account's username and home directory location to match this, though I've double checked that and everything seems in order there... Thank you in advance for any assistance. Edit: It seems that the /etc/passwd file didn't have my new home directory's location in it, so I changed that, and I am now able to log into my account, although I am still not listed in the login screen, and my username in the menu on the top right shows up as "[Invalid UTF-8]"...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >