Search Results

Search found 133 results on 6 pages for 'prakash ranjan'.

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

  • how to generate random bubbles from array of sprites in cocos2d?

    - by prakash s
    I am devoloping the bubble shooter game in cocos2d how to generate random bubbles from array of sprites here is my code (void)addTarget { CGSize winSize = [[CCDirector sharedDirector] winSize]; //CCSprite *target = [CCSprite spriteWithFile:@"3.png" rect:CGRectMake(0, 0, 256, 256)]; NSMutableArray * movableSprites = [[NSMutableArray alloc] init]; NSArray *images = [NSArray arrayWithObjects:@"1.png", @"2.png", @"3.png", @"4.png",@"5.png",@"1.png",@"5.png", @"3.png", nil]; for(int i = 0; i < images.count; ++i) { NSString *image = [images objectAtIndex:i]; // generate random number based on size of array (array size is larger than 10) CCSprite*target = [CCSprite spriteWithFile:image]; float offsetFraction = ((float)(i+1))/(images.count+1); target.position = ccp(winSize.width*offsetFraction, winSize.height/2); target.position = ccp(350*offsetFraction, 460); [self addChild:target]; [movableSprites addObject:target]; //[target runAction:]; id actionMove = [CCMoveTo actionWithDuration:10 position:ccp(winSize.width/2,winSize. height/2)]; This code generating bubbles with *.png colour bubbles but i want to generate randomly because for shooting the bubbles by shooter class help me please id actionMoveDone = [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)]; [target runAction:[CCSequence actions:actionMove, actionMoveDone, nil]]; } }

    Read the article

  • how to give action to the CCArray which contain bubbles(sprites)

    - by prakash s
    I am making bubbles shooter game in cocos2d I have taken one array in that i have inserted number of different color bubbles and i showing on my game scene also , but if give some move action to that array ,it moving down but it displaying all the bubbles at one position and automatically destroying , what is the main reason behind this please help me here is my code: -(void)addTarget { CGSize winSize = [[CCDirector sharedDirector] winSize]; //CCSprite *target = [CCSprite spriteWithFile:@"3.png" rect:CGRectMake(0, 0, 256, 256)]; NSMutableArray * movableSprites = [[NSMutableArray alloc] init]; NSArray *images = [NSArray arrayWithObjects:@"1.png", @"2.png", @"3.png", @"4.png",@"5.png",@"1.png",@"5.png", @"3.png", nil]; for(int i = 0; i < images.count; ++i) { NSString *image = [images objectAtIndex:i]; // generate random number based on size of array (array size is larger than 10) CCSprite*target = [CCSprite spriteWithFile:image]; float offsetFraction = ((float)(i+1))/(images.count+1); //target.position = ccp(winSize.width*offsetFraction, winSize.height/2); target.position = ccp(350*offsetFraction, 460); // [[CCActionManager sharedManager ] pauseAllActionsForTarget:target ] ; [self addChild:target]; [movableSprites addObject:target]; //[target runAction:[CCMoveTo actionWithDuration:20.0 position:ccp(0,0)]]; id actionMove = [CCMoveTo actionWithDuration:10 position:ccp(winSize.width/2,winSize. height/2)]; id actionMoveDone = [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)]; [target runAction:[CCSequence actions:actionMove, actionMoveDone, nil]]; } } after the move at certain position i want to display all the bubbles in centre of my window

    Read the article

  • WHMCS Fatal error: Out of memory while View Invoice PDF

    - by prakash
    I can log into WHMCS & can access everything I should be able to access, but if i try to click View PDF Invoice, the following error will occur, Fatal error: Out of memory (allocated 67633152) (tried to allocate 76 bytes) in /home/xxxx/public_html/whmcs/includes/classes/class.tcpdf.php on line 8419 I have already set the allocated Memory limit to 256MB, but the error still occurs. At that time of the error, the process memory is exceeding the allocation I set. I checked log file, and found the following errors: #2 /home/xxxxx/public_html/client/includes/classes/class.tcpdf.php(8453): TCPDF->Image('/home/xxxxx/...', 20, 25, 75, 17.5816023739, 'PNG', '', '', false, 300, '', false, 8) #3 /home/xxxxx/public_html/client/includes/classes/class.tcpdf.php(7881): TCPDF->ImagePngAlpha('/home/xxxxx/...', 20, 25, 337, 79, 75, 17.5816023739, 'PNG', '', '', false, 300, '', NULL) While I was investigating the issue above I also noticed the error condition pictured below:

    Read the article

  • ArchBeat Link-o-Rama for 2012-03-23

    - by Bob Rhubart
    Why is Java EE 6 better than Spring? | Arun Gupta blogs.oracle.com "While Spring was revolutionary in its time and is still very popular and quite main stream in the same way Struts was circa 2003, it really is last generation's framework," says Arun Gupta. "Some people are even calling it legacy." OWSM vs. OEG - When to use which component - 11g | Prakash Yamuna blogs.oracle.com Prakash Yamuna shares a brief but informative summary. Webcast Q&A: Demystifying External Authorization blogs.oracle.com The slide deck, a transcript of the audience Q&A, and a link to replay of the recent Oracle Entitlements Server webcast featuring Tanya Baccam from SANS Institute. Anil Gaur on Cloud Computing Support in Java EE 7 www.infoq.com InfoQ's Srini Penchikala talks with Anil Gaur, Vice President of Software Development at Oracle, about cloud computing support in Java EE 7, project road map and timeline, cloud API in Java EE 7, and cloud development and deployment tools. Want to Patch your Red Hat Linux Kernel Without Rebooting? | Lenz Grimmer blogs.oracle.com Lenz Grimmer shares info an resources for those interested in learning more about KSplice. Oracle Linux Newsletter, March Edition www.oracle.com Get a spring dose of Linux goodness. Oracle Enterprise Gateway: Integration with Oracle Service Bus and Oracle Web Services Manager www.oracle.com Oracle Enterprise Gateway and Oracle Web Services Manager are central points of a SOA initiative when security is paramount. In this article, William Markito Oliveira and Fabio Mazanatti describe how to integrate these products with Oracle Service Bus. Thought for the Day "We always strain at the limits of our ability to comprehend the artifacts we construct — and that's true for software and for skyscrapers." — James Gosling

    Read the article

  • SQLAuthority News – Technical Review of Learning at Koenig Solutions

    - by pinaldave
    Yesterday I finished my 3 days fast track in person learning of course End to End SQL Server Business Intelligence at Koenig Solutions. You can read my previous article over here regarding why am I learning SQL Server. Yesterday I blogged about my experience of arriving to Training Center and my induction with the center. The Training Days I had enrolled for three days training so my routine each of the three days was very much same. However, the content every day was different as I was learning something new every day. Let me describe a few of the interesting details of my daily routine. A Single Student Batch The best part of my training was that in my training batch, I am single student. Koenig is known to smaller batches and often they have single student batches as well. I was very much delighted to know that I will have dedicated access and attention from my trainer in my batch as I will be single student in my batch. In most of the labs I have observed there are no more than 4 students at any time. Prakash and Pinal 7:30 AM Breakfast Talk We all students gather at 7:30 in breakfast area. The best time of the day. I was the only Indian student in the group. The other students were from USA, Canada, Nigeria, Bhutan, Tanzania, and a few others from other countries. I immediately become the source of information and reference manual. Though the distance between Delhi and Bangalore is 2000+ KM I was considered as a local guy. 8:30 AMHeading to Training Center Every day without fail at 8:30 the van started from our accommodation to the training center. As mentioned in an earlier blog post the distance is about 5 minutes and we were able to reach at the location before 8:45. This gave us some time settle in before our class starts at 9:00 AM. 9:00 AM Order Lunch Food Well it may sound funny that we just had breakfast 30 minutes but the first thing everybody has to do is to order lunch as soon as the class starts. There is an online training portal to order food for the day. Everybody has to place their order early during the day so the food arrives on time during lunch time. Everybody can order whatever they want to order using an online ordering system. The options are plenty and everybody can order what they like. 9:05 AM Learning Starts After deciding the lunch we started the learning. I was very fortunate to have a very experienced trainer - Prakash Chheatry. Though I have never met him before I have heard a lot about Prakash. He is known as the top most SQL Server Trainer in India. His student list contains some of the very well known SQL Server Experts of the world and few of SQL Server “best seller” book authors. Learning continues till 1:00 PM with one tea-coffee break in between. 1:00 PM Lunch The lunch time is again the fun time. We all students get together in the afternoon and tell the stories of the world. Indeed the best part of the day beside learning new stuff. 4:55 PM Ready to Return We stop at 4:55 as at precisely 5:00 PM the van stops by the institute which takes us back to our accommodation. Trust me seriously long long day always but the amount of the learning is the win of the day. 7:30 PM Dinner Time After coming back to the accommodation I study till 7:30 and then rush for dinner. Dinner is world cuisine and deserts are really delicious. After dinner every day I have written a blog and retired early as the next day is always going to be busier than the present day. What did I learn As I mentioned earlier I know SQL Server fairly well. I had expressed the same in my conversation as well. This is the reason I was assigned a fairly senior trainer and we learned everything quite quickly. As I know quite a few things we went pretty fast in many topics. There were a few things, I wanted to learn in detail as well practice on the labs. We slowed down where we wanted and rush through the concepts where I was very comfortable. Here is the list of the things which we covered in action pack three days. Introduction to Business Intelligence (Intro) SQL Server Analysis Service (Theory and Lab) SQL Server Integration Service  (Theory and Lab) SQL Server Reporting Service  (Theory and Lab) SQL Server PowerPivot (Lab) UDM (Theory) SharePoint Concepts (Theory) Power View (Demo) Business Intelligence and Security (Discussion) Well, I was delighted that I was able to refresh lots of concepts during these three days. Thanks to my trainer and my friend who helped me to have a good learning experience. I believe all the learning  will help me in my growth and future career. With this I end my this experience. I am planning to have another online learning experience later this month. I will blog about my experience as I begin it. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQL Training, T SQL, Technology

    Read the article

  • Merging free space of hard drive to primary partition

    - by Dibya Ranjan
    I have purchased a new HDD, I tried to format making 1 primary partition, I converted the rest unallocated space to extended partition then to logical drive now I have 3 logical drives. I feel that the size allocated to the primary partition is less so I used shrink option to the 3 logical partitions in diskmgmt but each partition is resulting in one memory block of Free space. Now I want to merge these free spaces to my primary partition.

    Read the article

  • Needs free/ opensource network monitoring tool for office LAN

    - by Amit Ranjan
    I know there must be a lot similar questions on SU. Let me explain my setup first. I have 4-5 PC, Laptops and Few Android Phones in my office. To get them on a network , I have a UTStarCom, WA3002G1 ADSL2+ router with a landline broadband connection which has nothing to do with any PC except the configuration settings. Broadband channel is always on, we need to switch on the router and the internet is ready for us. No Internet Connection sharing is done via any PC. I have a limited 20GB monthly plan, which is consumed in 10-20 days, depending upon the download requirements. So in the above case, i need some suggestions from you: How do I monitor my Internet Bandwidth along-with the connected systems, realtime? Any free opensource tool available? Tweaks / Changes in PC to save bandwidth as my ISP do not have any Unlimited plan. PC and Laptops are Windows XP and/Or windows 7. Either of the platform tools are welcome.

    Read the article

  • No headphone or speakers plugged in - Windows 7 issue

    - by Amit Ranjan
    I am facing a wierd issue between my sound card driver and Windows7(any edition). I have a sony vaio notebook (VPCEB24EN). Two days ago, on start I got diabled wifi, charging and speakers. Then I restart the PC and everthing worked fine. Later on I again restarted my machine, and then I found the my speakers were not working. I thought, restart will work. I restarted many more times but it did'nt work. I searched google and found that , it might be due to : 1. Hardware is not switched on from bios. 2. No hardware. 3. overriding 64-bit drivers with 32-bit drivers. To make it working, I restored my laptop from scratched, but while restoring pc, the realtek HD drivers, it gave me an error 505. I then formatted the drive and installed Win7 Ultimate 32bit (With PC was, Win7 64-bit Home Basic). I got lots of yellow exclamation in device manager, thinking now this will resolve my issue. But Even after the installing all drivers on a fresh installation, I was still with the same position. A red cross on speaker- No Speakers or Headphone plugged in. Please Note: My Laptop is Vaio , E Series, VPCEB24EN. Audio : Intel® High Definition Audio compatible but accepts Realted Audio. While using BIOS Agent, I got Intel Chipset 5 Series Audio Adapter and ATI RV370 Audio adapter found on my board. Installed is Win7 32bit Ultimate. factory default was Win7 64-bit Home Basic Memory: RAM 3GB/ 320GB HDD Display : ATI Mobility Radeon™ HD 5145 Graphics

    Read the article

  • Is it possible to save the product key of Windows 8?

    - by Dibya Ranjan
    I have Windows 8 activated in my system. I don't have the product key of windows right now. Now I want to format my system again. Is there any way so that I can reuse the key? Is there any way I can get the key from an activated windows machine? Edit: I am not able to find the product key because I have used a MAK as my product key. Now I want the same to use it after formatting my disk. I found a software Volume Activation Manager tool on the windows website. I am not sure how to use it. Please tell me how can I reuse my key?

    Read the article

  • How Can I Configure Selenium grid to test website in parallel?

    - by prakash.panjwani
    Hello Friends, I want to use selenium grid for my web page testing. I have successfully installed the demo of selenium grid on my PC and it is running fine. I have followed this link to install and run the selenium grid demo. I am trying to code a java program using selenium rc which can run with selenium grid for testing the web site, but I am not getting how does I make change on the selenium grid existing demo so that it will work for my web test. Can some body provide me any link/example so that I will do that?

    Read the article

  • How can I create email account using WHM Cpanel?

    - by prakash.panjwani
    Hello Friends, I have a dedicated linux server. I am using WHM cpanel for linux server.I want to create a email account using this cpanel. I am not getting how I can create a email account.The cpanel says that mail Lists 0/0. I have attached the images of cpanel.I am newer with linux server. Please somebody help me. Thanks In advance.

    Read the article

  • converting to MXF using ffmpeg

    - by Prakash
    I have been trying to use FFmpeg utility to convert a avi file using DNxHD to mxf format. I am using "FFmpeg" with params as following: ffmpeg -i ccvt_box.avi -vcodec dnxhd -video_size 1920x1080 -r 24 -b:v 115m ex.mxf The error it is giving : ffmpeg version N-43737-g76c3fff Copyright (c) 2000-2012 the FFmpeg developers built on Aug 20 2012 18:50:42 with llvm-gcc 4.2.1 (LLVM build 2336.11.00) configuration: libavutil 51. 70.100 / 51. 70.100 libavcodec 54. 53.100 / 54. 53.100 libavformat 54. 25.104 / 54. 25.104 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 11.101 / 3. 11.101 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 Input #0, avi, from 'ccvt_box.avi': Duration: 00:00:10.00, start: 0.000000, bitrate: 691 kb/s Stream #0:0: Video: indeo5 (IV50 / 0x30355649), yuv410p, 340x344, 10 tbr, 10 tbn, 10 tbc Metadata: title : bob.avi [dnxhd @ 0x7fcd60818e00] video parameters incompatible with DNxHD Output #0, mxf, to 'ex.mxf': Stream #0:0: Video: dnxhd, yuv422p, 340x344, q=2-1024, 90k tbn, 24 tbc Metadata: title : bob.avi Stream mapping: Stream #0:0 -> #0:0 (indeo5 -> dnxhd) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    Read the article

  • Telugu (unicode) font rendering in emacs

    - by Prakash K
    [I asked the following question in stackoverflow, and I have been redirected here. I hope I can get some answers here. My question at stackoverflow had two small images showing the example rendering of text. As a new user at superuser, I am not being allowed to include them here, nor I am allowed to post more than one hyperlink. And, I don't have enough reputation on SO to migrate that question. Please look at the stackoverflow question for the images. Sorry about the inconvenience.] I sometimes edit text in telugu language. However, when I open the file (UTF-8 encoded) in GNU emacs (version 23.1.50.1 on Ubuntu Jaunty) the text rendering is incorrect. The same text file opened in gedit is rendered correctly. Here's a snippet: ????????? ???? ???? ???????? rendred in gedit: Please see the SO question for the image showing telugu text rendering in gedit And, the emacs rendering of the same text: Please see the SO question for the image showing telugu text rendering in emacs Wherever glyphs need to be composited (not sure if it's the right word), emacs (or whatever library it uses) is not doing it right. Is there anyway to fix this? Perhaps tuning some setting in my configuration? Any ideas, please?

    Read the article

  • Telugu (unicode) font rendering in emacs

    - by Prakash K
    I sometimes edit text in telugu language. However, when I open the file (UTF-8 encoded) in GNU emacs (version 23.1.50.1 on Ubuntu Jaunty) the text rendering is incorrect. The same text file opened in gedit is rendered correctly. Here's a snippet: ????????? ???? ???? ???????? rendred in gedit: And, the emacs rendering of the same text: Wherever glyphs need to be composited (not sure if it's the right word), emacs (or whatever library it uses) is not doing it right. Is there anyway to fix this? Perhaps tuning some setting in my configuration? Any ideas, please?

    Read the article

  • Internet setup for my office

    - by prakash
    We have two internet connections to our office and our current setup is like this.. The internet connections require pppoe log in so i take each cable and plug it into a wifi router and configure the router to log in to the pppoe and then plug in a cable from the router to a switch and distribute the internet throughout my office. The problem with this setup is it is really hard to monitor and im not able to monitor who is hogging internet usage and what he or she is actually using it for. apart from this we also have a nas setup which is routed through another switch . Could someone please throw a little light on how i can restructure this setup for easy monitoring and better transparency... ? each wan router is connected to a different switch and is distributed to users accordingly.. we have around 40 users in the office.. we want to setup a single linux box to which i want to connect the two wan connections and from there distribute it to all our users.... im looking for a solution where we do not have to invest more that buying a single pc and a couple of nics

    Read the article

  • how to optimize apache on web-server

    - by Prakash
    how can I optimize the server with following configuration. It takes too much time to load a page. IBM X3200 M3 Server - 1 Intel Xeon Processor with 4 GB Ram Below is my current configuration for apache: Start Servers: 5 (Default) Minimum Spare Servers: 10 Maximum Spare Servers: 20 Server Limit: 500 Max Clients: 500 Max Requests Per Child: 10000 (Default) Keep-Alive: On Keep-Alive Timeout: 5 Max Keep-Alive Requests: 100 Timeout: 200

    Read the article

  • How Can I test my website using selemium Grid?

    - by prakash.panjwani
    Hello sir, I want to use selenium grid for my web page testing. I have successfully installed the demo of selenium grid on my PC and it is running fine. Now I want to run the test for my web site,but I am not getting how can I do that. Can some body give some example so that I will do that.I am a newer with selenium. I do not know much about selenium and Ant. Please help me . (I have basic knowledge about java.) Thanks In Advance

    Read the article

  • Sound card issues (High Definition Audio Controller)

    - by Prakash R
    I have a 5-year-old Acer Aspire 4520. Until a month back it was working beautifully on Windows 7 32bit. But then out of the blue, the sound stopped working. I've tried reinstalling the OS 3-4 times. The sound came back a couple of times, but it stopped working after a reboot. Even after installing the sound drivers, I don't see any entry in the Playback tab of the Sound applet in Control Panel. I see a High Definition Audio Controller entry in Device Manager. I disabled and uninstalled it, but Windows reinstalls it automatically. I'll share specific hardware details if anybody here needs to know. The processor is "AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55". Any help would be appreciated.

    Read the article

  • Tech Mahindra Applications Consolidation Project

    - by Javier Puerta
    “With Oracle’s end-to-end hardware and software solutions, we seamlessly migrated 22 applications from the legacy platform to the new platform in just seven weeks. Thanks to Oracle, we gained an integrated view of enterprisewide data across 49 locations and increased storage capacity by 25%, enabling us to improve service delivery and support our revenue-growth target.” - Ved Prakash Nirbhya, CIO, Tech Mahindra Limited Read full story details here

    Read the article

  • Class Mapping Error: 'T' must be a non-abstract type with a public parameterless constructor

    - by Amit Ranjan
    Hi, While mapping class i am getting error 'T' must be a non-abstract type with a public parameterless constructor in order to use it as parameter 'T' in the generic type or method. Below is my SqlReaderBase Class public abstract class SqlReaderBase<T> : ConnectionProvider { #region Abstract Methods protected abstract string commandText { get; } protected abstract CommandType commandType { get; } protected abstract Collection<IDataParameter> GetParameters(IDbCommand command); **protected abstract MapperBase<T> GetMapper();** #endregion #region Non Abstract Methods /// <summary> /// Method to Execute Select Queries for Retrieveing List of Result /// </summary> /// <returns></returns> public Collection<T> ExecuteReader() { //Collection of Type on which Template is applied Collection<T> collection = new Collection<T>(); // initializing connection using (IDbConnection connection = GetConnection()) { try { // creates command for sql operations IDbCommand command = connection.CreateCommand(); // assign connection to command command.Connection = connection; // assign query command.CommandText = commandText; //state what type of query is used, text, table or Sp command.CommandType = commandType; // retrieves parameter from IDataParameter Collection and assigns it to command object foreach (IDataParameter param in GetParameters(command)) command.Parameters.Add(param); // Establishes connection with database server connection.Open(); // Since it is designed for executing Select statements that will return a list of results // so we will call command's execute reader method that return a Forward Only reader with // list of results inside. using (IDataReader reader = command.ExecuteReader()) { try { // Call to Mapper Class of the template to map the data to its // respective fields MapperBase<T> mapper = GetMapper(); collection = mapper.MapAll(reader); } catch (Exception ex) // catch exception { throw ex; // log errr } finally { reader.Close(); reader.Dispose(); } } } catch (Exception ex) { throw ex; } finally { connection.Close(); connection.Dispose(); } } return collection; } #endregion } What I am trying to do is , I am executine some command and filling my class dynamically. The class is given below: namespace FooZo.Core { public class Restaurant { #region Private Member Variables private int _restaurantId = 0; private string _email = string.Empty; private string _website = string.Empty; private string _name = string.Empty; private string _address = string.Empty; private string _phone = string.Empty; private bool _hasMenu = false; private string _menuImagePath = string.Empty; private int _cuisine = 0; private bool _hasBar = false; private bool _hasHomeDelivery = false; private bool _hasDineIn = false; private int _type = 0; private string _restaurantImagePath = string.Empty; private string _serviceAvailableTill = string.Empty; private string _serviceAvailableFrom = string.Empty; public string Name { get { return _name; } set { _name = value; } } public string Address { get { return _address; } set { _address = value; } } public int RestaurantId { get { return _restaurantId; } set { _restaurantId = value; } } public string Website { get { return _website; } set { _website = value; } } public string Email { get { return _email; } set { _email = value; } } public string Phone { get { return _phone; } set { _phone = value; } } public bool HasMenu { get { return _hasMenu; } set { _hasMenu = value; } } public string MenuImagePath { get { return _menuImagePath; } set { _menuImagePath = value; } } public string RestaurantImagePath { get { return _restaurantImagePath; } set { _restaurantImagePath = value; } } public int Type { get { return _type; } set { _type = value; } } public int Cuisine { get { return _cuisine; } set { _cuisine = value; } } public bool HasBar { get { return _hasBar; } set { _hasBar = value; } } public bool HasHomeDelivery { get { return _hasHomeDelivery; } set { _hasHomeDelivery = value; } } public bool HasDineIn { get { return _hasDineIn; } set { _hasDineIn = value; } } public string ServiceAvailableFrom { get { return _serviceAvailableFrom; } set { _serviceAvailableFrom = value; } } public string ServiceAvailableTill { get { return _serviceAvailableTill; } set { _serviceAvailableTill = value; } } #endregion public Restaurant() { } } } For filling my class properties dynamically i have another class called MapperBase Class with following methods: public abstract class MapperBase<T> where T : new() { protected T Map(IDataRecord record) { T instance = new T(); string fieldName; PropertyInfo[] properties = typeof(T).GetProperties(); for (int i = 0; i < record.FieldCount; i++) { fieldName = record.GetName(i); foreach (PropertyInfo property in properties) { if (property.Name == fieldName) { property.SetValue(instance, record[i], null); } } } return instance; } public Collection<T> MapAll(IDataReader reader) { Collection<T> collection = new Collection<T>(); while (reader.Read()) { collection.Add(Map(reader)); } return collection; } } There is another class which inherits the SqlreaderBaseClass called DefaultSearch. Code is below public class DefaultSearch: SqlReaderBase<Restaurant> { protected override string commandText { get { return "Select Name from vw_Restaurants"; } } protected override CommandType commandType { get { return CommandType.Text; } } protected override Collection<IDataParameter> GetParameters(IDbCommand command) { Collection<IDataParameter> parameters = new Collection<IDataParameter>(); parameters.Clear(); return parameters; } protected override MapperBase<Restaurant> GetMapper() { MapperBase<Restaurant> mapper = new RMapper(); return mapper; } } But whenever I tried to build , I am getting error 'T' must be a non-abstract type with a public parameterless constructor in order to use it as parameter 'T' in the generic type or method. Even T here is Restaurant has a Parameterless Public constructor.

    Read the article

  • Making Infragistics ultrawingrid, desired columns readonly

    - by Amit Ranjan
    I am stucked at the situation where I need to disable few columns of a each row ,except newly added row. That is I have 10 columns in grid and I want first three columns that are binded from the rows coming from db as disabled or read-only, rest are editable. if I add new row then all columns of new row must be enabled until and unless it is saved. I dont have any DataKey or Primary key for my existing row or new row. I have to check for some boolean values like IsNewRow. in my current scenario i am using this code block Private Sub dgTimeSheet_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles dgTimeSheet.InitializeRow ''if either column key is Project, Class or Milestone '' Activation.NoEdit = Disable and Activation.AllowEdit = Enable Dim index As Integer = e.Row.Index If e.Row.IsAddRow Then dgTimeSheet.Rows(index).Cells(PROJECT).Activation = Activation.AllowEdit dgTimeSheet.Rows(index).Cells(SERVICE_ISSUE_CLASS).Activation = Activation.AllowEdit dgTimeSheet.Rows(index).Cells(MILESTONE).Activation = Activation.AllowEdit Else dgTimeSheet.Rows(index).Cells(PROJECT).Activation = Activation.NoEdit dgTimeSheet.Rows(index).Cells(SERVICE_ISSUE_CLASS).Activation = Activation.NoEdit dgTimeSheet.Rows(index).Cells(MILESTONE).Activation = Activation.NoEdit End If CheckRows() End Sub but the problem is that if i click on disabled/readonly rows then newly added rows also gets disabled., which i dont want

    Read the article

  • Parsing and getting specific values from CSV string

    - by Amit Ranjan
    I am having a string in CSV format. Please see my earlier question http://stackoverflow.com/questions/2865861/parsing-csv-string-and-binding-it-to-listbox I can add new values to it by some mechanism. Everything will be same except the new values will have numeric part = 0. Take example I have this exsiting CSV string 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt Now by some mechanism i added two more files Superman.txt and Spiderman.txt to the existing string. Now it became 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt What i am doing here is that this csv string is paased into SP where its splitted and inserted to db. So for inserting I have to take the files with numeric part 0 only rest will be omiited .Which will be further then converted into CSV string Array will look like this str[0]="1" str[1]="abc.txt" str[2]="2" str[3]="def.doc " str[4]="3" str[5]="flyaway.txt" str[6]="0" str[7]="Superman.txt" str[8]="0" str[9]="Spiderman.txt" So at last i want to say my input will be 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt Desired Output: 0, Superman.txt, 0 , Spiderman.txt

    Read the article

  • Using If Else in HTML page inside <%# %>tags

    - by Amit Ranjan
    I have to set image on the basis of fields value coming from db. I want it to achieve via. tags <%# %. For example i have collection binded with grid. It has a Field called Online which is boolean. So if the value of Online is true then the green.png will be set as path of asp:image control else grey.png will be the path of the asp: image control.

    Read the article

  • Holding value in collection

    - by Amit Ranjan
    I have a application which is on timesheet. I have total of 54 columns out of which 10 columns are visible rest invisible. First 3 columns are Project, MileStone and Classes. Rest are Sun- Sat work hrs. Now I have a column named 'taskid' as SunTaskID,MonTaskID and so on till SatTaskID for holding each days taskid. Now on the selection of SunHrs (Sunday's Work Hrs), i retrieve that days taskid and on the basis of task id i retrieve attachments which is displayed under a listbox. Now the problem is that since a day can have multiple attachments and a user can attach multiple attachments at time. He can enter values from grid to. Grid cells are editable. I am using BindingList(of TaskClass) in VB.Net for binding grid. I have total 54 properties n my task class. So i want to what property do i need to hod each days attachment and in what way. Earlier I tried Dictionary. But i was not aware of its usage as a property so i gave. Then prepared a separate class for attachment but, it was difficult to synchronize the existing attachments with taskid...

    Read the article

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