Amjad Glory amjad iqbal

1

votes
1

answer
13

views

PreLoad and Load event in asp.net

I'm a beginner in ASP.NET, just a question on page life cycle: The MSDN doc says: "Raised after the page loads view state for itself and all controls, and after it processes postback data that is included with the Request instance", which means, I can also put the programming logic here protected vo...
amjad
-2

votes
2

answer
53

views

using statement in C#

I know the purpose of using statement is that CLR release memory as the code block finishes, so using (MyResource myRes = new MyResource()) { myRes.DoSomething(); } will get translated to : MyResource myRes= new MyResource(); try { myRes.DoSomething(); } finally { // Check for a null resource. if (m...
amjad
1

votes
3

answer
91

views

What is the difference between :something => true and something: true in Ruby?

I have this Capabara method that takes an option: page.should have_selector("#jFooterStandardLinks", :visible => true) The option can also be provided like: page.should have_selector("#jFooterStandardLinks", visible: true) Both methods work but I am getting an error in Eclipse IDE. What is the diff...
amjad
1

votes
2

answer
360

views

How to get value of textbox in C# when it assign by jquery

I am new to jQuery. I have a web service which returns some data. I assign this data to a textbox using jQuery but when I want to access this value in C#, it generates an exception incorrect format. This is my jquery code. $('#Ltrl_GSalary').html(GrossSalary); $('#Ltrl_NetSalary').html(GrossSalary-p...
Amjad Shah
1

votes
2

answer
6k

views

ASP.NET button server click event not firing after jquery e.preventdefault() fires

I have a web page where I use jQuery AJAX to load data from a database to fill a drop down list. When the jQuery function runs, the server events does not fire. jQuery: $('#Cmb_PDept').on('change', function (e) { e.preventDefault(); var DepartmentId = $('#Cmb_PDept :selected').val(); if (DepartmentI...
Amjad Shah
1

votes
1

answer
1.2k

views

compiling sendmmsg get undefined reference to `sendmmsg'?

I tried to compile the following code witch send multiple massages using sendmmsg() in c, but it gives me a compiler error " undefined reference to `sendmmsg' ". I tried to google it, but not found any result! I got the code from this page: http://manpages.courier-mta.org/htmlman2/sendmmsg.2.html an...
Amjad Omari
1

votes
2

answer
541

views

Getting “Request Error” after hosting WCF on IIS

Before hosting WCF Restful Services on IIS. I was getting response from server in my android application but now I have hosted my services on IIS but getting an error message of REQUEST ERROR. I don't know what's went wrong. can someone please sort out my problem. Thanks in Advance Before Hosting on...
Muneeb Amjad
1

votes
1

answer
1.2k

views

how to create an array and reuse in scala template play framework 2?

I need to create an array in one of my index.scala.html. Later I want to use that array to store some values. I want to achieve following index.scala.html @import scala._ @myArray = @{ArrayList()}; and I am getting an error saying not found value @myArray If above problem is resolved I want to re...
amjad
1

votes
2

answer
93

views

Mode Rewrite added another url parameter but not working (multiple parameters)

I have the following htaccess file code below RewriteEngine On RewriteBase /site/public/admin/ RewriteCond %{REQUEST_METHOD} POST RewriteRule ^ - [L] RewriteCond %{THE_REQUEST} \s([^.]+?)(?:\.php)?\?caseid=([^&\s]+) [NC] RewriteRule ^ %1/caseid/%2/? [R=302,L] RewriteCond %{REQUEST_FILENAME} !-f Rewr...
Amjad
1

votes
2

answer
89

views

linux (ubuntu) apache www folder access issue

I'm a newbie in Linux, just installed ubuntu 14.04 and wanted to install WAMP (MAMP), I followed a youtube tutorial to install php5, apache2, mysql and phpmyadmin. Installed successfully both http://localhost and http://localhost/phpmyadmin works fine logged in successfully. now I wanted to add some...
Amjad
1

votes
2

answer
106

views

How to reset Action Bar Search after Searching?

I have created an action bar Search in the action bar menu. Well, I am trying to make it go to its normal state if I click a go button or a click anywhere on the screen. Here is my code : public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it i...
Amjad AL-Ahdal
1

votes
2

answer
648

views

Unable to get Child Categories inside <ul> using HtmlAgilityPack C# ASP.NET

I am new in Webscraping and trying to get data from a website with HTMLAgilityPack using ASP.NET C#. HTML structure which I am trying to parse is: CLOTHING Just In Exclusives Dresses & Gowns Coats Jackets Shirts & Blouses Tops Knitwear Sweatshirts Skirts & Shorts Trousers Jumpsuits Jeans Swimwear Li...
Bilal Amjad
1

votes
1

answer
245

views

Multiple file uploads in octobercms

I just want to know how to upload multiple files in octobercms at front-end there is no tutorial, I am using and then got only the last uploaded image $posting->posting->image=Input::file('posting-image'); $posting->save(); how can I retrieve all images ?
Amjad Niazi
1

votes
3

answer
68

views

Receiving SIGINT and exception Handles in Linux

Let's say we have a program in C that uses the sleep() function The program executes and goes to sleep. Then we type ctrl-c to send a SIGINT signal to the process. We know that the default action upon receipt of a SIGINT is to terminate the process, we also know that the sleep() function resume the...
amjad
2

votes
2

answer
41

views

(Dynamic Memory Allocation) why maximize peak utilization?

I was reading a textbook which says that: I'm totally lost, let's says: n = 10 and p (required payload) = 800 bytes, Does it mean that on the n = 9 which is 9th allocate request, P9 needs to be 792 bytes( suppose a single minimum allocate is 8 bytes)? Is my understanding correct?
amjad
1

votes
2

answer
268

views

Serializing JSON using c#

I am working on some App. in which I want to send data from my server to Android Application in JSON. I have a RestFul WCF service from which my Client communicates with server. Its fine if I want a single value.. but im struck when I want a Bunch of data. I have searched some threads and studied ab...
Muneeb Amjad
1

votes
6

answer
146

views

how to create functions in jquery and reusing them

I've got the following code if(!$rta_cl_fn.length > 0){ formSubmit = false; $('#div_cl_fn').addClass('has-error'); }else{ $('#div_cl_fn').removeClass('has-error'); } if(!$rta_cl_ln.length > 0){ formSubmit = false; $('#div_cl_ln').addClass('has-error'); }else{ $('#div_cl_ln').removeClass('has-error')...
Amjad
1

votes
3

answer
59

views

How to Disabled a website if user has disabled JavaScript (JS) [duplicate]

This question already has an answer here: How to detect if JavaScript is disabled? 36 answers A quick question.. searched across the web but could not find the solution of my question First how I should detect that user has JavaScript enable/disabled in browser. If disabled show a message, hide pag...
Amjad
1

votes
1

answer
5.3k

views

How to user if condition in yii2 gridview active button or deactive botton show on gridview

How to user if condition in yii2 gridview active button or deactive button show on gridview
Amjad Sarwar
2

votes
2

answer
554

views

Need help to use Rating bar

I want to use rating bar in my android application. My game has 10 levels I want to show the stars according to the score/time user scored per level. A screen will have 10 images for each level and 10 rating bars also. Can any one help me with this. Please tell me the most effective solution for thi...
Jawad Amjad
5

votes
2

answer
310

views

How to Deserialize JSON

I'm working on project in which I'm Posting data from asp.net webform to WCF service. I'm posting data through params and the service respond me back a JSON string. Now I have an issue in deserialize. I read many threads but didn't find any solution. Hope someone can sort out my problem. Thanks in A...
Muneeb Amjad
17

votes
8

answer
9.6k

views

Ignoring undefined data / vars in an underscore template

Still learning backbone so bear with me; I'm trying to add a new model with blank fields to a view, but the template I've created has a whole bunch of Works perfectly fine when fetching data, it populates it and all goes well. The trouble arises when I want to create a new (blank) rendered view, it...
Shaz Amjad
18

votes
3

answer
16.9k

views

How to load image through byte array using Glide?

I have an image contents byte[] form. But when i load them through Glide then broken images are shown. what I'm doing is shown below. Glide.with(context) .load(imageByteArray) .asBitmap() .placeholder(R.drawable.ic_broken) .into(rowImageView); imageByteArray successfully converts to bitmap without u...
Adnan Amjad
18

votes
5

answer
36.3k

views
1

votes
1

answer
2.1k

views

how to select an option by index in capabara

I want to select second option using index in following tree. one one Two I don't want to use value or text just by index. How I can do it ? I am using Capybara with cucumber
amjad
1

votes
3

answer
4.6k

views

HTTP status 404 error or web.xml error dont know

I am running tomcat 7 in eclipse... I get the following error when I run my html which called a servlet to performe a simple calculation.. error is HTTP Status 404 - /TestTomcat/ -------------------------------------------------------------------------------- type Status report message /TestTo...
Amjad
5

votes
2

answer
713

views

cancel a blocking operation in Go

I have a blocking operation in a 3rd party library that I don't control. It could potentially go forever. So I want to set a timeout on it. The obvious way is to wrap it with a channel and a goroutine and then select on the result with time.After. However, the problem is the goroutine running the bl...
Amjad Masad
19

votes
14

answer
100.2k

views

asp.net Button OnClick event not firing

I have problem in asp.net button control. I define a button in form, onclick event of button is not firing when I click on the button. protected void btn_QuaSave_Click(object sender, EventArgs e) { }
Amjad Shah
1

votes
6

answer
12k

views

After post back jquery not working

I have combo box in which I fill data from ajax jquery. It works fine but when I click save button post back occurs after post back it not works. This is my Jquery code. $(document).ready(function () { var EmpCombo = $('#Cmb_PEmp'); var textbox = $("#TxBx_BasicSalary"); var BasicSalary = $('#Hid_Bas...
Amjad Shah
6

votes
3

answer
3.6k

views

How can I deploy and execute an application on a device connected to a remote system?

I have a requirement to deploy a test application and issue commands on a device connected to another machine in the same network. I read through http://developer.android.com/tools/help/adb.html#directingcommands but I am not able to find the answer. I tried using adb connect but I got unable to c...
amjad
20

votes
4

answer
8.7k

views

How does PHP interface with Apache?

I've almost finished writing a HTTP/1.0 compliant web server under Java (no commercial usage as such, this is just for fun) and basically I want to include PHP support. I realize that this is no easy task at all, but I think it'll be a nice accomplishment. So I want to know how PHP exactly interface...
Waleed Amjad
1

votes
4

answer
787

views

NullPointerException when Passing ArrayList through Intent using Parcelable

I'm working on project and getting data from WCF services and make an ArrayList, everything is working fine. I'm successfully getting data from service. Now what I want is Passing that ArrayList through Intent to another Activity. Basically I know how to send string and int. values but I have no ide...
Muneeb Amjad
2

votes
1

answer
387

views

Node.js Route error

Absolute beginner in node.js I was making that routes file which is below productCategoryRouteConfig.js function productCategoryRouteConfig(app){ this.app = app; this.routesTable = []; this.init(); } productCategoryRouteConfig.prototype.init = function(){ this.addRoutes(); this.processRoutes(); } pr...
Amjad
1

votes
3

answer
62

views

Avoid image stretch within a CSS octagon container

When I updated the octagon's background image, it seems to have stretched it. Before, with the same CSS and a different image, it was normal. Here is the original photo. As you can see, it is NOT stretched: Here is the octagon photo that is stretched: Here is all the code affecting the octagon image...
Amjad-H-Ali
5

votes
10

answer
8.5k

views

execute statement after return statement in javascript

window.onbeforeunload = function() { if (document.getElementById("parentpan").style.display == "block") { return "You are logged out."; Logout(); } }; I want the logout() function to be called after the return statement, is it possible?
Faisal Amjad
6

votes
3

answer
23.4k

views

send email with pdf attachment

I'm trying to send an email using the mail() function in php with a pdf attachment. I'm running the script on localmachine. I set up the smtp ip in php.ini. I can send a text email perfectly but with an attachment I get the following error: Warning: mail() [function.mail]: SMTP server response: 503...
Amjad
3

votes
2

answer
1.7k

views

wrong encoding When adding audio file to android studio

I add audio file .mp3 to raw folder in android studio and an error with these details: File was loaded in the wrong encoding: 'UTF-8'
Amjad
2

votes
3

answer
5.8k

views

java.lang.RuntimeException: Unable to start activity ComponentInfo{ java.lang.ClassCastException: android.widget.LinearLayout [closed]

What does this exception mean? 07-05 12:09:11.788: W/dalvikvm(445): threadid=1: thread exiting with uncaught exception (group=0x40015560) 07-05 12:09:11.808: E/AndroidRuntime(445): FATAL EXCEPTION: main 07-05 12:09:11.808: E/AndroidRuntime(445): java.lang.RuntimeException: Unable to start activity C...
Salman Amjad
3

votes
2

answer
225

views

How to destructure nested objects in for-loop

var users = [ { user: "Name1",geo:{lat:'12',long:'13'} }, { user: "Name2",geo:{lat:'12',long:'13'}, age: 2 }, { user: "Name2",geo:{lat:'12',long:'13'} }, { user: "Name3",geo:{lat:'12',long:'13'}, age: 4 } ]; Above is the array of objects. Here is the for-loop I destructured and get user and age but...
Amjad Mehmood
3

votes
2

answer
86

views

what's the purpose of pushing address of local variables on the stack(assembly)

Let's there is a function: int caller() { int arg1 = 1; int arg2 = 2 int a = test(&arg1, &arg2) } test(int *a, int *b) { ... } so I don't understand why &arg1 and &arg2 have to be pushed on the stack too like this I can understand that we can get address of arg1 and arg2 in the callee by using movl...
amjad

View additional