Search Results

Search found 12 results on 1 pages for 'mirza awais'.

Page 1/1 | 1 

  • extended permission using php sdk

    - by Awais Qarni
    Hello, I am developing a facebook application using php-sdk. i want to take some extended permissions from user of my application. As this is application where user comes after login into facebook, so how can i take extended permission when user visit my page? We cannot place login button in which we can take permissions. now any one can guide me how to take and where to place that code? Thanks in advance. Regards, Awais Qarni

    Read the article

  • vb.net Object Initialiser List(Of T)

    - by Tim B James
    I have been looking at some C# code: List<Employee> Employees = new List<Employee>{ new Employee{firstname="Aamir",lastname="Hasan",age=20}, new Employee{firstname="awais",lastname="Hasan",age=50}, new Employee{firstname="Bill",lastname="Hasan",age=70}, new Employee{firstname="sobia",lastname="khan",age=80}, }; Now when I convert this to vb.net Dim Employees as List(Of Employee) = New List(Of Employee)() With { New Employee() With { _ .firstname = "Aamir", _ .lastname = "Hasan", _ .age = 20 _ }, _ New Employee() With { _ .firstname = "awais", _ .lastname = "Hasan", _ .age = 50 _ }, _ New Employee() With { _ .firstname = "Bill", _ .lastname = "Hasan", _ .age = 70 _ }, _ New Employee() With { _ .firstname = "sobia", _ .lastname = "khan", _ .age = 80 _ } _ } I get the error "Name of field or property being initialized in an object initializer must start with'.'." Now I can get an array of employee using the code: Dim Employees = { New Employee() With { _ .FirstName = "Aamir", _ .LastName = "Hasan", _ .Age = 20}, _ New Employee() With { _ .FirstName = "Awais", _ .LastName = "Hasan", _ .Age = 50}, _ New Employee() With { _ .FirstName = "Bill", _ .LastName = "Hasan", _ .Age = 70 _ } _ } But I would like a List(Of Employee) as it is bugging me as to why this doesnt work in vb.net?

    Read the article

  • Looking for a short term solution to improve website performance with additional server

    - by Tanim Mirza
    I am working with a small team to run an internal website running with PHP 5.3.9, MySQL 5.0.77. All the files and database are hosted on a dedicated Linux machine with the following configuration: Intel Xeon E5450 8 CPU cores @3.00GHz, 2992.498 MHz, Cache 6148 KB, Cent OS – Red Hat Enterprise Linux Server release 5.4 We started small and then the database got bigger and now the website performance degraded significantly. We often get server space overrun, mysql overloaded with too many calls, etc. We don't have much experience dealing with these issues. We recently got another server that we were thinking to use to improve performance. Since it has better configuration, some of us wanted to completely move everything to the new machine. But I am trying to find out how we can utilize both machine for optimized performance. I found options such as MySQL clustering, Load balancer, etc. I was wondering if I could get any suggestion for this situation "How to utilize two machines in short term for best performance", that would be great. By short term we are looking for something that we can deploy in a month or so. Thanks in advance for your time.

    Read the article

  • Excel formula for variable fields

    - by awais
    I am looking for a simple formula to do the calculation on two fields that are variable, for e.g., c1 has 100 and c3 has 150 and I want to calculate an increase/decrease percentage, but the trick is the cell values change every month. How do I put the formula to cater for such variation. Appreciate your help. Regards

    Read the article

  • Multiple autocompletes on same form in socialengine

    - by Mirza Awais
    I am quite new to socialegine module development. I want to use multiple autocomplets on my one form. I have no problem of showing multiple auto completes but problem comes when one selects options from auto complete. I have seen that autocompet.js uses id toValues to show selected option from autocomlte. So if there is only one autocomplete on one form then we can have one element as toValues to show the selected value. But if we have multiple auto completes then how to show the selected item of each auto complete as separately? Using the following code for autocomplete en4.core.runonce.add(function() { new Autocompleter.Request.JSON('to', '<?php echo $this->url(array('module' => 'localspots', 'controller' => 'lookup', 'action' => 'city'), 'default', true) ?>', { 'minLength': 2, 'delay' : 1, 'selectMode': 'pick', 'autocompleteType': 'message', 'multiple': false, 'className': 'message-autosuggest', 'filterSubset' : true, 'tokenFormat' : 'object', 'tokenValueKey' : 'label', 'injectChoice': function(token){ console.log(token.type); var choice = new Element('li', {'class': 'autocompleter-choices', 'html': token.photo, 'id':token.label}); new Element('div', {'html': this.markQueryValue(token.label),'class': 'autocompleter-choice'}).inject(choice); this.addChoiceEvents(choice).inject(this.choices); choice.store('autocompleteChoice', token); }, onPush : function(){ if( $('toValues').value.split(',').length >= maxRecipients ){ $('to').disabled = true; $('to').setAttribute("class", "disabled"); } }, }); });

    Read the article

  • NoMethodError: undefined method `has_attached_file'

    - by mirza
    Paperclip produces this error, after checking out the plugin's rails3 branch. My Gemfile has following line: gem 'paperclip', :git => 'http://github.com/thoughtbot/paperclip.git', :branch => 'rails3' And the error message is: NoMethodError: undefined method `has_attached_file' for #<Class:0x2a50530>

    Read the article

  • how to call a view method to a model in zendframework

    - by Awais Qarni
    hello I just want to ask whether we can call a view method to a model? I know that we can call it on our controller in zend framework. Like if I want to call the url method of view on my controller I can call it like this $this->view->url(array(),''); and on the view we just can call it by $this->url(array(),''); But When I tried to call the same method on my model by $this->view->url(array(),''); it generates an error of call to undefined method url. Now I want to ask whether it is possible to call view method to a model? If yes then how? What Am I doing wrong. Thanks

    Read the article

  • JProgressBar.stringPainted(true); is not working

    - by Mirza Ghalib
    This is a part of my java code, in this code I have written that when I click the button the value of JProgressBar should becomes 0 and stringPainted(); becomes true, but "string painted" is not visible when I click the button, please help. import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JProgressBar; public class R implements ActionListener { static int y; CustomProgressBar b = new CustomProgressBar(); public static void main(String arg[]) throws Exception { new R(); } public R() throws Exception { JFrame f = new JFrame(); JButton btn = new JButton("Click"); f.setExtendedState(JFrame.MAXIMIZED_BOTH); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setUndecorated(true); f.setLayout(new FlowLayout()); btn.addActionListener(this); f.add(b); f.add(btn); f.setVisible(true); } class CustomProgressBar extends JProgressBar{ private static final long serialVersionUID = 1L; private boolean isStringToBePainted = false; public CustomProgressBar() { super(JProgressBar.VERTICAL,0,100); } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); if(isStringToBePainted ) { Dimension size = CustomProgressBar.this.getSize(); if( CustomProgressBar.this.getPercentComplete()<0.9 ) R.y = (int)( size.height - size.height * CustomProgressBar.this.getPercentComplete() ); String text = getString(); g.setColor(Color.BLACK ); g.drawString(text, 0, R.y); } } @Override public void setStringPainted(boolean b) { isStringToBePainted=b; } } @Override public void actionPerformed(ActionEvent e) { b.setValue(0); b.setStringPainted(true); } }

    Read the article

1