Search Results

Search found 141 results on 6 pages for 'adnan anwar'.

Page 6/6 | < Previous Page | 2 3 4 5 6 

  • Validate a statment from string in JAVA

    - by Adnan
    I have a string; String allIn = "(50 > 100) AND (85< 100)"; Now I need to evaluate if the conditions inside are TRUE or FALSE, how can I do it? In real the string will be a value from a field in my DB, where I will substitute different values and they will form a string as shown above.

    Read the article

  • remove duplicate from string in PHP

    - by Adnan
    Hello, I am looking for the fastest way to remove duplicate values in a string separated by commas. So my string looks like this; $str = 'one,two,one,five,seven,bag,tea'; I can do it be exploding the string to values and then compare, but I think it will be slow. what about preg_replace() will it be faster? Any one did it using this function?

    Read the article

  • alternative of microsoft project along API :)

    - by adnan
    Dear, I am looking for well known Microsoft Project alike applications which somehow i get to know through this http://stackoverflow.com/questions/729926/alternatives-to-microsoft-project but I also need to know their API/Library through which I can pro grammatically read their files using .NET Hope m not asking for much :)

    Read the article

  • list all files from directories and subdirectories in Java

    - by Adnan
    What would be the fastest way to list the names of files from 1000+ directories and sub-directories? EDIT; The current code I use is: import java.io.File; public class DirectoryReader { static int spc_count=-1; static void Process(File aFile) { spc_count++; String spcs = ""; for (int i = 0; i < spc_count; i++) spcs += " "; if(aFile.isFile()) System.out.println(spcs + "[FILE] " + aFile.getName()); else if (aFile.isDirectory()) { System.out.println(spcs + "[DIR] " + aFile.getName()); File[] listOfFiles = aFile.listFiles(); if(listOfFiles!=null) { for (int i = 0; i < listOfFiles.length; i++) Process(listOfFiles[i]); } else { System.out.println(spcs + " [ACCESS DENIED]"); } } spc_count--; } public static void main(String[] args) { String nam = "D:/"; File aFile = new File(nam); Process(aFile); } }

    Read the article

  • Deprecated Preference Activity method

    - by Adnan Nazir
    package com.adi.preferencedemotest; i am working on PreferenceActivity but when i call my preference xml(prefs.xml) with the help of addPreferencesFromResource it says this method is deprecated and "This function is not relevant for a modern fragment-based PreferenceActivity" is there any alternative of this method? how i can handle ? public class PrefsActivity extends PreferenceActivity { @SuppressWarnings("deprecation") <------- @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.prefs); <------- } } Note: may be my question rate as duplicated but i didn't find any.

    Read the article

  • how can i show ccessarychecked cell values in alertbox

    - by adnan
    i have created uitableview and cell in uitableview are accessarychecked . i have implemented an action named -(IBAction) checkBoxClicked . what i need is that i wanted to show accessarychecked cell values in alertbox when i click on button this is the code which i have written #import "ViewController.h" @implementation ViewController @synthesize cell; - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 7; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { cell= [tableView dequeueReusableCellWithIdentifier:@"cell"]; if (cell == nil) { cell = [[ UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; } cell.textLabel.text = [myarray objectAtIndex:indexPath.row]; /* NSString *imagefile = [[NSBundle mainBundle] pathForResource:@"cellimage" ofType:@"png"]; UIImage *ui = [[UIImage alloc] initWithContentsOfFile:imagefile]; cell.imageView.image = ui;*/ NSString *check = [[NSBundle mainBundle] pathForResource:@"checkbox_not_ticked" ofType:@"png"]; UIImage *bi = [[UIImage alloc] initWithContentsOfFile:check]; cell.imageView.image = bi; cell.accessoryType = UITableViewCellAccessoryNone; return cell; [cell release]; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { cell = [tableView cellForRowAtIndexPath:indexPath]; if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } else { cell.accessoryType = UITableViewCellAccessoryNone; } } -(IBAction) checkBoxClicked { NSArray *array = [[NSArray alloc] initWithArray:[myarray objectAtIndex:cell.accessoryType]:UITableViewCellAccessoryCheckmark]; if (array.cell.accessoryType == UITableViewCellAccessoryCheckmark) { UIAlertView *msg = [[ UIAlertView alloc] initWithTitle:@"selected items are given: " message:array delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil ]; [msg show ]; [msg release]; [myarray release]; } } //-(IBAction)checkBoxClicked{} - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } #pragma mark - View lifecycle - (void)viewDidLoad { myarray = [[NSArray alloc] initWithObjects:@"mondey",@"tuesday", @"wednesday",@"thursday",@"friday",@"saturday",@"sundey", nil]; [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } - (void)viewDidUnload { [myarray release]; [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } @end

    Read the article

  • date in future for Rails

    - by Adnan
    Hello, I am trying to make a validation that will validate that the entered date is in future and that the selected date is in the next 7 days. In order to validate if the date is in future I use; valid_until.future? and this one works fine, but to make a validation to check if the date selected is withing 7 days from now?

    Read the article

  • intel dg31pr heat issues

    - by user17077
    Hi there, I have got Intel 8400 processor installed on a DG31PR board. My board gets hot quite quickly and the temperature hovers around 50-65 C at normal load. I have got a good cooling system but I wonder if its a problem in my mobo. Can you guys kindly suggest what to do? My processor runs fine and stands at 30-32 C. Thanks. Regards, Adnan

    Read the article

  • How do I change the default .htm file icon?

    - by Michael Clayton
    I really enjoy the look of UBUNTU. The only thing that I want to change is the default icon used for .html (.htm) files. I want to use the icon /usr/lib/firefox/browser/icons/mozicon128.png instead. I do not want to change any other visual element. Is there a practical way to accomplish this small change? edit: @Mitch, I've used assogiate in the past and although I was able to change the icon used for .mht files, I could not get it to change the .htm icon. @Anwar Shah, thanks for the information. I wish that it would work for me. Running 13.10 x86, after I do the copy of the icons, in the folders are a bunch of links to .svg files not actual graphics files. It does not appear that the second copy actually does anything on my system.

    Read the article

  • Cursor seems to freeze in the first attempt to type - Unity 3D, 12.04

    - by Denis
    It happens in the first attempt of typing, no matter is after the startup, or 5 minutes later, or then after. The cursor (or maybe it's the system) seems to freeze, no matter the application I use, taking up 4 to 5 sec to appear what is typed. Subsequently, everything is normal, using another applications. @Anwar Shah suggested it could be a daemon waiting to run before the lauching of the first application. Turning off Zeitgest didn't help. It occurs only with Unity-3d. Tested with Unity-2d, everything is fine. Tried to change some Compiz settings, nothing worked, although not tested with every single parameter. Also I deactivated Ati proprietary driver, no effect. My system: AMD E350 1.6Gh, 2G-Ram, ATI graphics - Ubuntu 12.04, 64bits. Is that what I should expect, or can be fixed or improved? Thanks.

    Read the article

  • Upcoming events 2011 IT Camp Saturday Tampa and Orlando Code Camp 2011

    - by Nikita Polyakov
    I’ll be speaking at a few upcoming events: Saturday March 19th 2011 IT Camp Saturday Tampa http://itcampsaturday.com/tampa This is a first of it’s kind – IT Pro camp, a more topic open then many traditional Code Camp and no so much code focused. Here is just a small sample: Adnan Cartwright Administrating your Network with Group Policy Nikita Polyakov Intro to Phone 7 Development Landon Bass Enterprise Considerations for SharePoint 2010 Michael Wells Intro to SQL Server for IT Professionals Keith Kabza Microsoft Lync Server 2010 Overview Check out the full session schedule for other session, if you are in the IT Pro field – you will find many sessions of interest here: http://itcampsaturday.com/tampa/2011/03/01/schedule/   Saturday March 26th 2011 Orlando Code Camp http://www.orlandocodecamp.com/ Just a highlight of a few sessions: Design & Animation Chris G. Williams: Making Games for Windows Phone 7 with XNA 4.0 Diane Leeper: Animating in Blend: It's ALIVE Diane Leeper: Design for Developers: Bad Design Kills Good Projects Henry Lee: Windows Phone 7 Animation Konrad Neumann: Being a Designer in a Developer's World Nikita Polyakov: Rapid Prototyping with SketchFlow in Expression Blend WP7 Henry Lee: Learn to Use Accelerometer and Location Service (GPS) in Windows Phone Application Joe Healy: Consuming Services in Windows Phone 7 Kevin Wolf: Work From Anywhere = WFA (Part 1) Kevin Wolf: Work From Anywhere = WFA (Part 2) Nikita Polyakov: WP7 Marketplace Place and Monetization Russell Fustino: Making (More) Money with Phone 7

    Read the article

  • Cursor seems to freeze in the first attempt of typing - Unity 3D, 12.04

    - by Denis
    It happens in the first attempt of typing, no matter is after the startup, or 5 minutes later, or then after. The cursor (or maybe it's the system) seems to freeze, no matter the application I use, taking up 5 sec to appear what is typed. Subsequently, everything is normal, using another applications. @Anwar Shah suggested it could be a daemon waiting to run before the lauching of the first application. Turning off Zeitgest didn't help. It occurs only with Unity-3d. Tested with Unity-2d, everything is fine. Tried to change some Compiz settings, nothing worked, although not tested with every single parameter. Also I deactivated Ati proprietary driver, no effect. My system: AMD E350 1.6Gh, 2G-Ram, ATI graphics - Ubuntu 12.04, 64bits. Update 1: the cursor is blinking normally before I start typing. After the first character (which is not showed), seems to freeze, taking 5 seconds to get normal again. Very annoying, specially when you want to access login sites. Update 2: I tested on a different and old machine (Athlon 64 4800 x2, 4Gb ram, no problems - takes 2 seconds, acceptable. I think it could be related to my specific hardware (Samsung RV415), but not sure about it. Anyone experiencing something similar? Is that what I should expect, or can be fixed or improved? Thanks.

    Read the article

  • How do we achieve "substring-match" under O(n) time?

    - by Pacerier
    I have an assignment that requires reading a huge file of random inputs, for example: Adana Izmir Adnan Menderes Apt Addis Ababa Aden ADIYAMAN ALDAN Amman Marka Intl Airport Adak Island Adelaide Airport ANURADHAPURA Kodiak Apt DALLAS/ADDISON Ardabil ANDREWS AFB etc.. If I specify a search term, the program is supposed to find the lines whereby a substring occurs. For example, if the search term is "uradha", the program is supposed to show ANURADHAPURA. If the search term is "airport", the program is supposed to show Amman Marka Intl Airport, Adelaide Airport A quote from the assignment specs: "You are to program this application taking efficiency into account as though large amounts of data and processing is involved.." I could easily achieve this functionality using a loop but the performance would be O(n). I was thinking of using a trie but it seems to only work if the substring starts from index 0. I was wondering what solutions are there which gives a performance better than O(n)?

    Read the article

  • Unable to use stored procs in a generic repository for the entity framework. (ASP.NET MVC 2)

    - by Matt
    Hi, I have a generic repository that uses the entity framework to manipulate the database. The original code is credited to Morshed Anwar's post on CodeProject. I've taken his code and modified is slightly to fit my needs. Unfortunately I'm unable to call an Imported Function because the function is only recognized for my specific instance of the entity framework public class Repository<E, C> : IRepository<E, C>, IDisposable where E : EntityObject where C : ObjectContext { private readonly C _ctx; public ObjectResult<MyObject> CallFunction() { // This does not work because "CallSomeImportedFunction" only works on // My object. I also cannot cast it (TrackItDBEntities)_ctx.CallSomeImportedFunction(); // Not really sure why though... but either way that kind of ruins the genericness off it. return _ctx.CallSomeImportedFunction(); } } Anyone know how I can make this work with the repository I already have? Or does anyone know a generic way of calling stored procedures with entity framework? Thanks, Matt

    Read the article

  • how do i search from php file ?

    - by Tum Bin
    Dear Friends, im totally new in php. Just learning. I got 2 Assingment with php and html. Assignment 01: I have to mansion some pplz name and all of them some friends name. and I have to print common friend if there have common friend. Bt there have a prob that I got also msg which dnt have any common friend like “Rana has 0 friends in common with Roni.” I want to stop this and how can i? Assignment 02: I made a html form to search a person from that php file. Like: when I will search for Rana php form will b open and and print : Rana have 4 friends and he has a common friend with Nandini and Mamun. when I will search for Tanmoy the page will be open and print: Tonmoy is Rana’s friend who have 4 friend and common friends with Nandini and Mamun. for this I have to use the function “post/get/request” Plz plz plzzzzzzzzzz help me! Here im posting my codes; <?php # Function: finfCommon function findCommon($current, $arr) { $cUser = $arr[$current]; unset($arr[$current]); foreach ($arr As $user => $friends) { $common = array(); $total = array(); foreach ($friends As $friend) { if (in_array($friend, $cUser)) { $common[] = $friend; } } $total = count($common); $add = ($total != 1) ? 's' : ''; $final[] = "<i>{$current} has {$total} friend{$add} in common with {$user}.</i>"; } return implode('<br />', $final); } # Array of users and friends $Friends = array( "Rana" => array("Pothik", "Zaman", "Tanmoy", "Ishita"), "Nandini" => array("Bonna", "Shakib", "Kamal", "Minhaj", "Ishita"), "Roni" => array("Akbar", "Anwar", "Khakan", "Pavel"), "Liton" => array("Mahadi", "Pavel"), "Mamun" => array("Meheli", "Tarek", "Zaman") ); # Creating the output value $output = "<ul>"; foreach ($Friends As $user => $friends) { $total = count($friends); $common = findCommon($user, $Friends); $output .= "<li><u>{$user} has {$total} friends.</u><br /><strong>Friends:</strong>"; if (is_array($friends) && !empty($friends[0])) { $output .= "<ul>"; foreach ($friends As $friend) { $output .= "<li>{$friend}</li>"; } $output .= "</ul>"; } $output .= "{$common}<br /><br /></li>"; } $output .= "</ul>"; # Printing the output value print $output; ?>

    Read the article

< Previous Page | 2 3 4 5 6