Search Results

Search found 1016 results on 41 pages for 'ajeet kumar yadav'.

Page 7/41 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Blackberry Development, java.lang.outofmemoryerror

    - by Nikesh Yadav
    Hi Forum, I am new to Blackberry development (I am using Eclipse with Blackberry plug-in), I am trying to read a text file, which I placed in the "src" folder of my Blackberry project and this text file just contain a word "Test". when I run the program, I gets "UncaughtException: java.lang.outofmemoryerror". Here is the code I am using, where "speech.txt" is the file I am trying to read and is placed in the "src" folder - public class SpeechMain extends MainScreen { public SpeechMain() { try { Class myClass = this.getClass(); InputStream is = null; is = myClass.getResourceAsStream("speech.txt"); InputStreamReader isr = new InputStreamReader(is); char c; while ((c = (char)isr.read()) != -1) { add(new LabelField("" + c)); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); add(new LabelField(e.getMessage())); } } } Thanks in advance. Thanks, Nikesh

    Read the article

  • accessing base class's method with derived class's object which has a method of same name.

    - by ashish yadav
    when accessing foo() of "base" using derived class's object. include class base { public: void foo() { std::cout<<"\nHello from foo\n"; } }; class derived : public base { public: void foo(int k) { std::cout<<"\nHello from foo with value = "< } how to access base class method having a method of same name in derived class. the error generated has been shown. i apologize if i am not clear but i feel i have made myself clear as water. thanks in advance.

    Read the article

  • Postgres Stored procedure using iBatis

    - by Om Yadav
    --- The error occurred while applying a parameter map. --- Check the newSubs-InlineParameterMap. --- Check the statement (query failed). --- Cause: org.postgresql.util.PSQLException: ERROR: wrong record type supplied in RETURN NEXT Where: PL/pgSQL function "getnewsubs" line 34 at return next the function detail is as below.... CREATE OR REPLACE FUNCTION getnewsubs(timestamp without time zone, timestamp without time zone, integer) RETURNS SETOF record AS $BODY$declare v_fromdt alias for $1; v_todt alias for $2; v_domno alias for $3; v_cursor refcursor; v_rec record; v_cpno bigint; v_actno int; v_actname varchar(50); v_actid varchar(100); v_cpntypeid varchar(100); v_mrp double precision; v_domname varchar(100); v_usedt timestamp without time zone; v_expirydt timestamp without time zone; v_createdt timestamp without time zone; v_ctno int; v_phone varchar; begin open v_cursor for select cpno,c.actno,usedt from cpnusage c inner join account s on s.actno=c.actno where usedt = $1 and usedt < $2 and validdomstat(s.domno,v_domno) order by c.usedt; fetch v_cursor into v_cpno,v_actno,v_usedt; while found loop if isactivation(v_cpno,v_actno,v_usedt) IS TRUE then select into v_actno,v_actname,v_actid,v_cpntypeid,v_mrp,v_domname,v_ctno,v_cpno,v_usedt,v_expirydt,v_createdt,v_phone a.actno,a.actname as name,a.actid as actid,c.descr as cpntypeid,l.mrp as mrp,s.domname as domname,c.ctno as ctno,b.cpno,b.usedt,b.expirydt,d.createdt,a.phone from account a inner join cpnusage b on a.actno=b.actno inner join cpn d on b.cpno=d.cpno inner join cpntype c on d.ctno=c.ctno inner join ssgdom s on a.domno=s.domno left join price_class l ON l.price_class_id=b.price_class_id where validdomstat(a.domno,v_domno) and b.cpno=v_cpno and b.actno=v_actno; select into v_rec v_actno,v_actname,v_actid,v_cpntypeid,v_mrp,v_domname,v_ctno,v_cpno,v_usedt,v_expirydt,v_createdt,v_phone; return next v_rec; end if; fetch v_cursor into v_cpno,v_actno,v_usedt; end loop; return ; end;$BODY$ LANGUAGE 'plpgsql' VOLATILE; ALTER FUNCTION getnewsubs(timestamp without time zone, timestamp without time zone, integer) OWNER TO radius If i am running the function from the console it is running fine and giving me the correct response. But when using through java causing the above error. Can ay body help in it..Its very urgent. Please response as soon as possible. Thanks in advance.

    Read the article

  • How to take input for a character pointer without using fget?

    - by ashish yadav
    consider the code #include<stdio.h> int main() { char* a; scanf("%s",a);//&a and &a[0] give same results-crashes printf("%s",); return 0; } why does this code results in crashing?whereas this code using character array works fine? #include<stdio.h> int main() { char a[100]; scanf("%s",&a[0]);//works fine printf("%s",a); return 0; } the difference being character array and pointer?but i knew that pointer just points to the first element that is &a[0] should work fine but upper code crashes for all three that is a,&a and &a[0]? the main thing i would to gather is how can i take input of a character pointer if i insist on using scanf only? i apologize if i am not clear. thanks in advance:)

    Read the article

  • what happens when two exceptions occur?

    - by ashish yadav
    what will the operating system and compiler behave when they have two exceptions. And none of them have been caught yet. what type of handler will be called . lets say both the exceptions were of different type. i apologize if i am not clear but i feel i have made myself clear enough. thank you!!!

    Read the article

  • [c]how to take input for a character pionter without using fget?

    - by ashish yadav
    consider the code include int main() {char* a; scanf("%s",a);//&a and &a[0] give same results-crashes printf("%s",); return 0; } why does this code results in crashing?whereas this code using character array works fine? include int main() {char a[100]; scanf("%s",&a[0]);//works fine printf("%s",a); return 0; } the difference being character array and pointer?but i knew that pointer just points to the first element that is &a[0] should work fine but upper code crashes for all three that is a,&a and &a[0]? the main thing i would to gather is how can i take input of a character pointer if i insist on using scanf only? i apologize if i am not clear. thanks in advance:)

    Read the article

  • why does the array doesn't get initialized by global variable , even though it should not?

    - by ashish yadav
    why does the array a does not get initialized by global variable 'size'. include int size=5; int main() { int a[size]={1,2,3,4,5}; printf("%d",a[0]); return 0; } the compilation error is shown as "variable-sized object may not be initialized". according to me the array should get initialized by 'size'. i apologize if i am not clear but i feel i have expressed myself well enough. thank you!!!!!!!!!!!

    Read the article

  • Advance DataGird Header column Drag drop

    - by Atul Yadav
    Hi.. I want to prevent drag drop in some column header . Thanks My code private function _headerShift(evt:IndexChangedEvent):void{ var dg:AdvancedDataGrid= AdvancedDataGrid(evt.currentTarget); var column:AdvancedDataGridColumn = dg.columns[evt.newIndex]; var dropTarget:AdvancedDataGrid = AdvancedDataGrid(evt.currentTarget); if(evt.oldIndex > 3){ evt.stopImmediatePropagation(); evt.preventDefault(); dropTarget.validateNow(); } }

    Read the article

  • Copying 1-D array into 2 -D array

    - by Digvijay Yadav
    I have one two dimensional array and one single dimensional array. The two dimensional array is of NxM size. And the one dimensional array is of size N x M means it has N X M elements. Now I want to copy all the elements of the one dimensional array into the 2-D array. This is what I tried for(i = 0; i < M; i += 1) { for(j = 0; j < N; j += 1) { arr2d[i][j] = arr2d[(i*j +j)]; } } But not working Any suggestions???

    Read the article

  • Use nested static class as ActionListener for the Outer class

    - by Digvijay Yadav
    I want to use an nested static class as an actionListener for the enclosing class's GUI elements. I did something like this: public class OuterClass { public static void myImplementation() { OuterClass.StartupHandler startupHandler = new OuterClass.StartupHandler(); exitMenuItem.addActionListener(startupHandler); // error Line } public static class StartupHandler implements ActionListener { @Override public void actionPerformed(ActionEvent e) { //throw new UnsupportedOperationException("Not supported yet."); if (e.getSource() == exitMenuItem) { System.exit(1); } else if (e.getSource() == helpMenuItem) { // show help menu } } } } But when I invoke this code I get the NullPointerException at the //error Line. Is this the right method to do do this or there is something I did am missing?

    Read the article

  • Help me to choose the right platform for my Portal from .net, php, php based cms and .net based cms

    - by parveen-yadav
    hi I am planning to develop a site very similar to http://www.nextdaypets.com/ but with some more features...i have worked on JOOMLA n i know it pretty well. but there are few limitation like access level control and there is no component available for what i need. what i m confused about is that whether i should make that component in joomla or should i develop my own cms or should i take some .net based cms and write the component for it. I know C# and .net framework as a beginner. I just completed a certification course in .net last month and i don't know php but don't have issue in learning it...so what should i do...please suggest.

    Read the article

  • Random movement of wandering monsters in x & y axis in LibGDX

    - by Vishal Kumar
    I am making a simple top down RPG game in LibGDX. What I want is ... the enemies should wander here and there in x and y directions in certain interval so that it looks natural that they are guarding something. I spend several hours doing this but could not achieve what I want. After a long time of coding, I came with this code. But what I observed is when enemies come to an end of x or start of x or start of y or end of y of the map. It starts flickering for random intervals. Sometimes they remain nice, sometimes, they start flickering for long time. public class Enemy extends Sprite { public float MAX_VELOCITY = 0.05f; public static final int MOVING_LEFT = 0; public static final int MOVING_RIGHT = 1; public static final int MOVING_UP = 2; public static final int MOVING_DOWN = 3; public static final int HORIZONTAL_GUARD = 0; public static final int VERTICAL_GUARD = 1; public static final int RANDOM_GUARD = 2; private float startTime = System.nanoTime(); private static float SECONDS_TIME = 0; private boolean randomDecider; public int enemyType; public static final float width = 30 * World.WORLD_UNIT; public static final float height = 32 * World.WORLD_UNIT; public int state; public float stateTime; public boolean visible; public boolean dead; public Enemy(float x, float y, int enemyType) { super(x, y); state = MOVING_LEFT; this.enemyType = enemyType; stateTime = 0; visible = true; dead = false; boolean random = Math.random()>=0.5f ? true :false; if(enemyType == HORIZONTAL_GUARD){ if(random) velocity.x = -MAX_VELOCITY; else velocity.x = MAX_VELOCITY; } if(enemyType == VERTICAL_GUARD){ if(random) velocity.y = -MAX_VELOCITY; else velocity.y = MAX_VELOCITY; } if(enemyType == RANDOM_GUARD){ //if(random) //velocity.x = -MAX_VELOCITY; //else //velocity.y = MAX_VELOCITY; } } public void update(Enemy e, float deltaTime) { super.update(deltaTime); e.stateTime+= deltaTime; e.position.add(velocity); // This is for updating the Animation for Enemy Movement Direction. VERY IMPORTANT FOR REAL EFFECTS updateDirections(); //Here the various movement methods are called depending upon the type of the Enemy if(e.enemyType == HORIZONTAL_GUARD) guardHorizontally(); if(e.enemyType == VERTICAL_GUARD) guardVertically(); if(e.enemyType == RANDOM_GUARD) guardRandomly(); //quadrantMovement(e, deltaTime); } private void guardHorizontally(){ if(position.x <= 0){ velocity.x= MAX_VELOCITY; velocity.y= 0; } else if(position.x>= World.mapWidth-width){ velocity.x= -MAX_VELOCITY; velocity.y= 0; } } private void guardVertically(){ if(position.y<= 0){ velocity.y= MAX_VELOCITY; velocity.x= 0; } else if(position.y>= World.mapHeight- height){ velocity.y= -MAX_VELOCITY; velocity.x= 0; } } private void guardRandomly(){ if (System.nanoTime() - startTime >= 1000000000) { SECONDS_TIME++; if(SECONDS_TIME % 5==0) randomDecider = Math.random()>=0.5f ? true :false; if(SECONDS_TIME>=30) SECONDS_TIME =0; startTime = System.nanoTime(); } if(SECONDS_TIME <=30){ if(randomDecider && position.x >= 0) velocity.x= -MAX_VELOCITY; else{ if(position.x < World.mapWidth-width) velocity.x= MAX_VELOCITY; else velocity.x= -MAX_VELOCITY; } velocity.y =0; } else{ if(randomDecider && position.y >0) velocity.y= -MAX_VELOCITY; else velocity.y= MAX_VELOCITY; velocity.x =0; } /* //This is essential so as to keep the enemies inside the boundary of the Map if(position.x <= 0){ velocity.x= MAX_VELOCITY; //velocity.y= 0; } else if(position.x>= World.mapWidth-width){ velocity.x= -MAX_VELOCITY; //velocity.y= 0; } else if(position.y<= 0){ velocity.y= MAX_VELOCITY; //velocity.x= 0; } else if(position.y>= World.mapHeight- height){ velocity.y= -MAX_VELOCITY; //velocity.x= 0; } */ } private void updateDirections() { if(velocity.x > 0) state = MOVING_RIGHT; else if(velocity.x<0) state = MOVING_LEFT; else if(velocity.y>0) state = MOVING_UP; else if(velocity.y<0) state = MOVING_DOWN; } public Rectangle getBounds() { return new Rectangle(position.x, position.y, width, height); } private void quadrantMovement(Enemy e, float deltaTime) { int temp = e.getEnemyQuadrant(e.position.x, e.position.y); boolean random = Math.random()>=0.5f ? true :false; switch(temp){ case 1: velocity.x = MAX_VELOCITY; break; case 2: velocity.x = MAX_VELOCITY; break; case 3: velocity.x = -MAX_VELOCITY; break; case 4: velocity.x = -MAX_VELOCITY; break; default: if(random) velocity.x = MAX_VELOCITY; else velocity.y =-MAX_VELOCITY; } } public float getDistanceFromPoint(float p1,float p2){ Vector2 v1 = new Vector2(p1,p2); return position.dst(v1); } private int getEnemyQuadrant(float x, float y){ Rectangle enemyQuad = new Rectangle(x, y, 30, 32); if(ScreenQuadrants.getQuad1().contains(enemyQuad)) return 1; if(ScreenQuadrants.getQuad2().contains(enemyQuad)) return 2; if(ScreenQuadrants.getQuad3().contains(enemyQuad)) return 3; if(ScreenQuadrants.getQuad4().contains(enemyQuad)) return 4; return 0; } } Is there a better way of doing this. I am new to game development. I shall be very grateful to any help or reference.

    Read the article

  • OIM 11g notification framework

    - by Rajesh G Kumar
    OIM 11g has introduced an improved and template based Notifications framework. New release has removed the limitation of sending text based emails (out-of-the-box emails) and enhanced to support html features. New release provides in-built out-of-the-box templates for events like 'Reset Password', 'Create User Self Service' , ‘User Deleted' etc. Also provides new APIs to support custom templates to send notifications out of OIM. OIM notification framework supports notification mechanism based on events, notification templates and template resolver. They are defined as follows: Ø Events are defined as XML file and imported as part of MDS database in order to make notification event available for use. Ø Notification templates are created using OIM advance administration console. The template contains the text and the substitution 'variables' which will be replaced with the data provided by the template resolver. Templates support internationalization and can be defined as HTML or in form of simple text. Ø Template resolver is a Java class that is responsible to provide attributes and data to be used at runtime and design time. It must be deployed following the OIM plug-in framework. Resolver data provided at design time is to be used by end user to design notification template with available entity variables and it also provides data at runtime to replace the designed variable with value to be displayed to recipients. Steps to define custom notifications in OIM 11g are: Steps# Steps 1. Define the Notification Event 2. Create the Custom Template Resolver class 3. Create Template with notification contents to be sent to recipients 4. Create Event triggering spots in OIM 1. Notification Event metadata The Notification Event is defined as XML file which need to be imported into MDS database. An event file must be compliant with the schema defined by the notification engine, which is NotificationEvent.xsd. The event file contains basic information about the event.XSD location in MDS database: “/metadata/iam-features-notification/NotificationEvent.xsd”Schema file can be viewed by exporting file from MDS using weblogicExportMetadata.sh script.Sample Notification event metadata definition: 1: <?xml version="1.0" encoding="UTF-8"?> 2: <Events xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation="../../../metadata/NotificationEvent.xsd"> 3: <EventType name="Sample Notification"> 4: <StaticData> 5: <Attribute DataType="X2-Entity" EntityName="User" Name="Granted User"/> 6: </StaticData> 7: <Resolver class="com.iam.oim.demo.notification.DemoNotificationResolver"> 8: <Param DataType="91-Entity" EntityName="Resource" Name="ResourceInfo"/> 9: </Resolver> 10: </EventType> 11: </Events> Line# Description 1. XML file notation tag 2. Events is root tag 3. EventType tag is to declare a unique event name which will be available for template designing 4. The StaticData element lists a set of parameters which allow user to add parameters that are not data dependent. In other words, this element defines the static data to be displayed when notification is to be configured. An example of static data is the User entity, which is not dependent on any other data and has the same set of attributes for all event instances and notification templates. Available attributes are used to be defined as substitution tokens in the template. 5. Attribute tag is child tag for StaticData to declare the entity and its data type with unique reference name. User entity is most commonly used Entity as StaticData. 6. StaticData closing tag 7. Resolver tag defines the resolver class. The Resolver class must be defined for each notification. It defines what parameters are available in the notification creation screen and how those parameters are replaced when the notification is to be sent. Resolver class resolves the data dynamically at run time and displays the attributes in the UI. 8. The Param DataType element lists a set of parameters which allow user to add parameters that are data dependent. An example of the data dependent or a dynamic entity is a resource object which user can select at run time. A notification template is to be configured for the resource object. Corresponding to the resource object field, a lookup is displayed on the UI. When a user selects the event the call goes to the Resolver class provided to fetch the fields that are displayed in the Available Data list, from which user can select the attribute to be used on the template. Param tag is child tag to declare the entity and its data type with unique reference name. 9. Resolver closing tag 10 EventType closing tag 11. Events closing tag Note: - DataType needs to be declared as “X2-Entity” for User entity and “91-Entity” for Resource or Organization entities. The dynamic entities supported for lookup are user, resource, and organization. Once notification event metadata is defined, need to be imported into MDS database. Fully qualified resolver class name need to be define for XML but do not need to load the class in OIM yet (it can be loaded later). 2. Coding the notification resolver All event owners have to provide a resolver class which would resolve the data dynamically at run time. Custom resolver class must implement the interface oracle.iam.notification.impl.NotificationEventResolver and override the implemented methods with actual implementation. It has 2 methods: S# Methods Descriptions 1. public List<NotificationAttribute> getAvailableData(String eventType, Map<String, Object> params); This API will return the list of available data variables. These variables will be available on the UI while creating/modifying the Templates and would let user select the variables so that they can be embedded as a token as part of the Messages on the template. These tokens are replaced by the value passed by the resolver class at run time. Available data is displayed in a list. The parameter "eventType" specifies the event Name for which template is to be read.The parameter "params" is the map which has the entity name and the corresponding value for which available data is to be fetched. Sample code snippet: List<NotificationAttribute> list = new ArrayList<NotificationAttribute>(); long objKey = (Long) params.get("resource"); //Form Field details based on Resource object key HashMap<String, Object> formFieldDetail = getObjectFormName(objKey); for (Iterator<?> itrd = formFieldDetail.entrySet().iterator(); itrd.hasNext(); ) { NotificationAttribute availableData = new NotificationAttribute(); Map.Entry formDetailEntrySet = (Entry<?, ?>)itrd.next(); String fieldLabel = (String)formDetailEntrySet.getValue(); availableData.setName(fieldLabel); list.add(availableData); } return list; 2. Public HashMap<String, Object> getReplacedData(String eventType, Map<String, Object> params); This API would return the resolved value of the variables present on the template at the runtime when notification is being sent. The parameter "eventType" specifies the event Name for which template is to be read.The parameter "params" is the map which has the base values such as usr_key, obj_key etc required by the resolver implementation to resolve the rest of the variables in the template. Sample code snippet: HashMap<String, Object> resolvedData = new HashMap<String, Object>();String firstName = getUserFirstname(params.get("usr_key"));resolvedData.put("fname", firstName); String lastName = getUserLastName(params.get("usr_key"));resolvedData.put("lname", lastname);resolvedData.put("count", "1 million");return resolvedData; This code must be deployed as per OIM 11g plug-in framework. The XML file defining the plug-in is as below: <?xml version="1.0" encoding="UTF-8"?> <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <plugins pluginpoint="oracle.iam.notification.impl.NotificationEventResolver"> <plugin pluginclass= " com.iam.oim.demo.notification.DemoNotificationResolver" version="1.0" name="Sample Notification Resolver"/> </plugins> </oimplugins> 3. Defining the template To create a notification template: Log in to the Oracle Identity Administration Click the System Management tab and then click the Notification tab From the Actions list on the left pane, select Create On the Create page, enter values for the following fields under the Template Information section: Template Name: Demo template Description Text: Demo template Under the Event Details section, perform the following: From the Available Event list, select the event for which the notification template is to be created from a list of available events. Depending on your selection, other fields are displayed in the Event Details section. Note that the template Sample Notification Event created in the previous step being used as the notification event. The contents of the Available Data drop down are based on the event XML StaticData tag, the drop down basically lists all the attributes of the entities defined in that tag. Once you select an element in the drop down, it will show up in the Selected Data text field and then you can just copy it and paste it into either the message subject or the message body fields prefixing $ symbol. Example if list has attribute like First_Name then message body will contains this as $First_Name which resolver will parse and replace it with actual value at runtime. In the Resource field, select a resource from the lookup. This is the dynamic data defined by the Param DataType element in the XML definition. Based on selected resource getAvailableData method of resolver will be called to fetch the resource object attribute detail, if method is overridden with required implementation. For current scenario, Map<String, Object> params will get populated with object key as value and key as “resource” in the map. This is the only input will be provided to resolver at design time. You need to implement the further logic to fetch the object attributes detail to populate the available Data list. List string should not have space in between, if object attributes has space for attribute name then implement logic to replace the space with ‘_’ before populating the list. Example if attribute name is “First Name” then make it “First_Name” and populate the list. Space is not supported while you try to parse and replace the token at run time with real value. Make a note that the Available Data and Selected Data are used in the substitution tokens definition only, they do not define the final data that will be sent in the notification. OIM will invoke the resolver class to get the data and make the substitutions. Under the Locale Information section, enter values in the following fields: To specify a form of encoding, select either UTF-8 or ASCII. In the Message Subject field, enter a subject for the notification. From the Type options, select the data type in which you want to send the message. You can choose between HTML and Text/Plain. In the Short Message field, enter a gist of the message in very few words. In the Long Message field, enter the message that will be sent as the notification with Available data token which need to be replaced by resolver at runtime. After you have entered the required values in all the fields, click Save. A message is displayed confirming the creation of the notification template. Click OK 4. Triggering the event A notification event can be triggered from different places in OIM. The logic behind the triggering must be coded and plugged into OIM. Examples of triggering points for notifications: Event handlers: post process notifications for specific data updates in OIM users Process tasks: to notify the users that a provisioning task was executed by OIM Scheduled tasks: to notify something related to the task The scheduled job has two parameters: Template Name: defines the notification template to be sent User Login: defines the user record that will provide the data to be sent in the notification Sample Code Snippet: public void execute(String templateName , String userId) { try { NotificationService notService = Platform.getService(NotificationService.class); NotificationEvent eventToSend=this.createNotificationEvent(templateName,userId); notService.notify(eventToSend); } catch (Exception e) { e.printStackTrace(); } } private NotificationEvent createNotificationEvent(String poTemplateName, String poUserId) { NotificationEvent event = new NotificationEvent(); String[] receiverUserIds= { poUserId }; event.setUserIds(receiverUserIds); event.setTemplateName(poTemplateName); event.setSender(null); HashMap<String, Object> templateParams = new HashMap<String, Object>(); templateParams.put("USER_LOGIN",poUserId); event.setParams(templateParams); return event; } public HashMap getAttributes() { return null; } public void setAttributes() {} }

    Read the article

  • Implementing Scrolling Background in LibGDX game

    - by Vishal Kumar
    I am making a game in LibGDX. After working for whole a day..I could not come out with a solution on Scrolling background. My Screen width n height is 960 x 540. I have a png image of 1024 x 540. I want to scroll the background in such a way that it contuosly goes back with camera x-- as per camera I tried many alternatives... drawing the image twice ..did a lot of calculations and many others.... but finally end up with this dirty code if(bg_x2 >= - Assets.bg.getRegionWidth()) { //calculated it to position bg .. camera was initially at 15 bg_x2 = (16 -4*camera.position.x); bg_x1=bg_x2+Assets.bg.getRegionWidth(); } else{ bg_x1 = (16 -4*camera.position.x)%224; // this 16 is not proper //I think there can be other ways bg_x2=bg_x1+Assets.bg.getRegionWidth(); } //drawing twice batch.draw(Assets.bg, bg_x2, bg_y); batch.draw(Assets.bg, bg_x1, bg_y); The Simple idea is SCROLLING BACKGROUND WITH SIZE SOMEWHAT MORE THAN SCREEN SIZE SO THAT IT LOOK SMOOTH. Even after a lot of search, i didn't find an online solution. Please help.

    Read the article

  • How to Upgrade Ubuntu 12.04.2 to Ubuntu 12.04.3

    - by Saurav Kumar
    I am currently using Ubuntu 12.04.2 32bit. I installed it using LiveCD. Tomorrow, 23rd August 2013,Ubuntu 12.04.3 is released. I want to upgrade from Ubuntu 12.04.2 to Ubuntu 12.04.3 without using any LiveCD. Is it possible? If so please suggest me how can I do. Actually while using Ubuntu 12.04.2 I have troubled with graphics. My graphics card is Intel i845G 64 MB. When Ubuntu starts it works fine and smooth without any lagging, but after sometime it hangs for few seconds (1 or 2 seconds) with a garbage screen and becomes sluggish. All windows and browsers start lagging and also it is not possible to play any video in any player (VLC, Movie Player, Xnoise, SMPlayer etc..). I think Upgrading to Ubuntu 12.04.3 could fix my problem. Any help will be greatly appreciated..

    Read the article

  • The Oracle Linux Advantage

    - by Monica Kumar
    It has been a while since we've summed up the Oracle Linux advantage over other Linux products. Wim Coekaerts' new blog entries prompted me to write this article. Here are some highlights. Best enterprise Linux - Since launching UEK almost 18 months ago, Oracle Linux has leap-frogged the competition in terms of the latest innovations, better performance, reliability, and scalability. Complete enterprise Linux solution: Not only do we offer an enterprise Linux OS but it comes with management and HA tools that are integrated and included for free. In addition, we offer the entire "apps to disk" solution for Linux if a customer wants a single source. Comprehensive testing with enterprise workloads: Within Oracle, 1000s of servers run incredible amount of QA on Oracle Linux amounting to100,000 hours everyday. This helps in making Oracle Linux even better for running enterprise workloads. Free binaries and errata: Oracle Linux is free to download including patches and updates. Highest quality enterprise support: Available 24/7 in 145 countries, Oracle has been offering affordable Linux support since 2006. The support team is a large group of dedicated professionals globally that are trained to support serious mission critical environments; not only do they know their products, they also understand the inter-dependencies with database, apps, storage, etc. Best practices to accelerate database and apps deployment: With pre-installed, pre-configured Oracle VM Templates, we offer virtual machine images of Oracle's enterprise software so you can easily deploy them on Oracle Linux. In addition, Oracle Validated Configurations offer documented tips for configuring Linux systems to run Oracle database. We take the guesswork out and help you get to market faster. More information on all of the above is available on the Oracle Linux Home Page. Wim Coekaerts did a great job of detailing these advantages in two recent blog posts he published last week. Blog article: Oracle Linux components http://bit.ly/JufeCD Blog article: More Oracle Linux options: http://bit.ly/LhY0fU These are must reads!

    Read the article

  • SQL SERVER – Beginning of SQL Server Architecture – Terminology – Guest Post

    - by pinaldave
    SQL Server Architecture is a very deep subject. Covering it in a single post is an almost impossible task. However, this subject is very popular topic among beginners and advanced users.  I have requested my friend Anil Kumar who is expert in SQL Domain to help me write  a simple post about Beginning SQL Server Architecture. As stated earlier this subject is very deep subject and in this first article series he has covered basic terminologies. In future article he will explore the subject further down. Anil Kumar Yadav is Trainer, SQL Domain, Koenig Solutions. Koenig is a premier IT training firm that provides several IT certifications, such as Oracle 11g, Server+, RHCA, SQL Server Training, Prince2 Foundation etc. In this Article we will discuss about MS SQL Server architecture. The major components of SQL Server are: Relational Engine Storage Engine SQL OS Now we will discuss and understand each one of them. 1) Relational Engine: Also called as the query processor, Relational Engine includes the components of SQL Server that determine what your query exactly needs to do and the best way to do it. It manages the execution of queries as it requests data from the storage engine and processes the results returned. Different Tasks of Relational Engine: Query Processing Memory Management Thread and Task Management Buffer Management Distributed Query Processing 2) Storage Engine: Storage Engine is responsible for storage and retrieval of the data on to the storage system (Disk, SAN etc.). to understand more, let’s focus on the following diagram. When we talk about any database in SQL server, there are 2 types of files that are created at the disk level – Data file and Log file. Data file physically stores the data in data pages. Log files that are also known as write ahead logs, are used for storing transactions performed on the database. Let’s understand data file and log file in more details: Data File: Data File stores data in the form of Data Page (8KB) and these data pages are logically organized in extents. Extents: Extents are logical units in the database. They are a combination of 8 data pages i.e. 64 KB forms an extent. Extents can be of two types, Mixed and Uniform. Mixed extents hold different types of pages like index, System, Object data etc. On the other hand, Uniform extents are dedicated to only one type. Pages: As we should know what type of data pages can be stored in SQL Server, below mentioned are some of them: Data Page: It holds the data entered by the user but not the data which is of type text, ntext, nvarchar(max), varchar(max), varbinary(max), image and xml data. Index: It stores the index entries. Text/Image: It stores LOB ( Large Object data) like text, ntext, varchar(max), nvarchar(max),  varbinary(max), image and xml data. GAM & SGAM (Global Allocation Map & Shared Global Allocation Map): They are used for saving information related to the allocation of extents. PFS (Page Free Space): Information related to page allocation and unused space available on pages. IAM (Index Allocation Map): Information pertaining to extents that are used by a table or index per allocation unit. BCM (Bulk Changed Map): Keeps information about the extents changed in a Bulk Operation. DCM (Differential Change Map): This is the information of extents that have modified since the last BACKUP DATABASE statement as per allocation unit. Log File: It also known as write ahead log. It stores modification to the database (DML and DDL). Sufficient information is logged to be able to: Roll back transactions if requested Recover the database in case of failure Write Ahead Logging is used to create log entries Transaction logs are written in chronological order in a circular way Truncation policy for logs is based on the recovery model SQL OS: This lies between the host machine (Windows OS) and SQL Server. All the activities performed on database engine are taken care of by SQL OS. It is a highly configurable operating system with powerful API (application programming interface), enabling automatic locality and advanced parallelism. SQL OS provides various operating system services, such as memory management deals with buffer pool, log buffer and deadlock detection using the blocking and locking structure. Other services include exception handling, hosting for external components like Common Language Runtime, CLR etc. I guess this brief article gives you an idea about the various terminologies used related to SQL Server Architecture. In future articles we will explore them further. Guest Author  The author of the article is Anil Kumar Yadav is Trainer, SQL Domain, Koenig Solutions. Koenig is a premier IT training firm that provides several IT certifications, such as Oracle 11g, Server+, RHCA, SQL Server Training, Prince2 Foundation etc. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Security, SQL Server, SQL Tips and Tricks, SQL Training, T SQL, Technology

    Read the article

  • How can I post scores to Facebook from a LibGDX android game?

    - by Vishal Kumar
    I am using LibGDX to create an android game. I am not making the HTML backend of the game. I just want it to be on the Android Google Play store. Is it possible to post the scores to Facebook? And if so, how can I do it. I searched and found the solutions only for web-based games. For LibGDX, there is a tutorial for Scoreloop. So, I am worried whether there is a way to do so. Any Suggestion will be welcome.

    Read the article

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