Search Results

Search found 129 results on 6 pages for 'usman ismail'.

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

  • Wrappers of primitive types in arraylist vs arrays

    - by ismail marmoush
    Hi, In "Core java 1" I've read CAUTION: An ArrayList is far less efficient than an int[] array because each value is separately wrapped inside an object. You would only want to use this construct for small collections when programmer convenience is more important than efficiency. But in my software I've already used Arraylist instead of normal arrays due to some requirements, though "The software is supposed to have high performance and after I've read the quoted text I started to panic!" one thing I can change is changing double variables to Double so as to prevent auto boxing and I don't know if that is worth it or not, in next sample algorithm public void multiply(final double val) { final int rows = getSize1(); final int cols = getSize2(); for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { this.get(i).set(j, this.get(i).get(j) * val); } } } My question is does changing double to Double makes a difference ? or that's a micro optimizing that won't affect anything ? keep in mind I might be using large matrices.2nd Should I consider redesigning the whole program again ?

    Read the article

  • How to check if ping responded or not in a batch file

    - by Ismail
    I want to continuously ping a server and see a message box when ever it responds i.e. server is currently down. I want to do it through batch file. I can show a message box as said here http://stackoverflow.com/questions/774175/how-can-i-open-a-message-box-in-a-windows-batch-file/774253#774253 and can ping continuously by ping <servername> -t But how do I check if it responded or not?

    Read the article

  • By Pressing Enter key move to next Textbox in ASP.Net

    - by Malik Usman
    I have two textboxes and one Button control.....In first TextBox when press enter key moves to next textbox(Barcode) and when i press enter in barcode textbox it fires the button click event......till that its ok.... But what happening after fireing the Button click even on enter in Barcode Textbox its going back to focus on first textbox.........But i want this to stay in same Barcode TextBox to scan more barcodes. The code is below. <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"> </script> <Head> <script type="text/javascript"> $(function() { $('input:text:first').focus(); var $inp = $('input:text'); $inp.bind('keydown', function(e) { //var key = (e.keyCode ? e.keyCode : e.charCode); var key = e.which; if (key == 13) { e.preventDefault(); var nxtIdx = $inp.index(this) + 1; $(":input:text:eq(" + nxtIdx + ")").focus(); } }); }); </script> </Head>

    Read the article

  • How to overlay a small page on a html page?

    - by Usman Ajmal
    Hi, I have a webpage underconstruction. I want to notify the people who visit it about its under-construction nature. For that I wanted to show a small transparent or transluscent page on the above page as shown here http://img17.imageshack.us/i/normalpagewithasmallpag.png/ You may notice that i want that page to appear at the center of the webpage overlayed on the original page with a cross at top-right corner. Clicking on that cross may close this small page revealing the page behind it so that the users may see what has been developed so far. I hope you guys have some suggestions for me. I know its possible with javascript but don't know how...any tutorial if available will also help. Thanks a lot.

    Read the article

  • TabPage Validating event firing when clicked on the currently selected tab

    - by Ismail S
    I'm doing things as said in How do I prevent the user from changing the selected tab page in a TabControl? Things are working fine. But the validating event of tabpage1 occurs if I've tabpage1 is currently selected and user clicks on tabpage1 itself. and later when user clicks on tabpage2 validating event for tabpage1 doesn't fire. What happens is if I do e.Cancel in validating event of tabpage1, in the above case, when user clicks on tabpage1 by mistake having tabpage1 already selected, it will prompt user that "Do you want to stay on current tab to save data or move from the current tab?". and if user clicks Stay but doesn't do any changes. And then when he correctly clicks tabpage2, Validating event of tabpage1 is not firing. I've uploaded the sample application here. You can run and see the behavior to properly understand the problem

    Read the article

  • SQL Insert multilingual characters

    - by Usman Akram
    I am trying to create a table in my MS SQL database for Languages. I want to store an English name of Language and a local name of language in the database. i.e. Language, Language(local) English, English German, Deutsch Italian, Italiano Japanese, ??? ... ... I have 279 languages that I want to import, but when I import it shows '?????' for some like japanese, Russian and arabic etc The database Collation is Latin1_General_CI_AS. I would also like advise on multilingual websites; if i have a database of product descriptions and I want to have translation in multiple languages, should I go for separate databases or Can I have translation in one databse? (I prefer not to duplicate data!). Anything else to make sure users are able to write comments in different languages (char encoding on web?) and can be stored in database.

    Read the article

  • How to populate gridview on button_click after searching from access database?

    - by Usman
    I am creating a form in c#.net . I want to populate the gridview only on button click with entries meeting search criteria. I have tried but on searching ID it works but on searching FirstName it gives error plz check SQL also. My Code behind private void button1_Click(object sender, EventArgs e) { try { string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=L:/New project/Project/Project/Data.accdb"; string sql = "SELECT * FROM AddressBook WHERE FirstName='" + textBox1.Text.ToString(); OleDbConnection connection = new OleDbConnection(strConn); OleDbDataAdapter dataadapter = new OleDbDataAdapter(sql, connection); DataSet ds = new DataSet(); connection.Open(); dataadapter.Fill(ds, "AddressBook"); connection.Close(); dataGridView1.DataSource = ds; dataGridView1.DataMember = "AddressBook"; } catch (System.Exception err) { this.label27.Visible = true; this.label27.Text = err.Message.ToString(); } }

    Read the article

  • Circular reference problem Singleton

    - by Ismail
    I'm trying to creating a Singleton class like below where MyRepository lies in separate DAL project. It's causing me a circular reference problem because GetMySingleTon() method returns MySingleTon class and needs its access. Same way I need MyRepository access in constructor of MySingleTon class. public class MySingleTon { static MySingleTon() { if (Instance == null) { MyRepository rep = new MyRepository(); Instance = rep.GetMySingleTon(); } } public static MySingleTon Instance { get; private set; } public string prop1 { get; set; } public string prop2 { get; set; } }

    Read the article

  • how to add parameters with mulitselection enabled in ssrs 2008

    - by Sheikh Usman
    Hi, I have a table called Resource, and i am making a line chart (the chart is complicated, so just assume its a simple xy line chart). I want to execute the report with different resources. I have added a new parameter and bound it to a dataset to return a dropdownlist of resource names. Can i do a mulitiple selection of resource. for example if i want to make chart with ResourceA and ResourceB, only, can i select these two resources from the dropdownlist of parameters. cheers, Oz

    Read the article

  • Help regarding database and logic layer for my ASP.NET MVC application

    - by Ismail S
    I'm going to start a new project which is going to be small initially but may grow to big over the years. I'm strongly convinced that I'm going to use ASP.NET MVC with jQuery for UI. I want to go for MySQL as database for some reasons but worried on few things. I've a good years of experience working on SQL Server databases and on one project I've had a bad experience creating and managing stored procedures on MySQL database. I'm totally new to Linq but I see that it is easier to use once you are familiar with it. First thing is that accessing data should be easy. So I thought I should use MySQL to Linq but somewhere I read that it is not directly supported but MySQL .NET connector adds support for EntityFramework. I don't know what are the pros and cons of it. I would love if I can implement repository pattern. Will it be possible if I use Entity Framework? I'm not clear on how I should go about all this or I should just forget every thing and directly use SQL to Linq on SQL Server. I'm also concerned about the performance. Someone told me that if we use Entity framework it fetches lot of data and then filter it. Is that right?

    Read the article

  • Magento table rates custom options

    - by Usman Ahmad
    in Tablerate.php I want to change the calculation. So for some Products with custom options like width, height the shipping cost must change. I tried with this method to find out if one product in cart has width or height greater than 60cm (example). But currently I have no Idea how to get custom option values... this code working well. foreach ($request->getAllItems() as $item) { echo 'Name: '.$item->getName(). '<br/> SKU:'.$item->getSku(). '<br/> ProductID: '.$item->getProductId(). '<br/> Price: '.$item->getPrice().'<br/>'; } Thanks

    Read the article

  • How to Log Exception in a file?

    - by Ismail
    I want to be able to do logging in every catch block. Something like this. catch (Exception exception) { Logger.Write(exception); } and then the settings in the configuration will pick up the Message and StackTrace property etc using customer listener. I would like to use Enterprise Library Logging Application Block. I'm sure someone must have done this already.

    Read the article

  • How to make a particular information to be accessible at masterpage, page and usercontrol

    - by Ismail S
    I'm fetching some settings out of the database based on a value passed from a query string. Out of these settings, a few will be used in master page, few on my Page and few in my user control (say login control which is a web user control). I've an entity class MySetting for it and there is a method in my data access layer which returns me an instance of MySetting when I pass the value I got in query string. I don't want to fetch settings from the database multiple times for one request. I'm using asp.net web forms with C# and sql server.

    Read the article

  • Disallow typing of few of characters e.g.'<', '>' in all input textboxes using jquery

    - by Ismail
    How do I achieve this:- When user types character like 'abcd' and then '>'(an invalid character for my application), I want to set the text back to 'abcd'. Better if we can cancel the input itself as we do in winforms application. This should happen when user is typing and not on a click of button. I want this to be applied on all text boxes in my web page. This will be easy if the solution is jQuery based. May be something which will start like this. $("input[type='text']")

    Read the article

  • Ajax enabled sorting and paging on grid in ASP.NET 3.5

    - by Ismail S
    Is there any good solution for ajax enabled Grid with pageing and sorting which only brings the required data from database? I mean it should only bring the data from the database which is to be displayed on the particular page number of the grid. I looked at this. It looks good. But I just thought if anyone has created something better using Google's or Yahoo's javascript library or using any good features of asp.net 3.5.

    Read the article

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