Search Results

Search found 322 results on 13 pages for 'muhammad adnan'.

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

  • simple search in rails

    - by Adnan
    Hi, I'm making a simple search form in rails. In my search view I have two select boxes with fixed values like: SELECT BOX 1 SELECT BOX 2 ALL, ALL, FR, FR, US, US, DE DE And I have 2 fields in my DB with country_from and country_to. So for making a simple search like from FR to US I use: @search_result = Load.find(:all, :conditions => "country_from='#{params[:country_from]}' AND country_to='#{params[:country_to]}'" ) that is fine, but I need to implement the ALL option as well, so when I make a search like from DE to ALL I get a list with all countries in country_to I image I can do it with ifs...but what would be the most efficient way to do it?

    Read the article

  • 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

  • How does DNS "get stuck"?

    - by Muhammad Mussnoon
    I recently registered a domain and got hosting from Dreamhost. But when even after three days, the website was not accessible, I contacted support about it. This is the response the support person gave me: "My apologies! The DNS had gotten stuck, so I went ahead and pushed that through for you. Please allow 2-3 hours for the DNS to propagate." Now I have to say that my knowledge regarding these things is virtually zero, and I couldn't understand what the support person meant, so I ran a search and it seemed that Mr. Google knew just as much as I did regarding this. Can someone tell me what "dns getting stuck" means?

    Read the article

  • Having trouble Getting "RTSP over HTTP"

    - by Muhammad Adeel Zahid
    There is an axis camera that is connected to our site (camba.tv) through axis one click connection component (which acts as proxy). We can communicate with this camera only through http by setting the proxy to our OCCC server's address. If we want to get RTSP streams (h.264) we are only left with "RTSP over HTTP" option. For this I have followed axis VAPIX 3 documentation section 3.3. I issue requests through fiddler but don't get any response. But when i put the URL (axrtsphttp://1.00408CBEA38B/axis-media/media.amp) in windows media player (with proxy set to OCCC server 212.78.237.156:3128) the player is able to get RTSP stream over HTTP after logging in. I have created a request trace of communication between camera and windows media player through wireshark and the request that brings the stream looks like http://1.00408cbea38b/axis-media/media.amp HTTP/1.1 x-sessioncookie: 619 User-Agent: Axis AMC Host: 1.00408CBEA38B Proxy-Connection: Keep-Alive Pragma: no-cache Authorization: Digest username="root",realm="AXIS_00408CBEA38B",nonce="000a8b40Y0100409c13ac7e6cceb069289041d8feb1691",uri="/axis-media/media.amp",cnonce="9946e2582bd590418c9b70e1b17956c7",nc=00000001,response="f3cab86fc84bfe33719675848e7fdc0a",qop="auth" HTTP/1.0 200 OK Content-Type: application/x-rtsp-tunnelled Date: Tue, 02 Nov 2010 11:45:23 GMT RTSP/1.0 200 OK CSeq: 1 Content-Type: application/sdp Content-Base: rtsp://1.00408CBEA38B/axis-media/media.amp/ Date: Tue, 02 Nov 2010 11:45:23 GMT Content-Length: 410 v=0 o=- 1288698323798001 1288698323798001 IN IP4 1.00408CBEA38B s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:50000 t=0 0 a=control:* a=range:npt=0.000000- m=video 0 RTP/AVP 96 b=AS:50000 a=framerate:30.0 a=transform:1,0,0;0,1,0;0,0,1 a=control:trackID=1 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeNQFAe2AtwEBAaQeJEV,aM48gA== RTSP/1.0 200 OK CSeq: 2 Session: 3F4763D8; timeout=60 Transport: RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=060922C6;mode="PLAY" Date: Tue, 02 Nov 2010 11:45:24 GMT RTSP/1.0 200 OK CSeq: 3 Session: 3F4763D8 Range: npt=0- RTP-Info: url=rtsp://1.00408CBEA38B/axis-media/media.amp/trackID=1;seq=7392;rtptime=4190934902 Date: Tue, 02 Nov 2010 11:45:24 GMT [Binary Stream Content] But when i copy this request to fiddler, I only get 200 status code with content-type set to application/x-rtsp-tunneled and there is no stream data. The only thing i do different with stream is to use Basic in authorization header instead of Digest and I do not get 401 (Un authorized) status code. Can anyone explain what's happening here? How can I write request sequences to get stream in fiddler? If it is needed, I can upload the wireshark request dump somewhere.

    Read the article

  • How do I use Group Policy on a domain to delete Temporary Internet Files?

    - by Muhammad Ali
    I have a domain controller running on Windows 2008 Server R2 and users login to application servers on which Windows 2003 Server SP2 is installed. I have applied a Group Policy to clean temporary internet files on exit i.e to delete all temporary internet files when users close the browser. But the group policy doesn't seem to work as user profile size keeps on increasing and the major space is occupied by temporary internet files therefore increasing the disk usage. How can i enforce automatic deletion of temporary internet files?

    Read the article

  • Migrating data from SQL Server 2000 to SQL Server 2005

    - by Muhammad Kashif Nadeem
    I have to migrate existing data which is in SQL Server 2000 to SQL Server 2005. The schema of two databases is different. For Example Locations table in SS2000 is split into two tables and has different columns. This is one time activity. After successful migration I don't need old db anymore. What is the best way to transfer data from one SQL Server to another having different schemas? I can write stored procedures to fetch data from SQL Server 2000 and insert/update tables in SQL Server 2005. What about SSIS? I don't have any experience with this and is this better to create package of SSIS because I don't need this again and need to learn it first. Thanks.

    Read the article

  • Compress with Gzip or Deflate my CSS & JS files

    - by muhammad usman
    i ve a fashion website & using wordpress. I want to Compress or Gzip or Deflate my CSS & JS files. i have tried many codes with .htaccess to compress but not working. Would any body help me please? My phpinfo is http://deemasfashion.co.uk/1.php below are the codes i have tried not not working. Few of them might be same but there is a difference in the syntax. <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> other code I have tried but not working... <files *.css> SetOutputFilter DEFLATE </files> <files *.js> SetOutputFilter DEFLATE </files> I have also tried this code as well but no success. <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> This code is also not working <FilesMatch "\.(html?|txt|css|js|php|pl)$"> SetOutputFilter DEFLATE </FilesMatch> Here is another code not working. <ifmodule mod_deflate.c> AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x- javascript application/javascript </ifmodule> Here is another code not working. <IFModule mod_deflate.c> <filesmatch "\.(js|css|html|jpg|png|php)$"> SetOutputFilter DEFLATE </filesmatch> </IFModule> Here is another code not working. <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json <FilesMatch "\.(css|js)$" > SetOutputFilter DEFLATE </FilesMatch> </IfModule> Here is another code not working. #Gzip - compress text, html, javascript, css, xml <ifmodule mod_deflate.c> AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript </ifmodule> #End Gzip Here is another code not working. <Location /> SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|gz2|sit|rar)$ no-gzip dont-vary </Location>

    Read the article

  • Config file (App.config) does not update on new installation

    - by Muhammad Kashif Nadeem
    I am creating setup of my project using Visula Studio 2008. I am facing problem in setup installation. If I uninstall old setup (application) and install the new one then config file (App.config) updates the attributes (surely it is new file) of config file but if I install new setup without uninstalling the old one then config file does not update. from config file I mean MyProject.exe.config Why is this behavior of config file. Should it not be updated on installation of the new setup Is this possible to delete and copy the config file of new setup? Is there a way to update only config file forcefully during installation. Thanks for your help!

    Read the article

  • Localhost doesnot work.

    - by Muhammad Sajid
    Hi, I installed wamp server on xp. During the installation it did not show any error/warning message. Then i start it & type http://localhost/ in url bar but it just show a blank page. I also checked notepad C:\WINDOWS\system32\drivers\etc\hosts their is no restriction for localhost. Help. Thanks...

    Read the article

  • Building a new cluster for mathematical calculations (Win/Lin)

    - by Muhammad Farhan
    I would like to build a new cluster to perform heavy mathematical calculations in Matlab and Abaqus. One of my friend told me that distributed computing is way faster than parallel computing, which is very true after reading a bit on the internet. However, I have never clustered before. Current workstation I own: Dell Precision T5400 2 x Intel Xeon 2.5 GHz 16 GB RAM (2GB x 8) 1 x Western Digital 1TB HDD 7200 rpm 1 x nVidia Quadro FX4600 768MB GPU 1 x 870W PSU OS: Windows 7 Ultimate 64-bit 2nd WS: I can buy another WS similar configuration to the one I own I am not bothered about OS, I am willing to cluster with either Windows or Linux. However, my software are compatible with windows 64-bit only. Please help me setup a cluster. Thank you.

    Read the article

  • What do I need to use Smart card for windows login (no domain, just regular single local machine)

    - by Muhammad Nour
    I have a reader from ACS "ACR83" and a brand new card from the same place ACO3-32 as a development kit and I need to use both of them to login into my laptop locally I am not a part of domain, I am using Windows xp SP3 what should I do to enable smart card login do I need third party software to do this without domain or should it be a domain environment to be able to do such a thing this is the first time dealing with smart card, so I hope some one will help me Doing this

    Read the article

  • After installing VS 2010 - Generic Host Process For Win32 Services problem starts.

    - by Muhammad Kashif Nadeem
    After installing VS 2010 trial I am getting this error "Generic Host Process For Win32 Services Encountered A Problem and needs to close. When this message pops my computer just stuck and I can not even restart it normally. I have found one fix on net but after that fix I can not access my LAN. This fix change these values in registry. HKLM\SYSTEM\CurrentControlSet\Services\netbt\parameters TransportBindName HKLM\Software\Microsoft\OLE EnableDCOM If I revert these registry changes then I again start getting 'Generic Host Process For Win32 Services' I have uninstall VS 2010 but this problem persist. This problem is not because of any virus. Any help to fix this or I have to re install Windows. Thanks.

    Read the article

  • After installing VS 2010 - Generic Host Process For Win32 Services problem starts.

    - by Muhammad Kashif Nadeem
    After installing VS 2010 trial I am getting this error "Generic Host Process For Win32 Services Encountered A Problem and needs to close. When this message pops my computer just stuck and I can not even restart it normally. I have found one fix on net but after that fix I can not access my LAN. This fix change these values in registry. HKLM\SYSTEM\CurrentControlSet\Services\netbt\parameters TransportBindName HKLM\Software\Microsoft\OLE EnableDCOM If I revert these registry changes then I again start getting 'Generic Host Process For Win32 Services' I have uninstall VS 2010 but this problem persist. This problem is not because of any virus. Any help to fix this or I have to re install Windows. Thanks.

    Read the article

  • WINDOWS - Deleting Temporary Internet Files through Group Policy

    - by Muhammad Ali
    I have a domain controller running on Windows 2008 Server R2 and users login to application servers on which Windows 2003 Server SP2 is installed. I have applied a Group Policy to clean temporary internet files on exit i.e to delete all temporary internet files when users close the browser. But the group policy doesn't seem to work as user profile size keeps on increasing and the major space is occupied by temporary internet files therefore increasing the disk usage. How can i enforce automatic deletion of temporary internet files?

    Read the article

  • Is it possible to boot Windows 7 from when you're harddrive's partition with two OSes?

    - by Muhammad
    I have a PC with a hard drive that's partition into home directories for Windows 7 and Ubuntu. I primarily use Windows 7 and occasionally (once a week) use Ubuntu. When I boot up my computer, I usually get taken to a boot menu that includes about 5 different options: 3 are for Ubuntu's configurations, one's for swap, and the forth is for Windows 7. Then after I select Windows 7 or Ubuntu from this menu, I get taken to another menu that again asks me for Windows 7 or Ubuntu. This time, there's only 2 options, Windows 7 and Ubuntu. [Side note: out of experience I realized most boot menus are timed and so are these.] So if I ever turn my computer on without actually sitting in front of it for a few minutes, it boots into Ubuntu. I'm trying to figure out what I need to do so I can first get rid of the 2 boot menus. And if possible, I'm looking for help changing my boot options where I can load up Windows 7 (even with the boot menu wait of about 30 seconds). My harddrive's partition's laid out like this: Windows 7 (C partition) Multimedia (D partition, I just use this for backup/non-OS stuff) Ubuntu (home directory) Swap Is there any other information I need to provide?

    Read the article

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