PostId
int64 | PostCreationDate
string | OwnerUserId
int64 | OwnerCreationDate
string | ReputationAtPostCreation
int64 | OwnerUndeletedAnswerCountAtPostTime
int64 | Title
string | BodyMarkdown
string | Tag1
string | Tag2
string | Tag3
string | Tag4
string | Tag5
string | PostClosedDate
string | OpenStatus
string | unified_texts
string | OpenStatus_id
int64 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,088,087 | 07/06/2009 17:03:15 | 60,558 | 01/30/2009 10:26:57 | 86 | 8 | Collecting/Processing headers in PHP Soap Server | I'm creating a web service using PHP5's native SOAP Methods. Everything went fine until I tried to handle authentication using SOAP Headers.
I could easily find how to add the username/password to the SOAP headers, **client-side**:
$myclient = new SoapClient($wsdl, $options);
$login = new SOAPHeader($wsdl, 'email', 'mylogin');
$password = new SOAPHeader($wsdl, 'password', 'mypassword');
$headers = array($login, $password);
$myclient->__setSOAPHeaders($headers);
But I can't find anywhere the methods for collecting and processing these headers **server-side**. I'm guessing there has to be an easy way to define a method in my SoapServer that handles the headers... | php | soap | web-services | null | null | null | open | Collecting/Processing headers in PHP Soap Server
===
I'm creating a web service using PHP5's native SOAP Methods. Everything went fine until I tried to handle authentication using SOAP Headers.
I could easily find how to add the username/password to the SOAP headers, **client-side**:
$myclient = new SoapClient($wsdl, $options);
$login = new SOAPHeader($wsdl, 'email', 'mylogin');
$password = new SOAPHeader($wsdl, 'password', 'mypassword');
$headers = array($login, $password);
$myclient->__setSOAPHeaders($headers);
But I can't find anywhere the methods for collecting and processing these headers **server-side**. I'm guessing there has to be an easy way to define a method in my SoapServer that handles the headers... | 0 |
3,211,828 | 07/09/2010 10:40:12 | 387,637 | 07/09/2010 10:40:11 | 1 | 0 | repeator control in asp.net | can you explain about repeator control in asp.net and if its possble then give me one small example ..................plzz | asp.net | null | null | null | null | 07/09/2010 10:51:28 | not a real question | repeator control in asp.net
===
can you explain about repeator control in asp.net and if its possble then give me one small example ..................plzz | 1 |
973,598 | 06/10/2009 03:47:35 | 116,176 | 06/02/2009 18:57:58 | 53 | 4 | What do the Visual Studio margin colors mean? | I noticed that Visual Studio colors a few pixel wide area in the margin, to the right of the area where you place breakpoints. What do these colors mean? | visual-studio | null | null | null | null | null | open | What do the Visual Studio margin colors mean?
===
I noticed that Visual Studio colors a few pixel wide area in the margin, to the right of the area where you place breakpoints. What do these colors mean? | 0 |
7,770,318 | 10/14/2011 15:59:05 | 995,724 | 02/28/2011 23:10:35 | 1 | 0 | How to prevent browser from displaying php code? | The browser shows php source code if I go to http://mysite.com/script.php. There must be a way to prevent it! | php | security | browser | null | null | 10/14/2011 16:28:45 | not constructive | How to prevent browser from displaying php code?
===
The browser shows php source code if I go to http://mysite.com/script.php. There must be a way to prevent it! | 4 |
3,662,961 | 09/07/2010 21:37:19 | 32,484 | 10/29/2008 17:48:46 | 5,236 | 119 | A question on the backward/forward compatibility of csc.exe | Is the .NET command line compiler (csc.exe) in VS2010 a full, .NET 4.0 compiler? Furthermore (And this may sound stupid), if I write code in .NET 4.0 but it only makes use of .NET 2.0 features and nothing beyond that, would it compile with a .NET 2.0 compiler?
Thanksa | .net | null | null | null | null | null | open | A question on the backward/forward compatibility of csc.exe
===
Is the .NET command line compiler (csc.exe) in VS2010 a full, .NET 4.0 compiler? Furthermore (And this may sound stupid), if I write code in .NET 4.0 but it only makes use of .NET 2.0 features and nothing beyond that, would it compile with a .NET 2.0 compiler?
Thanksa | 0 |
8,407,523 | 12/06/2011 22:04:20 | 654,666 | 03/11/2011 03:11:46 | 539 | 31 | Django models and views misconception | I have a model that contains the models.Models subclass which looks as below :
from django.db import models
from django.contrib.auth.models import User
class BlogPost(models.Model):
title = models.CharField(max_length=50)
post = models.TextField()
posted_by = models.ForeignKey(User)
date_published = models.DateField()
def __str__(self):
return self.title
class Comment(models.Model):
comment = models.CharField(max_length=50)
commented_by = models.ForeignKey(User)
commented_on = models.DateTimeField()
blog = models.ForeignKey(BlogPost)
def __str__(self):
return self.comment
From the view I would like to pass the BlogPost Object and in the template itself fetch the
Comment objects related to the specific BlogPost. So, I have render the view like;
from django.http import HttpResponse
from blogs.models import BlogPost,Comment
from django.template import loader,Context
def index(request):
l = loader.get_template('blogs/index.html')
posts = BlogPost.objects.all()
c = Context({'blogs':posts})
return HttpResponse(l.render(c))
In the view, I wanted to fetch the comment related to each of the post and so I did like blog.comment_set.all() which is object(should be iterable if a list) which is valid in shell and I could fetch all the Comment objects related to the blog but in view it gives some error saying ``Could not parse the remainder: '()' from 'post.comment_set.all()'``. My template looks like this;
{% extends 'blogs/base.html' %}
{% block styles %}
h3{
color:#A82F00;
}
p{
color:#653F00;
}
{%endblock %}
{% block contents %}
<ul>
{% for post in blogs %}
<li>comment
<h3>{{ post.title }}</h3>
<p>{{ post.post }} </p>
<p>{{ post.posted_by.username }} {{ post.date_published }} </p>
</li>
<h4>Comments :</h4>
<ul>
{% for comment in post.comment_set.all() %} <!-- Most probably error is here -->
<li>
<p>comment.comment</p>
<p>Commented on: {{ comment.commented_on }} comment.commented_by.username</p>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% endblock %}
So, how do I fetch the Comment object associated to the BlogPost model. Should the above code work with some refinement ? Since, this runs in the shell and able to fetch the model. What should be the solution ?? | django | django-models | django-templates | django-views | null | 12/08/2011 01:08:24 | too localized | Django models and views misconception
===
I have a model that contains the models.Models subclass which looks as below :
from django.db import models
from django.contrib.auth.models import User
class BlogPost(models.Model):
title = models.CharField(max_length=50)
post = models.TextField()
posted_by = models.ForeignKey(User)
date_published = models.DateField()
def __str__(self):
return self.title
class Comment(models.Model):
comment = models.CharField(max_length=50)
commented_by = models.ForeignKey(User)
commented_on = models.DateTimeField()
blog = models.ForeignKey(BlogPost)
def __str__(self):
return self.comment
From the view I would like to pass the BlogPost Object and in the template itself fetch the
Comment objects related to the specific BlogPost. So, I have render the view like;
from django.http import HttpResponse
from blogs.models import BlogPost,Comment
from django.template import loader,Context
def index(request):
l = loader.get_template('blogs/index.html')
posts = BlogPost.objects.all()
c = Context({'blogs':posts})
return HttpResponse(l.render(c))
In the view, I wanted to fetch the comment related to each of the post and so I did like blog.comment_set.all() which is object(should be iterable if a list) which is valid in shell and I could fetch all the Comment objects related to the blog but in view it gives some error saying ``Could not parse the remainder: '()' from 'post.comment_set.all()'``. My template looks like this;
{% extends 'blogs/base.html' %}
{% block styles %}
h3{
color:#A82F00;
}
p{
color:#653F00;
}
{%endblock %}
{% block contents %}
<ul>
{% for post in blogs %}
<li>comment
<h3>{{ post.title }}</h3>
<p>{{ post.post }} </p>
<p>{{ post.posted_by.username }} {{ post.date_published }} </p>
</li>
<h4>Comments :</h4>
<ul>
{% for comment in post.comment_set.all() %} <!-- Most probably error is here -->
<li>
<p>comment.comment</p>
<p>Commented on: {{ comment.commented_on }} comment.commented_by.username</p>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% endblock %}
So, how do I fetch the Comment object associated to the BlogPost model. Should the above code work with some refinement ? Since, this runs in the shell and able to fetch the model. What should be the solution ?? | 3 |
7,369,207 | 09/10/2011 02:24:26 | 863,951 | 07/26/2011 17:15:12 | 11 | 0 | How to fix "Error parsing data org.json.JSONException: Value <?xml of type java.lang.String cannot be converted to JSONArray" in my program | I am very new to android and I'm trying to make a program that shows you results from a database that I have. So when I type in a first name and the database sends the information of that person to me. However, when I look at the LogCat it says
"09-09 22:05:39.544: ERROR/log_tag(8813): Error parsing data org.json.JSONException: Value <?xml of type java.lang.String cannot be converted to JSONArray"
How do I fix this????
This is my code:
public class PS extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//get the two controls we created earlier, also with the resource reference and the id
final EditText et_Text = (EditText)findViewById(R.id.et_Text);
//add new KeyListener Callback (to record key input)
et_Text.setOnKeyListener(new OnKeyListener()
{
//function to invoke when a key is pressed
public boolean onKey(View v, int keyCode, KeyEvent event)
{
//check if there is
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
//check if the right key was pressed
if (keyCode == KeyEvent.KEYCODE_ENTER)
{
InputStream is = null;
String result = "";
//the name data to send
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("name",et_Text.getText().toString()));
//http post
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://myIPaddress/sampleDB/testSend.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
// At this point is should be set, if it isn't, tell user what went wrong
if (is != null) {
//convert response to string
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result=sb.toString();
}catch(Exception e){
Log.e("log_tag", "Error converting result "+e.toString());
}
//parse json data
try{
JSONArray jArray = new JSONArray(result);
for(int i=0;i<jArray.length();i++){
JSONObject json_data = jArray.getJSONObject(i);
Log.i("log_tag","PersonID: "+json_data.getInt("personID")+
", FirstName: "+json_data.getString("FirstName")+
", LastName: "+json_data.getString("LastName")+
", Age: "+json_data.getInt("Age")
);
}
}catch(JSONException e){
Log.e("log_tag", "Error parsing data "+e.toString());
}} else {Log.i("log_tag", "Something went wrong!"//I don't know what to put here);} ;
et_Text.setText("");
//and clear the EditText control
return true;
}
}
return false;
}
});
}
}
This is my php code:
<?php
$con = mysql_connect("localhost","enjoyen","veritas");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("enjoyen_usersDB", $con);
$q=mysql_query("SELECT * FROM Persons WHERE FirstName='".$_REQUEST['name']."'");
while($e=mysql_fetch_assoc($q))
$output[]=$e;
print(json_encode($output));
mysql_close($con);
?>
Please help!
| android | mysql | database | database-connection | null | null | open | How to fix "Error parsing data org.json.JSONException: Value <?xml of type java.lang.String cannot be converted to JSONArray" in my program
===
I am very new to android and I'm trying to make a program that shows you results from a database that I have. So when I type in a first name and the database sends the information of that person to me. However, when I look at the LogCat it says
"09-09 22:05:39.544: ERROR/log_tag(8813): Error parsing data org.json.JSONException: Value <?xml of type java.lang.String cannot be converted to JSONArray"
How do I fix this????
This is my code:
public class PS extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//get the two controls we created earlier, also with the resource reference and the id
final EditText et_Text = (EditText)findViewById(R.id.et_Text);
//add new KeyListener Callback (to record key input)
et_Text.setOnKeyListener(new OnKeyListener()
{
//function to invoke when a key is pressed
public boolean onKey(View v, int keyCode, KeyEvent event)
{
//check if there is
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
//check if the right key was pressed
if (keyCode == KeyEvent.KEYCODE_ENTER)
{
InputStream is = null;
String result = "";
//the name data to send
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("name",et_Text.getText().toString()));
//http post
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://myIPaddress/sampleDB/testSend.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
// At this point is should be set, if it isn't, tell user what went wrong
if (is != null) {
//convert response to string
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result=sb.toString();
}catch(Exception e){
Log.e("log_tag", "Error converting result "+e.toString());
}
//parse json data
try{
JSONArray jArray = new JSONArray(result);
for(int i=0;i<jArray.length();i++){
JSONObject json_data = jArray.getJSONObject(i);
Log.i("log_tag","PersonID: "+json_data.getInt("personID")+
", FirstName: "+json_data.getString("FirstName")+
", LastName: "+json_data.getString("LastName")+
", Age: "+json_data.getInt("Age")
);
}
}catch(JSONException e){
Log.e("log_tag", "Error parsing data "+e.toString());
}} else {Log.i("log_tag", "Something went wrong!"//I don't know what to put here);} ;
et_Text.setText("");
//and clear the EditText control
return true;
}
}
return false;
}
});
}
}
This is my php code:
<?php
$con = mysql_connect("localhost","enjoyen","veritas");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("enjoyen_usersDB", $con);
$q=mysql_query("SELECT * FROM Persons WHERE FirstName='".$_REQUEST['name']."'");
while($e=mysql_fetch_assoc($q))
$output[]=$e;
print(json_encode($output));
mysql_close($con);
?>
Please help!
| 0 |
6,560,331 | 07/03/2011 00:20:12 | 504,325 | 11/11/2010 09:55:34 | 414 | 30 | C# paradoxical and controversial constructs | The purpose of this post is to collect all neat and tricky c# constructs and issues that don't occur on everyday basis.
So here goes:
**Issue 1** (this one I've discovered by my own)
What will be printed on screen?
class Program
{
private static String Function(out String str)
{
str = "Hello ";
return "world!";
}
private static void Main(string[] args)
{
String x = Function(out x);
Console.WriteLine(x);
}
}
Any thoughts? :)
**Issue 2** Creating generic collection (such as List<> or Dictionary<>) of anonymous types, is it possible?
var Customer = new { FirstName = "John", LastName = "Doe" };
var customerList = new List<????>();
Consider this one found [here][1]:
static List<T> CreateList<T>(params T[] values)
{
return new List<T>(values);
}
static void Main(string[] args)
{
var x = new { A = "Hello", B = "world!" };
var list = CreateList(x);
list.Add(new { A = "Hello again", B = "world!" });
}
Share your findings. Thank you!
[1]: http://kirillosenkov.blogspot.com/2008/01/how-to-create-generic-list-of-anonymous.html | c# | .net | null | null | null | 07/03/2011 00:38:29 | not constructive | C# paradoxical and controversial constructs
===
The purpose of this post is to collect all neat and tricky c# constructs and issues that don't occur on everyday basis.
So here goes:
**Issue 1** (this one I've discovered by my own)
What will be printed on screen?
class Program
{
private static String Function(out String str)
{
str = "Hello ";
return "world!";
}
private static void Main(string[] args)
{
String x = Function(out x);
Console.WriteLine(x);
}
}
Any thoughts? :)
**Issue 2** Creating generic collection (such as List<> or Dictionary<>) of anonymous types, is it possible?
var Customer = new { FirstName = "John", LastName = "Doe" };
var customerList = new List<????>();
Consider this one found [here][1]:
static List<T> CreateList<T>(params T[] values)
{
return new List<T>(values);
}
static void Main(string[] args)
{
var x = new { A = "Hello", B = "world!" };
var list = CreateList(x);
list.Add(new { A = "Hello again", B = "world!" });
}
Share your findings. Thank you!
[1]: http://kirillosenkov.blogspot.com/2008/01/how-to-create-generic-list-of-anonymous.html | 4 |
10,679,659 | 05/21/2012 04:53:28 | 1,245,455 | 03/02/2012 15:54:19 | 6 | 0 | Android App Interfacing with IMAP and populating with Gmail emails | I am trying to make an application which will basically be the same as the stock email app. To allow me to log into an email account using IMAP and SMTP. I have been trying to understand the protocols and how to interface them with an app, but am at a loss. Can anyone possibly guide me to a solution or a direct download for the source of the stock app? | android | email | imap | null | null | null | open | Android App Interfacing with IMAP and populating with Gmail emails
===
I am trying to make an application which will basically be the same as the stock email app. To allow me to log into an email account using IMAP and SMTP. I have been trying to understand the protocols and how to interface them with an app, but am at a loss. Can anyone possibly guide me to a solution or a direct download for the source of the stock app? | 0 |
8,418,435 | 12/07/2011 16:06:57 | 110,569 | 03/25/2009 14:25:28 | 151 | 4 | Why is connectionStrings.config ignored when publishing from VS2010 | I'm publishing my web application project to a shared network folder, web.config is published, but my other config files are ignored. These config files all have their "Build Action" property set to "Content". | visual-studio-2010 | null | null | null | null | null | open | Why is connectionStrings.config ignored when publishing from VS2010
===
I'm publishing my web application project to a shared network folder, web.config is published, but my other config files are ignored. These config files all have their "Build Action" property set to "Content". | 0 |
5,602,599 | 04/09/2011 02:54:28 | 699,588 | 04/09/2011 02:54:28 | 1 | 0 | c# regex matching | Broadly: how do I match a word with regex rules for a)the beginning, b)the whole word, and c)the end?
More specifically: How do I match an expression of length >= 1 that has the following rules:
1. It cannot have any of: ! @ #
2. It cannot begin with a space or =
3. It cannot end with a space
I tried: ^[^\s=][^!@#]*[^\s]$
But the ^[^\s=] matching moves past the first character in the word. Hence this also matches words that begin with '!' or '@' or '#' (eg: '#ab' or '@aa'). This also forces the word to have at least 2 characters (one beginning character that is not space or = -and- one non-space character in the end).
I got to: ^[^\s=(!@#)]\1*$ for a regex matching the first two rules. But how do I match no trailing spaces in the word with allowing words of length 1? | c# | regex | matching | null | null | null | open | c# regex matching
===
Broadly: how do I match a word with regex rules for a)the beginning, b)the whole word, and c)the end?
More specifically: How do I match an expression of length >= 1 that has the following rules:
1. It cannot have any of: ! @ #
2. It cannot begin with a space or =
3. It cannot end with a space
I tried: ^[^\s=][^!@#]*[^\s]$
But the ^[^\s=] matching moves past the first character in the word. Hence this also matches words that begin with '!' or '@' or '#' (eg: '#ab' or '@aa'). This also forces the word to have at least 2 characters (one beginning character that is not space or = -and- one non-space character in the end).
I got to: ^[^\s=(!@#)]\1*$ for a regex matching the first two rules. But how do I match no trailing spaces in the word with allowing words of length 1? | 0 |
5,468,999 | 03/29/2011 07:03:57 | 681,527 | 03/29/2011 07:03:57 | 1 | 0 | help with 960 grid and jquery | Doing this as a class group project, I'm doing the front end while other members are doing the backend. I'm using the 24 columns 960 grid system, to try and position everything. It is my first time really doing a project using CSS and the 960 grid system.
I'm using javascript to include other html files.Excluding the header and footer, I created 6 divs for the main content area and want each div to include a different html file. 2 Rows of 3 divs.
The problem I have come across is that the divs are stacking ontop of each other and I cant really control how wide each div is even though i gave it a grid_8 class. On top of that they are stacking ontop of each other, and it gets cut off at the bottom even after I scroll down. I also want to make the footer stay at the bottom but instead of being fixed on the bottom of the browser at all times I want to scroll all the way down to be able to see it.
Here is what it looks like atm, I gave borders to the divs so you can see how they are stacking <http://i53.tinypic.com/2lbzgp.png> I have also put `<div id="clear"></div>` into the **header.html** and **footer.html** files
Any help is appreciated, been driving me nuts for the past week. | jquery | css | 960.gs | null | null | null | open | help with 960 grid and jquery
===
Doing this as a class group project, I'm doing the front end while other members are doing the backend. I'm using the 24 columns 960 grid system, to try and position everything. It is my first time really doing a project using CSS and the 960 grid system.
I'm using javascript to include other html files.Excluding the header and footer, I created 6 divs for the main content area and want each div to include a different html file. 2 Rows of 3 divs.
The problem I have come across is that the divs are stacking ontop of each other and I cant really control how wide each div is even though i gave it a grid_8 class. On top of that they are stacking ontop of each other, and it gets cut off at the bottom even after I scroll down. I also want to make the footer stay at the bottom but instead of being fixed on the bottom of the browser at all times I want to scroll all the way down to be able to see it.
Here is what it looks like atm, I gave borders to the divs so you can see how they are stacking <http://i53.tinypic.com/2lbzgp.png> I have also put `<div id="clear"></div>` into the **header.html** and **footer.html** files
Any help is appreciated, been driving me nuts for the past week. | 0 |
3,494,580 | 08/16/2010 15:22:04 | 98,317 | 04/30/2009 07:29:08 | 13 | 2 | Is there such a thing as a 'half-day' programming job? | I love programming and I look forward to going to work everyday, but there are other (non-paying) activities which I would describe as my passion. I dream sometimes of having half my day devoted to this passion of mine, but I've never heard of any employer agreeing to half pay for half a day's work.
Has anybody arranged such a thing or heard of such an arrangement, or is the only alternative self-employment where I can set my own hours? | career-development | null | null | null | null | 01/28/2012 21:13:54 | not constructive | Is there such a thing as a 'half-day' programming job?
===
I love programming and I look forward to going to work everyday, but there are other (non-paying) activities which I would describe as my passion. I dream sometimes of having half my day devoted to this passion of mine, but I've never heard of any employer agreeing to half pay for half a day's work.
Has anybody arranged such a thing or heard of such an arrangement, or is the only alternative self-employment where I can set my own hours? | 4 |
9,285,465 | 02/14/2012 22:56:26 | 1,011,089 | 10/24/2011 14:51:09 | 82 | 0 | Configuring and hosting WCF services in a Prism desktop application | My application is currently made up of 2 different solutions.
1) The Shell which contains all the WPF and front end logic
2) The BackEnd which contains all the WCF service implementations and NHibernate related data access. At the moment, there are 6 different WCF service contracts defined.
I currently have this working quite well in Visual Studio but need to consider the deployment options for when the application is installed on to a users PC. As far as I am aware there are numerous different ways of hosting WCF services -- in-process, as a Windows Service, in IIS. I am intrigued to know how people go about configuring this type of setup in a Prism application.
The nearest info I have found so far is from http://wcfguidanceforwpf.codeplex.com/releases/view/27987 but I don't think it is quite what I am looking for.
I would like to know :-
**a)** How and if you can allow the users the choice of different hosting strategies for WCF services?<br>
**b)** All the examples I have seen show the ServiceHost opening and starting one service. Is this the recommended practice and I would have to create 6 Service hosts or could I start six WCF services in one ServiceHost?<br>
**c)** If the WCF services are run in process for testing locally for example - do you use the bootstrapper in the Shell and open all 6 WCF services or is there some other place that this happens?<br>
**d)** What strategies you use for configuring the endpoints or is it simply a case of modifying the app.config files?<br>
**e)** If there are any decent references online or book that I have not managed to find that cover Prism desktop / WCF configuration?<br>
Apologies for the amount of questions but usually I can piece together an idea of what I need to do from extensive Googling but on this occasion I cannot find anything other than the link above that seems to match what I need to know.
Any help with this on any question would be most appreciated.
Alex | c# | wpf | wcf | hosting | prism | 02/23/2012 23:08:10 | not constructive | Configuring and hosting WCF services in a Prism desktop application
===
My application is currently made up of 2 different solutions.
1) The Shell which contains all the WPF and front end logic
2) The BackEnd which contains all the WCF service implementations and NHibernate related data access. At the moment, there are 6 different WCF service contracts defined.
I currently have this working quite well in Visual Studio but need to consider the deployment options for when the application is installed on to a users PC. As far as I am aware there are numerous different ways of hosting WCF services -- in-process, as a Windows Service, in IIS. I am intrigued to know how people go about configuring this type of setup in a Prism application.
The nearest info I have found so far is from http://wcfguidanceforwpf.codeplex.com/releases/view/27987 but I don't think it is quite what I am looking for.
I would like to know :-
**a)** How and if you can allow the users the choice of different hosting strategies for WCF services?<br>
**b)** All the examples I have seen show the ServiceHost opening and starting one service. Is this the recommended practice and I would have to create 6 Service hosts or could I start six WCF services in one ServiceHost?<br>
**c)** If the WCF services are run in process for testing locally for example - do you use the bootstrapper in the Shell and open all 6 WCF services or is there some other place that this happens?<br>
**d)** What strategies you use for configuring the endpoints or is it simply a case of modifying the app.config files?<br>
**e)** If there are any decent references online or book that I have not managed to find that cover Prism desktop / WCF configuration?<br>
Apologies for the amount of questions but usually I can piece together an idea of what I need to do from extensive Googling but on this occasion I cannot find anything other than the link above that seems to match what I need to know.
Any help with this on any question would be most appreciated.
Alex | 4 |
11,339,964 | 07/05/2012 07:48:37 | 1,421,204 | 05/28/2012 07:39:45 | 6 | 0 | Implement facory pattern with spring annotation | This is related to
http://stackoverflow.com/a/8735621/1421204
I need to implement factory pattern with auto detect and autowired bean
@Service("Service")
public class ServiceImpl implements Service{
private static ServiceImpl ServiceImpl;
public static final ServiceImpl getService( String service) {
if (service.equals(Service)) {
return ServiceImpl;
}else{
return ServiceImpl;
}
}
Sorry I am new, what is the best approach to implement factory pattern | design-patterns | service | implementation | factory | autowired | 07/07/2012 15:02:43 | not a real question | Implement facory pattern with spring annotation
===
This is related to
http://stackoverflow.com/a/8735621/1421204
I need to implement factory pattern with auto detect and autowired bean
@Service("Service")
public class ServiceImpl implements Service{
private static ServiceImpl ServiceImpl;
public static final ServiceImpl getService( String service) {
if (service.equals(Service)) {
return ServiceImpl;
}else{
return ServiceImpl;
}
}
Sorry I am new, what is the best approach to implement factory pattern | 1 |
9,518,572 | 03/01/2012 15:06:03 | 216,238 | 11/21/2009 21:24:44 | 449 | 5 | UTF-8 html without BOM displays strange characters | I have some HTML which contains some forign characters (€, ó, á). The HTML document is saved as UTF-8 without BOM. When I view the page in the browser the forign characters seem to get replaced with stranger character combinations (€, ó, Ã). It's only when I save my HTML document as UTF-8 with BOM that the characters then display properly.
I'd really rather not have to include a BOM in my files, but has anybody got any idea why it might do this? and a way to fix it? (other than including a BOM) | html | utf-8 | bom | null | null | null | open | UTF-8 html without BOM displays strange characters
===
I have some HTML which contains some forign characters (€, ó, á). The HTML document is saved as UTF-8 without BOM. When I view the page in the browser the forign characters seem to get replaced with stranger character combinations (€, ó, Ã). It's only when I save my HTML document as UTF-8 with BOM that the characters then display properly.
I'd really rather not have to include a BOM in my files, but has anybody got any idea why it might do this? and a way to fix it? (other than including a BOM) | 0 |
10,876,555 | 06/04/2012 05:10:43 | 480,346 | 10/19/2010 10:23:33 | 983 | 14 | How to animate image like this using iPhone SDK? | Please check this app:
http://itunes.apple.com/us/app/draw-hearts-happy-valentines/id419003288?mt=8
Screenshot from that app is shown below:
![enter image description here][1]
[1]: http://i.stack.imgur.com/HLTe4.jpg
Can you please let me know how we can achieve such animation?
Thanks! | iphone | objective-c | ios | cocoa-touch | animation | 06/04/2012 07:32:38 | not a real question | How to animate image like this using iPhone SDK?
===
Please check this app:
http://itunes.apple.com/us/app/draw-hearts-happy-valentines/id419003288?mt=8
Screenshot from that app is shown below:
![enter image description here][1]
[1]: http://i.stack.imgur.com/HLTe4.jpg
Can you please let me know how we can achieve such animation?
Thanks! | 1 |
11,105,286 | 06/19/2012 16:27:32 | 713,428 | 04/18/2011 12:57:04 | 407 | 19 | Create NuGet package which installs references with Copy Local set to false | Is there a way to create a NuGet package where when the package is installed into a project it adds references to the dlls with "Copy Local" set to false?
I assume it would be some kind of script within the 'install.ps1' file. | nuget | null | null | null | null | null | open | Create NuGet package which installs references with Copy Local set to false
===
Is there a way to create a NuGet package where when the package is installed into a project it adds references to the dlls with "Copy Local" set to false?
I assume it would be some kind of script within the 'install.ps1' file. | 0 |
10,870,687 | 06/03/2012 13:20:16 | 780,478 | 06/02/2011 03:34:34 | 129 | 1 | bishops giving Wrong answer (spoj) | i was trying to do this problem but i could not able to get it accepted , its input is large so i thought to take it with strings but still i am getting wrong answer .
problem statement is here [bishops][1]
[1]: http://ww.spoj.pl/problems/BISHOPS/
here is my code:
#include<iostream>
#include<string.h>
#include<cstdio>
using namespace std;
int main()
{
string s;
cin>>s;
int y=0,i,z;
z = s.length();
for(i=0;i<z;i++)
{
y = y*10 + (s[i]-'0');
}
if(y==1 || y== 0)
{
printf("%d\n",y);
}
else
printf("%d\n",(2*y)-2);
return 0;
} | c++ | null | null | null | null | 06/04/2012 08:07:20 | not a real question | bishops giving Wrong answer (spoj)
===
i was trying to do this problem but i could not able to get it accepted , its input is large so i thought to take it with strings but still i am getting wrong answer .
problem statement is here [bishops][1]
[1]: http://ww.spoj.pl/problems/BISHOPS/
here is my code:
#include<iostream>
#include<string.h>
#include<cstdio>
using namespace std;
int main()
{
string s;
cin>>s;
int y=0,i,z;
z = s.length();
for(i=0;i<z;i++)
{
y = y*10 + (s[i]-'0');
}
if(y==1 || y== 0)
{
printf("%d\n",y);
}
else
printf("%d\n",(2*y)-2);
return 0;
} | 1 |
7,639,887 | 10/03/2011 19:45:52 | 9,938 | 09/15/2008 20:31:28 | 1,256 | 11 | What is the best way to do a lookup then disable / enable fields? | This is more of a user interface design type question.
Here is the scenario.
I have a web application written in ASP.NET MVC and use some jquery on the app.
Here is what I need.
I have a page with 4 fields.
Return Tag
Part Number
Serial Number
Notes
If the user enters a Return Tag then I need to use some Ajax, get the Part Number and Serial Number and then lock the Part Number and Serial Number so they can't be edited. The only field that can be edited is the notes in this case.
If the Return Tag does not exist in the database, then we need to allow a Part Number, Serial Number and Notes to be entered.
I have all the logic and it works fine, but here's the problem.
If I put in a Return Tag and it pulls back a Part and Serial Number, those fields are now pre-filled and disabled so they can't be changed.
Let's say the user realizes the wrong Return Tag was entered so they go back and enter a different Return Tag.
In this instance it becomes kind of ugly because the Return Tag lookup in the database isn't happening until they leave the Return Tag field. Well, the only way to leave the Return Tag field is to go all the way down to the notes and click. Then if the Return Tag has no part and serial associated with it, the user must then click back up on the Part Number field.
Just looking for some suggestions on the best way to handle this. Any sites with examples would be great.
| jquery | user-interface | user-experience | null | null | 10/05/2011 14:05:15 | not constructive | What is the best way to do a lookup then disable / enable fields?
===
This is more of a user interface design type question.
Here is the scenario.
I have a web application written in ASP.NET MVC and use some jquery on the app.
Here is what I need.
I have a page with 4 fields.
Return Tag
Part Number
Serial Number
Notes
If the user enters a Return Tag then I need to use some Ajax, get the Part Number and Serial Number and then lock the Part Number and Serial Number so they can't be edited. The only field that can be edited is the notes in this case.
If the Return Tag does not exist in the database, then we need to allow a Part Number, Serial Number and Notes to be entered.
I have all the logic and it works fine, but here's the problem.
If I put in a Return Tag and it pulls back a Part and Serial Number, those fields are now pre-filled and disabled so they can't be changed.
Let's say the user realizes the wrong Return Tag was entered so they go back and enter a different Return Tag.
In this instance it becomes kind of ugly because the Return Tag lookup in the database isn't happening until they leave the Return Tag field. Well, the only way to leave the Return Tag field is to go all the way down to the notes and click. Then if the Return Tag has no part and serial associated with it, the user must then click back up on the Part Number field.
Just looking for some suggestions on the best way to handle this. Any sites with examples would be great.
| 4 |
3,005,973 | 06/09/2010 13:01:57 | 357,849 | 06/03/2010 19:29:39 | 13 | 0 | What is the purpose of ROWLOCK on Delete and when should I use it? | Ex)
When should I use this statement:
DELETE TOP (@count)
FROM ProductInfo WITH (ROWLOCK)
WHERE ProductId = @productId_for_del;
And when should be just doing:
DELETE TOP (@count)
FROM ProductInfo
WHERE ProductId = @productId_for_del; | sql | null | null | null | null | null | open | What is the purpose of ROWLOCK on Delete and when should I use it?
===
Ex)
When should I use this statement:
DELETE TOP (@count)
FROM ProductInfo WITH (ROWLOCK)
WHERE ProductId = @productId_for_del;
And when should be just doing:
DELETE TOP (@count)
FROM ProductInfo
WHERE ProductId = @productId_for_del; | 0 |
2,860,699 | 05/18/2010 20:03:27 | 344,441 | 05/18/2010 20:03:27 | 1 | 0 | MySQL: group by and IF statement | Here is my problem:
By default `parent_id` = 0. I want to select all records with `parent_id` = 0 and only the last ones with `parent_id` > 0.
I tried this, but it didn't work:
SELECT * FROM `articles`
IF `parent_id` > 0 THEN
GROUP BY `parent_id`
HAVING COUNT(`parent_id`) >= 1
END;
ORDER BY `time` DESC
What could be the solution?
Thank you. | mysql | group-by | null | null | null | null | open | MySQL: group by and IF statement
===
Here is my problem:
By default `parent_id` = 0. I want to select all records with `parent_id` = 0 and only the last ones with `parent_id` > 0.
I tried this, but it didn't work:
SELECT * FROM `articles`
IF `parent_id` > 0 THEN
GROUP BY `parent_id`
HAVING COUNT(`parent_id`) >= 1
END;
ORDER BY `time` DESC
What could be the solution?
Thank you. | 0 |
6,358,906 | 06/15/2011 14:01:01 | 798,807 | 06/15/2011 02:23:50 | 1 | 0 | Loading list elements randomly | So I've got an unordered list. What I need is to load each <li> randomly, but have them stay in there corresponding spot of the list if that makes sense.
Example:
<ul id="nameOfList">
<li>element here</li>
<li>no element here</li>
<li>element here</li>
<li>element here</li>
<li>no element here</li>
</ul>
Remember, the list elements needs to stay in that order, but be loaded in randomly. | jquery | random | null | null | null | 06/15/2011 15:03:34 | not a real question | Loading list elements randomly
===
So I've got an unordered list. What I need is to load each <li> randomly, but have them stay in there corresponding spot of the list if that makes sense.
Example:
<ul id="nameOfList">
<li>element here</li>
<li>no element here</li>
<li>element here</li>
<li>element here</li>
<li>no element here</li>
</ul>
Remember, the list elements needs to stay in that order, but be loaded in randomly. | 1 |
5,437,909 | 03/25/2011 20:41:15 | 660,065 | 03/15/2011 06:30:18 | 40 | 9 | How do SQL server 2000 and XML linked? | How do SQL server 2000 and XML linked? Can XML be used to access data?
FOR XML (ROW, AUTO, EXPLICIT) | sql | xml | null | null | null | 03/25/2011 21:14:16 | not a real question | How do SQL server 2000 and XML linked?
===
How do SQL server 2000 and XML linked? Can XML be used to access data?
FOR XML (ROW, AUTO, EXPLICIT) | 1 |
7,527,518 | 09/23/2011 10:19:18 | 960,833 | 09/23/2011 09:42:54 | 1 | 0 | Twitter integration using c# code | Now am working with a twitter integration part to update status from my application .Now am tried with different ways but the authentication error is getting,and i tried with code bellow i given but in status am getting null value.can u help me to solve it out.
This is my code in c#
OAuthTokens tokens = new OAuthTokens();
tokens.ConsumerKey = ConfigurationManager.AppSettings["ConsumerKey"];
tokens.ConsumerSecret = ConfigurationManager.AppSettings["ConsumerSecret"];
tokens.AccessToken = ConfigurationManager.AppSettings["AccessToken"];
tokens.AccessTokenSecret = ConfigurationManager.AppSettings["AccessTokenSecret"];
StatusUpdateOptions options = new StatusUpdateOptions();
//TwitterStatus newStatus = TwitterStatus.RelatedResultsShow(tokens,true);
TwitterStatus status = TwitterStatus.Update(tokens,"hai all", options).ResponseObject; | facebook-c#-sdk | null | null | null | null | null | open | Twitter integration using c# code
===
Now am working with a twitter integration part to update status from my application .Now am tried with different ways but the authentication error is getting,and i tried with code bellow i given but in status am getting null value.can u help me to solve it out.
This is my code in c#
OAuthTokens tokens = new OAuthTokens();
tokens.ConsumerKey = ConfigurationManager.AppSettings["ConsumerKey"];
tokens.ConsumerSecret = ConfigurationManager.AppSettings["ConsumerSecret"];
tokens.AccessToken = ConfigurationManager.AppSettings["AccessToken"];
tokens.AccessTokenSecret = ConfigurationManager.AppSettings["AccessTokenSecret"];
StatusUpdateOptions options = new StatusUpdateOptions();
//TwitterStatus newStatus = TwitterStatus.RelatedResultsShow(tokens,true);
TwitterStatus status = TwitterStatus.Update(tokens,"hai all", options).ResponseObject; | 0 |
3,582,650 | 08/27/2010 08:56:42 | 410,589 | 08/04/2010 09:34:01 | 6 | 4 | CSS on PDF (Prawn) | Can we use stylesheet classes inside Pdf reports?
i am trying to change the header_color from b7e3fe to .heading oh the stylesheet, inside the table
file:heading.pdf.prawn
texts=[""],[""]
pdf.table texts,
:headers => [" Heading "],
:header_color => 'b7e3fe',
file: public/stylesheets/style.css
.heading
{ font-family: "trebuchet ms", Verdana, Arial, Helvetica, sans-serif; font-size: 11px; background: #E5E5E5; color: #0D0E0E; font-weight: bold; padding-left:10px; line-height: 20px;}
| ruby-on-rails | null | null | null | null | null | open | CSS on PDF (Prawn)
===
Can we use stylesheet classes inside Pdf reports?
i am trying to change the header_color from b7e3fe to .heading oh the stylesheet, inside the table
file:heading.pdf.prawn
texts=[""],[""]
pdf.table texts,
:headers => [" Heading "],
:header_color => 'b7e3fe',
file: public/stylesheets/style.css
.heading
{ font-family: "trebuchet ms", Verdana, Arial, Helvetica, sans-serif; font-size: 11px; background: #E5E5E5; color: #0D0E0E; font-weight: bold; padding-left:10px; line-height: 20px;}
| 0 |
8,833,165 | 01/12/2012 10:01:58 | 1,012,590 | 10/25/2011 11:04:00 | 19 | 8 | how stack ,GC and heap memory work? | Can anybody help me to when object destroyed?
when they used heap and stack memory?
if possible then explain based on diagram. | java | null | null | null | null | 01/12/2012 10:53:42 | not a real question | how stack ,GC and heap memory work?
===
Can anybody help me to when object destroyed?
when they used heap and stack memory?
if possible then explain based on diagram. | 1 |
693,154 | 03/28/2009 17:23:49 | 78,351 | 03/15/2009 19:37:58 | 135 | 5 | What's the best software for checking disk health on Mac ? | Does Mac OS X have a good utility provided by default. Disk Utility doesn't seem very comprehensive.
What is the best software available ? | osx | mac-os-x | disk | null | null | 03/28/2009 17:33:21 | off topic | What's the best software for checking disk health on Mac ?
===
Does Mac OS X have a good utility provided by default. Disk Utility doesn't seem very comprehensive.
What is the best software available ? | 2 |
11,368,745 | 07/06/2012 19:45:13 | 1,389,352 | 05/11/2012 11:50:14 | 1 | 0 | Not able to run sdk manager exe file | Not able to run sdk manager exe file, when i click this file command prompt pop ups and get close within a second on windows 7. I have installed jdk 1.7 | android | null | null | null | null | 07/10/2012 18:13:25 | not a real question | Not able to run sdk manager exe file
===
Not able to run sdk manager exe file, when i click this file command prompt pop ups and get close within a second on windows 7. I have installed jdk 1.7 | 1 |
7,831,723 | 10/20/2011 06:00:02 | 968,749 | 09/28/2011 09:19:46 | 1 | 0 | Should -Dsun.java2d.noddraw=true should be the first argument always? | Is there any difference using -Dsun.java2d.noddraw=true as the first argument or it can be used at anywhere
-Dsun.java2d.noddraw=true -Xms256m -Xmx512m
can i pass the noddraw argument in this position instead of passing it first.
-Xms256m -Xmx512m -Dsun.java2d.noddraw=true | java | null | null | null | null | 10/20/2011 17:52:30 | not a real question | Should -Dsun.java2d.noddraw=true should be the first argument always?
===
Is there any difference using -Dsun.java2d.noddraw=true as the first argument or it can be used at anywhere
-Dsun.java2d.noddraw=true -Xms256m -Xmx512m
can i pass the noddraw argument in this position instead of passing it first.
-Xms256m -Xmx512m -Dsun.java2d.noddraw=true | 1 |
1,319,399 | 08/23/2009 19:55:25 | 126,015 | 06/19/2009 22:39:19 | 50 | 4 | How to debug JavaFX | I've just started working with javafx, it seems cool and NetBeans seems much more fun than Eclipse but I find it impossible to debug my application. I've added breakpoints, and I pressed the debug button, I see the debugger is registered to some port but it doesn't cause the application to start.
When I run the application and attach a debugger nothing seems to happen. This is extremely annoying since I am using an external library I've added to my project, and I can't edit its content (since I am getting 'java file cannot be locked as it is read only').
I am **very** new to java and especially javafx, thank you for your help I sure need it:) | java | javafx | debugging | null | null | null | open | How to debug JavaFX
===
I've just started working with javafx, it seems cool and NetBeans seems much more fun than Eclipse but I find it impossible to debug my application. I've added breakpoints, and I pressed the debug button, I see the debugger is registered to some port but it doesn't cause the application to start.
When I run the application and attach a debugger nothing seems to happen. This is extremely annoying since I am using an external library I've added to my project, and I can't edit its content (since I am getting 'java file cannot be locked as it is read only').
I am **very** new to java and especially javafx, thank you for your help I sure need it:) | 0 |
8,762,575 | 01/06/2012 18:24:59 | 864,442 | 07/26/2011 23:38:05 | 46 | 0 | Selecting and Copying terminal output in gnome | What are the keyboard options to select and copy the output of gnome terminal window? Using mouse is not an option as I have more than 50,000 lines to select and copy.
I do remember vaguely that you select a line at the bottom and another command takes you to the start of the terminal window then copy it.
Thanks. | linux | terminal | null | null | null | 01/08/2012 05:44:39 | off topic | Selecting and Copying terminal output in gnome
===
What are the keyboard options to select and copy the output of gnome terminal window? Using mouse is not an option as I have more than 50,000 lines to select and copy.
I do remember vaguely that you select a line at the bottom and another command takes you to the start of the terminal window then copy it.
Thanks. | 2 |
11,522,541 | 07/17/2012 12:34:35 | 1,531,782 | 07/17/2012 12:32:17 | 1 | 0 | Can some give me link for pymedia to support Python 2.7 | I am not able to install Pymedia for python 2.7 version where to download pls provide me a source for that | python | null | null | null | null | 07/19/2012 04:25:18 | not constructive | Can some give me link for pymedia to support Python 2.7
===
I am not able to install Pymedia for python 2.7 version where to download pls provide me a source for that | 4 |
10,904,862 | 06/05/2012 20:59:09 | 1,273,586 | 03/16/2012 08:50:31 | 6 | 0 | easy way to edit the content of a website online | i've just made a new website for a costumer. Everything is done and is published online.
However this customer now asks me if it is possible that i can add the function to edit the content of the website online. Does anyone know how to do this or what i need to do this?
I was thinking that i need a sort of cms system or wysiwyg editor script. But most of the scripts/systems i have seen use a sort of theme system and i already made my site's design.
So does anyone know how to do this while using the design of my site? | html | null | null | null | null | 06/05/2012 21:13:08 | off topic | easy way to edit the content of a website online
===
i've just made a new website for a costumer. Everything is done and is published online.
However this customer now asks me if it is possible that i can add the function to edit the content of the website online. Does anyone know how to do this or what i need to do this?
I was thinking that i need a sort of cms system or wysiwyg editor script. But most of the scripts/systems i have seen use a sort of theme system and i already made my site's design.
So does anyone know how to do this while using the design of my site? | 2 |
3,479,922 | 08/13/2010 18:58:36 | 327,216 | 04/27/2010 19:51:00 | 31 | 1 | how-to switch resx at runtime? | I have a second resx file Strings.ps-ps.resx that I want to point my code to at runtime. Each resx has Designer.cs with a unique class name. Do I have to switch/wrap these things myself? ...or is there some built in approach?
thx! | c# | internationalization | resx | null | null | null | open | how-to switch resx at runtime?
===
I have a second resx file Strings.ps-ps.resx that I want to point my code to at runtime. Each resx has Designer.cs with a unique class name. Do I have to switch/wrap these things myself? ...or is there some built in approach?
thx! | 0 |
3,372,346 | 07/30/2010 14:19:43 | 246,776 | 01/08/2010 22:16:08 | 734 | 21 | Javascript comparison question (null >= 0) | How should I understand these?
null>0
> false
null==0
> false
null>=0
> true | javascript | comparison | null | null | null | null | open | Javascript comparison question (null >= 0)
===
How should I understand these?
null>0
> false
null==0
> false
null>=0
> true | 0 |
4,163,996 | 11/12/2010 11:08:24 | 505,624 | 11/12/2010 10:46:45 | 1 | 0 | Tools to assist migration of C++ projects | Currently we want to migrate some modules of our C++ projects, and I wonder if someone has already used CppDepend in the preparation phase to understand the existing code base, and detect all dependencies before migration.
Any feedback is welcome.
Thanks
| c++ | null | null | null | null | 11/13/2010 01:38:32 | not a real question | Tools to assist migration of C++ projects
===
Currently we want to migrate some modules of our C++ projects, and I wonder if someone has already used CppDepend in the preparation phase to understand the existing code base, and detect all dependencies before migration.
Any feedback is welcome.
Thanks
| 1 |
9,237,867 | 02/11/2012 04:39:32 | 1,203,347 | 02/11/2012 04:31:08 | 1 | 0 | ITEXTSHARP in .net, Extract image code, I can't get this to work | I am looking to simply extract all images from a pdf. I found some code that looks like it is exactly what I need
Private Sub getAllImages(ByVal dict As pdf.PdfDictionary, ByVal images As List(Of Byte()), ByVal doc As pdf.PdfReader)
Dim res As pdf.PdfDictionary = CType(pdf.PdfReader.GetPdfObject(dict.Get(pdf.PdfName.RESOURCES)), pdf.PdfDictionary)
Dim xobj As pdf.PdfDictionary = CType(pdf.PdfReader.GetPdfObject(res.Get(pdf.PdfName.XOBJECT)), pdf.PdfDictionary)
If xobj IsNot Nothing Then
For Each name As pdf.PdfName In xobj.Keys
Dim obj As pdf.PdfObject = xobj.Get(name)
If (obj.IsIndirect) Then
Dim tg As pdf.PdfDictionary = CType(pdf.PdfReader.GetPdfObject(obj), pdf.PdfDictionary)
Dim subtype As pdf.PdfName = CType(pdf.PdfReader.GetPdfObject(tg.Get(pdf.PdfName.SUBTYPE)), pdf.PdfName)
If pdf.PdfName.IMAGE.Equals(subtype) Then
Dim xrefIdx As Integer = CType(obj, pdf.PRIndirectReference).Number
Dim pdfObj As pdf.PdfObject = doc.GetPdfObject(xrefIdx)
Dim str As pdf.PdfStream = CType(pdfObj, pdf.PdfStream)
Dim bytes As Byte() = pdf.PdfReader.GetStreamBytesRaw(CType(str, pdf.PRStream))
Dim filter As String = tg.Get(pdf.PdfName.FILTER).ToString
Dim width As String = tg.Get(pdf.PdfName.WIDTH).ToString
Dim height As String = tg.Get(pdf.PdfName.HEIGHT).ToString
Dim bpp As String = tg.Get(pdf.PdfName.BITSPERCOMPONENT).ToString
If filter = "/FlateDecode" Then
bytes = pdf.PdfReader.FlateDecode(bytes, True)
Dim pixelFormat As System.Drawing.Imaging.PixelFormat
Select Case Integer.Parse(bpp)
Case 1
pixelFormat = Drawing.Imaging.PixelFormat.Format1bppIndexed
Case 24
pixelFormat = Drawing.Imaging.PixelFormat.Format24bppRgb
Case Else
Throw New Exception("Unknown pixel format " + bpp)
End Select
Dim bmp As New System.Drawing.Bitmap(Int32.Parse(width), Int32.Parse(height), pixelFormat)
Dim bmd As System.Drawing.Imaging.BitmapData = bmp.LockBits(New System.Drawing.Rectangle(0, 0, Int32.Parse(width), Int32.Parse(height)), System.Drawing.Imaging.ImageLockMode.WriteOnly, pixelFormat)
Marshal.Copy(bytes, 0, bmd.Scan0, bytes.Length)
bmp.UnlockBits(bmd)
Using ms As New MemoryStream
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
bytes = ms.GetBuffer
End Using
End If
images.Add(bytes)
ElseIf pdf.PdfName.FORM.Equals(subtype) Or pdf.PdfName.GROUP.Equals(subtype) Then
getAllImages(tg, images, doc)
End If
End If
Next
End If End Sub
Now my issue is simply, how can I call this, I do not know what to set the dict variable to or the images list??
So in essance if I have a PDF located at C:\temp\test.pdf that contains images, how do I call this?
Dim x As New FileStream("C:\image\test.pdf", FileMode.Open)
Dim reader As New iTextSharp.text.pdf.PdfReader(x)
getAllImages(?????, ?????? ,reader)
Sorry for the dumb question, but I am a novice and can't figure it out.
Thanks in advance! | .net | itextsharp | null | null | null | null | open | ITEXTSHARP in .net, Extract image code, I can't get this to work
===
I am looking to simply extract all images from a pdf. I found some code that looks like it is exactly what I need
Private Sub getAllImages(ByVal dict As pdf.PdfDictionary, ByVal images As List(Of Byte()), ByVal doc As pdf.PdfReader)
Dim res As pdf.PdfDictionary = CType(pdf.PdfReader.GetPdfObject(dict.Get(pdf.PdfName.RESOURCES)), pdf.PdfDictionary)
Dim xobj As pdf.PdfDictionary = CType(pdf.PdfReader.GetPdfObject(res.Get(pdf.PdfName.XOBJECT)), pdf.PdfDictionary)
If xobj IsNot Nothing Then
For Each name As pdf.PdfName In xobj.Keys
Dim obj As pdf.PdfObject = xobj.Get(name)
If (obj.IsIndirect) Then
Dim tg As pdf.PdfDictionary = CType(pdf.PdfReader.GetPdfObject(obj), pdf.PdfDictionary)
Dim subtype As pdf.PdfName = CType(pdf.PdfReader.GetPdfObject(tg.Get(pdf.PdfName.SUBTYPE)), pdf.PdfName)
If pdf.PdfName.IMAGE.Equals(subtype) Then
Dim xrefIdx As Integer = CType(obj, pdf.PRIndirectReference).Number
Dim pdfObj As pdf.PdfObject = doc.GetPdfObject(xrefIdx)
Dim str As pdf.PdfStream = CType(pdfObj, pdf.PdfStream)
Dim bytes As Byte() = pdf.PdfReader.GetStreamBytesRaw(CType(str, pdf.PRStream))
Dim filter As String = tg.Get(pdf.PdfName.FILTER).ToString
Dim width As String = tg.Get(pdf.PdfName.WIDTH).ToString
Dim height As String = tg.Get(pdf.PdfName.HEIGHT).ToString
Dim bpp As String = tg.Get(pdf.PdfName.BITSPERCOMPONENT).ToString
If filter = "/FlateDecode" Then
bytes = pdf.PdfReader.FlateDecode(bytes, True)
Dim pixelFormat As System.Drawing.Imaging.PixelFormat
Select Case Integer.Parse(bpp)
Case 1
pixelFormat = Drawing.Imaging.PixelFormat.Format1bppIndexed
Case 24
pixelFormat = Drawing.Imaging.PixelFormat.Format24bppRgb
Case Else
Throw New Exception("Unknown pixel format " + bpp)
End Select
Dim bmp As New System.Drawing.Bitmap(Int32.Parse(width), Int32.Parse(height), pixelFormat)
Dim bmd As System.Drawing.Imaging.BitmapData = bmp.LockBits(New System.Drawing.Rectangle(0, 0, Int32.Parse(width), Int32.Parse(height)), System.Drawing.Imaging.ImageLockMode.WriteOnly, pixelFormat)
Marshal.Copy(bytes, 0, bmd.Scan0, bytes.Length)
bmp.UnlockBits(bmd)
Using ms As New MemoryStream
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
bytes = ms.GetBuffer
End Using
End If
images.Add(bytes)
ElseIf pdf.PdfName.FORM.Equals(subtype) Or pdf.PdfName.GROUP.Equals(subtype) Then
getAllImages(tg, images, doc)
End If
End If
Next
End If End Sub
Now my issue is simply, how can I call this, I do not know what to set the dict variable to or the images list??
So in essance if I have a PDF located at C:\temp\test.pdf that contains images, how do I call this?
Dim x As New FileStream("C:\image\test.pdf", FileMode.Open)
Dim reader As New iTextSharp.text.pdf.PdfReader(x)
getAllImages(?????, ?????? ,reader)
Sorry for the dumb question, but I am a novice and can't figure it out.
Thanks in advance! | 0 |
6,493,967 | 06/27/2011 13:55:47 | 817,501 | 06/27/2011 13:55:47 | 1 | 0 | SQL Injection on INSERT statement | I have to follow query which I wanna break:
INSERT INTO `table` (`A`,`B`,`C`,`D`,`E`,`F`,`G`,`TIMESTAMP`)
VALUES ('' ,'1','2','z','X','1','n',NOW());
WHERE X is the value which comes from POST
I wanna inject a UPDATE statement:
what I tryd:
' XOR (UPDATE `table2` SET `VALUE` = 'j' WHERE `TABLE_ID` = 2) OR '
also this:
Test','0','n',NOW()); UPDATE `table2` SET `VALUE` = j WHERE `TABLE_ID` = 2); --
But both give me a error. Any Idea how to do it? Query 1 works when there is not UPDATE inserted (example ' XOR TRUE ' OR ') and query 2 wont accept ether the escapeing -- or the secound query?
Thanks for your help.
| sql | update | insert | sql-injection | injection | 06/27/2011 14:06:24 | not constructive | SQL Injection on INSERT statement
===
I have to follow query which I wanna break:
INSERT INTO `table` (`A`,`B`,`C`,`D`,`E`,`F`,`G`,`TIMESTAMP`)
VALUES ('' ,'1','2','z','X','1','n',NOW());
WHERE X is the value which comes from POST
I wanna inject a UPDATE statement:
what I tryd:
' XOR (UPDATE `table2` SET `VALUE` = 'j' WHERE `TABLE_ID` = 2) OR '
also this:
Test','0','n',NOW()); UPDATE `table2` SET `VALUE` = j WHERE `TABLE_ID` = 2); --
But both give me a error. Any Idea how to do it? Query 1 works when there is not UPDATE inserted (example ' XOR TRUE ' OR ') and query 2 wont accept ether the escapeing -- or the secound query?
Thanks for your help.
| 4 |
4,135,095 | 11/09/2010 14:59:46 | 184,046 | 10/04/2009 20:35:01 | 2,631 | 31 | Tackling Interview Phobia? | For most of the people, their day starts with Google. Mine starts with Google and SO in parallel so I thought I'll post this question I've seen [elsewhere][2] as I am interested in knowing what the opinions of people here are mainly because I respect this community more than any other. Today morning, I came across [this][1] interesting discussion on [CodeProject][2]. The question goes like this:
> I consider myself a good developer, fellow developers and managers as well as clients have told me the same. I code to standards and make sure it is done correctly.
> So why is it that in an interview when asked a question about code I get stumped and not able to answer it correctly? Am I the only one that does this? Can you BE a great developer without being able to tell you the definition of polymorphism or the like? I know I can do the work, very well. So what can I do to learn the definitions of things? I am thinking of making cue cards and going from there. They have helped me in the past.
> What do you think? What is the best way for you to learn? Also, do you know definitions and meanings of everything you do?
Now, a summary of some really great points posted there:
- Don’t try to remember or memorize the technologies definitions, it’s a mistake. If you are familiar with the concept just explain it with your own words or even short verbal examples. This is how I got my current job, with describing my vision of what OOP and “object” is which is quite different from the “official” definitions.
- I bet you can be a great *solo* programmer/developer/engineer, but when working in team you need to know how certain patterns are named to make communication faster and more fluent. I was like you a couple of years ago, but then I spent some time learning a proper names for patters, structures, etc. and it is kinda worth knowing them (-. So keep up and you will eventually be there.
- *I've read plenty of code from adademics, PHD, Masters etc. It's not a pretty sight.*
- I just faced an interview and had similar questions. I was all prepared for the high level stuff, the projects I did, the business problems we solved, frameworks we used etc etc. As soon as the introductions were done the first question that was shot at me was "Define an interface, abstract class, their differences and when to use them?" (BTW, I am a Java guy and I subscribe to The Code Project news). I know the answers, but, I was searching for the right words and it took me time ( and I struggled) a bit to put the answer in a crisp way.
- In my 17 years of programming, i have never had a discussion with a co-worker about a "pattern".
Now the question applies to me as well because I do not come from a CS background and often take a very unconventional approach to get things done but a "native" guy still has an edge. I am sure there are many like me. I don't think this has anything to do with intellectual merit because I can tackle most problems that I encounter everyday but rather on the approach that I take. With this I developed a fear of interviews and I escape from them all the time! What is the best way to unlearn my attitude and develop a better one? Solve more interview questions?
[1]: http://www.codeproject.com/Lounge.aspx?msg=3660003#xx3660003xx
[2]: http://www.codeproject.com | interview-questions | self-improvement | attitude | null | null | 11/09/2010 15:19:55 | off topic | Tackling Interview Phobia?
===
For most of the people, their day starts with Google. Mine starts with Google and SO in parallel so I thought I'll post this question I've seen [elsewhere][2] as I am interested in knowing what the opinions of people here are mainly because I respect this community more than any other. Today morning, I came across [this][1] interesting discussion on [CodeProject][2]. The question goes like this:
> I consider myself a good developer, fellow developers and managers as well as clients have told me the same. I code to standards and make sure it is done correctly.
> So why is it that in an interview when asked a question about code I get stumped and not able to answer it correctly? Am I the only one that does this? Can you BE a great developer without being able to tell you the definition of polymorphism or the like? I know I can do the work, very well. So what can I do to learn the definitions of things? I am thinking of making cue cards and going from there. They have helped me in the past.
> What do you think? What is the best way for you to learn? Also, do you know definitions and meanings of everything you do?
Now, a summary of some really great points posted there:
- Don’t try to remember or memorize the technologies definitions, it’s a mistake. If you are familiar with the concept just explain it with your own words or even short verbal examples. This is how I got my current job, with describing my vision of what OOP and “object” is which is quite different from the “official” definitions.
- I bet you can be a great *solo* programmer/developer/engineer, but when working in team you need to know how certain patterns are named to make communication faster and more fluent. I was like you a couple of years ago, but then I spent some time learning a proper names for patters, structures, etc. and it is kinda worth knowing them (-. So keep up and you will eventually be there.
- *I've read plenty of code from adademics, PHD, Masters etc. It's not a pretty sight.*
- I just faced an interview and had similar questions. I was all prepared for the high level stuff, the projects I did, the business problems we solved, frameworks we used etc etc. As soon as the introductions were done the first question that was shot at me was "Define an interface, abstract class, their differences and when to use them?" (BTW, I am a Java guy and I subscribe to The Code Project news). I know the answers, but, I was searching for the right words and it took me time ( and I struggled) a bit to put the answer in a crisp way.
- In my 17 years of programming, i have never had a discussion with a co-worker about a "pattern".
Now the question applies to me as well because I do not come from a CS background and often take a very unconventional approach to get things done but a "native" guy still has an edge. I am sure there are many like me. I don't think this has anything to do with intellectual merit because I can tackle most problems that I encounter everyday but rather on the approach that I take. With this I developed a fear of interviews and I escape from them all the time! What is the best way to unlearn my attitude and develop a better one? Solve more interview questions?
[1]: http://www.codeproject.com/Lounge.aspx?msg=3660003#xx3660003xx
[2]: http://www.codeproject.com | 2 |
4,092,698 | 11/03/2010 23:48:16 | 149,080 | 08/01/2009 21:00:20 | 1,326 | 21 | Rails - PaperClip & Acts_As_Versioned - Accessing a Photo URL | I've implemented the following:
**File versioning in Ruby on Rails with Paperclip & acts_as_versioned:**
[http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/][1]
When you upload a new photo it is now successfully being version. The issue I'm having is that I can't grab the image <IMG> with paperclip:
<% for version in @photos.first.versions.reverse %>
<%= version.photo.inspect %>
<%= image_tag(version.photo.photo(:thumb)) %>
<% end %>
Which the "version.photo.inspect" shows the right info, when I call it in the image tag to show the photo, it's always showing the most recent version and not the older version.
Ideas?
| ruby-on-rails | ruby-on-rails-3 | paperclip | acts-as-versioned | null | null | open | Rails - PaperClip & Acts_As_Versioned - Accessing a Photo URL
===
I've implemented the following:
**File versioning in Ruby on Rails with Paperclip & acts_as_versioned:**
[http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/][1]
When you upload a new photo it is now successfully being version. The issue I'm having is that I can't grab the image <IMG> with paperclip:
<% for version in @photos.first.versions.reverse %>
<%= version.photo.inspect %>
<%= image_tag(version.photo.photo(:thumb)) %>
<% end %>
Which the "version.photo.inspect" shows the right info, when I call it in the image tag to show the photo, it's always showing the most recent version and not the older version.
Ideas?
| 0 |
11,062,153 | 06/16/2012 09:08:50 | 454,520 | 09/21/2010 23:41:50 | 83 | 2 | Floating image to the right | I would like to float the image in div#rakshak to the right of div#MainMenu. How can I fix the css in the site below
http://goo.gl/BqALW | html | css-float | null | null | null | 06/18/2012 03:22:10 | too localized | Floating image to the right
===
I would like to float the image in div#rakshak to the right of div#MainMenu. How can I fix the css in the site below
http://goo.gl/BqALW | 3 |
10,453,749 | 05/04/2012 17:52:09 | 1,344,148 | 04/19/2012 13:41:12 | 1 | 0 | PHP assign mysql_fetch_array(data) to a array variable | I would like to use the following:
$row1 = mysql_fetch_array($genDay[0][0]);
$row2 = mysql_fetch_array($genDay[0][1]);
$row3 = mysql_fetch_array($genDay[0][2]);
$row4 = mysql_fetch_array($genDay[0][3]);
$row5 = mysql_fetch_array($genDay[0][4]);
$row6 = mysql_fetch_array($genDay[0][5]);
$row7 = mysql_fetch_array($genDay[0][6]);
$row8 = mysql_fetch_array($genDay[1][0]);
$row9 = mysql_fetch_array($genDay[1][1]);
$row10 = mysql_fetch_array($genDay[1][2]);
$row11 = mysql_fetch_array($genDay[1][3]);
$row12 = mysql_fetch_array($genDay[1][4]);
$row13 = mysql_fetch_array($genDay[1][5]);
$row14 = mysql_fetch_array($genDay[1][6]);
Like this:
$row[$q] = mysql_fetch_array($genDay[$g][$x]);
Ultimately I want to use this to echo the result as follows:
<?php echo $row[0]['SUM(itemQty)']; ?>
Which doesn't work. | php | mysql | arrays | variables | multidimensional-array | null | open | PHP assign mysql_fetch_array(data) to a array variable
===
I would like to use the following:
$row1 = mysql_fetch_array($genDay[0][0]);
$row2 = mysql_fetch_array($genDay[0][1]);
$row3 = mysql_fetch_array($genDay[0][2]);
$row4 = mysql_fetch_array($genDay[0][3]);
$row5 = mysql_fetch_array($genDay[0][4]);
$row6 = mysql_fetch_array($genDay[0][5]);
$row7 = mysql_fetch_array($genDay[0][6]);
$row8 = mysql_fetch_array($genDay[1][0]);
$row9 = mysql_fetch_array($genDay[1][1]);
$row10 = mysql_fetch_array($genDay[1][2]);
$row11 = mysql_fetch_array($genDay[1][3]);
$row12 = mysql_fetch_array($genDay[1][4]);
$row13 = mysql_fetch_array($genDay[1][5]);
$row14 = mysql_fetch_array($genDay[1][6]);
Like this:
$row[$q] = mysql_fetch_array($genDay[$g][$x]);
Ultimately I want to use this to echo the result as follows:
<?php echo $row[0]['SUM(itemQty)']; ?>
Which doesn't work. | 0 |
11,558,406 | 07/19/2012 10:02:39 | 1,436,681 | 06/05/2012 06:43:02 | 1 | 1 | .app file not working on 5.1.1 update on iphone? | I have created one application app file(build file) its not working on iphone 4s that is jailbroken and its working on iphone that is not jailbroken iphone. Please help what are the steps that i have to follow to install on jailbroken iphone. | application | build | jailbreak | null | null | 07/19/2012 16:06:51 | not a real question | .app file not working on 5.1.1 update on iphone?
===
I have created one application app file(build file) its not working on iphone 4s that is jailbroken and its working on iphone that is not jailbroken iphone. Please help what are the steps that i have to follow to install on jailbroken iphone. | 1 |
7,938,535 | 10/29/2011 11:15:38 | 133,939 | 07/06/2009 22:38:15 | 7,069 | 210 | How can I use the Platform LSF blaunch command to start processes simultaneously? | I'm having a hard time figuring out why I can't launch commands in parallel using the LSF `blaunch` command:
for num in `seq 3`; do
blaunch -u JobHost ./cmd_${num}.sh &
done
Error message:
Oct 29 13:08:55 2011 18887 3 7.04 lsb_launch(): Failed while executing tasks.
Oct 29 13:08:55 2011 18885 3 7.04 lsb_launch(): Failed while executing tasks.
Oct 29 13:08:55 2011 18884 3 7.04 lsb_launch(): Failed while executing tasks.
Removing the ampersand (`&`) allows the commands to execute sequentially, but I am after parallel execution.
| bash | lsf | null | null | null | null | open | How can I use the Platform LSF blaunch command to start processes simultaneously?
===
I'm having a hard time figuring out why I can't launch commands in parallel using the LSF `blaunch` command:
for num in `seq 3`; do
blaunch -u JobHost ./cmd_${num}.sh &
done
Error message:
Oct 29 13:08:55 2011 18887 3 7.04 lsb_launch(): Failed while executing tasks.
Oct 29 13:08:55 2011 18885 3 7.04 lsb_launch(): Failed while executing tasks.
Oct 29 13:08:55 2011 18884 3 7.04 lsb_launch(): Failed while executing tasks.
Removing the ampersand (`&`) allows the commands to execute sequentially, but I am after parallel execution.
| 0 |
11,188,335 | 06/25/2012 11:17:55 | 1,479,762 | 06/25/2012 11:07:06 | 1 | 0 | How to find the path (ipadress) in mysql_conect () when trying to execute query from another web site | I am trying to select data from a web site from another web site. Now I am confused about the address need to insert in the mysql_connect().
How can I find out the address need to insert in the mysql_connect().(How to find out the path from cpanel).
Sincerely,
Rose Franklin
| php | mysql-connect | null | null | null | 06/26/2012 11:53:04 | not a real question | How to find the path (ipadress) in mysql_conect () when trying to execute query from another web site
===
I am trying to select data from a web site from another web site. Now I am confused about the address need to insert in the mysql_connect().
How can I find out the address need to insert in the mysql_connect().(How to find out the path from cpanel).
Sincerely,
Rose Franklin
| 1 |
7,872,131 | 10/24/2011 06:50:11 | 878,077 | 08/04/2011 07:35:06 | 85 | 1 | intresting SQL query | I have this data in my table:
onum amt odate cnum snum
3001 18,69 1990-03-10 00:00:00.000 2008 1007
3002 1900,10 1990-03-10 00:00:00.000 2007 1004
3003 767,19 1990-03-10 00:00:00.000 2001 1001
3005 5160,45 1990-03-10 00:00:00.000 2003 1002
3006 1098,16 1990-03-10 00:00:00.000 2008 1007
3007 75,75 1990-03-10 00:00:00.000 2004 1002
3008 4723,00 1990-05-10 00:00:00.000 2006 1001
3009 1713,23 1990-04-10 00:00:00.000 2002 1003
3010 1309,95 1990-06-10 00:00:00.000 2004 1002
3011 9891,88 1990-06-10 00:00:00.000 2006 1001
I need get this result:
amt odate snum
5160,45 1990-03-10 00:00:00.000 1002
4723,00 1990-05-10 00:00:00.000 1001
9891,88 1990-06-10 00:00:00.000 1001
that is I select the max **amt** on the each day **odate**, but with displaying of seller **snum**
if I write this:
SELECT MAX(amt), odate, snum FROM [Understanding].[dbo].[Orders] GROUP BY odate, snum
the output is wrong because it displays the groups by days and sellers. | sql | tsql | null | null | null | null | open | intresting SQL query
===
I have this data in my table:
onum amt odate cnum snum
3001 18,69 1990-03-10 00:00:00.000 2008 1007
3002 1900,10 1990-03-10 00:00:00.000 2007 1004
3003 767,19 1990-03-10 00:00:00.000 2001 1001
3005 5160,45 1990-03-10 00:00:00.000 2003 1002
3006 1098,16 1990-03-10 00:00:00.000 2008 1007
3007 75,75 1990-03-10 00:00:00.000 2004 1002
3008 4723,00 1990-05-10 00:00:00.000 2006 1001
3009 1713,23 1990-04-10 00:00:00.000 2002 1003
3010 1309,95 1990-06-10 00:00:00.000 2004 1002
3011 9891,88 1990-06-10 00:00:00.000 2006 1001
I need get this result:
amt odate snum
5160,45 1990-03-10 00:00:00.000 1002
4723,00 1990-05-10 00:00:00.000 1001
9891,88 1990-06-10 00:00:00.000 1001
that is I select the max **amt** on the each day **odate**, but with displaying of seller **snum**
if I write this:
SELECT MAX(amt), odate, snum FROM [Understanding].[dbo].[Orders] GROUP BY odate, snum
the output is wrong because it displays the groups by days and sellers. | 0 |
9,560,905 | 03/05/2012 02:24:05 | 680,578 | 03/28/2011 16:24:25 | 851 | 83 | MySQL select all users who have not logged in in 30 days | I have a table that has a user id & timestamp, like the following.
[member id] [timestamp]
1 1142461087
1 1339461211
2 1321280124
1 1249042100
3 1308325002
3 1308259235
I want to return a list of unique member ids who have not logged in in 30 days.
This is my current query:
SELECT member_id, login_timestamp
FROM logins
WHERE login_timestamp <= 1329461087
GROUP BY member_id
ORDER BY login_timestamp DESC
I thought this was correct, but for some reason, in production, the admin user's ID shows up on the list, which is not possible since admin logs every day. | mysql | query | unix-timestamp | null | null | null | open | MySQL select all users who have not logged in in 30 days
===
I have a table that has a user id & timestamp, like the following.
[member id] [timestamp]
1 1142461087
1 1339461211
2 1321280124
1 1249042100
3 1308325002
3 1308259235
I want to return a list of unique member ids who have not logged in in 30 days.
This is my current query:
SELECT member_id, login_timestamp
FROM logins
WHERE login_timestamp <= 1329461087
GROUP BY member_id
ORDER BY login_timestamp DESC
I thought this was correct, but for some reason, in production, the admin user's ID shows up on the list, which is not possible since admin logs every day. | 0 |
7,218,059 | 08/27/2011 23:36:16 | 304,853 | 03/30/2010 07:03:27 | 348 | 22 | PHP - include index.php for path above this one | So, am using this code here...
<?php
if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
include(dirname(dirname(__FILE__)) . '/index.php');
else
exit;
?>
So I have a filepath like so:
> /root/folder/a_sub1/b_sub1/c_sub1/d_sub1
Each *_sub folder has a file `index.php` with the above code in it. The **folder** directory has the following code in it:
<?php
// Look for Settings.php....
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))
{
// Found it!
require(dirname(dirname(__FILE__)) . '/Settings.php');
header('Location: ' . $boardurl);
}
// Can't find it... just forget it.
else
exit;
?>
The **root** folder has Settings.php within it that defines the `$boardurl` to be: `http://dptest.dream-portal.net`, so why is it NOT redirecting to the `$boardurl` when I type in the url like this?
`http://dptest.dream-portal.net/folder/a_sub1`
To my understanding, it should include each index.php file within each path above it, until it gets to **folder** and than it should call upon Settings.php within the root and this should than just load up the `$boardurl` (http://dptest.dream-portal.net) instead right? Makes sense to me, but instead I am getting a 500 Internal Server Error when browsing any subdirectories within the **folder** directory...
Can someone please help me here.
Cheers :)
| php | filesystems | include | null | null | 09/01/2011 17:47:38 | too localized | PHP - include index.php for path above this one
===
So, am using this code here...
<?php
if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
include(dirname(dirname(__FILE__)) . '/index.php');
else
exit;
?>
So I have a filepath like so:
> /root/folder/a_sub1/b_sub1/c_sub1/d_sub1
Each *_sub folder has a file `index.php` with the above code in it. The **folder** directory has the following code in it:
<?php
// Look for Settings.php....
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))
{
// Found it!
require(dirname(dirname(__FILE__)) . '/Settings.php');
header('Location: ' . $boardurl);
}
// Can't find it... just forget it.
else
exit;
?>
The **root** folder has Settings.php within it that defines the `$boardurl` to be: `http://dptest.dream-portal.net`, so why is it NOT redirecting to the `$boardurl` when I type in the url like this?
`http://dptest.dream-portal.net/folder/a_sub1`
To my understanding, it should include each index.php file within each path above it, until it gets to **folder** and than it should call upon Settings.php within the root and this should than just load up the `$boardurl` (http://dptest.dream-portal.net) instead right? Makes sense to me, but instead I am getting a 500 Internal Server Error when browsing any subdirectories within the **folder** directory...
Can someone please help me here.
Cheers :)
| 3 |
11,554,548 | 07/19/2012 05:38:27 | 1,495,246 | 07/02/2012 06:06:25 | 1 | 0 | Gantt view for android | Can any body know how to create gantt view in android. My idea is to create view dynamically and add that view using arrayADapter or List Adapter to Listview. Is it possible?
Please reply if anybody know this ? | java | android | listview | project | gantt | 07/20/2012 12:12:35 | not a real question | Gantt view for android
===
Can any body know how to create gantt view in android. My idea is to create view dynamically and add that view using arrayADapter or List Adapter to Listview. Is it possible?
Please reply if anybody know this ? | 1 |
7,482,946 | 09/20/2011 09:27:14 | 865,170 | 07/27/2011 10:38:05 | 1 | 0 | How you implement Abstraction(oops) in c# code | Many times i faced this question by the interviewer.Can any body give me a good example | c# | null | null | null | null | 09/20/2011 11:28:35 | off topic | How you implement Abstraction(oops) in c# code
===
Many times i faced this question by the interviewer.Can any body give me a good example | 2 |
2,008,747 | 01/05/2010 20:12:36 | 244,213 | 01/05/2010 20:12:35 | 1 | 0 | Wordpress theme Javascript problem | I have a wordpress site running the WP-Coda theme [here][1], and have been working to create a page template. The link to the a page with the template is namastebella.byethost5.com/random (Sorry no hyperlink, can't post 2 as a beginner!)
The "fadethis" javascript function makes animated hovers on the top three links. It works on the main page, but I can't seem to figure out why it doesn't work on the page template at /random. The header is the same, and loads the same script on both, and the html calls for the same tag.
A friend pointed out that the template link isn't preloading all images either like the function calls for. I'm not sure how this relates to the problem.
Any help?
Thanks,
zeemy
[1]: http://namastebella.byethost5.com
[2]: http://namastebella.byethost5.com/random | wordpress | wordpress-theming | javascript | null | null | 02/09/2011 08:17:34 | too localized | Wordpress theme Javascript problem
===
I have a wordpress site running the WP-Coda theme [here][1], and have been working to create a page template. The link to the a page with the template is namastebella.byethost5.com/random (Sorry no hyperlink, can't post 2 as a beginner!)
The "fadethis" javascript function makes animated hovers on the top three links. It works on the main page, but I can't seem to figure out why it doesn't work on the page template at /random. The header is the same, and loads the same script on both, and the html calls for the same tag.
A friend pointed out that the template link isn't preloading all images either like the function calls for. I'm not sure how this relates to the problem.
Any help?
Thanks,
zeemy
[1]: http://namastebella.byethost5.com
[2]: http://namastebella.byethost5.com/random | 3 |
7,786,827 | 10/16/2011 19:47:50 | 515,024 | 11/21/2010 10:39:02 | 26 | 1 | Getting date of a revision using svn info | My objective is to extract revisions from the repository that are at least 30 days apart from each other. Lets say I want to examine revisions starting from 30 to 100. For each of the revisions, I have used SVN info command and use the last changed date as the date of that revision. The next steps are straightforward. Check the difference in days between two consecutive revisions.
My question is whether the approach is ok (or in another way, is it correct to get the date of a revision in this approach). Any suggestion would be helpful. Thanks.
Example of SVN info output.
svn info -r 200 https://itextsharp.svn.sourceforge.net/svnroot/itextsharp/trunk
Path: trunk
URL: https://itextsharp.svn.sourceforge.net/svnroot/itextsharp/trunk
Repository Root: https://itextsharp.svn.sourceforge.net/svnroot/itextsharp
Repository UUID: da003780-e18d-4f51-86a4-c2ecb517afe5
Revision: 200
Node Kind: directory
Last Changed Author: psoares33
Last Changed Rev: 200
Last Changed Date: 2010-10-17 12:25:23 -0600 (Sun, 17 Oct 2010)
| svn | repository | null | null | null | null | open | Getting date of a revision using svn info
===
My objective is to extract revisions from the repository that are at least 30 days apart from each other. Lets say I want to examine revisions starting from 30 to 100. For each of the revisions, I have used SVN info command and use the last changed date as the date of that revision. The next steps are straightforward. Check the difference in days between two consecutive revisions.
My question is whether the approach is ok (or in another way, is it correct to get the date of a revision in this approach). Any suggestion would be helpful. Thanks.
Example of SVN info output.
svn info -r 200 https://itextsharp.svn.sourceforge.net/svnroot/itextsharp/trunk
Path: trunk
URL: https://itextsharp.svn.sourceforge.net/svnroot/itextsharp/trunk
Repository Root: https://itextsharp.svn.sourceforge.net/svnroot/itextsharp
Repository UUID: da003780-e18d-4f51-86a4-c2ecb517afe5
Revision: 200
Node Kind: directory
Last Changed Author: psoares33
Last Changed Rev: 200
Last Changed Date: 2010-10-17 12:25:23 -0600 (Sun, 17 Oct 2010)
| 0 |
9,198,602 | 02/08/2012 17:42:21 | 966,858 | 09/27/2011 10:52:41 | 38 | 3 | jquery retrieve firefox 11 translate3d data preferably as an array | I cant really add much more here.
I am using a plugin but need a way to retrieve the 3d translation and scale as an array.
I have tried:
$('#image').css('-moz-transform)
but only get a string back.
is there a special way to get an array without having to substr and replace?
Thanks in advance. | jquery | firefox | css-transitions | null | null | null | open | jquery retrieve firefox 11 translate3d data preferably as an array
===
I cant really add much more here.
I am using a plugin but need a way to retrieve the 3d translation and scale as an array.
I have tried:
$('#image').css('-moz-transform)
but only get a string back.
is there a special way to get an array without having to substr and replace?
Thanks in advance. | 0 |
7,317,745 | 09/06/2011 09:31:08 | 341,878 | 05/15/2010 11:04:37 | 313 | 7 | Too many pages using kaminari gem in Ruby on Rails 3.1 application | I am using the kaminari pagination gem in my simple Rails 3.1 application. Problem is it creates too many pages, I end up with completly blank pages at the end of my page list.
I have experimented in the console with:
current_user.articles
Which returns me a list of 6 articles, the same as the ones being displayed in my application.
current_user.articles.count
Which returns me "8", is it this number that the number of pages is based on?
current_user.articles.length
Returns me "6"
current_user.articles.size
Returns me "8"
Is this discrepency between the number of articles causing my problem? Where is the problem, and how do I fix it please? | ruby-on-rails | ruby-on-rails-3 | pagination | ruby-on-rails-3.1 | kaminari | null | open | Too many pages using kaminari gem in Ruby on Rails 3.1 application
===
I am using the kaminari pagination gem in my simple Rails 3.1 application. Problem is it creates too many pages, I end up with completly blank pages at the end of my page list.
I have experimented in the console with:
current_user.articles
Which returns me a list of 6 articles, the same as the ones being displayed in my application.
current_user.articles.count
Which returns me "8", is it this number that the number of pages is based on?
current_user.articles.length
Returns me "6"
current_user.articles.size
Returns me "8"
Is this discrepency between the number of articles causing my problem? Where is the problem, and how do I fix it please? | 0 |
11,554,561 | 07/19/2012 05:40:03 | 1,536,853 | 07/19/2012 05:36:32 | 1 | 0 | How to use twitpic image in imageview in iphone app? | I am already uploaded image from twitpic,But i want to show image from twitpic like "http://twitpic.com/a97wy7" to imageview in iphone programatically | iphone | ios | twitter | null | null | 07/19/2012 11:49:51 | not a real question | How to use twitpic image in imageview in iphone app?
===
I am already uploaded image from twitpic,But i want to show image from twitpic like "http://twitpic.com/a97wy7" to imageview in iphone programatically | 1 |
10,218,818 | 04/18/2012 22:10:19 | 260,345 | 01/27/2010 18:23:29 | 156 | 0 | jsTree onSelect event | I've been trying to get the text of a node that is selected in a jsTree. I am able to populate the tree and trigger the onSelect event, but I can't find out which node was clicked. I've seen examples on the net that use `data.rslt.obj.attr("data")` to fetch the text, however this is returning undefined for me. Additionally, when I try to get the selected node using `.jstree('get_selected')` I can't find the node text anywhere in the object. How can I get the node text?
Here is my onSelect callback function:
function onSelect(event, data)
{
// Get the name of the equipment that was selected.
var selected_node = $("#equipment_tree").jstree('get_selected');
var equipment_name = data.rslt.obj.attr("data");
} | javascript | jstree | null | null | null | null | open | jsTree onSelect event
===
I've been trying to get the text of a node that is selected in a jsTree. I am able to populate the tree and trigger the onSelect event, but I can't find out which node was clicked. I've seen examples on the net that use `data.rslt.obj.attr("data")` to fetch the text, however this is returning undefined for me. Additionally, when I try to get the selected node using `.jstree('get_selected')` I can't find the node text anywhere in the object. How can I get the node text?
Here is my onSelect callback function:
function onSelect(event, data)
{
// Get the name of the equipment that was selected.
var selected_node = $("#equipment_tree").jstree('get_selected');
var equipment_name = data.rslt.obj.attr("data");
} | 0 |
215,784 | 10/19/2008 00:36:38 | 3,153 | 08/27/2008 02:45:05 | 6,758 | 144 | Making money while programming Linux and/or open source for small business? | During university, I wanted to start a software business. I didn't know what at the time, but I knew it would have to be Windows and closed source in order to make enough money to support a career.
Was I wrong? What could I have been told that would have changed my mind? I'm looking for arguments about why I could have programmed Linux and/or open source, while being a small business and while still make money.
I do understand that the question relating to programming for Linux and relating to programming open source can have 2 completely different answers. | linux | windows | commercial | open-source | null | 09/19/2011 05:15:07 | off topic | Making money while programming Linux and/or open source for small business?
===
During university, I wanted to start a software business. I didn't know what at the time, but I knew it would have to be Windows and closed source in order to make enough money to support a career.
Was I wrong? What could I have been told that would have changed my mind? I'm looking for arguments about why I could have programmed Linux and/or open source, while being a small business and while still make money.
I do understand that the question relating to programming for Linux and relating to programming open source can have 2 completely different answers. | 2 |
8,319,550 | 11/30/2011 00:14:55 | 793,454 | 06/10/2011 21:59:20 | 293 | 25 | how to collect form ids using jQuery | A jQuery selector $(".thumb_up") returns a collection of forms like this:
[<form id="like_post_78" ...</form> <form id="like_post_79"> ... </form>]
Ultimately I want to generate a string consisting of the numerical ending portion of the form ids.
"78,79"
What's the most efficient way of getting this?
| jquery | null | null | null | null | null | open | how to collect form ids using jQuery
===
A jQuery selector $(".thumb_up") returns a collection of forms like this:
[<form id="like_post_78" ...</form> <form id="like_post_79"> ... </form>]
Ultimately I want to generate a string consisting of the numerical ending portion of the form ids.
"78,79"
What's the most efficient way of getting this?
| 0 |
10,595,310 | 05/15/2012 06:32:58 | 649,524 | 03/08/2011 08:54:48 | 1,045 | 90 | Return ObservableCollection from linq query | I have following linq snippet
ObservableCollection<int> ints = new ObservableCollection<int>();
ints.Add(3);
ints.Add(4);
ints.Add(5);
ints.Add(6);
ints.Add(3);
ints.Add(4);
ints.Add(1);
ints.Add(2);
var groupedInts = ints.GroupBy(i=>i).Select(i=> new {Key=i.Key, Count=i.Count()});
I want following
1. To subscribe to groupedInts or ObservableCollection corresponding to it (basically databinding from WPF/Metro UI to groupInts)
2. Any change in ints (original observablecollection) should be reflected by groupedInts (so that UI subscribing to groupInts/related ObservableCollection can show the changes).
In actual scenario, the data structure is slightly complex (6-7 properties), but the problem boils down to above described issue.
| wpf | linq | winrt | null | null | null | open | Return ObservableCollection from linq query
===
I have following linq snippet
ObservableCollection<int> ints = new ObservableCollection<int>();
ints.Add(3);
ints.Add(4);
ints.Add(5);
ints.Add(6);
ints.Add(3);
ints.Add(4);
ints.Add(1);
ints.Add(2);
var groupedInts = ints.GroupBy(i=>i).Select(i=> new {Key=i.Key, Count=i.Count()});
I want following
1. To subscribe to groupedInts or ObservableCollection corresponding to it (basically databinding from WPF/Metro UI to groupInts)
2. Any change in ints (original observablecollection) should be reflected by groupedInts (so that UI subscribing to groupInts/related ObservableCollection can show the changes).
In actual scenario, the data structure is slightly complex (6-7 properties), but the problem boils down to above described issue.
| 0 |
326,649 | 11/28/2008 20:51:16 | 1,463 | 08/15/2008 17:26:44 | 1,872 | 78 | C# Financial Functions library | I'm looking for an open source C# .NET Financial Functions library. Something that does IRR (Internal Rate of Return) and other common functions that are available in applications like Excel.
Suggestions? | c# | .net | null | null | null | 06/17/2012 15:59:08 | not constructive | C# Financial Functions library
===
I'm looking for an open source C# .NET Financial Functions library. Something that does IRR (Internal Rate of Return) and other common functions that are available in applications like Excel.
Suggestions? | 4 |
7,452,540 | 09/17/2011 04:55:20 | 392,286 | 07/15/2010 04:25:48 | 28 | 2 | c#, hand held device | I am currently working on NET 2.0. I need to develop a web page that can be called from desktop and also a hand held device(It has Windows CE on it). I've never tried anything like this before. Ideally, the requirement is to call my web page on the hand held device and produce the page on it. The page needs to perform some database interaction and return result.
I would really appreciate any guidance on this topic
Thanks in advance | c# | null | null | null | null | 09/17/2011 07:11:57 | not a real question | c#, hand held device
===
I am currently working on NET 2.0. I need to develop a web page that can be called from desktop and also a hand held device(It has Windows CE on it). I've never tried anything like this before. Ideally, the requirement is to call my web page on the hand held device and produce the page on it. The page needs to perform some database interaction and return result.
I would really appreciate any guidance on this topic
Thanks in advance | 1 |
8,600,741 | 12/22/2011 07:41:38 | 1,111,249 | 12/22/2011 07:36:55 | 1 | 0 | FPGA and Camera Interface via Verilog HDL | I have two questions regarding my project.
1) I want to interface a camera with my FPGA board which is DE2 of ALTERA family, the properties of camera are
a) Camera is of Epix Inc
b) the camera is operated or controlled via a software (XCAP) in PC
c) The camera comes with Frame Grabber which is PCI interfaced with PC and camera is RJ45 interfaced with Frame Grabber.
i want to ask that can i interface the camera via RJ45 directly to FPGA? If yes then will it work fine because in PC it works with Software?
2) can you please guide me any good material for USB interface between PC and DE2 Board that how i can transfer pixel of image from PC software to FPGA via USB? also which memory should i use SRAM or SDRAM?
Please tell me how i can solve these two problems.
Thanks
| interface | camera | fpga | null | null | 12/23/2011 17:05:07 | not a real question | FPGA and Camera Interface via Verilog HDL
===
I have two questions regarding my project.
1) I want to interface a camera with my FPGA board which is DE2 of ALTERA family, the properties of camera are
a) Camera is of Epix Inc
b) the camera is operated or controlled via a software (XCAP) in PC
c) The camera comes with Frame Grabber which is PCI interfaced with PC and camera is RJ45 interfaced with Frame Grabber.
i want to ask that can i interface the camera via RJ45 directly to FPGA? If yes then will it work fine because in PC it works with Software?
2) can you please guide me any good material for USB interface between PC and DE2 Board that how i can transfer pixel of image from PC software to FPGA via USB? also which memory should i use SRAM or SDRAM?
Please tell me how i can solve these two problems.
Thanks
| 1 |
9,445,758 | 02/25/2012 16:26:43 | 970,083 | 09/28/2011 22:44:21 | 46 | 1 | Android : can I visual activity always? | Please look here https://market.android.com/details?id=com.myboyfriendisageek.aircalc this activity is always above any running applications. HOw can I do it ?
Thanks | android | null | null | null | null | null | open | Android : can I visual activity always?
===
Please look here https://market.android.com/details?id=com.myboyfriendisageek.aircalc this activity is always above any running applications. HOw can I do it ?
Thanks | 0 |
7,213,084 | 08/27/2011 07:18:19 | 84,433 | 03/30/2009 03:57:20 | 762 | 16 | How to do this simple set of nearly identical js without so much repeating? | I'm trying to learn DRY coding and wondering how to do this sort of thing with a lot less code.
ie I have something like this:
var option_shipping = $('#option_shipping div.selected .tag').text(),
option_payment = $('#option_payment div.selected .tag').text();
if(option_shipping.length < 1) {
error = 1;
$('.option_shipping_wrap').addClass('attention');
}
if(option_payment.length < 1) {
error = 1;
$('.option_payment_wrap').addClass('attention');
}
What is the most minimal way something like this can be done? | jquery | null | null | null | null | null | open | How to do this simple set of nearly identical js without so much repeating?
===
I'm trying to learn DRY coding and wondering how to do this sort of thing with a lot less code.
ie I have something like this:
var option_shipping = $('#option_shipping div.selected .tag').text(),
option_payment = $('#option_payment div.selected .tag').text();
if(option_shipping.length < 1) {
error = 1;
$('.option_shipping_wrap').addClass('attention');
}
if(option_payment.length < 1) {
error = 1;
$('.option_payment_wrap').addClass('attention');
}
What is the most minimal way something like this can be done? | 0 |
11,475,914 | 07/13/2012 18:05:38 | 1,524,240 | 07/13/2012 17:36:12 | 1 | 0 | How to to create a key/value map from a string in java | I have a text like
"SimpleKey1:word1. SimpleKey2: word word word, word word. word word. CompoundKey3 / CompoundKey3: word word word, word. Key3: word. SimpleKey4: word words, words word-word (word 18 word 100 ). CompoundKey4 / CompoundKey4: word word."
I need to parse that string in order obtain a key/value map like:
SimpleKey1:word1.
SimpleKey2: word word word, word word. word word.
CompoundKey3 / CompoundKey3: word word word, word.
SimpleKey4: word words, words word-word (word 18 word 100 ).
CompoundKey4 / CompoundKey4: word word.
Note that the key can contains slash character (/) and the values can contain special characters.
thanks.
| java | regex | null | null | null | 07/14/2012 05:10:04 | not a real question | How to to create a key/value map from a string in java
===
I have a text like
"SimpleKey1:word1. SimpleKey2: word word word, word word. word word. CompoundKey3 / CompoundKey3: word word word, word. Key3: word. SimpleKey4: word words, words word-word (word 18 word 100 ). CompoundKey4 / CompoundKey4: word word."
I need to parse that string in order obtain a key/value map like:
SimpleKey1:word1.
SimpleKey2: word word word, word word. word word.
CompoundKey3 / CompoundKey3: word word word, word.
SimpleKey4: word words, words word-word (word 18 word 100 ).
CompoundKey4 / CompoundKey4: word word.
Note that the key can contains slash character (/) and the values can contain special characters.
thanks.
| 1 |
10,882,036 | 06/04/2012 13:18:11 | 1,428,123 | 05/31/2012 10:12:04 | 3 | 1 | Showing can not open file | This is my code to download and then open the file from the sdcard.. but after downloading the file, when i click to the file to open it show a Toast message... cannot open file..
Please Tell me where is the error...
' package com.pdf;
import java.io.File;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.Toast;
public class PdffileActivity extends Activity
{
WebView webview;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
String pdf = "http://officeofthemufti.sg/MaulidBooklet.pdf";
webview.loadUrl("http://docs.google.com/gview?embedded=true&url=" + pdf);
setContentView(webview);
File file=new File("/sdcard/MaulidBooklet.pdf");
if (file.exists())
{
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
try
{
startActivity(intent);
}
catch (ActivityNotFoundException e)
{
Toast.makeText(PdffileActivity.this,
"No Application Available to View PDF",
Toast.LENGTH_SHORT).show();
}
}
}
| android | pdf | open | null | null | null | open | Showing can not open file
===
This is my code to download and then open the file from the sdcard.. but after downloading the file, when i click to the file to open it show a Toast message... cannot open file..
Please Tell me where is the error...
' package com.pdf;
import java.io.File;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.Toast;
public class PdffileActivity extends Activity
{
WebView webview;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
String pdf = "http://officeofthemufti.sg/MaulidBooklet.pdf";
webview.loadUrl("http://docs.google.com/gview?embedded=true&url=" + pdf);
setContentView(webview);
File file=new File("/sdcard/MaulidBooklet.pdf");
if (file.exists())
{
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
try
{
startActivity(intent);
}
catch (ActivityNotFoundException e)
{
Toast.makeText(PdffileActivity.this,
"No Application Available to View PDF",
Toast.LENGTH_SHORT).show();
}
}
}
| 0 |
9,621,509 | 03/08/2012 16:51:15 | 860,126 | 07/24/2011 10:08:25 | 174 | 2 | Limit number of records using trigger and constraints in MySQL | I have a table called BFFs, that stores userID, and best friend's userID and I would like to restrict that table to have exactly 3 number of best friends for each different user.
I mean if the table structre is:
BFFs(userID, userID)
and records are:
(3286, 1212)
(3286, 4545)
(3286, 7878)
And in that case, if user with ID 3286 should not be allowed to have a new record such as (3286, xyzt).
How should I restrich this on relational tables through assertions or triggers ?
Thanks
| mysql | triggers | constraints | null | null | null | open | Limit number of records using trigger and constraints in MySQL
===
I have a table called BFFs, that stores userID, and best friend's userID and I would like to restrict that table to have exactly 3 number of best friends for each different user.
I mean if the table structre is:
BFFs(userID, userID)
and records are:
(3286, 1212)
(3286, 4545)
(3286, 7878)
And in that case, if user with ID 3286 should not be allowed to have a new record such as (3286, xyzt).
How should I restrich this on relational tables through assertions or triggers ?
Thanks
| 0 |
7,903,805 | 10/26/2011 14:05:01 | 954,912 | 09/20/2011 13:57:47 | 6 | 0 | How can I check smartphone data usage by app? (for each major smartphone OS) | My work requires me to find a way to check how much data a specific app is using. Is there currently any way I can do this for each of the major smartphone OSes?
- Android
- iOS
- Windows Phone 7
- Blackberry
- Symbian
Thanks! | android | iphone | windows-phone-7 | blackberry | symbian | 10/26/2011 15:16:04 | off topic | How can I check smartphone data usage by app? (for each major smartphone OS)
===
My work requires me to find a way to check how much data a specific app is using. Is there currently any way I can do this for each of the major smartphone OSes?
- Android
- iOS
- Windows Phone 7
- Blackberry
- Symbian
Thanks! | 2 |
9,785,506 | 03/20/2012 11:02:57 | 315,168 | 04/13/2010 06:18:48 | 5,455 | 254 | Overriding portlet templates with z3c.jbot | Is it possible? Do portlet renderers satisfy necessary conditions for z3c.jbot to kick in?
If so... what's the correct syntax to refer portlet renderer via z3c.jbot filename? | plone | null | null | null | null | null | open | Overriding portlet templates with z3c.jbot
===
Is it possible? Do portlet renderers satisfy necessary conditions for z3c.jbot to kick in?
If so... what's the correct syntax to refer portlet renderer via z3c.jbot filename? | 0 |
4,394,238 | 12/09/2010 02:10:24 | 535,828 | 12/09/2010 02:10:24 | 1 | 0 | How to force a tombstone/crash in a Froyo phone? | How to force a tombstone/crash in a Froyo phone?
I need a way to perform a test, forcing a tombstone generation in a Froyo phone. Preferably using adb commands.
Does anyone know how to do this?
Thanks a lot! | tombstoning | null | null | null | null | null | open | How to force a tombstone/crash in a Froyo phone?
===
How to force a tombstone/crash in a Froyo phone?
I need a way to perform a test, forcing a tombstone generation in a Froyo phone. Preferably using adb commands.
Does anyone know how to do this?
Thanks a lot! | 0 |
9,945,943 | 03/30/2012 15:24:58 | 1,300,469 | 03/29/2012 10:06:18 | 1 | 0 | I need to write on a file student info and read only names? | I'm here writing on a text file Name ,age and GPA of student and then i want to read only student name ,and I'm trying to do so all info show up ,i just need to get just names without age or GPA
#include<stdio.h>
#include<Windows.h>
#include<tchar.h>
struct Student {
WCHAR name[20];
int age;
float gpa;
};
int _tmain(int argc , _TCHAR* argv[])
{
int NumOfStu=0;
Student St;
printf("Please enter number of students\n");
scanf("%d" , &NumOfStu);
HANDLE f = CreateFile(L"d:\\SPR2.txt" , GENERIC_WRITE , 0 , NULL , CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL);
if(f == INVALID_HANDLE_VALUE)
{
printf("Could not Create The File\n");
return 0;
}
printf("Please Enter details of the Sutdents in the Following sequence: Name Age GPA\n");
DWORD actual;
for(int i=0 ;i<NumOfStu;i++)
{
scanf("%s %d %f" , &St.name , &St.age , &St.gpa );
WriteFile(f , (LPCVOID)&St , sizeof(struct Student) , &actual , NULL);
}
CloseHandle(f);
int c;
do
{
printf("1- To Display all students in the file Enter 1\n2- Display the information of a student given by its index (0, 1, 2) Enter 2\n");
printf("3- Search for a student by name Enter 3\n4- Exit the program Enter 4\n");
scanf("%d" , &c);
if(c==1)
{
HANDLE F1 = CreateFile(L"d:\\SPR2.txt" , GENERIC_READ , 0 , NULL , OPEN_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL);
DWORD ac;
struct Student buffer[1];
while(true)
{
ReadFile(F1 , buffer , 20 , &ac , NULL);
if(ac < 20)
break;
else
printf("%s\t" , buffer);
}
}
}
while(c!=4);
return 0;
}
This is my code ,so if any one can tell me how can i just read names ,and if there is a better way to write my code please let me know . | c | winapi | file-io | null | null | 03/30/2012 15:52:59 | too localized | I need to write on a file student info and read only names?
===
I'm here writing on a text file Name ,age and GPA of student and then i want to read only student name ,and I'm trying to do so all info show up ,i just need to get just names without age or GPA
#include<stdio.h>
#include<Windows.h>
#include<tchar.h>
struct Student {
WCHAR name[20];
int age;
float gpa;
};
int _tmain(int argc , _TCHAR* argv[])
{
int NumOfStu=0;
Student St;
printf("Please enter number of students\n");
scanf("%d" , &NumOfStu);
HANDLE f = CreateFile(L"d:\\SPR2.txt" , GENERIC_WRITE , 0 , NULL , CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL);
if(f == INVALID_HANDLE_VALUE)
{
printf("Could not Create The File\n");
return 0;
}
printf("Please Enter details of the Sutdents in the Following sequence: Name Age GPA\n");
DWORD actual;
for(int i=0 ;i<NumOfStu;i++)
{
scanf("%s %d %f" , &St.name , &St.age , &St.gpa );
WriteFile(f , (LPCVOID)&St , sizeof(struct Student) , &actual , NULL);
}
CloseHandle(f);
int c;
do
{
printf("1- To Display all students in the file Enter 1\n2- Display the information of a student given by its index (0, 1, 2) Enter 2\n");
printf("3- Search for a student by name Enter 3\n4- Exit the program Enter 4\n");
scanf("%d" , &c);
if(c==1)
{
HANDLE F1 = CreateFile(L"d:\\SPR2.txt" , GENERIC_READ , 0 , NULL , OPEN_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL);
DWORD ac;
struct Student buffer[1];
while(true)
{
ReadFile(F1 , buffer , 20 , &ac , NULL);
if(ac < 20)
break;
else
printf("%s\t" , buffer);
}
}
}
while(c!=4);
return 0;
}
This is my code ,so if any one can tell me how can i just read names ,and if there is a better way to write my code please let me know . | 3 |
6,472,534 | 06/24/2011 19:01:18 | 720,075 | 04/22/2011 05:07:53 | 13 | 0 | To what extent can buying/selling shares be computerised? | Out of interest, how far can buying and selling shares be made automatic? How far do you think it can go? And what would you need to do it? | scripting | null | null | null | null | 06/24/2011 19:31:06 | off topic | To what extent can buying/selling shares be computerised?
===
Out of interest, how far can buying and selling shares be made automatic? How far do you think it can go? And what would you need to do it? | 2 |
4,700,262 | 01/15/2011 15:06:54 | 378,183 | 06/28/2010 15:50:07 | 757 | 16 | How do I make a single WordPress installation seem to power two sites? | I'd like to set up a single WordPress installation at `siteA.com` with 2 static pages and a blog. I have two domain names and I would like to set it up so that `siteA.com` shows page 1 as its home page, and `siteB.com` would show page 2 as the homepage. **Both sites would share the blog contents.**
Since the Wordpress installation resides at site A, how can I create a seamless experience for the user who visits site B?
Say they type in `http://siteB.com/`. What should I do to show page 1 at this address? PHP include? Redirect? Mess with `.htaccess`?
| php | wordpress | .htaccess | null | null | null | open | How do I make a single WordPress installation seem to power two sites?
===
I'd like to set up a single WordPress installation at `siteA.com` with 2 static pages and a blog. I have two domain names and I would like to set it up so that `siteA.com` shows page 1 as its home page, and `siteB.com` would show page 2 as the homepage. **Both sites would share the blog contents.**
Since the Wordpress installation resides at site A, how can I create a seamless experience for the user who visits site B?
Say they type in `http://siteB.com/`. What should I do to show page 1 at this address? PHP include? Redirect? Mess with `.htaccess`?
| 0 |
9,601,516 | 03/07/2012 12:27:53 | 560,065 | 01/02/2011 00:34:42 | 265 | 3 | Installing Perl DateTime | When installing DateTime for Perl I get the following errors and it fails;
# Failed test 'Make sure we can add 50 years worth of years in America/New_York time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of days in America/Chicago time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of minutes in America/Denver time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of seconds in America/Los_Angeles time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of nanoseconds in America/North_Dakota/Center time zone'
# at t/30future-tz.t line 45.
The full output is quite long so I have pasted it here: http://pastebin.com/raw.php?i=JiJeH4ij
I'm new to Perl modules and thusly, completely lost. What's going on here? | perl | perl-module | null | null | null | null | open | Installing Perl DateTime
===
When installing DateTime for Perl I get the following errors and it fails;
# Failed test 'Make sure we can add 50 years worth of years in America/New_York time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of days in America/Chicago time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of minutes in America/Denver time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of seconds in America/Los_Angeles time zone'
# at t/30future-tz.t line 45.
Use of uninitialized value in numeric ge (>=) at /home/bensley/.cpan/build/DateTime-0.72/blib/lib/DateTime.pm line 138.
# Failed test 'Make sure we can add 50 years worth of nanoseconds in America/North_Dakota/Center time zone'
# at t/30future-tz.t line 45.
The full output is quite long so I have pasted it here: http://pastebin.com/raw.php?i=JiJeH4ij
I'm new to Perl modules and thusly, completely lost. What's going on here? | 0 |
7,787,762 | 10/16/2011 22:22:37 | 638,036 | 02/28/2011 16:36:14 | 752 | 57 | String literal token generates MismatchedTokenException with escape sequence token | I am currently trying to implement an Antlr parser.<br/>
I obtain strange MismatchedTokenException in a token that identifies string literals once I add escape sequence support.
Following is the Antlr parser example that causes the issue:
rule: STRING_LITERAL ;
STRING_LITERAL
:
'"' STRING_GUTS '"'
;
fragment
STRING_GUTS
:
( ESC | ~('\\' | '"') )*
;
ESC
:
'\\'
( '\\' | '"' )
;
Do you seen any issue in this code?
Note that if I remove ESC from the STRING_GUTS, the string parsing is working well... | antlr | antlr3 | null | null | null | null | open | String literal token generates MismatchedTokenException with escape sequence token
===
I am currently trying to implement an Antlr parser.<br/>
I obtain strange MismatchedTokenException in a token that identifies string literals once I add escape sequence support.
Following is the Antlr parser example that causes the issue:
rule: STRING_LITERAL ;
STRING_LITERAL
:
'"' STRING_GUTS '"'
;
fragment
STRING_GUTS
:
( ESC | ~('\\' | '"') )*
;
ESC
:
'\\'
( '\\' | '"' )
;
Do you seen any issue in this code?
Note that if I remove ESC from the STRING_GUTS, the string parsing is working well... | 0 |
5,683,565 | 04/16/2011 00:18:56 | 209,432 | 11/12/2009 09:25:12 | 48 | 1 | Scp from iPad (or alternative) | I want to scp photos from my iPad to my server. I use MobileTerminal but ssh nor scp seem to be valid commands :S Guess it's not inatalled. Is there any way to install scp or a alternative that works like scp?
I don't have FTP on my server and I need to send large amounts of photos.
Thanks in advance! | ipad | scp | null | null | null | 04/16/2011 14:44:10 | off topic | Scp from iPad (or alternative)
===
I want to scp photos from my iPad to my server. I use MobileTerminal but ssh nor scp seem to be valid commands :S Guess it's not inatalled. Is there any way to install scp or a alternative that works like scp?
I don't have FTP on my server and I need to send large amounts of photos.
Thanks in advance! | 2 |
7,057,990 | 08/14/2011 16:09:49 | 585,101 | 01/21/2011 21:46:19 | 469 | 31 | form_tag not working as expected | I've added a method to my controller and routed it correctly but when I try to call it from a `form_tag` it give me a router error. What's going on?
<% form_tag search_item_path, :method => 'get' do %>
<%= text_field_tag :name , '' %>
<%= submit_tag "Submit" %>
<% end %>
routes:
resources :items do
collection do
get :search, :as => :search
end
end
rake routes also ok:
search_item GET /items/:id/search(.:format) {:action=>"search", :controller=>"items"}
items GET /items(.:format) {:action=>"index", :controller=>"items"}
POST /items(.:format) {:action=>"create", :controller=>"items"}
new_item GET /items/new(.:format) {:action=>"new", :controller=>"items"}
edit_item GET /items/:id/edit(.:format) {:action=>"edit", :controller=>"items"}
item GET /items/:id(.:format) {:action=>"show", :controller=>"items"}
PUT /items/:id(.:format) {:action=>"update", :controller=>"items"}
DELETE /items/:id(.:format) {:action=>"destroy", :controller=>"items
However, if I write something like this works:
<% form_tag url_for(:controller => "items" , :action => "search"), :method => "get" do %>
What am I missing here? | ruby-on-rails | ruby-on-rails-3 | routes | null | null | null | open | form_tag not working as expected
===
I've added a method to my controller and routed it correctly but when I try to call it from a `form_tag` it give me a router error. What's going on?
<% form_tag search_item_path, :method => 'get' do %>
<%= text_field_tag :name , '' %>
<%= submit_tag "Submit" %>
<% end %>
routes:
resources :items do
collection do
get :search, :as => :search
end
end
rake routes also ok:
search_item GET /items/:id/search(.:format) {:action=>"search", :controller=>"items"}
items GET /items(.:format) {:action=>"index", :controller=>"items"}
POST /items(.:format) {:action=>"create", :controller=>"items"}
new_item GET /items/new(.:format) {:action=>"new", :controller=>"items"}
edit_item GET /items/:id/edit(.:format) {:action=>"edit", :controller=>"items"}
item GET /items/:id(.:format) {:action=>"show", :controller=>"items"}
PUT /items/:id(.:format) {:action=>"update", :controller=>"items"}
DELETE /items/:id(.:format) {:action=>"destroy", :controller=>"items
However, if I write something like this works:
<% form_tag url_for(:controller => "items" , :action => "search"), :method => "get" do %>
What am I missing here? | 0 |
10,239,455 | 04/20/2012 02:31:25 | 1,100,624 | 12/15/2011 19:29:45 | 11 | 1 | Advice on which technologies to use for a client-server desktop application | I am writing a desktop application in Java which will allow clients to authenticate to a server with their credentials, and afterwards view and manipulate some data (orders, invoices, employees etc.) stored on the server.
I have decided to use Java to write the client, with SWT for the GUI. However, since I haven't previously worked on any large Java projects, I am not sure what technologies to use to make my job easier in writing the server.
The server application will be a frontend for an internal RDBMS, allowing the successfully-authenticated clients to perform various operations on the data the user has permission to work on (not all users have the same role). This will, in simpler terms, work in a similar fashion to a multiuser RDBMS where each database user is only allowed to execute certain stored procedures and nothing more.
I would like to have to deal as little as possible with serialization, duplicated code, writing my own protocol for client-server communication, hand-written object-relational mapping etc.
It would be nice to be able to have some data bindings between models and GUI and to abstractize away the networking (by some form of RPC, I imagine).
The first question to be asked is whether the protocol would be stateful or stateless, but I assume stateless is better (providing the user with some session id after successfully authenticating). The next question is what technologies/protocols/libraries should I use? RPC or something else? SOAP, something else over HTTP, not HTTP? I realize this is somewhat a matter of preference, but I'm not really aware of what options I have. I am interested in what's commonly used in the Java world etc.
I would probably also need some way of sharing the model classes' definition (to avoid code duplication) across the client and the server. The client would bind the models to the view and propagate the changes to the server (serializing the model before sending it probably). The server would then deserialize the model object and push it onto the database via some object-relational mapper. Of course, that's oversimplified and is just the way I imagine it would work, but I'm open to any suggestions.
My initial impulse was to use Python for the server, because that would make things more interesting for me (plus I have more experience). However, I'm thinking that going in this direction might over-complicate things. It's probably easier to write some model class and use it in both the client and the server than write it once in Python and once in Java and make sure to never forget to sync the changes (but then again, I might be able to use some common format to describe the model and then have it generate code in both Java and Python; I think ASN.1 does something like that). Do you think I can do this using a Python server without too much time wasted caused by the fact that the client is Java?
Thank you for taking your time to read this. All of your suggestions are appreciated. | java | python | rest | soap | technologies | 04/20/2012 04:19:21 | not constructive | Advice on which technologies to use for a client-server desktop application
===
I am writing a desktop application in Java which will allow clients to authenticate to a server with their credentials, and afterwards view and manipulate some data (orders, invoices, employees etc.) stored on the server.
I have decided to use Java to write the client, with SWT for the GUI. However, since I haven't previously worked on any large Java projects, I am not sure what technologies to use to make my job easier in writing the server.
The server application will be a frontend for an internal RDBMS, allowing the successfully-authenticated clients to perform various operations on the data the user has permission to work on (not all users have the same role). This will, in simpler terms, work in a similar fashion to a multiuser RDBMS where each database user is only allowed to execute certain stored procedures and nothing more.
I would like to have to deal as little as possible with serialization, duplicated code, writing my own protocol for client-server communication, hand-written object-relational mapping etc.
It would be nice to be able to have some data bindings between models and GUI and to abstractize away the networking (by some form of RPC, I imagine).
The first question to be asked is whether the protocol would be stateful or stateless, but I assume stateless is better (providing the user with some session id after successfully authenticating). The next question is what technologies/protocols/libraries should I use? RPC or something else? SOAP, something else over HTTP, not HTTP? I realize this is somewhat a matter of preference, but I'm not really aware of what options I have. I am interested in what's commonly used in the Java world etc.
I would probably also need some way of sharing the model classes' definition (to avoid code duplication) across the client and the server. The client would bind the models to the view and propagate the changes to the server (serializing the model before sending it probably). The server would then deserialize the model object and push it onto the database via some object-relational mapper. Of course, that's oversimplified and is just the way I imagine it would work, but I'm open to any suggestions.
My initial impulse was to use Python for the server, because that would make things more interesting for me (plus I have more experience). However, I'm thinking that going in this direction might over-complicate things. It's probably easier to write some model class and use it in both the client and the server than write it once in Python and once in Java and make sure to never forget to sync the changes (but then again, I might be able to use some common format to describe the model and then have it generate code in both Java and Python; I think ASN.1 does something like that). Do you think I can do this using a Python server without too much time wasted caused by the fact that the client is Java?
Thank you for taking your time to read this. All of your suggestions are appreciated. | 4 |
6,910,295 | 08/02/2011 10:00:32 | 864,866 | 07/27/2011 07:20:33 | 28 | 0 | Want to create a super-modern interface in HTML5 | i would like to create an app for my company to handle internal workflow documentation, that need to be approved from several levels with a fresh and modern interface.
I NEED to make a stunning interface and i'm trying to find something different to the classic (and maybe *old* jqueryUI); i would like to use html5 but would like to find some modern framework for it.
Can anyone help me in finding the right components? | html5 | user-interface | null | null | null | 08/02/2011 10:44:28 | not a real question | Want to create a super-modern interface in HTML5
===
i would like to create an app for my company to handle internal workflow documentation, that need to be approved from several levels with a fresh and modern interface.
I NEED to make a stunning interface and i'm trying to find something different to the classic (and maybe *old* jqueryUI); i would like to use html5 but would like to find some modern framework for it.
Can anyone help me in finding the right components? | 1 |
11,044,121 | 06/15/2012 03:09:26 | 1,051,745 | 11/17/2011 12:08:27 | 6 | 0 | Dynamic Form Generation Via PHP MYSQL | I have a form with dynamic input fields . Admin can add /delete/edit additional form fields to form (from backed). so if a any changes done to form->input element that element will be rendered with changes .
I managed to generate forms with using numbering . that means each input->name data will stored in one table(input_name) and the corresponding values (input->value) will be in another another table (input_val) referencing the above (foreign key).
so after user submit the form my post data will be like
input_name.id=input_val.id&input_name.id=input_val.id&input_name.id=input_val.id
eg:2=8&7=6&5=1
I can map and then assign values instead of numbers
what I want to know what is;
1. what is the best way to iterate through this result and assign values ..
(i did this by selecting all the data from both tables and assign values for numbers , but i want to is there any other optimize way to do this ?)
2. the best way to validate this data in form process (basically to chk if the data is null or not ,etc.)
3. best way to write this data to db
I use php+mysql.
any help would be much appreciated !
thanks ! | php | mysql | dynamic-data | dynamic-forms | null | 06/16/2012 02:58:47 | not a real question | Dynamic Form Generation Via PHP MYSQL
===
I have a form with dynamic input fields . Admin can add /delete/edit additional form fields to form (from backed). so if a any changes done to form->input element that element will be rendered with changes .
I managed to generate forms with using numbering . that means each input->name data will stored in one table(input_name) and the corresponding values (input->value) will be in another another table (input_val) referencing the above (foreign key).
so after user submit the form my post data will be like
input_name.id=input_val.id&input_name.id=input_val.id&input_name.id=input_val.id
eg:2=8&7=6&5=1
I can map and then assign values instead of numbers
what I want to know what is;
1. what is the best way to iterate through this result and assign values ..
(i did this by selecting all the data from both tables and assign values for numbers , but i want to is there any other optimize way to do this ?)
2. the best way to validate this data in form process (basically to chk if the data is null or not ,etc.)
3. best way to write this data to db
I use php+mysql.
any help would be much appreciated !
thanks ! | 1 |
10,154,595 | 04/14/2012 15:04:54 | 902,207 | 08/19/2011 09:57:20 | 239 | 14 | Using a variable in a selector in LESS | I have a variable `@index` and I want to output a selector so that when `@index` is `3`, the selector is `[data-sth="3"]`.
Longer example:
@index: 3;
/* selector here */ {
color: red;
}
Desired output:
[data-sth="3"] {
color: red;
}
I've tried a few things, but haven't managed to get anything that works, yet.
Thanks. | less | null | null | null | null | null | open | Using a variable in a selector in LESS
===
I have a variable `@index` and I want to output a selector so that when `@index` is `3`, the selector is `[data-sth="3"]`.
Longer example:
@index: 3;
/* selector here */ {
color: red;
}
Desired output:
[data-sth="3"] {
color: red;
}
I've tried a few things, but haven't managed to get anything that works, yet.
Thanks. | 0 |
7,306,076 | 09/05/2011 09:17:46 | 928,294 | 09/05/2011 05:39:21 | 1 | 3 | What is this error means? | when i am trying to access a fanpage like this
http://www.facebook.com/dialog/oauth?%20%20%20%20client_id=MY_APP_ID&redirect_uri=/FANSITE_ADDRESS&display=wap
I GOT THIS ERROR !
**FACEBOOK**
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
« Back to Home**
here MY_APP_ID = is our application id &
FANSITE_ADDRESS = client web page. (Sorry because of privacy issues i cant use them here) | facebook | page | web | null | null | 09/05/2011 22:30:13 | off topic | What is this error means?
===
when i am trying to access a fanpage like this
http://www.facebook.com/dialog/oauth?%20%20%20%20client_id=MY_APP_ID&redirect_uri=/FANSITE_ADDRESS&display=wap
I GOT THIS ERROR !
**FACEBOOK**
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
« Back to Home**
here MY_APP_ID = is our application id &
FANSITE_ADDRESS = client web page. (Sorry because of privacy issues i cant use them here) | 2 |
10,438,727 | 05/03/2012 20:18:00 | 944,247 | 09/14/2011 09:16:27 | 12 | 1 | what is assembly? In vs in 1 project i see 1 assembly.info file. Can i say 1 project=1 assembly? | I read many theoritical definitions on assembly. But i m not clear finally what actually is assembly in dotnet. | c# | .net | null | null | null | 05/03/2012 20:21:51 | not a real question | what is assembly? In vs in 1 project i see 1 assembly.info file. Can i say 1 project=1 assembly?
===
I read many theoritical definitions on assembly. But i m not clear finally what actually is assembly in dotnet. | 1 |
7,741,619 | 10/12/2011 14:25:28 | 125,857 | 06/19/2009 16:52:42 | 949 | 3 | How to make imported functions have same param order as the SP? | WIth EF 4.0, any Stored Procedure can be imported as function in edmx. When I imported sp, the function has different parameter order as orginal SP has.
How to enforce imported function have same parameter order as orginal SP has? | entity-framework | entity-framework-4 | entity-framework-4.1 | null | null | null | open | How to make imported functions have same param order as the SP?
===
WIth EF 4.0, any Stored Procedure can be imported as function in edmx. When I imported sp, the function has different parameter order as orginal SP has.
How to enforce imported function have same parameter order as orginal SP has? | 0 |
9,281,251 | 02/14/2012 17:18:10 | 669,153 | 03/21/2011 09:27:52 | 288 | 17 | reopen model dialog jquery | Hi<br/>I have a modal dialog what open when the document is ready.<br/>When I close it, I have this error `Object doesn't support property or method 'dialog'` at `$("#dialog").dialog('close');` and I can't reopen it.
$("#info").find(".openImg").click(function() {
$("#dialog").load("/Ajax.htm", function() {
$("#dialog").dialog("destroy");
$("#dialog").dialog({
autoOpen : false,
modal: true,
height : 300,
width : 300,
title : "Title",
close : function(event, ui) { $("#dialog").dialog('close'); }
});
$("#dialog").prepend("<p>Some text</p>");
$("#dialog").dialog("open");
});
});
What the solution? | jquery | html | null | null | null | 02/15/2012 16:24:48 | too localized | reopen model dialog jquery
===
Hi<br/>I have a modal dialog what open when the document is ready.<br/>When I close it, I have this error `Object doesn't support property or method 'dialog'` at `$("#dialog").dialog('close');` and I can't reopen it.
$("#info").find(".openImg").click(function() {
$("#dialog").load("/Ajax.htm", function() {
$("#dialog").dialog("destroy");
$("#dialog").dialog({
autoOpen : false,
modal: true,
height : 300,
width : 300,
title : "Title",
close : function(event, ui) { $("#dialog").dialog('close'); }
});
$("#dialog").prepend("<p>Some text</p>");
$("#dialog").dialog("open");
});
});
What the solution? | 3 |
8,475,770 | 12/12/2011 14:23:13 | 711,628 | 04/16/2011 22:38:34 | 21 | 1 | Wpf MessageBox taskbar visiblity issue | Good day.
I have WPF application, which, in some situations, may show MessageBox before the MainWindow is inited and it must be visible in taskbar. I can't set owner to MainWindow, because it is not ready. Could somebody help? Many thanks | c# | wpf | .net-4.0 | messagebox | null | 12/12/2011 17:22:51 | not a real question | Wpf MessageBox taskbar visiblity issue
===
Good day.
I have WPF application, which, in some situations, may show MessageBox before the MainWindow is inited and it must be visible in taskbar. I can't set owner to MainWindow, because it is not ready. Could somebody help? Many thanks | 1 |
11,339,122 | 07/05/2012 06:49:40 | 1,350,602 | 04/23/2012 06:03:14 | 15 | 0 | What is "impression" and "request" mean in admob? |
I cannot find the definition of these 2 terms, what exactly they mean? I know I will get credit if the user "click" the ads. But what about "impression" and "request"? | android | admob | null | null | null | 07/05/2012 14:40:07 | off topic | What is "impression" and "request" mean in admob?
===
I cannot find the definition of these 2 terms, what exactly they mean? I know I will get credit if the user "click" the ads. But what about "impression" and "request"? | 2 |
11,201,479 | 06/26/2012 05:56:56 | 1,411,084 | 05/22/2012 19:37:17 | 1 | 0 | read logcats at every run | I want to read logcat , but there is aa problem , most of source codes are available are designed to load logs manulay , I want some thing like build in Eclipse Logcat reader that loads logs automatically .
I do not want use timer to load logs at , I need it when logs changed .
is there ?
| android | null | null | null | null | 06/27/2012 11:48:02 | not a real question | read logcats at every run
===
I want to read logcat , but there is aa problem , most of source codes are available are designed to load logs manulay , I want some thing like build in Eclipse Logcat reader that loads logs automatically .
I do not want use timer to load logs at , I need it when logs changed .
is there ?
| 1 |
5,256,355 | 03/10/2011 06:41:30 | 653,006 | 03/10/2011 06:34:18 | 1 | 0 | php drop down list | i’m new to codeigniter and i’m working on a project. i have to create a dynamic drop down menu with values from my database, when a selection is made in the drop down as soon as you click on the submit button a new page has to occur where all the cities associated with the province selected in the drop menu appear, the cities are also in my database .My database consists of an id field, province field and a cities field.The drop menu is fine but cant seem to make the cities appear in the next page. your help will be highly appreciated
| php-frameworks | null | null | null | null | null | open | php drop down list
===
i’m new to codeigniter and i’m working on a project. i have to create a dynamic drop down menu with values from my database, when a selection is made in the drop down as soon as you click on the submit button a new page has to occur where all the cities associated with the province selected in the drop menu appear, the cities are also in my database .My database consists of an id field, province field and a cities field.The drop menu is fine but cant seem to make the cities appear in the next page. your help will be highly appreciated
| 0 |
5,465,678 | 03/28/2011 22:13:30 | 681,023 | 03/28/2011 22:00:15 | 1 | 0 | how do i create a li k from 1 module to another in java??? | heyy guys , I just created a server-client program and a login page in "java" but now am not able to connect or link those two modules !!!
if u enter username and password correctly it has to load the server-client program but in my case login stuff and that server-client program is working properly but they both are not working together :( | java | login | connection | client | null | 03/29/2011 00:42:44 | not a real question | how do i create a li k from 1 module to another in java???
===
heyy guys , I just created a server-client program and a login page in "java" but now am not able to connect or link those two modules !!!
if u enter username and password correctly it has to load the server-client program but in my case login stuff and that server-client program is working properly but they both are not working together :( | 1 |
7,370,863 | 09/10/2011 09:34:59 | 137,328 | 07/13/2009 10:18:37 | 86 | 0 | problem using Data paginator in icefaces | I have been trying to populate data from a csv file in ice:datatable. I am trying to bind the datatable to a data paginator to display 10 rows on each page.But when I click on other page numbers of paginator,it encounters the following exception
java.lang.IllegalArgumentException: -10
at javax.faces.component.UIData.setFirst(UIData.java:275)
at com.icesoft.faces.component.datapaginator.DataPaginator.broadcast(DataPaginator.java:160)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source) | icefaces | null | null | null | null | null | open | problem using Data paginator in icefaces
===
I have been trying to populate data from a csv file in ice:datatable. I am trying to bind the datatable to a data paginator to display 10 rows on each page.But when I click on other page numbers of paginator,it encounters the following exception
java.lang.IllegalArgumentException: -10
at javax.faces.component.UIData.setFirst(UIData.java:275)
at com.icesoft.faces.component.datapaginator.DataPaginator.broadcast(DataPaginator.java:160)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source) | 0 |
7,738,526 | 10/12/2011 10:19:23 | 988,670 | 10/11/2011 01:43:29 | 4 | 0 | sql query to display employees with the same sally and commission | hey guy im not that good at sql so need some help
the question is
DISPLAY THE NAME,DEPARTMENT NAME AND SALARY OF ANY EMPLOYEE WHOSE SALARY AND COMMISSION(BOTH) MATCH THE SALARY AND COMMISSION OF ANY EMPLOYEE LOCATED IN DALLAS. INCLUDE EMPLOYEES WORKING IN DALLAS IN YOUR RESULT.
this is my code so far which comes up empty
select e.ename,d.dname,e.sal
from dept d,emp e
WHERE (e.comm ,e.sal)IN (select e.comm,e.sal
from dept d,emp e
where d.loc = 'Dallas')
the actual answer should be
ENAME DNAME SAL
---------- -------------- ----------
SMITH RESEARCH 800
ADAMS RESEARCH 1100
JONES RESEARCH 2975
FORD RESEARCH 3000
SCOTT RESEARCH 3000
thanks guys | sql | query | null | null | null | 10/12/2011 20:05:38 | too localized | sql query to display employees with the same sally and commission
===
hey guy im not that good at sql so need some help
the question is
DISPLAY THE NAME,DEPARTMENT NAME AND SALARY OF ANY EMPLOYEE WHOSE SALARY AND COMMISSION(BOTH) MATCH THE SALARY AND COMMISSION OF ANY EMPLOYEE LOCATED IN DALLAS. INCLUDE EMPLOYEES WORKING IN DALLAS IN YOUR RESULT.
this is my code so far which comes up empty
select e.ename,d.dname,e.sal
from dept d,emp e
WHERE (e.comm ,e.sal)IN (select e.comm,e.sal
from dept d,emp e
where d.loc = 'Dallas')
the actual answer should be
ENAME DNAME SAL
---------- -------------- ----------
SMITH RESEARCH 800
ADAMS RESEARCH 1100
JONES RESEARCH 2975
FORD RESEARCH 3000
SCOTT RESEARCH 3000
thanks guys | 3 |
11,740,713 | 07/31/2012 13:01:37 | 1,183,113 | 02/01/2012 16:00:19 | 60 | 7 | jquery ui popup MVC 3 not firing | Developing an ASP.NET MVC 3 application (my first) and running into some trouble with jQuery, as I've never used it before. I'm trying to open up details for a particular search result in a modal dialog.
relevant razor code:
@foreach (var item in Model.claims)
{
<tr>
<td>@Html.ActionLink(item.CLAIMMASTID.Substring(Math.Max(0,item.CLAIMMASTID.Length-1)), "ClaimDetail", new {@id=item.CLAIMMASTID}, new {@class="ClaimsDetail"})</td>
</tr>
}
And the controller has that set up to display a partial view:
public ActionResult ClaimDetail()
{
return PartialView("_ClaimDetail");
}
All good so far, yes? That's what I think. So my jQuery script looks as such, and it's where I think the problem lies:
$(function () {
$('#ClaimsDialog').dialog({
autoOpen: false,
width: 800,
resizable: true,
modal: true
});
$('.ClaimsDetail').live("click", function () {
var target = $(this).attr('href');
$.get(target, function (result) {
('#ClaimsDialog').html(result);
('#ClaimsDialog').dialog({
});
});
return false;
}); | jquery | asp.net-mvc-3 | razor | null | null | null | open | jquery ui popup MVC 3 not firing
===
Developing an ASP.NET MVC 3 application (my first) and running into some trouble with jQuery, as I've never used it before. I'm trying to open up details for a particular search result in a modal dialog.
relevant razor code:
@foreach (var item in Model.claims)
{
<tr>
<td>@Html.ActionLink(item.CLAIMMASTID.Substring(Math.Max(0,item.CLAIMMASTID.Length-1)), "ClaimDetail", new {@id=item.CLAIMMASTID}, new {@class="ClaimsDetail"})</td>
</tr>
}
And the controller has that set up to display a partial view:
public ActionResult ClaimDetail()
{
return PartialView("_ClaimDetail");
}
All good so far, yes? That's what I think. So my jQuery script looks as such, and it's where I think the problem lies:
$(function () {
$('#ClaimsDialog').dialog({
autoOpen: false,
width: 800,
resizable: true,
modal: true
});
$('.ClaimsDetail').live("click", function () {
var target = $(this).attr('href');
$.get(target, function (result) {
('#ClaimsDialog').html(result);
('#ClaimsDialog').dialog({
});
});
return false;
}); | 0 |
1,998,166 | 01/04/2010 08:16:03 | 243,049 | 01/04/2010 08:16:03 | 1 | 0 | What next in the career map for a Lead QA Engineer | I am a Lead QA Engineer in a Software company and at a stage in my career wherein i need to plan my next move.
Option 1: The very obvious move would be to stay as a QA Lead and eventually become a QA Manager. But i don't see very good prospects/future after that. Or am i wrong?
Option 2: I love programming/coding, though i haven't spent a whole lot of time on that. So a direct move to becoming a Software Developer is not possible. Will moving to Test Automation eventually lead me to development. Even so, am i looking at step-down in pay and career-level.
Option 3: Moving to Product Management. Is this even possible and if so what would be the best approach.
Appreciate all your responses in advance. Thanks.
| qa | career | development | null | null | 02/02/2012 08:38:46 | not constructive | What next in the career map for a Lead QA Engineer
===
I am a Lead QA Engineer in a Software company and at a stage in my career wherein i need to plan my next move.
Option 1: The very obvious move would be to stay as a QA Lead and eventually become a QA Manager. But i don't see very good prospects/future after that. Or am i wrong?
Option 2: I love programming/coding, though i haven't spent a whole lot of time on that. So a direct move to becoming a Software Developer is not possible. Will moving to Test Automation eventually lead me to development. Even so, am i looking at step-down in pay and career-level.
Option 3: Moving to Product Management. Is this even possible and if so what would be the best approach.
Appreciate all your responses in advance. Thanks.
| 4 |
2,050,281 | 01/12/2010 16:03:28 | 101,152 | 05/04/2009 21:23:56 | 408 | 6 | Some really ugly C macro | I need some really ugly C macro (as an example, not to any real project), that does some simple thing (like adding one, for example) really hard and unreadable way.
Anyone has some idea? | c | macros | null | null | null | 01/12/2010 16:20:02 | not a real question | Some really ugly C macro
===
I need some really ugly C macro (as an example, not to any real project), that does some simple thing (like adding one, for example) really hard and unreadable way.
Anyone has some idea? | 1 |
8,684,609 | 12/30/2011 22:20:06 | 621,338 | 02/17/2011 12:03:19 | 1,077 | 62 | Dude, where's my php.ini? | So a few years ago I installed apache 2.2x and php 5.3.1 on a Linux server I maintain. I used .tar.gz's and built them as instructed (instead of rpms and what-have-you). And all was fine.
Today I need to install this http://us2.php.net/ibm_db2 which seems like a php library. I went through all the steps up to make install, and I find ibm_db2.so in $PHP_HOME/lib/extensions/somecomplicatedname/ibm_db2.so
The great catch is the last step is to configure php.ini but there is NO php.ini on my system. Horror of horrors. php works fine, except of course for this new-fangled ibm_db2 thingamagic that I want to use so somebody can use a GUI to tinker with DB2. (I tried a small php script which fails and indicates that the ibm_db2 functions are not available).
I have to deal with PHP once every few years, so please enlighten me at a very basic level about what I could do to enable web-based GUI access to DB2. Thank you in advance! | php | linux | php5 | db2 | db2-luw | null | open | Dude, where's my php.ini?
===
So a few years ago I installed apache 2.2x and php 5.3.1 on a Linux server I maintain. I used .tar.gz's and built them as instructed (instead of rpms and what-have-you). And all was fine.
Today I need to install this http://us2.php.net/ibm_db2 which seems like a php library. I went through all the steps up to make install, and I find ibm_db2.so in $PHP_HOME/lib/extensions/somecomplicatedname/ibm_db2.so
The great catch is the last step is to configure php.ini but there is NO php.ini on my system. Horror of horrors. php works fine, except of course for this new-fangled ibm_db2 thingamagic that I want to use so somebody can use a GUI to tinker with DB2. (I tried a small php script which fails and indicates that the ibm_db2 functions are not available).
I have to deal with PHP once every few years, so please enlighten me at a very basic level about what I could do to enable web-based GUI access to DB2. Thank you in advance! | 0 |
5,707,214 | 04/18/2011 18:29:17 | 713,899 | 04/18/2011 17:58:49 | 1 | 0 | Manipulating data in a Microsoft Access table | I have a large database of client details, and I need to generate a totally new field of data based on a single other field. It would be a simple IF..THEN deal.
Example:
The source field has data that looks like this "BAR DIN" (Barrie Dinners) and I need to fill a new field with "Dinners".
From what I understand, Data Macros are the right way to do this, but I'd prefer not to buy Access 2010. There should be a way to do this with normal macros. This update only needs to be done once a year and can be done manually. I mostly looking for a way to avoid having to enter all that data manually for each customer. | ms-access | macros | datatable | null | null | null | open | Manipulating data in a Microsoft Access table
===
I have a large database of client details, and I need to generate a totally new field of data based on a single other field. It would be a simple IF..THEN deal.
Example:
The source field has data that looks like this "BAR DIN" (Barrie Dinners) and I need to fill a new field with "Dinners".
From what I understand, Data Macros are the right way to do this, but I'd prefer not to buy Access 2010. There should be a way to do this with normal macros. This update only needs to be done once a year and can be done manually. I mostly looking for a way to avoid having to enter all that data manually for each customer. | 0 |
9,826,806 | 03/22/2012 16:48:02 | 1,286,483 | 03/22/2012 16:41:18 | 1 | 0 | using recuresion tree to find upper bound guess, Algorithms | how can i find guess by using the recursion tree for this recursion
T(n)= 2 T(n^1/2) + O (lgn)
any help would be apreciated
| algorithm | null | null | null | null | 03/31/2012 19:04:50 | not a real question | using recuresion tree to find upper bound guess, Algorithms
===
how can i find guess by using the recursion tree for this recursion
T(n)= 2 T(n^1/2) + O (lgn)
any help would be apreciated
| 1 |
2,995,745 | 06/08/2010 08:28:09 | 235,973 | 12/21/2009 12:01:47 | 1 | 0 | Samsung i7500 Galaxy - speakers, calling problem after listening music | I've been listening music on my Samsung i7500 Galaxy with headset plugged to the device. After listening I've plugged headset out and now while I call to somebody I see there is a call on the device screen, but either me, either person whom I am calling to, doesn't hear the other person. While I plug headset again I can hear everything (on the headset), after another plug out problem still exist. Anybody know how to fix it?
I found this [solution][1], but it doesn't works in my case.
[1]: http://androidforums.com/samsung-i7500/41993-speakers-problem.html | android | call | speaker | android-hardware | null | 06/10/2011 09:33:34 | off topic | Samsung i7500 Galaxy - speakers, calling problem after listening music
===
I've been listening music on my Samsung i7500 Galaxy with headset plugged to the device. After listening I've plugged headset out and now while I call to somebody I see there is a call on the device screen, but either me, either person whom I am calling to, doesn't hear the other person. While I plug headset again I can hear everything (on the headset), after another plug out problem still exist. Anybody know how to fix it?
I found this [solution][1], but it doesn't works in my case.
[1]: http://androidforums.com/samsung-i7500/41993-speakers-problem.html | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.