Search Results

Search found 3195 results on 128 pages for 'tip and tricks'.

Page 49/128 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Finding matching columns in excel

    - by fakaff
    I've never used excel before so I need the simplest solution available, and this is a work assignment due this week so I didn't have time read much of the documentation. Basically, I have two tables, A and B, and they are both thousands of rows long. Description of my task: right now (since I don't know better) I'm manually doing this: Go to row i in table B. Select entries in columns B(a, b, c) of that same row. Look for a row in table A where column A(b) matches row B(a). Paste the entries of columns B(a) of row i at the end of the row found in the last step. Repeat for row i + 1. Example: row B(cat, dog, mouse) matches A(mammal, cat, Mr. Whiskers). So I would paste B after A and have A(mammal, cat, Mr. Whiskers, cat, dog, mouse). Note: I am not joining tables. I am merely extending table A by pasting row A(b) if row A(b) matches row B(a). Also, sometimes entries are spelled slightly differently. Using wildcards to search for candidates would be of help. As the description should let on, this task is very tedious and inefficient if I don't know how to automate some operations (there are thousands of entries). Any quick tips as to how to be more productive is a big help.

    Read the article

  • Indenting an x number of lines in vim

    - by Mack Stump
    I've been coding in Java for a job recently and I've noticed that I'll write some code and then determine that I need to wrap the code in a try/catch block. I've just been moving to the beginning of a line and adding a tab. 0 i <tab> <esc> k (repeat process until at beginning or end of block) Now this was fine the first three or four times I had to indent but now it's just become tedious and I'm a lazy person. Could someone suggest an easier way I could deal with this problem?

    Read the article

  • Oracle automatic patch download

    - by watain
    I need to update/patch the firmware of a lot of Sun/Oracle systems quite frequently. To do that I first need to download the latest firmware snapshot by hand from Oracle's saggy and unsophisticated "My Oracle Support" (list of all firmware snapshots can be found at http://www.oracle.com/technetwork/systems/patches/firmware/release-history-jsp-138416.html). Now I wondered whether there is a known way to automate the download of all the latest patches, maybe using a script. Kind regards

    Read the article

  • Rotate triangle so that its tip points in the direction of the point on the screen that we last touched

    - by Sid
    OpenGL ES - Android. Hello all, I am unable to rotate the triangle accordingly in such a way that its tip always points to my finger. What i did : Constructed a triangle in by GL.GL_TRIANGLES. Added touch events to it. I can rotate the triangle along my Z-axis successfully. Even made the vector class for it. What i need : Each time when I touch the screen, I want to rotate the triangle to face the touch point. Need some help. Here's what i implemented. I wonder that where i am going wrong? My code : public class Graphic2DTriangle { private FloatBuffer vertexBuffer; private ByteBuffer indexBuffer; private float[] vertices = { -1.0f,-1.0f, 0.0f, 2.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f }; private byte[] indices = { 0, 1, 2 }; public Graphic2DTriangle() { ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4); vbb.order(ByteOrder.nativeOrder()); // Use native byte order vertexBuffer = vbb.asFloatBuffer(); // Convert byte buffer to float vertexBuffer.put(vertices); // Copy data into buffer vertexBuffer.position(0); // Rewind // Setup index-array buffer. Indices in byte. indexBuffer = ByteBuffer.allocateDirect(indices.length); indexBuffer.put(indices); indexBuffer.position(0); } public void draw(GL10 gl) { gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer); gl.glDrawElements(GL10.GL_TRIANGLES, indices.length, GL10.GL_UNSIGNED_BYTE, indexBuffer); gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); } } My SurfaceView class where i've done some Touch Events. public class BallThrowGLSurfaceView extends GLSurfaceView{ MySquareRender _renderObj; View _viewObj; float oldX,oldY,dX,dY; final float TOUCH_SCALE_FACTOR = 0.6f; Vector2 touchPos = new Vector2(); float angle=0; public BallThrowGLSurfaceView(Context context) { super(context); // TODO Auto-generated constructor stub _renderObj = new MySquareRender(context); this.setRenderer(_renderObj); this.setRenderMode(RENDERMODE_WHEN_DIRTY); } @Override public boolean onTouchEvent(MotionEvent event) { // TODO Auto-generated method stub touchPos.x = event.getX(); touchPos.y = event.getY(); Log.i("Co-ord", touchPos.x+"hh"+touchPos.y); switch(event.getAction()){ case MotionEvent.ACTION_MOVE : dX = touchPos.x - oldX; dY = touchPos.y - oldY; if(touchPos.y > getHeight()/2){ dX = dX*-1; } if(touchPos.x < getWidth()/2){ dY = dY*-1; } _renderObj.mAngle += (dX+dY) * TOUCH_SCALE_FACTOR; requestRender(); Log.i("AngleCo-ord", _renderObj.mAngle +"hh"); } oldX = touchPos.x; oldY = touchPos.y; Log.i("OldCo-ord", oldX+" hh "+oldY); return true; } } Last but not the least. My vector2 class. public class Vector2 { public static float TO_RADIANS = (1 / 180.0f) * (float) Math.PI; public static float TO_DEGREES = (1 / (float) Math.PI) * 180; public float x, y; public Vector2() { } public Vector2(float x, float y) { this.x = x; this.y = y; } public Vector2(Vector2 other) { this.x = other.x; this.y = other.y; } public Vector2 cpy() { return new Vector2(x, y); } public Vector2 set(float x, float y) { this.x = x; this.y = y; return this; } public Vector2 set(Vector2 other) { this.x = other.x; this.y = other.y; return this; } public Vector2 add(float x, float y) { this.x += x; this.y += y; return this; } public Vector2 add(Vector2 other) { this.x += other.x; this.y += other.y; return this; } public Vector2 sub(float x, float y) { this.x -= x; this.y -= y; return this; } public Vector2 sub(Vector2 other) { this.x -= other.x; this.y -= other.y; return this; } public Vector2 mul(float scalar) { this.x *= scalar; this.y *= scalar; return this; } public float len() { return FloatMath.sqrt(x * x + y * y); } public Vector2 nor() { float len = len(); if (len != 0) { this.x /= len; this.y /= len; } return this; } public float angle() { float angle = (float) Math.atan2(y, x) * TO_DEGREES; if (angle < 0) angle += 360; return angle; } public Vector2 rotate(float angle) { float rad = angle * TO_RADIANS; float cos = FloatMath.cos(rad); float sin = FloatMath.sin(rad); float newX = this.x * cos - this.y * sin; float newY = this.x * sin + this.y * cos; this.x = newX; this.y = newY; return this; } public float dist(Vector2 other) { float distX = this.x - other.x; float distY = this.y - other.y; return FloatMath.sqrt(distX * distX + distY * distY); } public float dist(float x, float y) { float distX = this.x - x; float distY = this.y - y; return FloatMath.sqrt(distX * distX + distY * distY); } public float distSquared(Vector2 other) { float distX = this.x - other.x; float distY = this.y - other.y; return distX * distX + distY * distY; } public float distSquared(float x, float y) { float distX = this.x - x; float distY = this.y - y; return distX * distX + distY * distY; } } PS : i am able to handle the touch events. I can rotate the triangle with the touch of my finger. But i want that ONE VERTEX of the triangle should point at my finger position respective of the position of my finger.

    Read the article

  • Performance optimization strategies of last resort?

    - by jerryjvl
    There are plenty of performance questions on this site already, but it occurs to me that almost all are very problem-specific and fairly narrow. And almost all repeat the advice to avoid premature optimization. Let's assume: the code already is working correctly the algorithms chosen are already optimal for the circumstances of the problem the code has been measured, and the offending routines have been isolated all attempts to optimize will also be measured to ensure they do not make matters worse What I am looking for here is strategies and tricks to squeeze out up to the last few percent in a critical algorithm when there is nothing else left to do but whatever it takes. Ideally, try to make answers language agnostic, and indicate any down-sides to the suggested strategies where applicable. I'll add a reply with my own initial suggestions, and look forward to whatever else the SO community can think of.

    Read the article

  • Hidden Features and Dark Corners of STL?

    - by Andrei
    C++ developers, all know the basics of C++: Declarations, conditionals, loops, operators, etc. Some of us even mastered the stuff like templates, object model, complex I/O, etc. But what are the most hidden features or tricks or dark corners of C++/STL that even C++ fans, addicts, and experts barely know? I am talking about a seasoned C++ programmer (be she/he a developer, student, fan, all three, etc), who thinks (s)he knows something 99% of us never heard or dreamed about. Something that not only makes his/her work easier, but also cool and hackish. After all, C++ is one of the most used programming languages in the world, thus it should have intricacies that only a few privileged know about and want to share with us. Boost is welcome too! One per post with an example please P.S Examples are important for other developers to copy and paste!

    Read the article

  • What is the most useful R trick?

    - by Dirk Eddelbuettel
    In order to share some more tips and tricks for R, what is you single-most useful feature or trick? Clever vectorization? Data input/output? Visualization and graphics? Statistical analysis? Special functions? The interactive environment itself? One item per post, and we will see if we get a winner by means of votes. [Edit 25-Aug 2008]: So after one week, it seems that the simple str() won the poll. As I like to recommend that one myself, it is an easy answer to accept.

    Read the article

  • Entity Framework v1 &ndash; tips and Tricks Part 3

    - by Rohit Gupta
    General Tips on Entity Framework v1 & Linq to Entities: ToTraceString() If you need to know the underlying SQL that the EF generates for a Linq To Entities query, then use the ToTraceString() method of the ObjectQuery class. (or use LINQPAD) Note that you need to cast the LINQToEntities query to ObjectQuery before calling TotraceString() as follows: 1: string efSQL = ((ObjectQuery)from c in ctx.Contact 2: where c.Address.Any(a => a.CountryRegion == "US") 3: select c.ContactID).ToTraceString(); ================================================================================ MARS or MultipleActiveResultSet When you create a EDM Model (EDMX file) from the database using Visual Studio, it generates a connection string with the same name as the name of the EntityContainer in CSDL. In the ConnectionString so generated it sets the MultipleActiveResultSet attribute to true by default. So if you are running the following query then it streams multiple readers over the same connection: 1: using (BAEntities context = new BAEntities()) 2: { 3: var cons = 4: from con in context.Contacts 5: where con.FirstName == "Jose" 6: select con; 7: foreach (var c in cons) 8: { 9: if (c.AddDate < new System.DateTime(2007, 1, 1)) 10: { 11: c.Addresses.Load(); 12: } 13: } 14: } ================================================================================= Explicitly opening and closing EntityConnection When you call ToList() or foreach on a LINQToEntities query the EF automatically closes the connection after all the records from the query have been consumed. Thus if you need to run many LINQToEntities queries over the same connection then explicitly open and close the connection as follows: 1: using (BAEntities context = new BAEntities()) 2: { 3: context.Connection.Open(); 4: var cons = from con in context.Contacts where con.FirstName == "Jose" 5: select con; 6: var conList = cons.ToList(); 7: var allCustomers = from con in context.Contacts.OfType<Customer>() 8: select con; 9: var allcustList = allCustomers.ToList(); 10: context.Connection.Close(); 11: } ====================================================================== Dispose ObjectContext only if required After you retrieve entities using the ObjectContext and you are not explicitly disposing the ObjectContext then insure that your code does consume all the records from the LinqToEntities query by calling .ToList() or foreach statement, otherwise the the database connection will remain open and will be closed by the garbage collector when it gets to dispose the ObjectContext. Secondly if you are making updates to the entities retrieved using LinqToEntities then insure that you dont inadverdently dispose of the ObjectContext after the entities are retrieved and before calling .SaveChanges() since you need the SAME ObjectContext to keep track of changes made to the Entities (by using ObjectStateEntry objects). So if you do need to explicitly dispose of the ObjectContext do so only after calling SaveChanges() and only if you dont need to change track the entities retrieved any further. ======================================================================= SQL InjectionAttacks under control with EFv1 LinqToEntities and LinqToSQL queries are parameterized before they are sent to the DB hence they are not vulnerable to SQL Injection attacks. EntitySQL may be slightly vulnerable to attacks since it does not use parameterized queries. However since the EntitySQL demands that the query be valid Entity SQL syntax and valid native SQL syntax at the same time. So the only way one can do a SQLInjection Attack is by knowing the SSDL of the EDM Model and be able to write the correct EntitySQL (note one cannot append regular SQL since then the query wont be a valid EntitySQL syntax) and append it to a parameter. ====================================================================== Improving Performance You can convert the EntitySets and AssociationSets in a EDM Model into precompiled Views using the edmgen utility. for e.g. the Customer Entity can be converted into a precompiled view using edmgen and all LinqToEntities query against the contaxt.Customer EntitySet will use the precompiled View instead of the EntitySet itself (the same being true for relationships (EntityReference & EntityCollections of a Entity)). The advantage being that when using precompiled views the performance will be much better. The syntax for generating precompiled views for a existing EF project is : edmgen /mode:ViewGeneration /inssdl:BAModel.ssdl /incsdl:BAModel.csdl /inmsl:BAModel.msl /p:Chap14.csproj Note that this will only generate precompiled views for EntitySets and Associations and not for existing LinqToEntities queries in the project.(for that use CompiledQuery.Compile<>) Secondly if you have a LinqToEntities query that you need to run multiple times, then one should precompile the query using CompiledQuery.Compile method. The CompiledQuery.Compile<> method accepts a lamda expression as a parameter, which denotes the LinqToEntities query  that you need to precompile. The following is a example of a lamda that we can pass into the CompiledQuery.Compile() method 1: Expression<Func<BAEntities, string, IQueryable<Customer>>> expr = (BAEntities ctx1, string loc) => 2: from c in ctx1.Contacts.OfType<Customer>() 3: where c.Reservations.Any(r => r.Trip.Destination.DestinationName == loc) 4: select c; Then we call the Compile Query as follows: 1: var query = CompiledQuery.Compile<BAEntities, string, IQueryable<Customer>>(expr); 2:  3: using (BAEntities ctx = new BAEntities()) 4: { 5: var loc = "Malta"; 6: IQueryable<Customer> custs = query.Invoke(ctx, loc); 7: var custlist = custs.ToList(); 8: foreach (var item in custlist) 9: { 10: Console.WriteLine(item.FullName); 11: } 12: } Note that if you created a ObjectQuery or a Enitity SQL query instead of the LINQToEntities query, you dont need precompilation for e.g. 1: An Example of EntitySQL query : 2: string esql = "SELECT VALUE c from Contacts AS c where c is of(BAGA.Customer) and c.LastName = 'Gupta'"; 3: ObjectQuery<Customer> custs = CreateQuery<Customer>(esql); 1: An Example of ObjectQuery built using ObjectBuilder methods: 2: from c in Contacts.OfType<Customer>().Where("it.LastName == 'Gupta'") 3: select c This is since the Query plan is cached and thus the performance improves a bit, however since the ObjectQuery or EntitySQL query still needs to materialize the results into Entities hence it will take the same amount of performance hit as with LinqToEntities. However note that not ALL EntitySQL based or QueryBuilder based ObjectQuery plans are cached. So if you are in doubt always create a LinqToEntities compiled query and use that instead ============================================================ GetObjectStateEntry Versus GetObjectByKey We can get to the Entity being referenced by the ObjectStateEntry via its Entity property and there are helper methods in the ObjectStateManager (osm.TryGetObjectStateEntry) to get the ObjectStateEntry for a entity (for which we know the EntityKey). Similarly The ObjectContext has helper methods to get an Entity i.e. TryGetObjectByKey(). TryGetObjectByKey() uses GetObjectStateEntry method under the covers to find the object, however One important difference between these 2 methods is that TryGetObjectByKey queries the database if it is unable to find the object in the context, whereas TryGetObjectStateEntry only looks in the context for existing entries. It will not make a trip to the database ============================================================= POCO objects with EFv1: To create POCO objects that can be used with EFv1. We need to implement 3 key interfaces: IEntityWithKey IEntityWithRelationships IEntityWithChangeTracker Implementing IEntityWithKey is not mandatory, but if you dont then we need to explicitly provide values for the EntityKey for various functions (for e.g. the functions needed to implement IEntityWithChangeTracker and IEntityWithRelationships). Implementation of IEntityWithKey involves exposing a property named EntityKey which returns a EntityKey object. Implementation of IEntityWithChangeTracker involves implementing a method named SetChangeTracker since there can be multiple changetrackers (Object Contexts) existing in memory at the same time. 1: public void SetChangeTracker(IEntityChangeTracker changeTracker) 2: { 3: _changeTracker = changeTracker; 4: } Additionally each property in the POCO object needs to notify the changetracker (objContext) that it is updating itself by calling the EntityMemberChanged and EntityMemberChanging methods on the changeTracker. for e.g.: 1: public EntityKey EntityKey 2: { 3: get { return _entityKey; } 4: set 5: { 6: if (_changeTracker != null) 7: { 8: _changeTracker.EntityMemberChanging("EntityKey"); 9: _entityKey = value; 10: _changeTracker.EntityMemberChanged("EntityKey"); 11: } 12: else 13: _entityKey = value; 14: } 15: } 16: ===================== Custom Property ==================================== 17:  18: [EdmScalarPropertyAttribute(IsNullable = false)] 19: public System.DateTime OrderDate 20: { 21: get { return _orderDate; } 22: set 23: { 24: if (_changeTracker != null) 25: { 26: _changeTracker.EntityMemberChanging("OrderDate"); 27: _orderDate = value; 28: _changeTracker.EntityMemberChanged("OrderDate"); 29: } 30: else 31: _orderDate = value; 32: } 33: } Finally you also need to create the EntityState property as follows: 1: public EntityState EntityState 2: { 3: get { return _changeTracker.EntityState; } 4: } The IEntityWithRelationships involves creating a property that returns RelationshipManager object: 1: public RelationshipManager RelationshipManager 2: { 3: get 4: { 5: if (_relManager == null) 6: _relManager = RelationshipManager.Create(this); 7: return _relManager; 8: } 9: } ============================================================ Tip : ProviderManifestToken – change EDMX File to use SQL 2008 instead of SQL 2005 To use with SQL Server 2008, edit the EDMX file (the raw XML) changing the ProviderManifestToken in the SSDL attributes from "2005" to "2008" ============================================================= With EFv1 we cannot use Structs to replace a anonymous Type while doing projections in a LINQ to Entities query. While the same is supported with LINQToSQL, it is not with LinqToEntities. For e.g. the following is not supported with LinqToEntities since only parameterless constructors and initializers are supported in LINQ to Entities. (the same works with LINQToSQL) 1: public struct CompanyInfo 2: { 3: public int ID { get; set; } 4: public string Name { get; set; } 5: } 6: var companies = (from c in dc.Companies 7: where c.CompanyIcon == null 8: select new CompanyInfo { Name = c.CompanyName, ID = c.CompanyId }).ToList(); ;

    Read the article

  • How to access hidden template in unnamed namespace?

    - by Johannes Schaub - litb
    Here is a tricky situation, and i wonder what ways there are to solve it namespace { template <class T> struct Template { /* ... */ }; } typedef Template<int> Template; Sadly, the Template typedef interferes with the Template template in the unnamed namespace. When you try to do Template<float> in the global scope, the compiler raises an ambiguity error between the template name and the typedef name. You don't have control over either the template name or the typedef-name. Now I want to know whether it is possible to: Create an object of the typedefed type Template (i.e Template<int>) in the global namespace. Create an object of the type Template<float> in the global namespace. You are not allowed to add anything to the unnamed namespace. Everything should be done in the global namespace. This is out of curiosity because i was wondering what tricks there are for solving such an ambiguity. It's not a practical problem i hit during daily programming.

    Read the article

  • What is the most obfuscated and clever code you've seen? [closed]

    - by ThibThib
    I am aware about the The International Obfuscated C Code Contest, but I am looking for obfuscated AND clever codes (specially short ones) Here is two examples (the first one is a classical one, I think) #define _ F-->00 || F-OO--; long F=00,OO=00; main(){F_OO();printf("%1.3f\n", 4.*-F/OO/OO);}F_OO() { _-_-_-_ _-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_ _-_-_-_ } and #include <unistd.h> float o=0.075,h=1.5,T,r,O,l,I;int _,L=80,s=3200;main(){for(;s%L|| (h-=o,T= -2),s;4 -(r=O*O)<(l=I*I)|++ _==L&&write(1,(--s%L?_<L?--_ %6:6:7)+"World! \n",1)&&(O=I=l=_=r=0,T+=o /2))O=I*2*O+h,I=l+T-r;} I let you compile and run them so as to understand what they are producing. Of course, I am not looking for only obfuscated code, because I guess that every code could be transformed in a way that it is not readable at all I am more looking for small codes that you can eventually understand, with some clever tricks. I will show them to my students as example of clever things that they should not do (it's always better to show clever examples rather than stupid ones...) Thanks

    Read the article

  • Show/hide using jQuery cookies

    - by Dilwin
    So I've created a simple tip box that fades in on page load, with an option to close the box. I'm trying to make the box hidden if the visitor clicks the close link. I'm fairly new to cookies, so I'm probably doing it all wrong, but this is what I have: $('#close').click(function(e) { jQuery.cookie('tip', 'hide', cookieOpts); $(this).parent('div.tip').fadeOut(1000); e.preventDefault(); }); jQuery.cookie('tip', 'show', cookieOpts); $('.tip').delay(500).fadeIn(1000); var shouldShow = jQuery.cookie('tip') == 'show'; var cookieOpts = {expires: 7, path: '/'}; if( shouldShow ) { $('.tip').delay(500).fadeIn(1000); } else { $('.tip').css('display', 'none'); }

    Read the article

  • Store data in tableview to NSUserDefaults

    - by Jozef Vrana
    Tricks.h file #import "Tricks.h" @implementation Tricks static NSMutableArray *trickList = nil; +(NSMutableArray *)trickList { if(!trickList){ trickList = [[NSMutableArray alloc]init]; } return trickList; } @end Tricks.m file @interface Tricks : NSObject @property(strong, nonatomic) NSString *trickName; Method for adding objects to array -(IBAction)saveAction:(id)sender { Tricks *trick = [[Tricks alloc]init]; trick.trickName = self.trickLabel.text; [[Tricks trickList]insertObject:trick atIndex:0]; [self.navigationController popViewControllerAnimated:YES]; } In .h file of UITabelview class I am making a reference to tricks class, but I am sure there is error on this line. @property (strong, nonatomic) Tricks *tricks; In cellForRow method I am storing data _trick = [[NSMutableDictionary alloc]initWithObjectsAndKeys:trick,nil]; NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults]; [defaults setObject:_trick forKey:@"numberArray"]; [defaults synchronize]; NSLog(@"%@",_trick); In .m class of UITableview in viewDidLoad I want to retrieve data if([[NSUserDefaults standardUserDefaults] objectForKey:@"numberArray"] != nil) { _tricks = [[NSUserDefaults standardUserDefaults] objectForKey:@"numberArray"]; } Thanks for advices

    Read the article

  • WebLogic Scripting Tool Tip &ndash; relax the syntax with the easy button

    - by james.bayer
    I stumbled on to this feature in WLST tonight called easeSyntax.  Apparently it’s a hidden feature that one of the WebLogic support engineers blogged about that allows you to simplify the commands in the interactive mode to have fewer parentheses and quotes.  For example, see how some of the commands instead of typing “ls()” I can type '”ls” or “cd(“/somepath”)” can become “cd /somepath”.  It’s not going to save the world, but it will help cut down on some extra typing. The example I was researching when stumbling into this was for how to print the runtime status of deployed application named “hello” on the “AdminServer”.  See the below output. wls:/base_domain/domainConfig> easeSyntax()   You have chosen to ease syntax for some WLST commands. However, the easy syntax should be strictly used in interactive mode. Easy syntax will not function properly in script mode and when used in loops. You can still use the regular jython syntax although you have opted for easy syntax. Use easeSyntax to turn this off. Use help(easeSyntax) for commands that support easy syntax wls:/base_domain/domainConfig> domainRuntime   wls:/base_domain/domainRuntime> ls dr-- AppRuntimeStateRuntime dr-- CoherenceServerLifeCycleRuntimes dr-- ConsoleRuntime dr-- DeployerRuntime dr-- DeploymentManager dr-- DomainServices dr-- LogRuntime dr-- MessageDrivenControlEJBRuntime dr-- MigratableServiceCoordinatorRuntime dr-- MigrationDataRuntimes dr-- PolicySubjectManagerRuntime dr-- SNMPAgentRuntime dr-- ServerLifeCycleRuntimes dr-- ServerRuntimes dr-- ServerServices dr-- ServiceMigrationDataRuntimes   -r-- ActivationTime Wed Dec 15 22:37:02 PST 2010 -r-- MessageDrivenControlEJBRuntime null -r-- MigrationDataRuntimes null -r-- Name base_domain -rw- Parent null -r-- ServiceMigrationDataRuntimes null -r-- Type DomainRuntime   -r-x preDeregister Void : -r-x restartSystemResource Void : WebLogicMBean(weblogic.management.configuration.SystemResourceMBean)   wls:/base_domain/domainRuntime> cd AppRuntimeStateRuntime/AppRuntimeStateRuntime wls:/base_domain/domainRuntime/AppRuntimeStateRuntime/AppRuntimeStateRuntime> ls   -r-- ApplicationIds java.lang.String[active-cache#[email protected], coherence-web-spi#[email protected], coherence#3. -r-- Name AppRuntimeStateRuntime -r-- Type AppRuntimeStateRuntime   -r-x getCurrentState String : String(appid),String(moduleid),String(subModuleId),String(target) -r-x getCurrentState String : String(appid),String(moduleid),String(target) -r-x getCurrentState String : String(appid),String(target) -r-x getIntendedState String : String(appid) -r-x getIntendedState String : String(appid),String(target) -r-x getModuleIds String[] : String(appid) -r-x getModuleTargets String[] : String(appid),String(moduleid) -r-x getModuleTargets String[] : String(appid),String(moduleid),String(subModuleId) -r-x getModuleType String : String(appid),String(moduleid) -r-x getRetireTimeMillis Long : String(appid) -r-x getRetireTimeoutSeconds Integer : String(appid) -r-x getSubmoduleIds String[] : String(appid),String(moduleid) -r-x isActiveVersion Boolean : String(appid) -r-x isAdminMode Boolean : String(appid),String(java.lang.String) -r-x preDeregister Void :   wls:/base_domain/domainRuntime/AppRuntimeStateRuntime/AppRuntimeStateRuntime> cmo.getCurrentState('hello','AdminServer') 'STATE_ACTIVE' wls:/base_domain/domainRuntime/AppRuntimeStateRuntime/AppRuntimeStateRuntime> cd / wls:/base_domain/domainRuntime>

    Read the article

  • Online video tutorials for HTML 5

    - by Albers
    Here are some of the best introductory HTML5 videos I have found online/for free. Mix 2011: HTML5 for Skeptics - Scott Stansfield channel9.msdn.com/Events/MIX/MIX11/EXT21 Filling the HTML5 Gaps with Polyfills and Shims - Ray Bango channel9.msdn.com/Events/MIX/MIX11/HTM04 50 Performance Tricks to Make Your HTML5 Web Sites Faster - Jason Weber channel9.msdn.com/Events/MIX/MIX11/HTM01 TechEd 2011 HTML5 and CSS3 Techniques You Can Use Today - Todd Anglin channel9.msdn.com/Events/TechEd/NorthAmerica/2011/DEV334 Google IO HTML5 Showcase for Web Developers: The Wow and the How www.youtube.com/watch?v=WlwY6_W4VG8 css-tricks localStorage for Forms - Chris Coyier css-tricks.com/video-screencasts/96-localstorage-for-forms/ Best Practices with Dynamic Content - Chris Coyier This one talks about Hash Tags - take a look at the History API too css-tricks.com/video-screencasts/85-best-practices-dynamic-content/ localStorage for Forms - Chris Coyier css-tricks.com/video-screencasts/96-localstorage-for-forms/ Overview of HTML5 Forms Types, Attributes, and Elements - Chris Coyier css-tricks.com/video-screencasts/99-overview-of-html5-forms-types-attributes-and-elements/ Bruce Lawson - HTML5: Who, What, When, Why www.ubelly.com/2011/10/bruce-lawson-html5-who-what-when-why/ Bruce Lawson is an evangelist for Opera, and in this video he provides an overview including the history & philosophy of HTML5.

    Read the article

  • Today’s Performance Tip: Views are for Convenience, Not Performance!

    - by Jonathan Kehayias
    I tweeted this last week on twitter and got a lot of retweets so I thought that I’d blog the story behind the tweet. Most vendor databases have views in them, and when people want to retrieve data from a database, it seems like the most common first stop they make are the vendor supplied Views.  This post is in no way a bash against the usage or creation of Views in a SQL Server Database, I have created them before to simplify code and compartmentalize commonly required queries so that there...(read more)

    Read the article

  • Tips &amp; Tricks: How to crawl a SSL enabled Oracle E-Business Suite

    - by Rajesh Ghosh
    Oracle E-Business Suite can be integrated with Oracle Secure Enterprise Search for a superior end user experience and enhanced data retrieval capabilities. Before end-users can perform search operations, data has to be crawled and indexed into Oracle SES server. However if the Oracle E-Business Suite instance is on SSL, some additional configurations are needed in Oracle SES server as well as in Oracle Search Modeler, before a search object can be deployed and crawled. The process involves the following steps: Step 1: Export the SSL certificate of Oracle E-Business Suite Access the Oracle E-business Suite instance from a web browser. You should be able to locate a security or certificate icon somewhere in the browser toolbar or status bar, depending on which browser you are using. Click on it and you should be able to view the certificate as well as export it to a local file. While exporting make sure that you use “DER encoded” format. Step 2: Import the SSL certificate into Oracle Secure Enterprise server’s java key-store Oracle SES (10.1.8.4) by default ships a JDK under $ORACLE_HOME. The Oracle SES mid-tier uses this jdk to start the oc4j container services. In this step the Oracle E-Business Suite’s SSL certificate which has been exported in step #1, has to be imported into the Oracle SES server’s java key store. Perform the following: Copy the certificate file onto the server where Oracle SES server is running; under $ORACLE_HOME/jdk/jre/lib/security/cacerts. “ORACLE_HOME” points to the Oracle SES oracle home. Set the JAVA_HOME environment variable to $ORACLE_HOME/jdk. Append $JAVA_HOME/bin to the PATH environment variable Issue the command :  “keytool -import -keystore keystore.jks -trustcacerts -alias myOHS –file ebs.crt” . Please substitute “ebs.crt” with the name of the certificate file you copied in step #2.1. The default key-store password “changeit”. Enter the same when prompted. If successful this process will end with a message saying “certificate successfully imported”. Step 3: Import the SSL certificate into Search Modeler java key-store Unlike Oracle SES, Search Modeler is not shipped with a bundled JDK. If you are using standalone OC4J, then you actually use an external JDK to start the oc4j container services. If you are using IAS instance then the JDK comes bundled with the IAS installation. Perform the following: Copy the certificate file onto the server where Search Modeler application is running; under $JDK_HOME/jre/lib/security/cacerts. “JDK_HOME” points to the JDK directory depending on whether you are using external JDK or a bundled one. Set the JAVA_HOME environment variable to JDK directory. Append $JAVA_HOME/bin to the PATH environment variable Issue the command :  “keytool -import -keystore keystore.jks -trustcacerts -alias myOHS –file ebs.crt” . Please substitute “ebs.crt” with the name of the certificate file you copied in step #3.1. The default key-store password “changeit”. Enter the same when prompted. If successful this process will end with a message saying “certificate successfully imported”. Once you have completed the above steps successfully, you can deploy the search objects using Search Modeler and then start crawling them as well.

    Read the article

  • Whats a good way to do Collision with 2D Rectangles? can someone give me a tip?

    - by Javier
    using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; namespace BreakOut { class Field { public static Field generateField() { List<Block> blocks = new List<Block>(); for (int j = 0; j < BlockType.BLOCK_TYPES.Length; j++) for (int i = 0; i < (Game1.WIDTH / Block.WIDTH); i++) { Block b = new Block(BlockType.BLOCK_TYPES[j], new Vector2(i * Block.WIDTH, (Block.HEIGHT + 2) * j + 5)); blocks.Add(b); } return new Field(blocks); } List<Block> blocks; public Field(List<Block> blocks) { this.blocks = blocks; } public void Update(GameTime gameTime, Ball b) { List<Block> removals = new List<Block>(); foreach (Block o in blocks) { if (o.BoundingBox.Intersects(new Rectangle((int)b.pos.X, (int)b.pos.Y, Ball.WIDTH, Ball.HEIGHT))) //collision with blocks { removals.Add(o); } } foreach(Block o in removals) blocks.Remove(o); //removes the blocks, but i need help hitting one at a time } public void Draw(GameTime gameTime) { foreach (Block b in blocks) b.Draw(gameTime); } } } My problem is that My collision in this sucks. I'm trying to add collision with a ball and hitting against a block and then one of the blocks dissapear. The problem i'm having is: When the ball hits the block, it removes it all in one instance. Please people don't be mean and say mean answers to me, im just in highschool, still a nooby and trying to learn more c#/XNA..

    Read the article

  • VS2010 tip: Cannot find the HttpUtility on .NET 4.0?

    Now that Visual Studio 2010 is here with more options and better colors, there are a few things that have changed a little and might confused you a bit. For example the good HttpUtility, if you are creating a Windows Console application or a Windows Service and you want to use that awesome class full of goodies, you would try to go to reference and add System.Web.dll, yet in the list that dll will be missing. So did they removed that dll in .NET 4? Not really, still there however there are not profiles...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • A quick tip for those working with the Windows Phone 7 AD SDK.

    - by mbcrump
    One thing that I’ve noticed in several apps in the Windows Phone 7 marketplace is the ad chopping off on the right hand side. I decided that my next Windows Phone 7 app will be ad supported so why not sign up for the Advertising SDK and investigate this issue. *Note: If you want to see this in an actual app then download the free app called “Road Rage”. So here is an example of what I am talking about: You will notice that the right hand side of the AD is chopped off using the default ad banner. You can see the border on the left hand side clearly. So, what exactly is going on? Let’s take a look at this in the designer. From this image we can see it clearer, the margin of the grid that the ad is contained in needs to be removed. By default, the ContentPanel in a Windows Phone Page has a margin already set on it. See below for an example of this: <!--ContentPanel - place additional content here--> <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> </Grid> If you simply remove that margin then your ad will display properly as shown below. It’s strange that I’ve seen this in multiple WP7 applications in the marketplace. If you are trying to make money off Ads, you would probably want to make sure the full ad is displayed. I am hoping this short post helped someone.   Subscribe to my feed

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >