Search Results

Search found 132 results on 6 pages for 'vishal naidu'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Using AdMob with Games that use Open GLES

    - by Vishal Kumar
    Can anyone help me integrating Admob to my game. I've used the badlogic framework by MarioZencher ... and My game is like the SuperJumper. I am unable to use AdMob after a lot of my attempts. I am new to android dev...please help me..I went thru a number of tutorials but not getting adds displayed ... I did the following... get the libraries and placed them properly My main.xml looks like this android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" / My Activity class onCreate method: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); RelativeLayout layout = new RelativeLayout(this); adView = new AdView(this, AdSize.BANNER, "a1518637fe542a2"); AdRequest request = new AdRequest(); request.addTestDevice(AdRequest.TEST_EMULATOR); request.addTestDevice("D77E32324019F80A2CECEAAAAAAAAA"); adView.loadAd(request); layout.addView(glView); RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); adParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); adParams.addRule(RelativeLayout.CENTER_IN_PARENT); layout.addView(adView, adParams); setContentView(layout); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); glView = new GLSurfaceView(this); glView.setRenderer(this); //setContentView(glView); glGraphics = new GLGraphics(glView); fileIO = new AndroidFileIO(getAssets()); audio = new AndroidAudio(this); input = new AndroidInput(this, glView, 1, 1); PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); wakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "GLGame"); } My Manifest file looks like this .... <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|smallestScreenSize"/> </application> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-sdk android:minSdkVersion="7" /> When I first decided to use the XML for admob purpose ..it showed no changes..it even didn't log the device id in Logcat... Later when I wrote code in the Main Activity class.. and run ... Application crashed ... with 7 errors evry time ... The android:configChanges value of the com.google.ads.AdActivity must include screenLayout. The android:configChanges value of the com.google.ads.AdActivity must include uiMode. The android:configChanges value of the com.google.ads.AdActivity must include screenSize. The android:configChanges value of the com.google.ads.AdActivity must include smallestScreenSize. You must have AdActivity declared in AndroidManifest.xml with configChanges. You must have INTERNET and ACCESS_NETWORK_STATE permissions in AndroidManifest.xml. Please help me by telling what wrong is there with the code? Can I write code only in xml files without changing the Activity class ... I will be very grateful to anyone providing support.

    Read the article

  • Should I make the Cells in a Tiledmap as null when my player hits it

    - by Vishal Kumar
    I am making a Tile Based game using Libgdx. I took the idea from SuperKoalio platformer demo by Mario Zencher. When I wanted to implement Collectables in my game , I simply draw the coins using Tiled Map Editor. When my player hits that, I use to set that cell as null. Someday on this site suggested me not to do so... never use null. I agreed. What can be any other way. If I am using layer.setCell(x,y) to set the cell to any other cell... even if an transparent one .. my player seems to be stopped by an invisible object/hurdle. This is my code: for (Rectangle tile : tiles) { if (koalaRect.overlaps(tile)) { TiledMapTileLayer layer = (TiledMapTileLayer) map.getLayers().get(1); try{ type = layer.getCell((int) tile.x, (int) tile.y).getTile().getProperties().get("tileType").toString(); } catch(Exception e){ System.out.print("Exception in Tiles Property"+e); type="nonbreakable"; } //Let us destroy this cell if(("award".equals(type))){ layer.setCell((int) tile.x, (int) tile.y, null); listener.coin(); score+=100; test = ""+layer.getCell(0, 0).getTile().getProperties().get("tileType"); } //DOING THIS GIVES A BAD EFFECT if(("killer".equals(type))){ //player.health--; //layer.setCell((int) tile.x, (int) tile.y, layer.getCell(20,0)); } // we actually reset the player y-position here // so it is just below/above the tile we collided with // this removes bouncing :) if (player.velocity.y > 0) { player.position.y = (tile.y - Player.height); } Is this a right approach? OR I should create separate Sprite Class called Coin.

    Read the article

  • TellagoStudio's presenting SOA Governance on the Microsoft platform using SO-Aware at Microsoft TechReady.

    - by Vishal
    Hi there, Microsoft is hosting the first edition of their annual TechReddy conference. TechReady is an internal Microsoft conference but Microsoft invited Tellago Studios to present a session about how to enable Agile SOA Governance on the Microsoft platform using our recently release product: SO-Aware. As part of our session, we will take a look at the current challenges that organizations face when enabling SOA governance capabilities on the Microsoft platform and how organizations can benefit from  more agile, lightweight and modern SOA governance models. The session will provide a practical view to the role of Tellago Studios' SO-Aware as an essential technology to enable native SOA governance on the Microsoft platform. We will explore in detail important capabilities of SO-Aware such as Centralized service repository Centralized configuration management Service testing Monitoring Transparent integration with technologies such as Visual Studio, BizTalk Server, Windows Server & Azure AppFabric among many others But the fun doesn't stop there..... As part of this session, we will showcase for the first time our upcoming SO-Aware Test Workbench product which enables load and functional web service testing capabilities on the Microsoft technology stack. SO-Aware Test Workbench provides developers with a visually rich environment to model and control the execution of load and functional tests in a SOA infrastructure. This tool includes the first native WCF load testing engine allowing developers to transparently load test applications built on Microsoft's service oriented technologies such as WCF, BizTalk Server or the Windows Server or Azure AppFabric.

    Read the article

  • How to implement a game launch counter in LibGDX

    - by Vishal Kumar
    I'm writing a game using LibGDX in which I want to save the number of launches of a game in a text file. So, In the create() of my starter class, I have the following code ..but it's not working public class MainStarter extends Game { private int count; @Override public void create() { // Set up the application AppSettings.setUp(); if(SettingsManager.isFirstLaunch()){ SettingsManager.createTextFileInLocalStorage("gamedata"); SettingsManager.writeLine("gamedata", "Launched:"+count ,FileType.LOCAL_FILE ); } else{ SettingsManager.writeLine("gamedata", "Not First launch :"+count++ ,FileType.LOCAL_FILE ); } // // Load assets before setting the screen // ##################################### Assets.loadAll(); // Set the tests screen setScreen(new MainMenuScreen(this, "Main Menu")); } } What is the proper way to do this?

    Read the article

  • You do not appear to be using the NVIDIA X driver

    - by Vishal shekhar
    my laptop has nvidia GT540m yesterday i install nvidia-current after updating fromsudo apt-add-repository ppa:ubuntu-x-swat/x-updates then i write sudo nvidia-xconfig and then reboot my desktop visual effect changes and it look good like nvidia is working but still glx i not working and nvidia-setting tells me that You do not appear to be using the NVIDIA X driver my dkms status is nvidia-current, 304.43, 3.2.0-30-generic-pae, i686: installed lspci |grep VGA output : 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev a1) also i can not login to my admin account but when i login to standard user or guest it works but still NVIDIA X driver is not working can any one suggest something so that NVIDIA X Driver start working as i seen many forum but none worked for me earlier i tried nvidia-173 ,nvidia-current(before x-swat/updates reprository) but none works for me

    Read the article

  • DataBinding in ResourceDictionary

    - by Vishal
    Hi All, I've a ResourceDictionary. In which I've defined all the commands. <ResourceDictionary x:Class="HTCmds" x:ClassModifier="public" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:commands="clr-namespace:Commands;assembly=UIInfrastructure" xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" xmlns:local="clr-namespace:Commands" xmlns:p="clr-namespace:PresentationModels"> <commands:CommandReference x:Key="CopyCommandReference" Command="{Binding Path=CopyCommand}"/> <commands:CommandReference x:Key="ExitCommandReference" Command="{Binding Path=ExitCommand}"/> </ResourceDictionary> I've merged this ResourceDictionary in a Windows class. <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../Commands/HTCmds.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> This window class has DataContext property set to Commands.cs class that contains all the commands and their handlers. Now, How do I bind the commands defined in ResourceDictionary with commands in DataContext of Windows class? Thanks & Regards, Vishal.

    Read the article

  • Timer a usage in msp430 in high compiler optimization mode

    - by Vishal
    Hi, I have used timer A in MSP430 with high compiler optimization, but found that my timer code is failing when high compiler optimization used. When none optimization is used code works fine. This code is used to achieve 1 ms timer tick. timeOutCNT is increamented in interrupt. Following is the code, //Disable interrupt and clear CCR0 TIMER_A_TACTL = TIMER_A_TASSEL | // set the clock source as SMCLK TIMER_A_ID | // set the divider to 8 TACLR | // clear the timer MC_1; // continuous mode TIMER_A_TACTL &= ~TIMER_A_TAIE; // timer interrupt disabled TIMER_A_TACTL &= 0; // timer interrupt flag disabled CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 500; TIMER_A_TACTL &= TIMER_A_TAIE; //enable timer interrupt TIMER_A_TACTL &= TIMER_A_TAIFG; //enable timer interrupt TACTL = TIMER_A_TASSEL + MC_1 + ID_3; // SMCLK, upmode timeOutCNT = 0; //timeOutCNT is increased in timer interrupt while(timeOutCNT <= 1); //delay of 1 milisecond TIMER_A_TACTL = TIMER_A_TASSEL | // set the clock source as SMCLK TIMER_A_ID | // set the divider to 8 TACLR | // clear the timer MC_1; // continuous mode TIMER_A_TACTL &= ~TIMER_A_TAIE; // timer interrupt disabled TIMER_A_TACTL &= 0x00; // timer interrupt flag disabled Can anybody help me here to resolve this issue? Is there any other way we can use timer A so it works fine in optimization modes? Or do I have used is wrongly to achieve 1 ms interrupt? Thanks in advanced. Vishal N

    Read the article

  • My timer code is failing when IAR is configured to do max optimization

    - by Vishal
    Hi, I have used timer A in MSP430 with high compiler optimization, but found that my timer code is failing when high compiler optimization used. When none optimization is used code works fine. This code is used to achieve 1 ms timer tick. timeOutCNT is increamented in interrupt. Following is the code [Code] //Disable interrupt and clear CCR0 TIMER_A_TACTL = TIMER_A_TASSEL | // set the clock source as SMCLK TIMER_A_ID | // set the divider to 8 TACLR | // clear the timer MC_1; // continuous mode TIMER_A_TACTL &= ~TIMER_A_TAIE; // timer interrupt disabled TIMER_A_TACTL &= 0; // timer interrupt flag disabled CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 500; TIMER_A_TACTL &= TIMER_A_TAIE; //enable timer interrupt TIMER_A_TACTL &= TIMER_A_TAIFG; //enable timer interrupt TACTL = TIMER_A_TASSEL + MC_1 + ID_3; // SMCLK, upmode timeOutCNT = 0; //timeOutCNT is increased in timer interrupt while(timeOutCNT <= 1); //delay of 1 milisecond TIMER_A_TACTL = TIMER_A_TASSEL | // set the clock source as SMCLK TIMER_A_ID | // set the divider to 8 TACLR | // clear the timer MC_1; // continuous mode TIMER_A_TACTL &= ~TIMER_A_TAIE; // timer interrupt disabled TIMER_A_TACTL &= 0x00; // timer interrupt flag disabled [/code] Can anybody help me here to resolve this issue? Is there any other way we can use timer A so it works fine in optimization modes? Or do I have used is wrongly to achieve 1 ms interrupt? Thanks in advanced. Vishal N

    Read the article

  • How to write onclick event for ListView in Android?

    - by Srikanth Naidu
    Hi i have the listview the sixitems in it, but when i call alet function on event it doesnt work ? let me know how to write a function on item event on click? public class PhotoListView extends ListActivity { String[] listItems = {"HeadShot", "BodyShot ", "ExtraShot", "Video Take1", "Video Take2", "Video Take3", }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setListAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1, listItems)); } OnListclick ListView Shot = getListView(); protected void onListItemClick(View view) { if(view == Shot){ AlertDialog.Builder alertbox = new AlertDialog.Builder(this); // set the message to display alertbox.setMessage("Please Get Ready"); }

    Read the article

  • How Can we implement search functionality in AxAcroPDFLib.AxAcroPDF( Pdf ) using C#

    - by V G S Naidu
    Hai, I am using the AxAcroPDFLib.AxAcroPDF library to Display the files in the winforms Control using the line, "AxAcroPDFLib.AxAcroPDF.src = path; " it's loaded the file well and when we click CTRL+F it showing search box and searching the searched string well. But we need to implement the search funtionality programatically using the Dotnet Code to automatically search the string in pdf file.*To do so i didn't find any supported methods to find the string programatically. please provide the solution to to implement the search functionality in pdf files. Thank you.

    Read the article

  • Java script Gallery - how to show a next image with an arrow - shiftImg(1)

    - by Srikanth Naidu
    //html file Image slideshow </script>   Loading image. Please wait 1     1/12 2/12 3/12 4/12 5/12 6/12 7/12 8/12   // //JS File var displayWaitMessage=true; // Display a please wait message while images are loading? var activeImage = false; var imageGalleryLeftPos = false; var imageGalleryWidth = false; var imageGalleryObj = false; var maxGalleryXPos = false; var slideSpeed = 0; var imageGalleryCaptions = new Array(); function startSlide(e) { if(document.all)e = event; var id = this.id; this.getElementsByTagName('IMG')[0].src = 'images/' + this.id + '_over.gif'; if(this.id=='arrow_right'){ slideSpeedMultiply = Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = -1*slideSpeedMultiply; slideSpeed = Math.max(-10,slideSpeed); }else{ slideSpeedMultiply = 10 - Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = 1*slideSpeedMultiply; slideSpeed = Math.min(10,slideSpeed); if(slideSpeed<0)slideSpeed=10; } } function releaseSlide() { var id = this.id; this.getElementsByTagName('IMG')[0].src = 'images/' + this.id + '.gif'; slideSpeed=0; } function gallerySlide() { if(slideSpeed!=0){ var leftPos = imageGalleryObj.offsetLeft; leftPos = leftPos/1 + slideSpeed; if(leftPos>maxGalleryXPos){ leftPos = maxGalleryXPos; slideSpeed = 0; } if(leftPos<minGalleryXPos){ leftPos = minGalleryXPos; slideSpeed=0; } imageGalleryObj.style.left = leftPos + 'px'; } setTimeout('gallerySlide()',20); } function showImage() { if(activeImage){ activeImage.style.filter = 'alpha(opacity=50)'; activeImage.style.opacity = 0.5; } this.style.filter = 'alpha(opacity=100)'; this.style.opacity = 1; activeImage = this; } function initSlideShow() { document.getElementById('arrow_left').onmousemove = startSlide; document.getElementById('arrow_left').onmouseout = releaseSlide; document.getElementById('arrow_right').onmousemove = startSlide; document.getElementById('arrow_right').onmouseout = releaseSlide; imageGalleryObj = document.getElementById('theImages'); imageGalleryLeftPos = imageGalleryObj.offsetLeft; imageGalleryWidth = document.getElementById('galleryContainer').offsetWidth - 80; maxGalleryXPos = imageGalleryObj.offsetLeft; minGalleryXPos = imageGalleryWidth - document.getElementById('slideEnd').offsetLeft; var slideshowImages = imageGalleryObj.getElementsByTagName('IMG'); for(var no=0;no<slideshowImages.length;no++){ slideshowImages[no].onmouseover = showImage; } var divs = imageGalleryObj.getElementsByTagName('DIV'); for(var no=0;no<divs.length;no++){ if(divs[no].className=='imageCaption')imageGalleryCaptions[imageGalleryCaptions.length] = divs[no].innerHTML; } gallerySlide(); } function showPreview(imagePath,imageIndex){ var subImages = document.getElementById('previewPane').getElementsByTagName('IMG'); if(subImages.length==0){ var img = document.createElement('IMG'); document.getElementById('previewPane').appendChild(img); }else img = subImages[0]; if(displayWaitMessage){ document.getElementById('waitMessage').style.display='inline'; } document.getElementById('largeImageCaption').style.display='none'; img.onload = function() { hideWaitMessageAndShowCaption(imageIndex-1); }; img.src = imagePath; } function hideWaitMessageAndShowCaption(imageIndex) { document.getElementById('waitMessage').style.display='none'; document.getElementById('largeImageCaption').innerHTML = imageGalleryCaptions[imageIndex]; document.getElementById('largeImageCaption').style.display='block'; } function shiftImg(imageIndex){ } window.onload = initSlideShow;

    Read the article

  • How can i put the thumbnail beside the list item in Android?

    - by Srikanth Naidu
    public class ShootList extends ListActivity implements OnItemClickListener { String[] listItems = {"HeadShot", "BodyShot ", "ExtraShot", "Video Take1", "Video Take2", "Video Take3", }; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list); setListAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1, listItems)); ListView shot = getListView(); shot.setOnItemClickListener(this); } @Override public void onItemClick(AdapterView<?> arg0, View arg1, int Position, long arg3) { // TODO Auto-generated method stub int P = Position; switch ( P ) { case 0: Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(intent, 1); break; case 1: AlertDialog.Builder alertbox1 = new AlertDialog.Builder(this); alertbox1.setMessage("BodyShot").show(); break; case 2: AlertDialog.Builder alertbox2 = new AlertDialog.Builder(this); alertbox2.setMessage("ExtraShot").show(); break; case 3: Intent Take1 = new Intent("android.media.action.VIDEO_CAPTURE"); startActivityForResult(Take1, 0); break; case 4: AlertDialog.Builder alertbox4 = new AlertDialog.Builder(this); alertbox4.setMessage("Take2").show(); break; case 5: AlertDialog.Builder alertbox5 = new AlertDialog.Builder(this); alertbox5.setMessage("Take3").show(); break; default: break; } } public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); int i; // if Activity was canceled, display a Toast message if (resultCode == RESULT_CANCELED) { Toast toast = Toast.makeText(this,"camera cancelled", 10000); toast.show(); return; } // lets check if we are really dealing with a picture if (requestCode == 1 && resultCode == RESULT_OK) { Bundle extras = data.getExtras(); Bitmap b = (Bitmap) extras.get("data"); //setContentView(R.layout.main); ImageView mImg; mImg = (ImageView) findViewById(R.id.img); mImg.setImageBitmap(b); // save image to gallery String timestamp = Long.toString(System.currentTimeMillis()); MediaStore.Images.Media.insertImage(getContentResolver(), b, timestamp, timestamp); } } }

    Read the article

  • How can i use .net webservice to make login app in android phone app?

    - by Srikanth Naidu
    How can i use .net webservice to make login app in android phone app? i have the Main.xml in layout like this i have a dologin.java package ads.login; import android.app.Activity; import android.os.Bundle; import android.view.View.OnClickListener; import android.view.View; import android.widget.Button; import android.widget.Toast; import android.app.AlertDialog; import android.content.DialogInterface; import android.app.ProgressDialog; public class DoLogin extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }

    Read the article

  • how to access camera.java in on cick event?

    - by Srikanth Naidu
    hi , i am making a app which takes photo on button click i have camera.java which operates camera and takes photo how to i call it on the below event? public void onClick(DialogInterface arg0, int arg1) { setContentView(R.layout.startcamera); } Camera .java package neuro.com; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import android.app.Activity; import android.hardware.Camera; import android.hardware.Camera.PictureCallback; import android.hardware.Camera.ShutterCallback; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.FrameLayout; public class CameraDemo extends Activity { private static final String TAG = "CameraDemo"; Camera camera; Preview preview; Button buttonClick; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.startcamera); preview = new Preview(this); ((FrameLayout) findViewById(R.id.preview)).addView(preview); buttonClick = (Button) findViewById(R.id.buttonClick); buttonClick.setOnClickListener( new OnClickListener() { public void onClick(View v) { preview.camera.takePicture(shutterCallback, rawCallback, jpegCallback); } }); Log.d(TAG, "onCreate'd"); } ShutterCallback shutterCallback = new ShutterCallback() { public void onShutter() { Log.d(TAG, "onShutter'd"); } }; /** Handles data for raw picture */ PictureCallback rawCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { Log.d(TAG, "onPictureTaken - raw"); } }; /** Handles data for jpeg picture */ PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { FileOutputStream outStream = null; try { // write to local sandbox file system // outStream = CameraDemo.this.openFileOutput(String.format("%d.jpg", System.currentTimeMillis()), 0); // Or write to sdcard outStream = new FileOutputStream(String.format("/sdcard/%d.jpg", System.currentTimeMillis())); outStream.write(data); outStream.close(); Log.d(TAG, "onPictureTaken - wrote bytes: " + data.length); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { } Log.d(TAG, "onPictureTaken - jpeg"); } }; }

    Read the article

  • How can i access or execute .java file in another javafile in android app development?

    - by Srikanth Naidu
    i got 2 java files app.java and gallaery.java App.java public class App extends Activity implements OnClickListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button Listvideo = (Button) findViewById(R.id.Listvideo); Listvideo.setOnClickListener(this); public void onClick(View view) { if (view == findViewById(R.id.Listvideo)) { // i have to call gallery.java here which executes list of images in the android pone } }

    Read the article

  • Building a structure/object in a place other than the constructor

    - by Vishal Naidu
    I have different types of objects representing the same business entity. UIObject, PowershellObject, DevCodeModelObject, WMIObject all are different representation to the same entity. So say if the entity is Animal then I have AnimalUIObject, AnimalPSObject, AnimalModelObject, AnimalWMIObject, etc. Now the implementations of AnimalUIObject, AnimalPSObject, AnimalModelObject are all in separate assemblies. Now my scenario is I want to verify the contents of business entity Animal irrespective of the assembly it came from. So I created a GenericAnimal class to represent the Animal entity. Now in GenericAnimal I added the following constructors: GenericAnimal(AnimalUIObject) GenericAnimal(AnimalPSObject) GenericAnimal(AnimalModelObject) Basically I made GenericAnimal depend on all the underlying assemblies so that while verifying I deal with this abstraction. Now the other approach to do this is have GenericAnimal with an empty constructor an allow these underlying assemblies to have a Transform() method which would build the GenericAnimal. Both approaches have some pros and cons: The 1st approach: Pros: All construction logic is in one place in one class GenericAnimal Cons: GenericAnimal class must be touched every-time there is a new representation form. The 2nd approach: Pros: construction responsibility is delegated to the underlying assembly. Cons: As construction logic is spread accross assemblies, tomorrow if I need to add a property X in GenericAnimal then I have to touch all the assemblies to change the Transform method. Which approach looks better ? or Which would you consider a lesser evil ? Is there any alternative way better than the above two ?

    Read the article

  • Redirecting a page when session expires using asp.net mvc

    - by Naidu
    In my web.config file i have the following code: <system.web> <assemblies> <authentication mode="Forms"> <forms loginUrl="/Account/Login" slidingExpiration="true" timeout="1" /> </authentication> <sessionState timeout="1"></sessionState> </assemblies> </system.web> And I have main page Project and in that there will sub pages. I have given the [Authorize] attribute for each view index method. After the session complete when we select any view then the page inside the project main page will be redirecting. But I want the whole page to be redirected. Any Help is appreciated.

    Read the article

  • Dynamically adding custom view to RemoteViews

    - by Naidu
    Could any help me to do this?My code is like: public CustomClass extends View { //uses ondraw() to do something } For displaying my custom view on HomeScreen i created a class to extend Broadcast Receiver public class customAppWidgetProvider extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.main); //Here i want to create my custom view class object and i want to add this view to linear layout in main.xml CustomClass object = new CustomClass(context) ; LinearLayout layout = new LinearLayout(context) ; layout.setLayoutParameters(new LayoutParameters(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT)); layout.addView(object); views.addview(R.id.linearlayout, (ViewGroup) layout) ; views.setOnClickPendingIntent(R.id.analog_appwidget, PendingIntent.getActivity(context, 0, new Intent(context, AlarmClock.class), PendingIntent.FLAG_CANCEL_CURRENT)); int[] appWidgetIds = intent.getIntArrayExtra( AppWidgetManager.EXTRA_APPWIDGET_IDS); AppWidgetManager gm = AppWidgetManager.getInstance(context); gm.updateAppWidget(appWidgetIds, views); } } } But adding viewgroup to RemoteView reference is not working... above main.xml contains only LinearLayout.I want to add custom view object to it.But after running this not showing anything on screen.. please help me to do this.Thanks in Advance.

    Read the article

  • APC UPS-5000 Power off remote servers

    - by Vishal
    Hi there, I have a UPS connected via the serial port to a server using PowerChute Business Edition. If a power outage occurs I would like this server to start shutting down all other servers within the network. Is there dedicated software to do this? I was thinking of creating a command file which runs a .bat file to run shut down commands to each server (using PSExec). I can set PowerChute to run this command file when a power failure occurs. Is there not anything APC provide which has this functionality and is more efficient than writing a .bat file to do this? Thanks,

    Read the article

  • Tellago Devlabs: A RESTful API for BizTalk Server Business Rules

    - by gsusx
    Tellago DevLabs keeps growing as the primary example of our commitment to open source! Today, we are very happy to announce the availability of the BizTalk Business Rules Data Service API which extends our existing BizTalk Data Services solution with an OData API for the BizTalk Server Business Rules engine. Tellago’s Vishal Mody led the implementation of this version of the API with some input from other members of our technical staff. The motivation The fundamental motivation behind the BRE Data...(read more)

    Read the article

  • SAPPHIRE NOW : SAP ouvre un site pour tester HANA, sa solution de In-Memory Computing au coeur de sa "stratégie d'innovation"

    SAPPHIRE NOW : SAP ouvre un site pour tester HANA Sa solution de In-Memory Computing au coeur de sa « stratégie d'innovation » Autre jour, autre ambiance au SAPPHIRE NOW de SAP qui se tient actuellement à Madrid. Si la présentation de Jim Hagemann Snabe, hier, était placée sous le signe de la sciences fiction, celle de Vishal Sikka, membre exécutive du Board de SAP, était aujourd'hui placé sous celui de la mythologie et de la Grèce antique. Le message, en revanche, confirmait celui introduit par le le co-PDG de la société : Cloud, Mobilité et In-Memory so...

    Read the article

  • encodingStyle usage in XmlSerializer.Serialize

    - by Vishal Seth
    Can somebody please explain the use of 4th parameter of public void Serialize( XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, string encodingStyle ) My issue is this: I've following string in one of the fields of my object: "reviewed ?" // music notation When I serialize it, it becomes & # x E; // see it as one word, w/o spaces it won't let me type And it fails when I try to transform this .NET generated XML through another XSL file Is it happening because its serializing using UTF-16? Is there any way I can make it transform using UTF-8 and make this "error" go away? **

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >