Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
5,599,265
5,599,266
Creating a calendar event in S Planner through code
<p>I have a working application whereby I have a set of 'timetable' for each user and what I wish to know if there is a way that they could 'SYNC' their 'timetable' with the S Planner in the phone?</p> <p>Is the only way of creating an event in the S Planner through opening the intent and do a 'manual' insertion? </p> <p>PS : The 'timetable' last for a few weeks daily with different timeslots.</p> <p>Thank you! </p>
android
[4]
5,554,645
5,554,646
Infinite Scroll deactivates Fancybox after loading second page
<p>I'm using FancyBox and Infinite Scroll on this site: <a href="http://www.davidgoltz.de/2011/blog-page/" rel="nofollow">http://www.davidgoltz.de/2011/blog-page/</a></p> <p>Everything works nice but after loading the second page (while scrolling down), the fancybox on the upcoming pages doesnt work. (Fancybox doesnt give the images the .fancybox-class too).</p> <p>After adding the classes on my own, it doesnt work either. I heard something about livequery. Is it possible to work with that to fix this?</p>
jquery
[5]
3,004,818
3,004,819
Image load event in IE8; event is undefined and this is `window` object
<p>I have written the below code and it is working in all modern browsers except in <code>&lt;IE9</code> </p> <pre><code>&lt;script&gt; function eventH(event) { alert(this); } &lt;/script&gt; &lt;img src="h300.png" onload="eventH(arguments[0]);"/&gt; </code></pre> <p>It fires event handler, but <code>event</code> is undefined and <code>this</code> value is parent object. Why?</p> <p>Does IE handle this differently or I am wrong somewhere in understanding this?</p>
javascript
[3]
5,358,699
5,358,700
How to compile and execute java using jar in cmd?
<p>I created one java file then i converted into jar now i want to use it in another java class how to import that jar and how to compile and execute.</p>
java
[1]
354,484
354,485
How can I make this JQuery 1.3.2 code compatible with jQuery 1.6.2?
<pre><code>// JavaScript Document $(document).ready(function(){ $buildingup = false; $("#sliders&gt;*").show(); //Blurs all links when clicked $("a").click(function(){ $(this).blur(); }); $(this).delay(2000,function(){ $("#titlebar").fadeOut(1000); }); $(this).delay(3500,function(){ //Show the elements $(".village").stop().animate({top:'30px'}, {queue:false, duration:2000, easing: 'easeInOutBack'}); $(".cloudbar").stop().animate({top:'0px'}, {queue:false, duration:2000, easing: 'easeInOutBack'}); $buildingup = true; }); $("a.toggle").click(function(){ if ($buildingup == false){ $("#titlebar").fadeOut(1000); $(this).delay(1000,function(){ $(".village").stop().animate({top:'30px'}, {queue:false, duration:2000, easing: 'easeInOutBack'}); $(".cloudbar").stop().animate({top:'0px'}, {queue:false, duration:2000, easing: 'easeInOutBack'}); $buildingup = true; }); }else{ $(".village").stop().animate({top:'366px'}, {queue:false, duration:2000, easing: 'easeInOutBack'}); $(".cloudbar").stop().animate({top:'-465px'}, {queue:false, duration:2000, easing: 'easeInOutBack'}); $buildingup = false; $(this).delay(2000,function(){ $("#titlebar").fadeIn(1000); }); } }); }); </code></pre>
jquery
[5]
4,268,548
4,268,549
android:hardwareAccelerated state of my application
<p>How to get the value of hardwareAccelerated of my application in code ? How to modify it through code ?</p>
android
[4]
2,477,639
2,477,640
How to reset indexes in array_diff result?
<p>I have two arrays: <code>Array ( [0] =&gt; 2 [1] =&gt; 3 )</code> and <code>Array ( [0] =&gt; 2 )</code>. I want to get the value, which is not in second array. So I have used the <code>array_diff</code> function but my result will get <code>Array ( [1] =&gt; 3 )</code> Actually this is the result. But a small problem here, its position is (key) <code>1</code>. I want the result in to a new array starts from 0th position, i.e., <code>Array ( [0] =&gt; 3 )</code>.</p> <p>Does any one help me?</p>
php
[2]
939,792
939,793
Adding a html file into a c# email app
<pre><code>using System; using System.Net; using System.Net.Mail; class MainClass { public static void Main(string[] args) { SmtpClient client = new SmtpClient("192.168.1.12", 25); using (MailMessage msg = new MailMessage()) { msg.From = new MailAddress("noreply@test.com"); msg.Subject = "***Dexter DB***"; msg.Body = "***DB backup done***"; // I want to change this so i can do this in html file - how do i pick up this file and send a html form? msg.To.Add(new MailAddress("test@test.com")); client.Send(msg); } } } </code></pre>
c#
[0]
421,741
421,742
php registration form problem
<pre><code> $error1=''; $error2=''; $error3=''; $error4=''; $error5=''; $error6=''; $yourname=''; $email=''; $email2=''; $password=''; $password2=''; $country=''; if (isset($_POST['Registerme'])) { $_POST['yourname']=$yourname; $_POST['email']=$email; $_POST['email2']=$email2; $_POST['password']=$password; $_POST['password2']=$password2; $_POST['country']=$country; if($yourname==''){ $error1='name required'; } if($email==''){ $error2='email required'; } if($email2==''){ $error3='required field'; } if($password==''){ $error4='password required'; } if($password2==''){ $error5='required field'; } if($country==''){ $error6='country required'; } if(empty($error1) &amp;&amp; empty($error2) &amp;&amp; empty($error3) &amp;&amp; empty($error4) &amp;&amp; empty($error5) &amp;&amp; empty($error6)) {echo 'mysql query goes here and add the user to database';} }///main one else {$error1=''; $error2=''; $error3=''; $error4=''; $error5=''; $error6='';} </code></pre> <p>this is a registration validation script. in my registration form there are two email and password filelds.second fields are for confirmation.i want to check weather user typed same information in that both field.if i want to do that in this script should i use another if statement? or i should use else if? i am confused about that step...</p>
php
[2]
1,025,885
1,025,886
Calculate Remote Image File Size Using PHP
<p>How can I find the file size of an image on a remote server? On the local machine, I can use <code>filesize()</code>, but I want to find the size without downloading the image.</p>
php
[2]
2,090,439
2,090,440
C# error message when trying to use System.Net.Http.Post
<p>I am developing Windows 8 app. Error message "The type or namespace name 'Post' does not exist in the namespace 'System.Net.Http' (are you missing an assembly reference?)" is coming in Visual Studio 2012 when I try to execute the code</p> <pre><code>byte[] response = System.Net.Http.Post ( url: "someurl", contentType: "application/json", contentLength: 32, content: "pqpUserName=admin&amp;password=test@123" ); </code></pre> <p>The code is from the URL <a href="http://stackoverflow.com/questions/4088625/net-simplest-way-to-send-post-with-data-and-read-response/15129678#15129678">.NET: Simplest way to send POST with data and read response</a></p> <p>. Any help is appreciated. </p>
c#
[0]
509,643
509,644
strange issue with phplot (php plot in general) generating corrupted image
<p>I'm using the phplot package to generate a simgple png file (have tried Image_Graph with similar issues). here is the code, which can output png without problem. However, after I added a line require('conf.php') below the require_once('phplot.php'). the conf.php is an empty php file, then the output png becomes corrupted, anyone know why this is happening and any way to go around?</p> <hr> <pre><code>&lt;?php require_once('phplot.php'); // plot $plot = new PHPlot(400, 300); $plot-&gt;SetImageBorderType('plain'); // Improves presentation in the manual $plot-&gt;SetTitle("Historical NAVs"); $plot-&gt;SetDataType('data-data'); $rdata[0] = array('', strtotime('2011-02-15'), 1, 3, 0, 2); $rdata[1] = array('', strtotime('2011-02-16'), 2, 4, 1, 3); $plot-&gt;SetDataValues($rdata); $plot-&gt;SetPlotType('candlesticks2'); $plot-&gt;SetDataColors(array('red', 'DarkGreen', 'red', 'DarkGreen')); $plot-&gt;SetXLabelAngle(90); $plot-&gt;SetXLabelType('time', '%Y-%m-%d'); $plot-&gt;SetXTickIncrement(7*86400); // 1 week interval $plot-&gt;SetYTickIncrement(0.05); #$d = intval((1 - $gmin)/0.1) + 1; #$u = intval(($gmax - 1)/0.1) + 1; #$plot-&gt;SetPlotAreaWorld(NULL, 1 - $d *0.1, NULL, 1 + $u * 0.1); $plot-&gt;DrawGraph(); ?&gt; </code></pre> <hr>
php
[2]
6,018,368
6,018,369
Python multiplication error
<p>I making a program in which a single line of input containing an integer, print a triangle of asterisks of that size. But my program is not working like this. So can you please have a look on my code and can determine my mistake please. Thanks</p> <pre><code>line = int(raw_input("Number of lines: ")) a = line * '*' print a </code></pre> <p>This is the output I want to produce: </p> <pre><code>Number of lines: 5 * ** *** **** ***** </code></pre>
python
[7]
424,663
424,664
Android radiobutton image
<p>I have a radiogroup with custom radiobuttons. Icons are set using</p> <pre><code>rbFirst.setButtonDrawable(R.drawable.first); </code></pre> <p>But icon is not in the center, how do I fix it? I tried different attributes in xml file and inside class but it had no effect.</p>
android
[4]
742,183
742,184
Is ASP.NET still worth learning or is it being replaced by frameworks like JQuery
<p>We have been using ASP.NET for a big project for > 5 years. Recently, we find that JavaScript is a preferred way of rendering data on the page. So I would like to ask if others are also moving in the direction of JavaScript / WebServices / JSON and thus ASP.NET is becoming irrelevant ?</p> <p>Also, does anybody ever use ASP.NET Server Controls or is it completely obsolete by now ?</p> <p>Thanks !</p>
asp.net
[9]
2,569,577
2,569,578
Bottom align a Bitmap inside an ImageView
<p>How can I bottom align a <code>Bitmap</code> inside a fixed size <code>ImageView</code>. Let's say, the <code>ImageView</code> has a size of <code>200x200</code>, the original bitmap is <code>400x200</code>. After calling <code>view.setImageBitmap</code> the bitmap will be <code>re-sized to 200x100</code> to fit the <code>imageView</code> and will always be centered in the middle.</p>
android
[4]
4,752,774
4,752,775
javascript unexpected identifier after string has been escaped?
<p>I'm trying to pass this escaped string to a function but keep getting an unexpected string error, with a similar string I'm getting an unexpected identifier error also. Does anyone know why this might be? </p> <pre><code>&lt;a href="javascript: loadPlayer('1','Disclosure%20-%20What%27s%20In%20Your%20Head%20%28Unofficial%20Music%20Video%29%20%7C%20HD')"&gt;Video&lt;/a&gt; </code></pre>
javascript
[3]
1,154,101
1,154,102
Calling virtual function of derived class from base class constructor?
<p>I´m trying to accomplish the same which is described in a previous question:</p> <p><a href="http://stackoverflow.com/questions/397404/virtual-function-call-from-base-class">virtual function call from base class</a></p> <p>But, my real question is:</p> <p>What if f() is the constructor in the Base class? Which g() will be called? I don´t know if I am doing wrong, but in my program it seems to be that is the opposite.</p> <p>Taking the same variables from the previous question, a code which shows such </p> <p>behavior would look like this:</p> <pre><code>Class Base { Base(){g();}; virtual void g(){//Do some Base related code;} }; Class Derived : public Base { Derived(){}; virtual void g(){//Do some Derived related code}; }; int main() { Derived newDerived; return 0; } </code></pre> <p><strong>Update:</strong></p> <p>Thanx to Naveen.</p> <p>He provided me a page which contains all related information about this topic.</p> <p>I´ll let you know the link here:</p> <p><a href="http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.6" rel="nofollow">parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.6</a></p>
c++
[6]
913,317
913,318
How do you stop text moving during Jquery animations?
<p>Hi im trying to add some effects to divs on my website using Jquery. I want some elements to expand out on load and then when the user leaves the page I want the divs to close the opposite way the opened. My problem is that when the animations play (both opening and closing) the text seems to go on new lines whilst the box is getting smaller, how do I stop that from happening?</p> <p>I can show you an example on this website See Example 3 (Collapse left) - Note the Moving Text</p> <p><a href="http://www.adipalaz.com/experiments/jquery/expand_collapse_different_directions.html" rel="nofollow">http://www.adipalaz.com/experiments/jquery/expand_collapse_different_directions.html</a></p>
jquery
[5]
1,340,787
1,340,788
Custom keyboard with Adaptxt SDK
<p>I'm working on custome keyboard with integration of openAdaptxt SDK for android . I'm stuck at auto-correction feature , on hit of space .</p> <p>Has anyone integrated the OpenAdaptxt SDK!</p> <p>Thanks!</p>
android
[4]
1,522,392
1,522,393
Terrain and satellite view using MapKit
<p>i am new to Mapkit View .i want to display when i give lat,lang without destination. is it possible to display maps through terrain,satelite view in mapkit?anny tutorial link?i have seen some examples with accessing google map API(html file).is it neccessary?</p>
iphone
[8]
3,541,436
3,541,437
Wordpress Custom Content and Taxonomy's Archives
<p>Ok so I have set up a custom content type: Event</p> <p>I have then set up the custom taxonomies in hierarchical format for Event: Type</p> <p>To display "event" posts in each "type", I'm using the template: taxonomy-type.php </p> <p>I have then set up a widget "Custom Taxonomies Menu Widget" to list the "types" in one of my widget areas with a count for post in each type.</p> <p>My issues:</p> <p>Clicking one of them takes me to pages that don't match the "event" posts that should be there for that "type". (one of which, the party "type, shows no posts available even though I have some in that "type".</p> <p>The count is not right for the posts in each category. (not that big of a deal compared)</p>
php
[2]
2,782,229
2,782,230
Samsung galaxy note not taking xml file from layout-large after updating to android 4
<p>In my app i have small, normal and large layout. Initially when i buy Samsung galaxy note, it comes with android 2.3.3, I tested my app in Samsung galaxy note, at that time it takes layout form layout-large and all works fine.</p> <p>But once i updated my device to android 4. It started taking layout form layout-normal, and as a result of this some of my page alignment changes. So i want to know why this happen, is there any way to fix this out.</p>
android
[4]
3,017,870
3,017,871
unable to identify the error while trying to access an array index
<p>The following php code :</p> <pre><code>&lt;?php class foo { $arr = array("First","Second","Third","Fourth"); } $obj = new foo(); echo $obj-&gt;$arr[1]; ?&gt; </code></pre> <hr> <p>generates the following error : </p> <pre><code>Parse error: syntax error, unexpected '$arr' (T_VARIABLE), expecting function (T_FUNCTION) in /opt/lampp/htdocs/tester.php on line 3 </code></pre> <p>I am using php5.4 . What is this error ? How do I resolve this ?</p>
php
[2]
178,012
178,013
want to access and override this specific a:hover value
<p>I have the following markup:</p> <pre><code>&lt;div class="nav-font nav-item-3"&gt; &lt;a href="/arc/place" class="top_nav"&gt;favorite places&lt;/a&gt; &lt;/div&gt; </code></pre> <p>and would like to target the link color for favorite places. I have the following jquery:</p> <pre><code>$('.nav-font').on('mouseover',function(){ //console.log('here i am'); $(this).addClass('light-color'); }); </code></pre> <p>but it doesn't overrride the a:hover. How would I more specifically set the value here?</p> <p>thx</p> <p>update #1:</p> <p>here's sample css (doing one or the other). I thought the first would be more 'specific' but the standard a:hover that I have is still taking precedence. Appreciate the help!</p> <pre><code>.light-class a:hover{ color: #f5e9d1; } .light-class{ color: #f5e9d1; } </code></pre>
jquery
[5]
36,802
36,803
Transactions for C# objects?
<p>Just curious, is there any support for transactions on plain C# objects? Like</p> <pre><code>using (var transaction = new ObjectTransaction(obj)) { try { obj.Prop1 = value; obj.Prop2 = value; obj.Recalculate(); // may fire exception transaction.Commit(); // now obj is saved } except { transaction.Rollback(); // now obj properties are restored } } </code></pre> <p>Just to make answers more useful ;-) is there anything similar in other languages?</p> <p>Update on STM: here's what it claims:</p> <pre><code>atomic { x++; y--; throw; } </code></pre> <p>will leave x/y unchanged, including chained methods calls. Looks like what I ask for. At least it's very interesting. I think that's close enough. Also, there're similar things in other languages, for example Haskell STM. Notice I don't say that it should be used for production ;-)</p>
c#
[0]
51,199
51,200
how to make application with android
<p>I am new one in android apps please any one help me and give me some android tutorial link.</p> <p>i am trying to create a new android apps but it says me like this </p> <blockquote> <p>[2011-08-18 15:27:39 - jeetu] Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first </p> </blockquote> <p>What does it mean</p> <p>thanks Dasarathi</p>
android
[4]
1,877,295
1,877,296
Opening a file and matching Engr Label
<p>1.Getting buildid from a buildlocation which is the last word after "\" which is "A1234ABCDE120083.1" in this case</p> <p>2.After getting the buildid,am opening a file and then trying to match the line "Engr Label: Data_CRM_PL_177999" to get the label name which is "Data_CRM_PL_177999"</p> <p>3.Final output should be "Data_CRM_PL_177999"</p> <p>For some reason I am getting the following syntax error..</p> <pre><code> import re Buildlocation= '\\umor\locations455\INT\A1234ABCDE120083.1' Labelgetbuildlabel(Buildlocation) def getbuildlabel(BuildLocation): buildid=BuildLocation.split('\')[-1] Notes=os.path.join(BuildLocation,Buildid + '_notes.txt') if os.path.exists(Notes): try: open(Notes) except IOError as er: pass else: for i in Notes.splitlines: if i.find(Engr Label) label=i.split(:)[-1] print label//output should be Data_CRM_PL_177999 </code></pre> <p>Output should be:-</p> <pre><code>Line looks like below in the file Engr Label: Data_CRM_PL_177999 </code></pre> <p>SYNTAX ERROR</p> <pre><code> buildid=BuildLocation.split('\')[-1] ^ SyntaxError: EOL while scanning string literal </code></pre>
python
[7]
3,593,860
3,593,861
Php writing to a file / string formating / file format how to do it right?
<p>right now I'm doing it this way:</p> <pre><code>$myFile = "config.ini"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "[scripts]\n\n[admin]\nhide_fields[] = ctr_ad_headerImg\n\n"; fwrite($fh, $stringData); $stringData = "[widget_areas]\n0.name = \"Top Navigation\"\n0.id = top-nav\n0.description = \"Widget area at the very top of the page\"\n\n[default_colors]\nsitebg = #$sitebg\nfooterbg = #$footerbg\nlink = #$link\nurl = #$url\nbg = #$bg\ntext = #$text\nborder = #$border\n\nlu_link = #$lu_link\nlu_url = #$lu_url\nlu_bg = #$lu_bg\nlu_text = #$lu_text\nlu_border = #$lu_border"; fwrite($fh, $stringData); fclose($fh); </code></pre> <p>The problem here is that I have to keep that exact file structure, what is a better way to do this? What should I study ? Any tutorials? Thanks</p>
php
[2]
2,350,377
2,350,378
Extending builtin classes in python
<p>How can I extend a builtin class in python? I would like to add a method to the str class.<br /> I've done some searching but all I'm finding is older posts, I'm hoping someone knows of something newer.</p>
python
[7]
1,912,975
1,912,976
How to use the new SlidingPaneLayout?
<p>In the 13th revision of the v4 support library, google introduced the SlidingPaneLayout. I don't know how should I start implementing it, and the documentation doesn't really seem to help. Could someone please clarify this to me? </p>
android
[4]
918,763
918,764
Google nexus one Macbook pro mismatch
<p>I have this annoying issue where my android google nexus one can't run my application from a macbook pro using eclipse. It says "device not found". </p> <p>The worst thing is that it used to work most of time when I was on 2.3.3 android version, but now I get the last version (ice cream sandwich I think - 4.0.3), it is still randomly working but 3 times out of a hundred.</p> <p>This is a famous issue but so far I didn't find the solution.</p>
android
[4]
5,953,606
5,953,607
Galaxy S2 does not return signal correctly
<p>Good morning! </p> <p>I use this code to get signal of telecom network:</p> <pre><code>int signalof = signalStrength.getGsmSignalStrength(); </code></pre> <p>The documentation says that 99 is returned when it was not possible to "read" the signal.</p> <p>However, other devices, returns the value correctly. </p> <p><strong>Only Galaxy S2 does not work. Versions 2.3.3 and 2.3.5 (Android factory build)</strong> </p> <p>Has anyone solved this problem?</p> <p>Very Thanks! </p>
android
[4]
4,401,699
4,401,700
Use of variables in global namespace
<p>Why should this be an error?</p> <pre><code>int a = 0; a = 42; int main() { } </code></pre> <p>A possibe match for this behavior i could find:</p> <blockquote> <p>(3.4.1/4) A name used in global scope, outside of any function, class or user-declared namespace, shall be declared before its use in global scope.</p> </blockquote> <p>Could this be a defect in standard?</p>
c++
[6]
3,474,817
3,474,818
Can you have multiple $(document).ready(function(){ ... }); sections?
<p>If i have a lot of functions on startup do they all have to be under one single:</p> <pre><code>$(document).ready(function() { </code></pre> <p>or can i have multiple:</p> <pre><code>$(document).ready(function() { </code></pre> <p>statements?</p>
jquery
[5]
903,163
903,164
Not able to launch putty with telnet session using php
<p>I have putty.exe on my desktop so if I will go to command prompt and then to <code>C:\Documents and Settings\user\Desktop</code> location and execute following command it will launch the Putty window of telnet connection to server specified:</p> <p><code>putty.exe telnet://a.b.c.d/</code></p> <p>I am trying to launch the putty to telnet to specific server using following but its not working for me:</p> <pre><code>&lt;?php $securecrt = "C:\\Documents and Settings\\user\\Desktop\\putty.exe telnet://a.b.c.d/ "; exec($securecrt); ?&gt; If I try following then it launches the putty application but will have to provide the host name or IP to login: &lt;?php $securecrt = "C:\\Documents and Settings\\user\\Desktop\\putty.exe "; exec($securecrt); ?&gt; </code></pre> <p>Not sure if I am missing something very basic, It will be great if someone can help with this.</p>
php
[2]
3,121,760
3,121,761
A question related to UIButton
<p>I have taken customview in my code for UIButton.</p> <pre><code>UIButton *button= [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; [button addTarget:self action:@selector(checkedimage:) forControlEvents:UIControlEventTouchUpInside]; -(IBAction)checkedimage:(id)sender { NSLog(@"checkedimage"); if(checkImage == NO) { newImage = [UIImage imageNamed:@"a.png"]; checkImage=YES; } else if(checkImage==YES) { newImage = [UIImage imageNamed:@"b.png"]; checkImage=NO; } } </code></pre> <p>but when i click on UIButton it is not going to action checkedimage<br> why?</p>
iphone
[8]
4,374,901
4,374,902
Form submit not happening when I set target attribute using jquery
<p>I have the form inside iframe, I have the following piece of code</p> <pre><code>&lt;script type="text/javascript"&gt; var Path="&lt;?= $this-&gt;url ?&gt;" $(function() { vReg=0 $("#signin").submit(function() { if(vReg == 1) { return true; } else{ var url = Path; var data = {}; $("input").each(function() { data[$(this).attr('name')] = $(this).val(); }); $("select").each(function() { data[$(this).attr('name')] = $(this).val(); }); $.post(url,data,function(resp) { vError="" for(id in resp){ oResp=resp[id]; for(key in oResp){ vError +=oResp[key]+"\n" } } if(vError == ''){ vReg=1; $("#formid").attr('target','_top'); $("#signin").submit(); return true; } else{ $("#formid").attr('target','_self'); alert(vError) } return false; },'json'); return false; } }); }); &lt;/script&gt; </code></pre> <p>My aim is, If I have no Error, I will apply this target attribute and then immediately submit the form which takes the page to parent page. But I got target attribute when I click form submit for the first time,again click the second time its now redirecting to parent page. I need it happens when i click first time itself.</p> <p>Kindly help</p>
jquery
[5]
2,762,484
2,762,485
php while statement causing 500 error
<p>I'm completely stumped here. I've written the code below and when I view the page I get a 500 error. Via process of commenting out select lines one by one I was able to find that the while statement is causing the error...could anyone tell me what could possible be wrong with my code?</p> <pre><code>&lt;?php $rQuery = "SELECT * FROM roles ORDER BY roleName ASC"; $rResult = mysql_query($rQuery); if (!$rResult){ echo 'Query Error &lt;br&gt;' . $rQuery; exit; } ?&gt; &lt;p&gt; &lt;select name="roleaddid" id="roleaddid" &gt; &lt;?php while ($roles = mysql_fetch_array($rResult)){ ?&gt; &lt;option value="&lt;?php echo $roles['roleId'] ?&gt;"&gt;&lt;?php echo $roles['roleName'] ?&gt;&lt;/option&gt; &lt;? } // end while ?&gt; &lt;/select&gt; &lt;/p&gt; </code></pre> <p>thanks for any insight...</p>
php
[2]
5,927,998
5,927,999
PHP :: I am trying to print an 8x8 grid
<p>I am trying to print an 8x8 grid on php can anyone check this code is I am doing something wrong</p> <pre><code> $row = 0; $col = 0; print "&lt;form&gt;"; while ($row &lt;= 8){ print "&lt;tr&gt;"; $row++; while ($col &lt;= 8){ print "&lt;td&gt;"; print "&lt;input type="checkbox" name="battle" value="ships"&gt;"; print "&lt;/td&gt;"; $col++; } print "&lt;/tr&gt;"; ) print "&lt;/form&gt;"; </code></pre>
php
[2]
3,003,978
3,003,979
Jquery on default values
<p>Using jquery, how can I change the color of these elements to red if the textboxes contain defaultvalues and the 'isrequired' value is "Yes"?</p> <pre><code>&lt;input type="text" value="Name" isrequired="Yes"&gt; &lt;input type="text" value="Address" isrequired="No"&gt; &lt;input type="text" value="Age" isrequired="Yes"&gt; </code></pre>
jquery
[5]
3,661,221
3,661,222
how to handle media button to stop a song?
<p>I have one service in which I am playing a song. Now I want to stop the song when i press volumn up and down button.</p> <p>i used broadcast receiver also with the following code but it doesn't help me</p> <p>if (intent.getAction().equals(Intent.ACTION_MEDIA_BUTTON)) { player.stop();<br> }</p> <p>please help me.</p> <p>Thanks in advance </p>
android
[4]
705,021
705,022
Always launch the main activity
<p>My application has 4 activities. If the user clicks the home button, the next time the application is launched, I want it to start on the main activity not the last activity it was on. If the phone's display turns off, as long as the application hasn't been closed, I want it to resume where it left off. What is the proper way to go about this?</p>
android
[4]
5,460,579
5,460,580
Chat app vs REST app - use a thread in an Activity or a thread in a Service?
<p>In Virgil Dobjanschi's talk, "Developing Android REST client applications" (link <a href="http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html#" rel="nofollow">here</a>), he said a few things that took me by surprise. Including:</p> <ul> <li><p>Don't run http queries in threads spawned by your activities. Instead, communicate with a service to do them, and store the information in a ContentProvider. Use a ContentObserver to be notified of changes.</p></li> <li><p><em>Always</em> perform long running tasks in a Service, never in your Activity.</p></li> <li><p>Stop your Service when you're done with it.</p></li> </ul> <p>I understand that he was talking about a REST API, but I'm trying to make it fit with some other ideas I've had for apps. One of APIs I've been using uses long-polling for their chat interface. There is a loop http queries, most of which will time out. </p> <p>This means that, as long as the app hasn't been killed by the OS, or the user hasn't specifically turned off the chat feature, I'll never be done with the Service, and it will stay open forever. This seems less than optimal. </p> <p>Long question short:</p> <p><b>For a chat application that uses long polling to simulate push and immediate response, is it still best practice to use a Service to perform the HTTP queries, and store the information in a ContentProvider?</b></p>
android
[4]
937,321
937,322
can i move the installed android sdk from XP system to windows7 ? Is it possible?
<p>i installed complete android package in XP system, i have windows7 in another pc but I dont want to do installing new software again . can i move it to Windows7 easily ?if possible what is the procedure?</p>
android
[4]
2,794,626
2,794,627
Jquery way to push an element to the top of the z-index order?
<p>What are the ways of finding the highest CSS z-index value of specified set of elements and pushing one element that is clicked to the top of the z-index order.</p>
jquery
[5]
112,730
112,731
jQuery on click and click again
<p>I am trying to make it so that when a button is clicked then a class is given to it and when its clicked again the class is removed. </p> <p>Could someone help?</p> <pre><code> $("body").on("click", ".AudioShowHidePlaylist", function(event){ $('.AudioShowHidePlaylist').addClass('active'); }); </code></pre>
jquery
[5]
2,999,217
2,999,218
Design view problem in .xml file with gallery
<p>i can only see the gallery view..any help please?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/back" android:orientation="vertical" &gt; &lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;Button android:id="@+id/btn1" android:layout_width="wrap_content" android:layout_height="81px" android:background="#aa0000" android:layout_marginTop="30px" android:textColor="#dcd3b6" android:layout_weight="1" /&gt; &lt;Button android:id="@+id/btn2" android:layout_width="wrap_content" android:layout_height="81px" android:background="#aa0000" android:layout_marginTop="30px" android:textColor="#dcd3b6" android:layout_below="@id/btn1" android:layout_weight="1" /&gt; &lt;Button android:id="@+id/btn4" android:layout_width="wrap_content" android:layout_height="81px" android:background="#aa0000" android:layout_marginTop="30px" android:textColor="#dcd3b6" android:layout_below="@id/btn2" android:layout_weight="1" /&gt; &lt;Gallery android:id="@+id/gallery" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/btn4" /&gt; &lt;/RelativeLayout&gt; &lt;/ScrollView&gt; </code></pre>
android
[4]
3,946,182
3,946,183
Why can't function in JavaScript "Class" call itself?
<p>I can't figure out what is wrong with this code. Firefox's error console tells me: "<em>this.animateImgSlider is not a function</em>".</p> <p>What I would like is to call <code>this.selectImage()</code> with <code>jsItems[0].selectImage(0)</code> and then have <code>this.animateImgSlider()</code> be called some number of times until <code>selfCall</code> is false:</p> <pre><code>function WindowItem(inId) { this.id = inId; this.imgSliderTarget = 0; this.imgSlider = document.getElementById("imgSlider"+inId); this.animateImgSlider = function() { var selfCall = true; var currLeft = parseInt(this.imgSlider.style.left, 10); if (currLeft &lt; this.imgSliderTarget) { currLeft += 8; if (currLeft &gt;= this.imgSliderTarget) { currLeft = this.imgSliderTarget; selfCall = false; } } else { currLeft -= 8; if (currLeft &lt;= this.imgSliderTarget) { currLeft = this.imgSliderTarget; selfCall = false; } } this.imgSlider.style.left = currLeft+"px"; if (selfCall) setTimeout("this.animateImgSlider()", 0); } this.selectImage = function(inImg) { this.imgSliderTarget = -inImg*488; this.animateImgSlider(); } } var jsItems = new Array(); jsItems.push(new WindowItem(0)); </code></pre> <p>This line is the one that throws the error:</p> <pre><code>if (selfCall) setTimeout("this.animateImgSlider()", 0); </code></pre>
javascript
[3]
4,746,690
4,746,691
Why does PHP's foreach advance the pointer of its array (only) once?
<p>This is a question of curiosity about the reasons behind the way <code>foreach</code> is implemented within PHP.</p> <p>Consider:</p> <pre><code>$arr = array(1,2,3); foreach ($arr as $x) echo current($arr) . PHP_EOL; </code></pre> <p>which will output:</p> <pre><code>2 2 2 </code></pre> <p>I understand that <code>foreach</code> rewinds array pointers to the beginning; however, why does it then increment it only once? What is happening inside the magic box?? Is this just an (ugly) artefact?</p> <hr> <p>Thanks @NickC -- for anyone else curious about <code>zval</code> and <code>refcount</code>, you can read up on the basics <a href="http://php.net/manual/en/features.gc.refcounting-basics.php" rel="nofollow">here</a></p>
php
[2]
5,469,185
5,469,186
PHP error: Warning: ociparse() expects parameter 2 to be string
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given-in-select">mysql_fetch_array() expects parameter 1 to be resource, boolean given in select</a> </p> </blockquote> <p>Getting this error when trying to display data from the database. </p> <pre><code>Warning: ociparse() expects parameter 2 to be string, resource given in /home/sjrem/public_html/SIT104_3/order.php on line 29 An error occurred in parsing the sql string. </code></pre> <p>line 29 : <code>$stmt = OCIParse($connect, $query);</code> </p>
php
[2]
2,601,424
2,601,425
Is it possible to detect if my app is running and displaying on screen?
<p>Is it possible to detect if my app is running and displaying on screen? As we know, ios is supporting multi-task. But I prefer to get the status if my app is running in front of all app and interact to users.</p> <p>Welcome any comment</p>
iphone
[8]
679,836
679,837
How to display Modalpopuextender, target control in Datalist?
<p>In web application, I place modal popu extender, problem is taraget control is in datalist control, how can i write the targetcontrolid. when i click the button which is in datalist i want to show the modal popup control. Can you help me.</p> <pre><code> protected void dtlstMagazine_ItemCommand(object source, DataListCommandEventArgs e) { ModalPopupExtender1.Show(); } </code></pre> <p>Thank you for replay. I solve this problem</p>
asp.net
[9]
5,441,233
5,441,234
Using :visible and :first-child together in jQuery
<p>I'm trying to use the ":visible" and ":first-child" pseudo-selectors together in jQuery and it doesn't seem to be working out. I have the following HTML:</p> <pre><code>&lt;div&gt; &lt;a class="action" style="display:none;"&gt;Item One&lt;/a&gt; &lt;a class="action"&gt;Item One&lt;/a&gt; &lt;a class="action"&gt;Item One&lt;/a&gt; &lt;/div&gt; </code></pre> <p>And the following jQuery call:</p> <pre><code>$("div a.action:visible:first-child").addClass("first"); </code></pre> <p>But it never seems to find the right element...it finds the first element but not the first <strong>visible</strong> element. I've even tried swapping the selector order ":first-child:visible" instead of ":visible:first-child" and that doesn't work either. Any ideas?</p>
jquery
[5]
2,705,975
2,705,976
What is the best way to browse the contents of a jar file on the Mac platform?
<p>What is the best way to browse the contents of a jar file on the Mac platform?</p> <p>I usually use <code>unzip foo.jar -d foo</code>, but this is too slow with uber-jars.</p>
java
[1]
3,806,119
3,806,120
enum name as function
<p>What happens if we use the enum name as a function in c++? To elaborate, let me put the following code snippet</p> <pre><code>enum check{ HELLO, HI, HOWDY, SALAM, SALOM, STOP }; void main() { int p = check(); cout&lt;&lt;p; } </code></pre> <p>I could assume it may be invoking the default constructor in case of a class or structure, but what happens with an enum? </p> <p>And if it is some sort of a construtor-like method, does it return 0 ? because 'p' was set to 0.</p>
c++
[6]
2,340,787
2,340,788
Android how to share custom objects instance in the application
<p>I have created an application which uses a lot of custom objects I've created to manage parts of the application.</p> <p>for example:</p> <ul> <li>FacebookManager class - responsible for connecting to facebook</li> <li>DatabaseManager class - responsible for application's database connection</li> <li>etc...</li> </ul> <p>these classes must be reachable for all application's classes.</p> <p>i've extend the Application class and i'm sharing the Application instance between class so every class will be able to reach the global objects (and some more methods). i'm wondering if this is the correct way of doing what i want, or should i create a class with static methods for the same propose.</p> <p>I've read a lot about it and understood that from the memory point of view - non of these ways are best.</p> <p>is there a way to save an object to the SharedPereferences and get it from another class ? or any other idea ?</p>
android
[4]
3,272,313
3,272,314
Why does Android require the package name to have at least two identifiers?
<p>When creating a new Android application, <a href="http://androidcodingtips.blogspot.com/2011/08/package-name-must-have-at-least-two.html" rel="nofollow">Eclipse</a> complains <code>Package name must have at least two identifiers</code> and <a href="http://code.google.com/p/nbandroid/source/browse/project/src/org/netbeans/modules/android/project/ui/wizards/Bundle.properties?spec=svn46a5b01adf2736a4315e43c87b5b2eb75af2f58e&amp;r=46a5b01adf2736a4315e43c87b5b2eb75af2f58e" rel="nofollow">Netbeans</a> complains <code>Package name must have at least two parts (Android Bug)</code>.</p> <p>I understand how to work around this problem. My question is: where is this limitation coming from? I didn't find a mention of it in the Android documentation or the <a href="http://code.google.com/p/android/issues" rel="nofollow">issue tracker</a>.</p>
android
[4]
5,942,419
5,942,420
Send Outlook Meeting Invite using Java
<p>I want to send a Outlook Meeting Invite using Java.Can somebody please share the code for the same?</p> <p>Thanks &amp; Regards, Richa</p>
java
[1]
2,537,385
2,537,386
Jquery create text input element and append to form "field focus" does not work in Firefox -problem
<p>I have the following code (see below) which makes the field focus on the inserted text input. But this does not work in Firefox. So I cannot type any text in Firefox.</p> <pre><code>$('&lt;input/&gt;').attr({ type: 'text', id: 'test', name: 'test' }).appendTo('#form'); </code></pre> <p>Is there any fix for this?</p> <p>Thanks in advance!</p> <p>--</p> <p><strong>Correction to my question</strong></p> <p>I found out that the problem is caused by </p> <p><code>$(selector).sortable().disableSelection()</code></p> <p>The only resolution I have now is to not call</p> <p><code>//disableSelection()</code></p> <p>Any other suggestions are more then welcome.</p>
jquery
[5]
1,517,436
1,517,437
Is it possible to skip PHP code?
<p>Just casual paranoia. Let's say we have an index.php:</p> <pre><code>&lt;?php exit('Forbidden!'); ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"&gt; &lt;html&gt; &lt;title&gt;Can you see me?&lt;/title&gt; &lt;script language="javascript" type="text/javascript"&gt; alert("Welcome!"); &lt;/script&gt; &lt;p&gt;You got me.&lt;/p&gt; &lt;/html&gt; </code></pre> <p>Can an external user <strong>somehow</strong> reach the "Welcome!" message? And why yes/not?</p> <p>Any means are valid (e.g. viewing the source code for the page).</p> <p>Thank you in advance!</p>
php
[2]
5,048,518
5,048,519
change color color of text inside seterror method
<p>I am currently using an android application where i am using a seterror method for edittext validation . The problem is that i want to change the color of the text inside the method . plz help me... </p> <pre><code> EditText UserNameEdt, PasswordEdt; String UserName; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.login); UserName = UserNameEdt.getText().toString(); Password = PasswordEdt.getText().toString(); if (UserName.equals("")) { UserNameEdt.setError("Enter UserName"); } } </code></pre> <p>i want to change the color of string "enter username" into black, not the text inside the edittext</p>
android
[4]
2,837,519
2,837,520
Clear a part of a text in a textbox with jquery?
<p>I have a textbox that have the following value:</p> <pre><code>The person 'enter name here' has finished. </code></pre> <p>I want if the user clicked on every where between <code>''</code> the text <code>enter name here</code> clear. How to do this?</p> <pre><code>&lt;input type="text" id="txt"/&gt; </code></pre> <p>Edit: I may have two or more place in a textbox. like this:</p> <pre><code>The person 'enter name here','enter family here' has finished. </code></pre>
jquery
[5]
3,317,476
3,317,477
Javascript Hoisting
<p>Quite an interesting thing was discovered by me as a JS learner, consider the following code. </p> <pre><code> this.init = function (e) { var container = e.container; // slider var slider = $("#div1").slider({ orientation: "horizontal", step: 1, slide: function () { console.log(e.container); // not null console.log(container); // null } }); }; </code></pre> <p>here's how it's called:</p> <pre><code>lib.init({ container: $("#container") }); </code></pre> <p>I know that I can use <code>on("slide", {container: container}, function(event, args){...}))</code> to bind slide event and pass external data into it. But - could anyone explain why values returned by two console.log are different? Also I wonder if the technique is a technically sound replacement for <code>on</code> approach?</p>
javascript
[3]
824,589
824,590
Set Cursor Position in custom edittext
<p>I have a custom EditText which is empty and I want to set the cursor position using the co-ordinates(x,y) i get from ontouch event. Wherever I touch i should be able to move the cursor to that position and should be able to type the text from there. Help me out...</p>
android
[4]
3,600,748
3,600,749
How can I create an index file in java?
<p>I want to create an index file from a very large text file in java. Actually I want to keep the number and the byte of the first character in each line in the index file.I am going to use it to do searching as fast as possible in my original file. </p> <p>It will be great if someone can help me with a sample code.</p>
java
[1]
548,474
548,475
C++ size aware data type/parameter
<p>I am not sure, but I think I have once seen a method signature that looked like this (in the constructors):</p> <pre><code>class Buffer { Buffer(char_with_size *data) { ... }; Buffer(char *data, size_t len) { ... }; }; </code></pre> <p>In the first constructor call an array/pointer parameter can passed of which the compiler automatically knows its size. So, I always know the size of the char buffer passed.</p> <p>Does anyone know if this really exists in c++?</p>
c++
[6]
2,072,006
2,072,007
Javascript Close windows in IE, Firefox and Chrome
<p>is there a javascript code for closing window which can work in IE, Firefox and Google Chrome?</p> <p>I tried, </p> <pre><code>window.close(); </code></pre> <p>but it work in IE only.</p> <p>I tried, </p> <pre><code>window.open('','_parent',''); window.close(); </code></pre> <p>but it work in IE and Chrome but Firefox don't work.</p> <p>Can help me with it guys?</p>
javascript
[3]
5,326,202
5,326,203
How to set value of <input type="hidden"> in asp .net page_load without using runat="server"
<p>i need to do the following two things... </p> <ol> <li>i want to set value of in asp .net page_load. the problem is that i dont want to use runat="server". i have tried this the following but it does not work: </li> </ol> <p>HtmlInputHidden hiddenControl = (HtmlInputHidden) FindControl("a"); </p> <p>is there a way to access in asp .net page_load without using runat="server"? ? ?</p> <ol> <li>i can do this if i use but in this case i cannot access it in master page's javascript function. i have tried this but it does not work... <ul> <li>var hdnField = document.getElementById('&lt;%= hdnIdentity.ClientId%>');</li> <li>var hdnField = document.getElementById("hdnIdentity").getAttribute("value");</li> <li>var hdnField = document.getElementById("hdnIdentity").value </li> </ul></li> </ol> <p>what i need... i want to access content page's hidden field value in javascript in master page. is there a way ? ? ? thnx in advance regards Haroon haroon426@yahoo.com</p>
c#
[0]
741,430
741,431
How do you count every subfolder under the Outlook mailbox?
<p>Using the Microsoft Outlook 14.0 Object Library reference and the code below I would like to count all folders listed under the mailbox including every subfolder but I have a problem. </p> <p><img src="http://i.stack.imgur.com/PQDZL.jpg" alt="enter image description here"></p> <p>This code only counts the top level folders and second level folder but doesn't count any subfolders beneath. Something wrong within my foreach statement in the countRootFolders method but I can't work it out. Can anyone help? </p> <pre><code>Microsoft.Office.Interop.Outlook.Application app = null; Microsoft.Office.Interop.Outlook._NameSpace ns = null; private void button1_Click(object sender, EventArgs e) { app = new Microsoft.Office.Interop.Outlook.Application(); ns = app.GetNamespace("MAPI"); MessageBox.Show(countRootFolders().ToString()); } public int countRootFolders() { Microsoft.Office.Interop.Outlook.MAPIFolder rootFolder = this.ns.Session.DefaultStore.GetRootFolder(); int rootCount = rootFolder.Folders.Count; foreach (Microsoft.Office.Interop.Outlook.MAPIFolder subfolder in rootFolder.Folders) { rootCount += subfolder.Folders.Count; } return rootCount; } </code></pre> <p>Any help greatly appreicated!!</p>
c#
[0]
551,923
551,924
Show tick Symbol on label
<p>I have to show "√" (Tick symbol) in label text. How can show tick symbol on label</p> <p>Thanks</p>
c#
[0]
1,332,939
1,332,940
Can a Specialized Template Class Inherit from Another Specialized Template Class?
<p>I first defined</p> <pre><code>class Hash { }; </code></pre> <p>Then a specialization of Hash.</p> <pre><code>template &lt;class T&gt; class Hash&lt;int, T&gt; { public: Hash(int slotN = 11); bool insert(int key, T val); bool remove(int key); bool contains(int key); bool query(int key, T&amp; val) ; protected: // Basic Variables of the Hash Model. list&lt;int&gt;* slot; list&lt;T&gt;* slotVal; int slotN; }; </code></pre> <p>I want to use this specialized version of Hash to implement another specialization: Hash of String-Valued Keys.</p> <pre><code>template &lt;class T&gt; class Hash&lt;string, T&gt; : public Hash&lt;int, T&gt; { public: Hash(int slotN); bool insert(string key, T val); bool remove(string key); bool contains(string key); bool query(string key, T&amp; val) ; private: // Calculate the String's Hash Key. int str2key( string key); }; </code></pre> <p>But it seemed I cannot access fields in the class Hash. Why?</p>
c++
[6]
3,776,768
3,776,769
Widget starting a service also starts main activity
<p>I have a widget that is supposed to start and stop a service (start it when it's not running, stop it when it is). This is working fine, however, each time the service is started, my app's main activity is also launched, which I don't want. If I remove the MAIN-intent-filter ( <code>&lt;action android:name="android.intent.action.MAIN" /&gt;<br> &lt;category android:name="android.intent.category.LAUNCHER" /&gt;</code>) from the app's manifest, it works as I want it to (without launching the main-activity, just the service), but then I obviously don't have a main activity anymore...</p> <p>This is how I start the service (I would assume this is the normal way, and I can't see any reference to what might cause the MAIN intent to fire):</p> <pre><code>Intent svc = new Intent(this, OnOffService.class); startService(svc); </code></pre> <p>Thanks,<br> Nick</p>
android
[4]
4,295,915
4,295,916
only php code in a .php file?
<p>A very basic question:</p> <p>I'm creating a WordPress Page Template.</p> <p>I have a file: pagetemplatename.php</p> <p>Obviously the file has .php on the end of the name: Is everything in this file php code? Or can CSS and other code go in this file?</p>
php
[2]
5,557,574
5,557,575
Extracting day, month and year from calendar tables
<p>I am working on a booking system built in CodeIgniter. I have modified the Calendar library slightly to show only the four next weeks. I want the user to be able to choose check in and check out dates. When the corresponding calendar shows, the user pushes the date, and the value is stored in a hidden input, using JQuery. If it is late in a month, there might be two months showing, in other words two calendar tables. </p> <p>What is the best way to store the date using JQuery? The table cells is only showing the day, while a table heading is showing "month year". </p>
jquery
[5]
3,976,400
3,976,401
How to change password field to diplay asterisks instead of dots
<p>I am working on the task that requires the password field (i.e.the Edit Text) to hide user input using asterisks(*) rather than dots(.). Currently it shows as dots. Kindly tell me the way to do it if its possible using android's native methods. Or please post the code to do it if anyone has already done that.</p> <p>Thanks in advance..</p>
android
[4]
1,391,389
1,391,390
Grabbing the next biggest number
<p>I have this:</p> <pre><code> int[] tal = {3, 8, 5, 8, 2, 3, 9, 12, 21}; int max=tal[0]; for(int i=0;i&lt;tal.length;i++){ if(tal[i]&gt;5){ max=tal[i]; } } System.out.println("Biggest: "+ max); </code></pre> <p>Im reading Java, how can i make print out the next biggest number</p>
java
[1]
2,188,421
2,188,422
log in about admin for seprate
<p>i want to creat a login for the admin part but i need to creat from the eg(user_id=1) after that we creat the page of admin penel</p>
php
[2]
618,410
618,411
How can i catch picture that was taken?
<p>I new in the android developing. I want to develop simple application that will be able to take a picture using the cell phone camara and show it on the screen of the cell phone. </p> <p>Is there some simple example that i can use ? or some code that can help me learn how to do it ? </p> <p>Thanks for any help</p>
android
[4]
5,110,440
5,110,441
how to handle browser closing event in servlets
<p>Hi i am having the html page in my web application. The page is locked by a client and unlocked by the same client. if the client forgets to unlock or close the browser, press back button on the page, and other links the page will locked always and cannot be unlocked. i need to unlock the page in the above cases if he forget to unlock Thanks</p>
java
[1]
3,764,201
3,764,202
Android Listview with some non-standard columns
<p>The picture below is a Listview row I am looking for. Its kind of Inventory list.</p> <p><img src="http://i.stack.imgur.com/28YY2.png" alt="enter image description here"></p> <p>Question:</p> <p>How do I draw/create this kind of a List view row where </p> <p>1) The first column doesn't have horiz. or vert. splitter lines.</p> <p>2) The second column one is kind of a box with both horz. and vert splitter lines.</p> <p>There is a space between second and third column.</p> <p>3) The third column a standard list view row with text and small icons in it.</p> <p>How to combine all the 3 to make this a jazy row? :) </p> <p>I do know how to make a listview with the 3rd column alone; with text and images. But the column spacing and the vertical lines are the ones I don't know.</p> <p>Thank you for any suggestion</p> <p>Jacob</p>
android
[4]
216,003
216,004
Include file in PHP form show error and content of included file
<p>I have included php class file which contains all the classes as But in output it is showing content of classes.php file and fatal error class not found here i only want to use the classes written in "classes/classes.php".But it is showing contents of this file in output. please help me,i have tried all the ways. Thank U in advance.</p>
php
[2]
2,575,211
2,575,212
Generating graphs on-the-fly with JavaScript with mouseover "captions"
<p>I am developing a backend that requires to have graphs with information associated in a javascript why. The idea is to reproduce something similar to Google Analytics/Webmaster Tools:</p> <p><img src="http://i.stack.imgur.com/qFfXd.png" alt="example of graph"> </p> <p>I also like to reproduce the "hover" caption when someone moves throw the days.</p> <p>Does anybody knows if this is possible to do it with JavaScript? It's not allowed to use jQuery, so no "use jQuery" replies please.</p> <p>Thank you in advance</p>
javascript
[3]
5,158,137
5,158,138
Scroll view issue
<p>friends</p> <p>I develop one scroll view set its content size and set three view on scroll view and its scroll fine and i also want it move when segmentcontrol tap but it was not happen my view is not move on scroll can some one help me to figure out this problem.</p>
iphone
[8]
2,567,230
2,567,231
Android Contacts application theme/style
<p>Can you please tell me why the android Contacts application theme/style is using 'dark' theme? For example, the activity's background is Black instead of White. I have looked at their Android Manifest xml file and their layout xml file (e.g. call details.xml) file, but i don't see how they specified using a 'dark' theme?</p> <p>Can you please tell me how do they do that? I have looked at <a href="http://developer.android.com/guide/topics/ui/themes.html" rel="nofollow">http://developer.android.com/guide/topics/ui/themes.html</a>, but I don't see Contacts app is doing that.</p> <p>Thank you for any help.</p>
android
[4]
2,206,654
2,206,655
Android Play video in Mediaplayer?
<p>Video in res->raw folder.I want to play video directly in mediaplayer.I trying to search in google but cant get final solution...</p>
android
[4]
5,149,003
5,149,004
WAMP Uploading large File
<p>I have 2.24MB file size to upload to database, it displays</p> <p>No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.</p> <p>Iam using WAMP server 2.2 with supported versions </p> <pre><code>Apache 2.2.21 PHP 5.3.8 MySQL 5.5.16 </code></pre> <p>I made the following changes too</p> <pre><code>C:\wamp\bin\apache\apache2.2.6\bin\php.ini post_max_size = 750M upload_max_filesize = 750M max_execution_time = 5000 max_input_time = 5000 memory_limit = 1000M C:\wamp\bin\mysql\mysql5.0.45\my.ini: max_allowed_packet = 200M </code></pre> <p>Could anyone suggest me the option to upload large file.</p>
php
[2]
1,427,773
1,427,774
can we change the pitch in flite engine for iphone
<p>i am using flite engine to generate sound n iphone everything is fine now is it possible to change the pitch of sound lets say i want to put my sound ... can i do that??</p>
iphone
[8]
2,787,888
2,787,889
How to run cs-script (c# script) with StringTemplate?
<p>I copied Antlr3.StringTemplate.dll and Antlr3.Runtime.dll from <a href="http://www.stringtemplate.org/" rel="nofollow">http://www.stringtemplate.org/</a> to cs-script/lib directory ( <a href="http://www.csscript.net/" rel="nofollow">http://www.csscript.net/</a> ) and execute the code below but it says it cannot find the assemblies of Antlr why ? My prog below</p> <pre><code>//css_reference Antlr3.Runtime.dll; //css_reference Antlr3.StringTemplate.dll; using System; using Antlr.StringTemplate; using Antlr.StringTemplate.Language; using System.Windows.Forms; class Script { static public void Main(string[] args) { StringTemplateGroup group = new StringTemplateGroup("myGroup", @"C:\Tutorials\stringtemplate", typeof(DefaultTemplateLexer)); StringTemplate helloAgain = group.GetInstanceOf("homepage"); helloAgain.SetAttribute("title", "Welcome To StringTemplate"); helloAgain.SetAttribute("name", "World"); helloAgain.SetAttribute("friends", "Terence"); helloAgain.SetAttribute("friends", "Kunle"); helloAgain.SetAttribute("friends", "Micheal"); helloAgain.SetAttribute("friends", "Marq"); Console.Out.WriteLine(helloAgain.ToString()); } } </code></pre>
c#
[0]
1,654,517
1,654,518
How to slide up a div 15px to the top
<pre><code> $("SomeInputField").keydown(function () { $("SomeDiv").css("top", "30px"); }); </code></pre> <p>First this is making a div go 30px from the top</p> <pre><code> $("SomeInputField").bind("keyup", function () { $(this).val() == "" &amp;&amp; $("SomeDiv").css("top", "15px"); }); </code></pre> <p>Second, this is making the div go up 15px.</p> <p>My question: How can I make the div in the second code go up "smoothly", so not "instant" but with some sort of slide up(15px) event. </p>
jquery
[5]
344,049
344,050
JQuery Avoid Null in URL?
<p>I was just wondering if there's any way I can avoid parameter=null in jsp?</p> <p>Will there be any function that's similar to the <a href="http://www.cafeaulait.org/course/week2/43.html" rel="nofollow">Java's ? : operator</a> for Jquery?</p> <p>Thanks.</p>
jquery
[5]
3,033,412
3,033,413
Is there a correct way of spacing in Javascript?
<p>In a preliminary technical interview, I was asked to write a <em>simple calculator function</em> in Javascript. My code was passable but he commented on my <strong>bad spacing</strong>. I wrote something like this: </p> <pre><code> var calc = function(num1, num2, operand){ //function(... VS function (... if(operand === 'add'){ return num1 + num2; } else if(operand === 'multiply'){ // if(... return num1 * num2; } else if (operand === 'subtract'){ // if (... return num1 - num2; } else { console.log("Not a valid operand"); }; }; </code></pre> <p>I am a beginner in Javascript looking to learn and maintain good coding habits. I understand the function above would run regardless of my inconsistent spacing, but is there a correct way of spacing Javascript control loops? </p> <p>Any advice or coding examples will help! Thanks! </p>
javascript
[3]
2,138,980
2,138,981
second click on input type button jquery
<p>I have below code and i want to have default input type button when second clicked</p> <pre><code> $(function () { $('.inputbutton').on('click', function (e) { e.preventDefault(); $(this).css("background-color", "gray"); }); }); </code></pre>
jquery
[5]
4,460,914
4,460,915
How to add effects on bitmap in android?
<p>I am creating an android Application that will add effect on Bitmap. Is there any library for generating effects on bitmap?</p> <p>Please provide me a sample or a link .I search on google and also on stackOverflow but i couldn't find any thing helpfull.</p> <p>thankx in advance</p>
android
[4]
2,219,229
2,219,230
Android AsyncTask & starting new Activities
<p>I've been having some issues with starting a new activity once an AsyncTask has completed. I've read that I can put code like this:</p> <pre><code>protected void onPostExecute(String result) { super.onPostExecute(result); if (progress.isShowing()) { if (result.equals("true")) { progress.dismiss(); activity.startActivity(new Intent(activity, Main.class)); } } } </code></pre> <p>But basically that just crashes and it's always on the line which it's starting the Activity, It comes up with the error NullPointerException but I can't figure out why?</p> <p>Any idea?</p> <p>Thanks Chris</p>
android
[4]
903,669
903,670
android org.apache.http.httpclient package problem
<p>I am trying to import the code from this tutorial <a href="http://www.anddev.org/bbc_download.php?p=777&amp;item=7" rel="nofollow">http://www.anddev.org/bbc_download.php?p=777&amp;item=7</a></p> <p>into my eclipse,the tutorial is oldand I have trouble importing the packages that it referes.</p> <p>Are those packages deprecated? or I have to manually download and install them into my projects classhpath? if so can someone give me a link on where to find them? thanks in advances maxsap.</p>
android
[4]
1,850,028
1,850,029
Changing an html "for" label with java script
<p>I need to change a "for" label from an extension using javascript. I am unsure how to do this. Thank in advance for the help!</p> <pre><code>&lt;input id="theCheckboxId" type="checkbox" name="theCheckBoxName" /&gt; &lt;label for="theCheckBox"&gt;The text I want to change&lt;/label&gt; </code></pre>
javascript
[3]
4,396,242
4,396,243
Way to shorten jquerycode
<p>I have several modal popup windows which all use the same settings. One of these requires the following code.</p> <pre><code>var $modal = $('#modal') .attr('id', 'modal') .css({zIndex: 3000}); $('#modal-trigger').click(function(evt) { evt.preventDefault(), $('#modal').css("visibility","visible"); $(this).overlay({ effect: 'fade', glossy: true, opacity: 0.8, closeOnClick: true, onShow: function() { $('body').append($modal); }, onHide: function() { $modal.remove(); }, }) }); </code></pre> <p>So making a second one means changing the <em>modal</em> to something else in the following places:</p> <p>var $modal = $('#<strong>modal</strong>')</p> <p>.attr('id', '<strong>modal</strong>')</p> <p>$('<strong>#modal-trigger</strong>').click(function(evt) {</p> <p>$('body').append(<strong>$modal</strong>);</p> <p><strong>$modal</strong>.remove();</p> <p>Is there a way to shorten this, so I do not have to keep adding the full code to achieve this effect?</p>
jquery
[5]
4,111,176
4,111,177
Add Images to GridViews (Android)
<p>I have script that loads images from url using AsynkTasc. Now, i need dynamically ADD (not reload or other) images <strong>to already existing images when the user scrolls down, like in android market.</strong> I dont have any idea. I try notifyDataSetChanged, but as I know its refresh. But i need ADD. Please tell me what can i do ?</p> <p>When I try setadapter settings, its just reload. Have GridView something like "AddToAdapter" :)</p>
android
[4]
954,025
954,026
What event Asus Transformer calls in Android, then docking or undocking the tablet?
<p>I have problems with my app on Asus Transformer TF101, with keyboard.</p> <p>If i dock it to keyboard (or undock it) during displaying a activity, the activity is recreated. That means: onDestroy is called. onCreate is called.</p> <p>Is it possible to catch the event that user is undocking or docking?</p>
android
[4]