PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 30k | Tag1 stringlengths 1 25 ⌀ | Tag2 stringlengths 1 25 ⌀ | Tag3 stringlengths 1 25 ⌀ | Tag4 stringlengths 1 25 ⌀ | Tag5 stringlengths 1 25 ⌀ | PostClosedDate stringlengths 19 19 ⌀ | OpenStatus stringclasses 5 values | unified_texts stringlengths 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,085,297 | 04/10/2012 08:14:19 | 901,007 | 08/18/2011 16:21:04 | 52 | 5 | submitting a form and a jquery datatable (master and detail) | I have a form and a jquery datatable. The datatable is the detail while the other form elements are a master in the MySQL DB. Now I want to save this information into the DB and I hav no idea. | php | jquery | mysql | datatables | null | 04/11/2012 14:36:02 | not a real question | submitting a form and a jquery datatable (master and detail)
===
I have a form and a jquery datatable. The datatable is the detail while the other form elements are a master in the MySQL DB. Now I want to save this information into the DB and I hav no idea. | 1 |
1,292,153 | 08/18/2009 06:35:00 | 78,374 | 02/09/2009 12:19:02 | 5,013 | 248 | Where to find volunteers for an opensource project ? | The usual question being asked is: "I am cool and I want to provide my skills for an opensource project. Where do I find it?" Example:
http://stackoverflow.com/questions/1188982/what-is-the-best-way-to-find-a-open-source-project-to-volunteer-for-closed
However, I found no trace of the opposite question. Suppose I have a project plan, but I realize that is totally unrealistic just by myself. I need someone to help. Where should I look ?
I would like to point out that the "build it and they will come" approach never really worked in my experience. I seeded a number of software projects, but in the end collaborators either never came, or they came but never provided any help.
| recruitment | null | null | null | null | 05/01/2012 16:55:33 | off topic | Where to find volunteers for an opensource project ?
===
The usual question being asked is: "I am cool and I want to provide my skills for an opensource project. Where do I find it?" Example:
http://stackoverflow.com/questions/1188982/what-is-the-best-way-to-find-a-open-source-project-to-volunteer-for-closed
However, I found no trace of the opposite question. Suppose I have a project plan, but I realize that is totally unrealistic just by myself. I need someone to help. Where should I look ?
I would like to point out that the "build it and they will come" approach never really worked in my experience. I seeded a number of software projects, but in the end collaborators either never came, or they came but never provided any help.
| 2 |
5,312,446 | 03/15/2011 13:30:24 | 628,724 | 02/22/2011 17:00:38 | 16 | 0 | java/jsf tutorial | Can any one post the tutorial for jsf,i am following roseindia but it is not in full length. | jsf | null | null | null | null | 10/17/2011 12:29:03 | not constructive | java/jsf tutorial
===
Can any one post the tutorial for jsf,i am following roseindia but it is not in full length. | 4 |
6,443,145 | 06/22/2011 16:15:20 | 765,409 | 05/23/2011 03:58:39 | 85 | 2 | Debugging Python pygame being run through livewires | Python seems to completely ignore one of my objects - the games.Text object. Can't seem to understand why, syntax seems correct. Here's the code.
from livewires import games
#Creating and validating the pygame screen.
myscreen = games.Screen ()
#Loading an image into memory to create an image object
wall_image = games.load_image("wall.jpg", transparent = False)
myscreen.set_background(wall_image)
#Printing Arbitary Score
games.Text(screen = myscreen, x = 500, y = 30,
text = "Score: 1756521",
size = 50, color = color.black)
myscreen.mainloop() | python | debugging | pygame | livewires | null | null | open | Debugging Python pygame being run through livewires
===
Python seems to completely ignore one of my objects - the games.Text object. Can't seem to understand why, syntax seems correct. Here's the code.
from livewires import games
#Creating and validating the pygame screen.
myscreen = games.Screen ()
#Loading an image into memory to create an image object
wall_image = games.load_image("wall.jpg", transparent = False)
myscreen.set_background(wall_image)
#Printing Arbitary Score
games.Text(screen = myscreen, x = 500, y = 30,
text = "Score: 1756521",
size = 50, color = color.black)
myscreen.mainloop() | 0 |
5,094,595 | 02/23/2011 17:34:55 | 169,992 | 09/08/2009 06:08:26 | 5,799 | 147 | How do I Debug Memory Leaks, Infinite Loops, and Executing Javascript in the Browser? | What are the recommended ways to check for infinite loops in javascript in the browser? Say I open Chrome and it crashes, is there a way to breakpoint or somehow pinpoint where that occurred?
Then I'm wondering, how do I see a running list of the executing scripts in the browser (say some timer I lost track of is running and it's slowing things down)? Preferably in Chrome/Safari, but Firefox would work too.
I use the element inspector/console all the time, I just haven't figured out ways to effectively debug these 3 things.
Thanks! | javascript | debugging | null | null | null | null | open | How do I Debug Memory Leaks, Infinite Loops, and Executing Javascript in the Browser?
===
What are the recommended ways to check for infinite loops in javascript in the browser? Say I open Chrome and it crashes, is there a way to breakpoint or somehow pinpoint where that occurred?
Then I'm wondering, how do I see a running list of the executing scripts in the browser (say some timer I lost track of is running and it's slowing things down)? Preferably in Chrome/Safari, but Firefox would work too.
I use the element inspector/console all the time, I just haven't figured out ways to effectively debug these 3 things.
Thanks! | 0 |
9,300,516 | 02/15/2012 20:07:07 | 1,195,192 | 02/07/2012 16:41:53 | 8 | 0 | javascript date comparison negating timestamp value | What is the simplest way to compare two dates neglecting the timestamps. I have got two dates `firstDate` coming from the database (converted into javascript date) and `secondDate` coming from a date picker input field. <br />
Essentially for
my algorithm these two dates are equal as it doesn't take timestamp into consideration but the code wont consider it equal as `firstDate` has `01:00:00` in it. <br />
How to completely discard the timestamp for comparison?
firstDate:
Tue Mar 24 1992 01:00:00 GMT-0500 (Central Daylight Time)
secondDate:
Tue Mar 24 1992 00:00:00 GMT-0500 (Central Daylight Time)
Code:
if(firstDate < secondDate) {
alert("This alert shouldn't pop out as dates are equal");
}
| javascript | html | null | null | null | null | open | javascript date comparison negating timestamp value
===
What is the simplest way to compare two dates neglecting the timestamps. I have got two dates `firstDate` coming from the database (converted into javascript date) and `secondDate` coming from a date picker input field. <br />
Essentially for
my algorithm these two dates are equal as it doesn't take timestamp into consideration but the code wont consider it equal as `firstDate` has `01:00:00` in it. <br />
How to completely discard the timestamp for comparison?
firstDate:
Tue Mar 24 1992 01:00:00 GMT-0500 (Central Daylight Time)
secondDate:
Tue Mar 24 1992 00:00:00 GMT-0500 (Central Daylight Time)
Code:
if(firstDate < secondDate) {
alert("This alert shouldn't pop out as dates are equal");
}
| 0 |
10,210,599 | 04/18/2012 13:38:28 | 706,833 | 04/13/2011 21:00:12 | 3 | 1 | Sending mail without user knowledge in Windows Phone 7.1 | I'm trying to send a mail (with the content that I want, to the email address that I want) without user interaction or knowledge in Windows Phone 7.1 Mango. After some rechearch i come across that EmailComposeTask but it requires user interaction and a previous email configuration. After that, I though using sockets to connect to pop3 but System.Net.Sockets does not have the NetworkStream class. Is there some other way to make this connection without this class or something that can replace it or even other way to send a mail?
| sockets | windows-phone-7 | sendmail | networkstream | null | 04/18/2012 16:48:09 | too localized | Sending mail without user knowledge in Windows Phone 7.1
===
I'm trying to send a mail (with the content that I want, to the email address that I want) without user interaction or knowledge in Windows Phone 7.1 Mango. After some rechearch i come across that EmailComposeTask but it requires user interaction and a previous email configuration. After that, I though using sockets to connect to pop3 but System.Net.Sockets does not have the NetworkStream class. Is there some other way to make this connection without this class or something that can replace it or even other way to send a mail?
| 3 |
10,788,760 | 05/28/2012 18:04:54 | 748,789 | 05/11/2011 13:36:42 | 425 | 4 | PHP: Prevent the same error from being logged? | I've checked `ignore_repeated_errors` ini directive but it appears to deal only with the same error on the same file. It will still log the error if the php file was run by multiple users.
What I'm looking for is a solution that would prevent the same error from being logged if it's already present in the log file. So even if the error happens to several users it should only reflect one error in the log.
What's the best way to achieve this? | php | null | null | null | null | null | open | PHP: Prevent the same error from being logged?
===
I've checked `ignore_repeated_errors` ini directive but it appears to deal only with the same error on the same file. It will still log the error if the php file was run by multiple users.
What I'm looking for is a solution that would prevent the same error from being logged if it's already present in the log file. So even if the error happens to several users it should only reflect one error in the log.
What's the best way to achieve this? | 0 |
6,851,024 | 07/27/2011 20:48:03 | 766,654 | 05/23/2011 20:20:38 | 16 | 2 | I need know how much bytes has been uploaded for update a progress bar android | I am developing an app for upload video to a Apache/PHP Server. In this moment I already can upload videos. I need show a progress bar while the file is being uploaded. I have the next code using AsyncTask and HTTP 4.1.1 Libraries for emulate the FORM.
class uploadVideo extends AsyncTask<Void,Void,String>{
@Override
protected String doInBackground(Void... params) {
// Create a new HttpClient and Post Header
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.youtouch.cl/videoloader/index.php");
try {
// Add your data
File input=new File(fileName);
MultipartEntity multi=new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
multi.addPart("video", new FileBody(input));
httppost.setEntity(multi);
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
BufferedReader reader = new BufferedReader(
new InputStreamReader(
entity.getContent(), "UTF-8"));
String sResponse = reader.readLine();
return sResponse;
} catch (ClientProtocolException e) {
Log.v("Uri Galeria", e.toString());
e.printStackTrace();
} catch (IOException e) {
Log.v("Uri Galeria", e.toString());
e.printStackTrace();
}
return "error";
}
@Override
protected void onProgressUpdate(Void... unsued) {
//Here I do should update the progress bar
}
@Override
protected void onPostExecute(String sResponse) {
try {
if (pd.isShowing())
pd.dismiss();
if (sResponse != null) {
JSONObject JResponse = new JSONObject(sResponse);
int success = JResponse.getInt("SUCCESS");
String message = JResponse.getString("MESSAGE");
if (success == 0) {
Toast.makeText(getApplicationContext(), message,
Toast.LENGTH_LONG).show();
} else {
Toast.makeText(getApplicationContext(),
"Video uploaded successfully",
Toast.LENGTH_SHORT).show();
}
}
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
e.getMessage(),
Toast.LENGTH_LONG).show();
Log.e(e.getClass().getName(), e.getMessage(), e);
}
}
I need know where I can get how much bytes has been uploaded. File.length is the total size.
PD: Sorry, my english is regular | android | progress-bar | http-post | android-asynctask | null | null | open | I need know how much bytes has been uploaded for update a progress bar android
===
I am developing an app for upload video to a Apache/PHP Server. In this moment I already can upload videos. I need show a progress bar while the file is being uploaded. I have the next code using AsyncTask and HTTP 4.1.1 Libraries for emulate the FORM.
class uploadVideo extends AsyncTask<Void,Void,String>{
@Override
protected String doInBackground(Void... params) {
// Create a new HttpClient and Post Header
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.youtouch.cl/videoloader/index.php");
try {
// Add your data
File input=new File(fileName);
MultipartEntity multi=new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
multi.addPart("video", new FileBody(input));
httppost.setEntity(multi);
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
BufferedReader reader = new BufferedReader(
new InputStreamReader(
entity.getContent(), "UTF-8"));
String sResponse = reader.readLine();
return sResponse;
} catch (ClientProtocolException e) {
Log.v("Uri Galeria", e.toString());
e.printStackTrace();
} catch (IOException e) {
Log.v("Uri Galeria", e.toString());
e.printStackTrace();
}
return "error";
}
@Override
protected void onProgressUpdate(Void... unsued) {
//Here I do should update the progress bar
}
@Override
protected void onPostExecute(String sResponse) {
try {
if (pd.isShowing())
pd.dismiss();
if (sResponse != null) {
JSONObject JResponse = new JSONObject(sResponse);
int success = JResponse.getInt("SUCCESS");
String message = JResponse.getString("MESSAGE");
if (success == 0) {
Toast.makeText(getApplicationContext(), message,
Toast.LENGTH_LONG).show();
} else {
Toast.makeText(getApplicationContext(),
"Video uploaded successfully",
Toast.LENGTH_SHORT).show();
}
}
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
e.getMessage(),
Toast.LENGTH_LONG).show();
Log.e(e.getClass().getName(), e.getMessage(), e);
}
}
I need know where I can get how much bytes has been uploaded. File.length is the total size.
PD: Sorry, my english is regular | 0 |
10,695,503 | 05/22/2012 03:53:24 | 972,890 | 09/30/2011 10:18:39 | 42 | 0 | Android -Rename APK | my project name is XXXX and the apk is XXX
I rename the project to YYY by rigt clik refactor -rename->now the apk name comes as YYY
But when going to installing or uninstaling a the apk it shows me as XXXX
I relay need to fix this to YYY plz help me??? | android | null | null | null | null | 07/05/2012 15:45:06 | not a real question | Android -Rename APK
===
my project name is XXXX and the apk is XXX
I rename the project to YYY by rigt clik refactor -rename->now the apk name comes as YYY
But when going to installing or uninstaling a the apk it shows me as XXXX
I relay need to fix this to YYY plz help me??? | 1 |
7,363,582 | 09/09/2011 14:56:51 | 739,979 | 05/05/2011 12:56:41 | 1 | 1 | SQL Server flat file export is empty when run from SQL Job but correct when run from BIDS | I have an SSIS package that simply exports a database field into a text file. When I run it in debug from BIDS it outputs perfectly however when I run it from an SQL Job it only creates an empty file.
Any suggestions would be very helpful! | sql | sql-server-2008 | bids | null | null | null | open | SQL Server flat file export is empty when run from SQL Job but correct when run from BIDS
===
I have an SSIS package that simply exports a database field into a text file. When I run it in debug from BIDS it outputs perfectly however when I run it from an SQL Job it only creates an empty file.
Any suggestions would be very helpful! | 0 |
10,649,521 | 05/18/2012 08:51:49 | 1,402,802 | 05/18/2012 07:43:01 | 1 | 0 | Retrieving IP Address | There are two servers, for ex., 'A' and 'B'. Server 'A' receives the client request and then connects to Server 'B' for further processing. Is there any way i can retrieve the IP Address of Server 'A' from Server 'B'?? i tried using "request.getRemoteAddr()" but that returns the IP Address of the client who makes the request. Please help. | java | servlets | null | null | null | 05/18/2012 12:55:40 | not a real question | Retrieving IP Address
===
There are two servers, for ex., 'A' and 'B'. Server 'A' receives the client request and then connects to Server 'B' for further processing. Is there any way i can retrieve the IP Address of Server 'A' from Server 'B'?? i tried using "request.getRemoteAddr()" but that returns the IP Address of the client who makes the request. Please help. | 1 |
2,488,636 | 03/21/2010 20:44:27 | 243,782 | 01/05/2010 09:37:40 | 3,333 | 193 | How to force the user to complete a task before pressing back? | I show to user a list of categories, he must choose one.
How to force the user to choose before pressing back? | android | null | null | null | null | null | open | How to force the user to complete a task before pressing back?
===
I show to user a list of categories, he must choose one.
How to force the user to choose before pressing back? | 0 |
6,318,939 | 06/11/2011 22:38:59 | 787,987 | 06/07/2011 17:54:22 | 18 | 0 | Is acknowledgment response necessary when using send()/recv() of Winsock? | Using Winsock, C++, I send and receive the data with **send()/recv()**, TCP connection. I want to be sure that the data has been delivered to the other party, and wonder if it is recommended to send back some acknowledgment message after (if) receiving data with **recv**.
Here are two possibilities, and please advice which way to go:
1. If **send** returns the size of passed buffer, assume that the data has been delivered at least to **recv** function on the other side of wire. When I say "at least", I mean even if the **recv** fails there (e.g. due to insufficient buffer, etc.), I don't care, I just want to be sure I've done my server part of work properly - I've sent the data completely (i.e. the data reached the other machine).
2. Use additional acknowledgment: after receiving the data with **recv**, send back some ID of received packet (part of header of each data sent) signaling the successful receive operation of that packet. If I don't receive such "acknowledgment message" after some interval, return failure code from the sender function.
The second answer looks more safe, but I don't want to complicate the transfer protocol if it is redundant. Also please note that I'm talking about the TCP connection (which is more safe by itself than UDP).
Is there any other mechanisms (maybe some other APIs? maybe **WSARecv()/WSASend()** work differently?) of ensuring that the data was delivered to the **recv** function on the other side?
If you recommend the second way, could you please give me some code snippet that allows me to use **recv** with timeout to receive the acknowledgment? **recv** is a blocking operation so it will hang forever if the previous send attempt failed (the other party was not notified). Is there any simple way of using **recv** with timeout (without creating separate thread every time which would probably be the overkill for each and every **send** operation).
Also the amount of data I pass to **send** function might be quite big (several megabytes), so how to choose the timeout for "acknowledgment message"? Maybe I should "split" large buffers and use several **send** calls? I think it will get quite complicated, please advice! | c++ | tcp | winsock | send | recv | null | open | Is acknowledgment response necessary when using send()/recv() of Winsock?
===
Using Winsock, C++, I send and receive the data with **send()/recv()**, TCP connection. I want to be sure that the data has been delivered to the other party, and wonder if it is recommended to send back some acknowledgment message after (if) receiving data with **recv**.
Here are two possibilities, and please advice which way to go:
1. If **send** returns the size of passed buffer, assume that the data has been delivered at least to **recv** function on the other side of wire. When I say "at least", I mean even if the **recv** fails there (e.g. due to insufficient buffer, etc.), I don't care, I just want to be sure I've done my server part of work properly - I've sent the data completely (i.e. the data reached the other machine).
2. Use additional acknowledgment: after receiving the data with **recv**, send back some ID of received packet (part of header of each data sent) signaling the successful receive operation of that packet. If I don't receive such "acknowledgment message" after some interval, return failure code from the sender function.
The second answer looks more safe, but I don't want to complicate the transfer protocol if it is redundant. Also please note that I'm talking about the TCP connection (which is more safe by itself than UDP).
Is there any other mechanisms (maybe some other APIs? maybe **WSARecv()/WSASend()** work differently?) of ensuring that the data was delivered to the **recv** function on the other side?
If you recommend the second way, could you please give me some code snippet that allows me to use **recv** with timeout to receive the acknowledgment? **recv** is a blocking operation so it will hang forever if the previous send attempt failed (the other party was not notified). Is there any simple way of using **recv** with timeout (without creating separate thread every time which would probably be the overkill for each and every **send** operation).
Also the amount of data I pass to **send** function might be quite big (several megabytes), so how to choose the timeout for "acknowledgment message"? Maybe I should "split" large buffers and use several **send** calls? I think it will get quite complicated, please advice! | 0 |
6,719,126 | 07/16/2011 17:45:37 | 728,750 | 04/28/2011 07:10:25 | 425 | 1 | Memory allocation for regular class static class static method instanve method and data member on heap and stack c#? | most of the book never talk about how a program execute and how memory is allocated for them on stack and heap. when data stored on stack and when on heap.
suppose i have one regular class like
public class MyClass
{
int Age=0;
string strName="None"
Double Salary=0;
public void Data1()
{
Age=30;
strName="Robin";
Salary=3500;
}
}
Question
--------------
1) so for the above class how memory will be allocated. when program run the memory will be allocated or when we create instance then memory will be allocated. when we call Data1() through instance then what happen and how memory will be allocated. memory will be allocated for function call or for data member initialization? tell me how much memory will be allocated for age,name and salary. memory will be allocated on stack or heap.
public class MyClass
{
static int y=0;
static string strComp="None"
int Age=0;
string strName="None"
Double Salary=0;
public void Data1()
{
Age=30;
strName="Robin";
Salary=3500;
}
public static void Data3()
{
y=50;
strComp="Hello";
}
}
2) how and when memory is allocated for static data member and function. when we call like
MyClass.Data3() then memory will be allocated or when we just run the apps. memory is allocated on heap or stack?
3) how memroy is allocated for static class. static class stored on heap or stack...if stack then why?
here i asked asked couple of question please explain in detail. thanks. | c# | oop | null | null | null | 07/16/2011 22:37:27 | not a real question | Memory allocation for regular class static class static method instanve method and data member on heap and stack c#?
===
most of the book never talk about how a program execute and how memory is allocated for them on stack and heap. when data stored on stack and when on heap.
suppose i have one regular class like
public class MyClass
{
int Age=0;
string strName="None"
Double Salary=0;
public void Data1()
{
Age=30;
strName="Robin";
Salary=3500;
}
}
Question
--------------
1) so for the above class how memory will be allocated. when program run the memory will be allocated or when we create instance then memory will be allocated. when we call Data1() through instance then what happen and how memory will be allocated. memory will be allocated for function call or for data member initialization? tell me how much memory will be allocated for age,name and salary. memory will be allocated on stack or heap.
public class MyClass
{
static int y=0;
static string strComp="None"
int Age=0;
string strName="None"
Double Salary=0;
public void Data1()
{
Age=30;
strName="Robin";
Salary=3500;
}
public static void Data3()
{
y=50;
strComp="Hello";
}
}
2) how and when memory is allocated for static data member and function. when we call like
MyClass.Data3() then memory will be allocated or when we just run the apps. memory is allocated on heap or stack?
3) how memroy is allocated for static class. static class stored on heap or stack...if stack then why?
here i asked asked couple of question please explain in detail. thanks. | 1 |
9,092,097 | 02/01/2012 07:06:25 | 1,182,095 | 02/01/2012 06:58:54 | 1 | 0 | Ruby Hash to List for Mathematica 7 | Need to convert ruby hashes into something that's importable into mathematica 7 as a list
The ruby hash looks something like:
"truncated"=>false, "created_at"=>"Thu Jan 19 22:43:04 +0000 2012", "id_str"=>"160130179262451712"
and I would like this to be converted into a file so it can be imported into mathematica as list like:
{{truncated, false}, {created_at, "Thu Jan 19 22:43:04 +0000 2012"}, {id_str, 160130179262451712}}
| ruby | list | hash | mathematica | null | 02/03/2012 15:58:59 | not a real question | Ruby Hash to List for Mathematica 7
===
Need to convert ruby hashes into something that's importable into mathematica 7 as a list
The ruby hash looks something like:
"truncated"=>false, "created_at"=>"Thu Jan 19 22:43:04 +0000 2012", "id_str"=>"160130179262451712"
and I would like this to be converted into a file so it can be imported into mathematica as list like:
{{truncated, false}, {created_at, "Thu Jan 19 22:43:04 +0000 2012"}, {id_str, 160130179262451712}}
| 1 |
10,105,296 | 04/11/2012 11:48:42 | 654,445 | 03/10/2011 23:04:18 | 49 | 0 | Swarming in AS3 | Hi I keep getting the error: expecting identifier before greater than.
on line 13.
Any help would be nice please and Thank you.
[code]
fly = function () {
this.animate = function() {
// Capture mouse positions and distance from mouse
this.targetX = _root._xmouse;
this.targetY = _root._ymouse;
this.distX = this.targetX-this.meX+this.flockX;
this.distY = this.targetY-this.meY+this.flockY;
//
if ((this.targetX == this.oldTargetX) && Math.random()>0.9) {
// add small scale random darting if mouse is still
this.flockX = (Math.random()*100)-50;
this.flockY = (Math.random()*100)-50;
} else if ((this.targetX<>this.oldTargetX) && Math.random()>0.8) {
// add large scale random darting if mouse is moving
this.flockX = (Math.random()*400)-200;
this.flockY = (Math.random()*400)-200;
}
// Apply inertia equation
this.meX = Math.round(this.meX+(this.distX)/20);
this.meY = Math.round(this.meY+(this.distY)/20);
// perform animation
this._x = this.meX;
this._y = this.meY;
// remember the current mouse pos so we can tell if
// it has moved next time around
this.oldTargetX = this.targetX;
};
this.initialize = function() {
this.targetX = 0;
this.targetY = 0;
this.distX = 0;
this.distY = 0;
this.meX = this._x;
this.meY = this._y;
this.oldTargetX = 0;
this.flockX = (Math.random()*200)-100;
this.flockY = (Math.random()*200)-100;
};
// set up onEnterFrame script to animate _parent...
this.initialize();
this.onEnterFrame = this.animate;
};
//
//
var i:Number = 0;
var bugClip:MovieClip;
for (i=0; i<30; i++) {
bugClip = this.attachMovie("bug", "bug"+i, i);
fly.apply(bugClip);
}
[/code] | actionscript | null | null | null | null | null | open | Swarming in AS3
===
Hi I keep getting the error: expecting identifier before greater than.
on line 13.
Any help would be nice please and Thank you.
[code]
fly = function () {
this.animate = function() {
// Capture mouse positions and distance from mouse
this.targetX = _root._xmouse;
this.targetY = _root._ymouse;
this.distX = this.targetX-this.meX+this.flockX;
this.distY = this.targetY-this.meY+this.flockY;
//
if ((this.targetX == this.oldTargetX) && Math.random()>0.9) {
// add small scale random darting if mouse is still
this.flockX = (Math.random()*100)-50;
this.flockY = (Math.random()*100)-50;
} else if ((this.targetX<>this.oldTargetX) && Math.random()>0.8) {
// add large scale random darting if mouse is moving
this.flockX = (Math.random()*400)-200;
this.flockY = (Math.random()*400)-200;
}
// Apply inertia equation
this.meX = Math.round(this.meX+(this.distX)/20);
this.meY = Math.round(this.meY+(this.distY)/20);
// perform animation
this._x = this.meX;
this._y = this.meY;
// remember the current mouse pos so we can tell if
// it has moved next time around
this.oldTargetX = this.targetX;
};
this.initialize = function() {
this.targetX = 0;
this.targetY = 0;
this.distX = 0;
this.distY = 0;
this.meX = this._x;
this.meY = this._y;
this.oldTargetX = 0;
this.flockX = (Math.random()*200)-100;
this.flockY = (Math.random()*200)-100;
};
// set up onEnterFrame script to animate _parent...
this.initialize();
this.onEnterFrame = this.animate;
};
//
//
var i:Number = 0;
var bugClip:MovieClip;
for (i=0; i<30; i++) {
bugClip = this.attachMovie("bug", "bug"+i, i);
fly.apply(bugClip);
}
[/code] | 0 |
9,151,697 | 02/05/2012 18:15:49 | 1,190,908 | 02/05/2012 17:20:50 | 1 | 0 | ffmpeg: create interlaced output from progrssive input | I have a 720p60 (54.94 to be exact) clip that I would like to scale down and output in 540i30 (27.97 to be exact).
Here is my command line:
ffmpeg.exe -i clip720p60.m2t -ss 90 -t 30 -vcodec libxvid -s 960x540 -b 1000k -r 29.97 -acodec libmp3lame -ar 22050 -ab 64k -f avi clip540i30.avi
...
Input #0, mpegts, from 'clip720p60.m2t':
Duration: 01:53:55.76, start: 0.196678, bitrate: 17250 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 59.94 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
Output #0, avi, to 'clip540i30.avi':
Stream #0.0: Video: libxvid, yuv420p, 960x540 [PAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 29.97 tb(c)
Stream #0.1: Audio: libmp3lame, 22050 Hz, stereo, s16, 64 kb/s
...
The first options indicates to encode 30s at 90s past the start.
Whatever options I tried up to now always end up with a video stream of 60s and an audio stream of 30s in the output clip.
Can any one help me? | ffmpeg | null | null | null | null | 04/17/2012 09:47:21 | off topic | ffmpeg: create interlaced output from progrssive input
===
I have a 720p60 (54.94 to be exact) clip that I would like to scale down and output in 540i30 (27.97 to be exact).
Here is my command line:
ffmpeg.exe -i clip720p60.m2t -ss 90 -t 30 -vcodec libxvid -s 960x540 -b 1000k -r 29.97 -acodec libmp3lame -ar 22050 -ab 64k -f avi clip540i30.avi
...
Input #0, mpegts, from 'clip720p60.m2t':
Duration: 01:53:55.76, start: 0.196678, bitrate: 17250 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 59.94 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
Output #0, avi, to 'clip540i30.avi':
Stream #0.0: Video: libxvid, yuv420p, 960x540 [PAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 29.97 tb(c)
Stream #0.1: Audio: libmp3lame, 22050 Hz, stereo, s16, 64 kb/s
...
The first options indicates to encode 30s at 90s past the start.
Whatever options I tried up to now always end up with a video stream of 60s and an audio stream of 30s in the output clip.
Can any one help me? | 2 |
8,854,634 | 01/13/2012 17:23:25 | 661,517 | 03/15/2011 22:50:47 | 3 | 0 | Terminal rule ID not matching valid values for ID | I'm trying to define a rule where one element is the perfect candidate for the common terminal rule *ID*. When I launch the editor to test with sample code, the *ID* rule is not matched for the string "ABC":
Define : ABC : Holder_1
I get **"mismatched input 'ABC' expecting RULE_ID"**.
Is there something in my grammar conflicting with the ID rule to cause this error?
This is my grammar file:
grammar com.testco.Test with org.eclipse.xtext.common.Terminals
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
generate defwiz "http://www.testco.com/Test"
Define_Holder:
'Definition' ':' holder_name=ID ':' holder_number=HOLDER_NUMBER (':' attribute=define_attr)? (':' pad=holder_pad)?
;
holder_pad:
HEX
;
Type:
TYPE_TERM ':' type_value=TYPE_VAL
;
//***************** TERMINALS *****************
terminal TYPE_TERM:
'Type_' INT+
;
terminal PROFILE:
(PROFILE_ID)(PROFILE_ID)'.'(PROFILE_ID)(PROFILE_ID)
;
terminal HOLDER_NUMBER returns ecore:: EString:
'Holder_' INT+;
terminal HEX returns ecore:: EString :
('0'..'9'|'A'..'F')
;
terminal PROFILE_ID : '^'?('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9')*;
//***************** ENUMS *****************
enum define_attr:
BINARY='Binary' |
SCRAMBLE='Scramble' |
FORCESIZE='ForceSize' |
FIXEDSIZE='FixedSize'
;
| eclipse | xtext | null | null | null | null | open | Terminal rule ID not matching valid values for ID
===
I'm trying to define a rule where one element is the perfect candidate for the common terminal rule *ID*. When I launch the editor to test with sample code, the *ID* rule is not matched for the string "ABC":
Define : ABC : Holder_1
I get **"mismatched input 'ABC' expecting RULE_ID"**.
Is there something in my grammar conflicting with the ID rule to cause this error?
This is my grammar file:
grammar com.testco.Test with org.eclipse.xtext.common.Terminals
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
generate defwiz "http://www.testco.com/Test"
Define_Holder:
'Definition' ':' holder_name=ID ':' holder_number=HOLDER_NUMBER (':' attribute=define_attr)? (':' pad=holder_pad)?
;
holder_pad:
HEX
;
Type:
TYPE_TERM ':' type_value=TYPE_VAL
;
//***************** TERMINALS *****************
terminal TYPE_TERM:
'Type_' INT+
;
terminal PROFILE:
(PROFILE_ID)(PROFILE_ID)'.'(PROFILE_ID)(PROFILE_ID)
;
terminal HOLDER_NUMBER returns ecore:: EString:
'Holder_' INT+;
terminal HEX returns ecore:: EString :
('0'..'9'|'A'..'F')
;
terminal PROFILE_ID : '^'?('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9')*;
//***************** ENUMS *****************
enum define_attr:
BINARY='Binary' |
SCRAMBLE='Scramble' |
FORCESIZE='ForceSize' |
FIXEDSIZE='FixedSize'
;
| 0 |
5,226,634 | 03/07/2011 23:33:35 | 278,851 | 02/22/2010 16:44:33 | 424 | 3 | mysql query not using the index i want | I have the following query left joining 2 tables :
explain
select
n.* from npi n left join npi_taxonomy nt on n.NPI=nt.NPI_CODE
where
n.Provider_First_Name like '%s%' and
n.Provider_Last_Name like '%b%' and
n.Provider_Business_Practice_Location_Address_State_Name = 'SC' and
n.Provider_Business_Practice_Location_Address_City_Name = 'charleston' and
n.Provider_Business_Practice_Location_Address_Postal_Code in (29001,29003,29010,29016,29018,29020,29030,29032,29033,29038,29039,29040,29041,29042,29044,29045,29046,29047,29048,29051,29052,29053,29056,29059,29061,29062,29069,29071,29072,29073,29078,29079,29080,29081,29082,29102,29104,29107,29111,29112,29113,29114,29115,29116,29117,29118,29123,29125,29128,29133,29135,29137,29142,29143,29146,29147,29148,29150,29151,29152,29153,29154,29160,29161,29162,29163,29164,29168,29169,29170,29171,29172,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29212,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29224,29225,29226,29227,29228,29229,29230,29240,29250,29260,29290,29292,29401,29402,29403,29404,29405,29406,29407,29409) and
n.Entity_Type_Code = 1 and
nt.Healthcare_Provider_Taxonomy_Code in ('101Y00000X')
limit 0,10;
I have added a multi-column index :
**npi_fname_lname_state_city_zip_entity** on the table npi which indexes the columns in the following order :
NPI,
Provider_First_Name,
Provider_First_Name,
Provider_Business_Practice_Location_Address_State_Name, Provider_Business_Practice_Location_Address_City_Name, Provider_Business_Practice_Location_Address_Postal_Code,
Entity_Type_Code
However, when i do an explain on the query, it shows me that it uses the primary index (NPI). Also, it says rows examined = 1
What's worse is : the query takes roughly **120** seconds to execute. How do i optimize this ?
I would really appreciate some help regarding this. | mysql | indexing | query-optimization | null | null | null | open | mysql query not using the index i want
===
I have the following query left joining 2 tables :
explain
select
n.* from npi n left join npi_taxonomy nt on n.NPI=nt.NPI_CODE
where
n.Provider_First_Name like '%s%' and
n.Provider_Last_Name like '%b%' and
n.Provider_Business_Practice_Location_Address_State_Name = 'SC' and
n.Provider_Business_Practice_Location_Address_City_Name = 'charleston' and
n.Provider_Business_Practice_Location_Address_Postal_Code in (29001,29003,29010,29016,29018,29020,29030,29032,29033,29038,29039,29040,29041,29042,29044,29045,29046,29047,29048,29051,29052,29053,29056,29059,29061,29062,29069,29071,29072,29073,29078,29079,29080,29081,29082,29102,29104,29107,29111,29112,29113,29114,29115,29116,29117,29118,29123,29125,29128,29133,29135,29137,29142,29143,29146,29147,29148,29150,29151,29152,29153,29154,29160,29161,29162,29163,29164,29168,29169,29170,29171,29172,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29212,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29224,29225,29226,29227,29228,29229,29230,29240,29250,29260,29290,29292,29401,29402,29403,29404,29405,29406,29407,29409) and
n.Entity_Type_Code = 1 and
nt.Healthcare_Provider_Taxonomy_Code in ('101Y00000X')
limit 0,10;
I have added a multi-column index :
**npi_fname_lname_state_city_zip_entity** on the table npi which indexes the columns in the following order :
NPI,
Provider_First_Name,
Provider_First_Name,
Provider_Business_Practice_Location_Address_State_Name, Provider_Business_Practice_Location_Address_City_Name, Provider_Business_Practice_Location_Address_Postal_Code,
Entity_Type_Code
However, when i do an explain on the query, it shows me that it uses the primary index (NPI). Also, it says rows examined = 1
What's worse is : the query takes roughly **120** seconds to execute. How do i optimize this ?
I would really appreciate some help regarding this. | 0 |
4,478,733 | 12/18/2010 15:46:07 | 547,085 | 12/18/2010 15:46:07 | 1 | 0 | playing audio stream in blackberry | I am doing an audio playing Application in blackberry.When i pass a live url stream,it works,but when my url is a fixed one of size say 50 mb.It shows error,can anyone tell me the reason for it? | java | blackberry | null | null | null | null | open | playing audio stream in blackberry
===
I am doing an audio playing Application in blackberry.When i pass a live url stream,it works,but when my url is a fixed one of size say 50 mb.It shows error,can anyone tell me the reason for it? | 0 |
8,361,225 | 12/02/2011 19:00:05 | 604,023 | 02/05/2011 01:46:34 | 273 | 32 | What are some techniques to make paragraphs look clean, organized and easier to read? | When I make paragraphs I want them to be as easy as possible to read and to understand quickly. Unfortunately though my paragraphs end up something like this:
00000000000000000000000000
0000000000000000000000000
0000000000000000000000000000
000000000000000000000000000
0000000000000000000000000
00000000000000000000000000
000000000000000000000000
000000000.
When the ideal would be like this:
000000000000000000000
00000000000000000000000
00000000000000000000000
00000000000000000000000
00000000000000000000000
00000000000000000000000
000000000.
What are some techniques I could use in html and css to make my ideal come true? What do you usually do? | html | css | html5 | css3 | null | 12/02/2011 19:31:52 | off topic | What are some techniques to make paragraphs look clean, organized and easier to read?
===
When I make paragraphs I want them to be as easy as possible to read and to understand quickly. Unfortunately though my paragraphs end up something like this:
00000000000000000000000000
0000000000000000000000000
0000000000000000000000000000
000000000000000000000000000
0000000000000000000000000
00000000000000000000000000
000000000000000000000000
000000000.
When the ideal would be like this:
000000000000000000000
00000000000000000000000
00000000000000000000000
00000000000000000000000
00000000000000000000000
00000000000000000000000
000000000.
What are some techniques I could use in html and css to make my ideal come true? What do you usually do? | 2 |
367,641 | 12/15/2008 06:59:53 | 22,162 | 09/25/2008 13:28:13 | 336 | 32 | Where is the path will be set for Request.AppRelativeCurrentExecutionFilePath | I need to know the path for Request.AppRelativeCurrentExecutionFilePath. It gives the wrong file path when i retrieve any requests. | asp.net | null | null | null | null | null | open | Where is the path will be set for Request.AppRelativeCurrentExecutionFilePath
===
I need to know the path for Request.AppRelativeCurrentExecutionFilePath. It gives the wrong file path when i retrieve any requests. | 0 |
8,388,089 | 12/05/2011 15:59:20 | 979,528 | 10/05/2011 00:44:27 | 8 | 0 | php explode for paragraph | i have big word.
Paragraph 1
Paragraph 2
Paragraph 3
Paragraph 4
Paragraph 5
I must be explode for paragraph.
example : $paragraph[0] must be "Paragraph 1"
| php | explode | paragraph | null | null | 12/05/2011 16:02:39 | not a real question | php explode for paragraph
===
i have big word.
Paragraph 1
Paragraph 2
Paragraph 3
Paragraph 4
Paragraph 5
I must be explode for paragraph.
example : $paragraph[0] must be "Paragraph 1"
| 1 |
6,500,765 | 06/28/2011 01:52:19 | 806,858 | 06/20/2011 14:45:37 | 8 | 0 | Php unlink security flaws | I've read alot on here about the security flaws with unlink with php.
I was more curious as too whether there is a way round that by possibly md5 hashing the image when it comes to deleting it.
Having the name and the hash stored in the database when uploading a pic, though the hash would only be called upon when trying to delete a picture.
Would that limit the security flaws if possible, and or atleast stop people just typing in whatever in the top to delete an image?
Cheers
Jay | php | security | php5 | deleting | unlink | 06/28/2011 02:30:14 | not a real question | Php unlink security flaws
===
I've read alot on here about the security flaws with unlink with php.
I was more curious as too whether there is a way round that by possibly md5 hashing the image when it comes to deleting it.
Having the name and the hash stored in the database when uploading a pic, though the hash would only be called upon when trying to delete a picture.
Would that limit the security flaws if possible, and or atleast stop people just typing in whatever in the top to delete an image?
Cheers
Jay | 1 |
11,713,650 | 07/29/2012 22:48:27 | 838,060 | 07/11/2011 00:11:01 | 166 | 8 | Is starting up a WebGL project a bad idea? | I am trying to develop a game, and I was just wondering if it would be a bad idea to start the project in WebGL. I love the technology and I think it has potential to be great, but I'm afraid of its experimental nature. Since it's not really a "standard" yet, is it likely that it will change to the point of completely rendering the code I write useless?
I want to write a 3D game one way or another, but I prefer WebGL because I am used to Javascript, and working with OpenGL or D3D directly from the OS libraries is a pain. | javascript | html5 | opengl | html5-canvas | webgl | 07/29/2012 22:53:03 | not constructive | Is starting up a WebGL project a bad idea?
===
I am trying to develop a game, and I was just wondering if it would be a bad idea to start the project in WebGL. I love the technology and I think it has potential to be great, but I'm afraid of its experimental nature. Since it's not really a "standard" yet, is it likely that it will change to the point of completely rendering the code I write useless?
I want to write a 3D game one way or another, but I prefer WebGL because I am used to Javascript, and working with OpenGL or D3D directly from the OS libraries is a pain. | 4 |
901,121 | 05/23/2009 08:18:28 | 56,183 | 01/17/2009 13:00:50 | 306 | 19 | How to use inbulit django templatetags in google-app-engine | I am trying to use Django in built templatetags like markup and
humanize in my google app , but its not working.
I added markup and humanize in the INSTALLED_APPS. Still not working.
How to use that? | google-app-engine | django-templates | null | null | null | null | open | How to use inbulit django templatetags in google-app-engine
===
I am trying to use Django in built templatetags like markup and
humanize in my google app , but its not working.
I added markup and humanize in the INSTALLED_APPS. Still not working.
How to use that? | 0 |
10,499,987 | 05/08/2012 13:52:14 | 290,082 | 03/09/2010 23:31:23 | 1,316 | 1 | Heavy computing on remote pc | I love experements with linqpad but now my task requried a heavy computing. So trying to do it on my computer give me a lot of pain. My friend has a much more power computer then i. How can i migrate some operations from my linqpad to his computer? I havent RDP access but i can run on his computer any .net programm.
If it is not possibly is there any FREE services provides computing power? Maybe hosting trial or something. I know that windows azure gives 30-day trial. But it has a very slow CPU module and in my country MS partners an idiots who cannt get service site from down. | cloud | distributed-computing | null | null | null | 05/09/2012 11:23:14 | not a real question | Heavy computing on remote pc
===
I love experements with linqpad but now my task requried a heavy computing. So trying to do it on my computer give me a lot of pain. My friend has a much more power computer then i. How can i migrate some operations from my linqpad to his computer? I havent RDP access but i can run on his computer any .net programm.
If it is not possibly is there any FREE services provides computing power? Maybe hosting trial or something. I know that windows azure gives 30-day trial. But it has a very slow CPU module and in my country MS partners an idiots who cannt get service site from down. | 1 |
8,104,600 | 11/12/2011 13:04:18 | 1,041,499 | 11/11/2011 10:27:43 | 1 | 0 | bitrate for amr can not be changed on adroid MediaRecorder | i need to record speech with 5.15kbit/s encoding rate. but as i see at android MediaRecorder object i can not change this property with setAudioEncodingBitRate method. here is my code.but it sills encode speech with 12.2kit/s encoding rate ? how can change it ?
also any other application that can change encoding rate of an existing speech might be useful for me....
**
myMediaRecorder=new MediaRecorder();
myMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
myMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
myMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
myMediaRecorder.setAudioSamplingRate(8000);
myMediaRecorder.setAudioEncodingBitRate((int)(5.15 * 1024));
**
| android | null | null | null | null | null | open | bitrate for amr can not be changed on adroid MediaRecorder
===
i need to record speech with 5.15kbit/s encoding rate. but as i see at android MediaRecorder object i can not change this property with setAudioEncodingBitRate method. here is my code.but it sills encode speech with 12.2kit/s encoding rate ? how can change it ?
also any other application that can change encoding rate of an existing speech might be useful for me....
**
myMediaRecorder=new MediaRecorder();
myMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
myMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
myMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
myMediaRecorder.setAudioSamplingRate(8000);
myMediaRecorder.setAudioEncodingBitRate((int)(5.15 * 1024));
**
| 0 |
6,387,519 | 06/17/2011 14:42:14 | 78,687 | 03/16/2009 17:14:33 | 183 | 6 | What is the best way to address the local server in a SQL connection string for ASP.net? | We have a 2K3 server we're using as both a database server AND a web server - fairly small traffic website. I know, should be 2 separate servers, but isn't going to happen soon.
Currently, we have 2 NIC cards on this server, and in-house workers use custom apps that hit NIC1 all day long. We also have the connection string for the website using that same IP address.
I'm wondering if it would benefit us at all to use the IP for NIC2 for the connection string for the website SQL, or if would be a waste of time.
Also, I'm wondering in a setup like this, where the SQL server IS the local server, is there a better way to address the server in the connection string than using the IP?
I'm simply trying to maximize the network we have and not create any bottlenecks.
Thanks much. | asp.net | sql-server-2005 | null | null | null | null | open | What is the best way to address the local server in a SQL connection string for ASP.net?
===
We have a 2K3 server we're using as both a database server AND a web server - fairly small traffic website. I know, should be 2 separate servers, but isn't going to happen soon.
Currently, we have 2 NIC cards on this server, and in-house workers use custom apps that hit NIC1 all day long. We also have the connection string for the website using that same IP address.
I'm wondering if it would benefit us at all to use the IP for NIC2 for the connection string for the website SQL, or if would be a waste of time.
Also, I'm wondering in a setup like this, where the SQL server IS the local server, is there a better way to address the server in the connection string than using the IP?
I'm simply trying to maximize the network we have and not create any bottlenecks.
Thanks much. | 0 |
3,634,373 | 09/03/2010 09:11:25 | 335,500 | 05/07/2010 14:05:31 | 60 | 4 | kill application after crash | I haven't manage all errors on my application anymore. So I would like to know if it is possible to Kill entire app when it crash ?
(when the message "app MyApp crash, force close" appear, I would like the application was killed when user clik on "force close") | android | crash | kill | null | null | null | open | kill application after crash
===
I haven't manage all errors on my application anymore. So I would like to know if it is possible to Kill entire app when it crash ?
(when the message "app MyApp crash, force close" appear, I would like the application was killed when user clik on "force close") | 0 |
10,374,647 | 04/29/2012 18:12:09 | 1,364,495 | 04/29/2012 18:09:08 | 1 | 0 | Search jquery wiswig plugin like that | In last time i found great text editor http://pattern.dk/pastel/home.html
You can see editor when You click new article.
Anybody knows where i can find editor like this:?
Please help :)
Sorry for mistakes in english, but this is not my first language :) | jquery | html | css | null | null | 04/29/2012 18:35:28 | off topic | Search jquery wiswig plugin like that
===
In last time i found great text editor http://pattern.dk/pastel/home.html
You can see editor when You click new article.
Anybody knows where i can find editor like this:?
Please help :)
Sorry for mistakes in english, but this is not my first language :) | 2 |
11,730,462 | 07/30/2012 22:13:57 | 697,562 | 04/07/2011 20:39:17 | 211 | 33 | CAKeyframeAnimation flip animation slow first time | I'm doing a series of back-to-back animations using CAKeyframeAnimation. Currently, for each series, I create the CAKeyframeAnimation for a subsequent series when the previous one completes. This basically works except for nagging problem with timing. The issue is I have another concurrent animation I'm doing with an NSTimer and the keyframe animations need to be in sync with that. The problem is the keyframe animations are a bit slower the first time I play them. On subsequent times played, the timing is good on the latest hardware. On older hardware there are timing issues regardless. Since the animation is based on a series of png images, I initially thought it had to do with caching, but after pre-caching images, it seems that isn't the only problem (It appears that keyframe animation has other prep work it does prior to playing)
At this point I'm wondering if using a keyframe animation is the way to go. I haven't worked with CAAnimationGroup, but it does look like it might solve this problem. I could probably also solve it by using NSTimer instead of keyframe animations. I'm looking for some input as I'd rather not start down the wrong path at this point. | ios | animation | null | null | null | null | open | CAKeyframeAnimation flip animation slow first time
===
I'm doing a series of back-to-back animations using CAKeyframeAnimation. Currently, for each series, I create the CAKeyframeAnimation for a subsequent series when the previous one completes. This basically works except for nagging problem with timing. The issue is I have another concurrent animation I'm doing with an NSTimer and the keyframe animations need to be in sync with that. The problem is the keyframe animations are a bit slower the first time I play them. On subsequent times played, the timing is good on the latest hardware. On older hardware there are timing issues regardless. Since the animation is based on a series of png images, I initially thought it had to do with caching, but after pre-caching images, it seems that isn't the only problem (It appears that keyframe animation has other prep work it does prior to playing)
At this point I'm wondering if using a keyframe animation is the way to go. I haven't worked with CAAnimationGroup, but it does look like it might solve this problem. I could probably also solve it by using NSTimer instead of keyframe animations. I'm looking for some input as I'd rather not start down the wrong path at this point. | 0 |
8,423,572 | 12/07/2011 22:32:34 | 574,663 | 01/13/2011 17:54:58 | 367 | 10 | LINQ code works fine in w7 bombs in xp? | I have the following little import application, basically it
1) connects to a hosted sql server
2) pulls down a signup list
3) inserts to staging table
4) checks for duplication
5) filters non dupes into main table
oh BTW i came to the above conclusion by testing this on like 10 computers. Everywindows 7 box it ran no prob xp it gets to the first bit of LINQ and throws all kinds of crazy linq errors.
meat of code: (criticism welcome i'm still learning : ) )
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Threading;
//using System.Threading.Tasks;
namespace AfocImport
{
internal class Program
{
private static void Main(string[] args)
{
var LNQ = new LNQDataContext();
var sel = from a in LNQ.Respondents
where a.dateenter > Convert.ToDateTime(DateTime.Today.ToShortDateString())
select new
{
a.recordid,a.phone,a.wphone,a.wphone_ext,a.fax,a.cellphone,a.email,a.area_code,a.area_code_w,a.lname,a.fname,a.address,a.city,a.state,a.zip,a.county,a.address_w,a.city_w,a.state_w,
a.zip_w,a.county_w,a.employer,a.Occ_title,a.jobcode,a.hours,a.datebirth,a.gender,a.maritalstatus,a.income,a.education,a.race,a.Party,a.typehome,a.spousejobcode,a.spousehours,a.childgen1,
a.childbd1,a.childgen2,a.childbd2,a.childgen3,a.childbd3,a.childgen4,a.childbd4,a.childgen5,a.childbd5,a.childgen6,a.childbd6,a.resp_type,a.dateenter,a.dateupdated,a.referred_by_resp,
a.Pro_resp,a.Caution_Flag,a.last_selection,a.last_participation,a.number_parts,a.calling_note,a.notes,a.CC1,a.CC2,a.CC3,a.CC4,a.CC5,a.CC6,a.CC7,a.CC8,a.CC9,a.CC10,a.CC11,a.CC12,a.CC13,
a.CC14,a.CC15,a.CC16,a.CC17,a.CC18,a.CC19,a.CC20,a.CC21,a.CC22,a.CC23,a.CC24,a.CC25,a.CC26,a.CC27,a.CC28,a.CC29,a.CC30,a.CC31,a.CC32,a.CC33,a.CC34,a.CC35,a.CC36,a.CC37,a.CC38,a.CC39,
a.CC40,a.CC41,a.CC42,a.CC43,a.CC44,a.CC45,a.CC46,a.CC47,a.CC48,a.CC49,a.CC50,a.c_brand,a.c_flavor,a.c_length,a.c_type,a.c_past_purchases,a.c_other_brands,a.car_make_1,a.car_model_1,
a.car_year_1,a.car_options_1,a.car_make_2,a.car_model_2,a.car_year_2,a.car_options_2,
};
var LNQH = new LNQHDataContext();
foreach (var a in sel)
{
Console.WriteLine("\tInserting to Staging: " + a.fname + " " + a.lname);
var r = new RespondentStaging
{
recordid = a.recordid,phone = a.phone,wphone = a.wphone,wphone_ext = a.wphone_ext,fax = a.fax,cellphone = a.cellphone,email = a.email,area_code = a.area_code,area_code_w = a.area_code_w,
lname = a.lname,fname = a.fname,address = a.address,city = a.city,state = a.state,zip = a.zip,county = a.county,address_w = a.address_w,city_w = a.city_w,state_w = a.state_w,zip_w = a.zip_w,
county_w = a.county_w,employer = a.employer,Occ_title = a.Occ_title,jobcode = a.jobcode,hours = a.hours,datebirth = a.datebirth,gender = a.gender,maritalstatus = a.maritalstatus,income = a.income,
education = a.education,race = a.race,Party = a.Party,typehome = a.typehome,spousejobcode = a.spousejobcode,spousehours = a.spousehours,childgen1 = a.childgen1,childbd1 = a.childbd1,childgen2 = a.childgen2,
childbd2 = a.childbd2,childgen3 = a.childgen3,childbd3 = a.childbd3,childgen4 = a.childgen4,childbd4 = a.childbd4,childgen5 = a.childgen5,childbd5 = a.childbd5,childgen6 = a.childgen6,childbd6 = a.childbd6,
resp_type = a.resp_type,dateenter = a.dateenter,dateupdated = a.dateupdated,referred_by_resp = a.referred_by_resp,Pro_resp = a.Pro_resp,Caution_Flag = a.Caution_Flag,last_selection = a.last_selection,
last_participation = a.last_participation,number_parts = a.number_parts,calling_note = a.calling_note,notes = a.notes,CC1 = a.CC1,CC2 = a.CC2,CC3 = a.CC3,CC4 = a.CC4,CC5 = a.CC5,CC6 = a.CC6,CC7 = a.CC7,
CC8 = a.CC8,CC9 = a.CC9,CC10 = a.CC10,CC11 = a.CC11,CC12 = a.CC12,CC13 = a.CC13,CC14 = a.CC14,CC15 = a.CC15,CC16 = a.CC16,CC17 = a.CC17,CC18 = a.CC18,CC19 = a.CC19,CC20 = a.CC20,CC21 = a.CC21,CC22 = a.CC22,
CC23 = a.CC23,CC24 = a.CC24,CC25 = a.CC25,CC26 = a.CC26,CC27 = a.CC27,CC28 = a.CC28,CC29 = a.CC29,CC30 = a.CC30,CC31 = a.CC31,CC32 = a.CC32,CC33 = a.CC33,CC34 = a.CC34,CC35 = a.CC35,CC36 = a.CC36,CC37 = a.CC37,
CC38 = a.CC38,CC39 = a.CC39,CC40 = a.CC40,CC41 = a.CC41,CC42 = a.CC42,CC43 = a.CC43,CC44 = a.CC44,CC45 = a.CC45,CC46 = a.CC46,CC47 = a.CC47,CC48 = a.CC48,CC49 = a.CC49,CC50 = a.CC50,c_brand = a.c_brand,c_flavor = a.c_flavor,
c_length = a.c_length,c_type = a.c_type,c_past_purchases = a.c_past_purchases,c_other_brands = a.c_other_brands,car_make_1 = a.car_make_1,car_model_1 = a.car_model_1,car_year_1 = a.car_year_1,car_options_1 = a.car_options_1,
car_make_2 = a.car_make_2,car_model_2 = a.car_model_2,car_year_2 = a.car_year_2,car_options_2 = a.car_options_2
};
LNQH.RespondentStagings.InsertOnSubmit(r);
try
{
LNQH.SubmitChanges();
}
catch (Exception ex)
{
Console.WriteLine("\tError Occurred Getting Record From Remote Server: Details => " + ex);
Console.ReadLine();
}
}
var cnt = Convert.ToInt32(LNQH.RespondentStagings.Count());
if (cnt != 0)
{
List<string> nam;
List<string> phn;
List<string> wph;
List<string> cph;
List<string> good = new List<string>();
List<string> bad = new List<string>();
GetLists(out nam, out phn, out wph, out cph);
var fln = from a in LNQH.RespondentStagings
select new { a.recordid, a.fname, a.lname, a.phone, a.wphone, a.cellphone };
foreach(var a in fln) //was in parrallel for loop but scraped that
{
if (nam.Contains(a.fname + a.lname) && (phn.Contains(a.phone) || wph.Contains(a.wphone) || cph.Contains(a.cellphone)))
{
//Add To Filter Table
InsFilter(a.recordid);
bad.Add("\tAdded to Filter Table: " + a.fname + " " + a.lname);
}
else
{
//Add To Respondent Table
InsRespondent(a.recordid);
good.Add("\tAdded to Respondent Table: " + a.fname + " " + a.lname);
nam.Add(a.fname + a.lname);
phn.Add(a.phone);
wph.Add(a.wphone);
cph.Add(a.cellphone);
}
}
Console.WriteLine("The Following Records Have Been Added to the Main Table... ");
foreach (var a in good) { Console.WriteLine(a); }
Console.WriteLine("The Following Records Are Potential Duplicates and Have Been Added to Quarantine ... ");
foreach (var a in bad) { Console.WriteLine(a); }
}
else
{
Console.WriteLine("Zero Records Inserted ... ");
}
using (var con = new SqlConnection())
{
con.ConnectionString = @"Data Source=xxxxx;Initial Catalog=xxxx;User ID=xxxx;Password=xxxxx";
try
{
con.Open();
var del = new SqlCommand("DELETE FROM dbo.Respondent", con) {CommandType = CommandType.Text};
del.ExecuteNonQuery();
}
finally
{
con.Close();
}
}
//Console.ReadLine();
}
public static void InsFilter(int recid)
{
var LNQH = new LNQHDataContext();
var sel = from a in LNQH.RespondentStagings
where a.recordid == recid
select new
{ a.recordid,a.phone,a.wphone,a.wphone_ext,a.fax,a.cellphone,a.email,a.area_code,a.area_code_w,a.lname,a.fname,a.address,a.city,a.state,a.zip,a.county,a.address_w,a.city_w,a.state_w,a.zip_w,a.county_w,
a.employer,a.Occ_title,a.jobcode,a.hours,a.datebirth,a.gender,a.maritalstatus,a.income,a.education,a.race,a.Party,a.typehome,a.spousejobcode,a.spousehours,a.childgen1,a.childbd1,a.childgen2,a.childbd2,
a.childgen3,a.childbd3,a.childgen4,a.childbd4,a.childgen5,a.childbd5,a.childgen6,a.childbd6,a.resp_type,a.dateenter,a.dateupdated,a.referred_by_resp,a.Pro_resp,a.Caution_Flag,a.last_selection,a.last_participation,
a.number_parts,a.calling_note,a.notes,a.CC1,a.CC2,a.CC3,a.CC4,a.CC5,a.CC6,a.CC7,a.CC8,a.CC9,a.CC10,a.CC11,a.CC12,a.CC13,a.CC14,a.CC15,a.CC16,a.CC17,a.CC18,a.CC19,a.CC20,a.CC21,a.CC22,a.CC23,a.CC24,a.CC25,a.CC26,a.CC27,
a.CC28,a.CC29,a.CC30,a.CC31,a.CC32,a.CC33,a.CC34,a.CC35,a.CC36,a.CC37,a.CC38,a.CC39,a.CC40,a.CC41,a.CC42,a.CC43,a.CC44,a.CC45,a.CC46,a.CC47,a.CC48,a.CC49,a.CC50,a.c_brand,a.c_flavor,a.c_length,a.c_type,a.c_past_purchases,
a.c_other_brands,a.car_make_1,a.car_model_1,a.car_year_1,a.car_options_1,a.car_make_2,a.car_model_2,a.car_year_2,a.car_options_2,
};
foreach (var a in sel)
{
var f = new RespondentFiltered
{
phone_Y = a.phone,wphone_Y = a.wphone,wphone_ext_Y = a.wphone_ext,fax_Y = a.fax,cellphone_Y = a.cellphone,email_Y = a.email,area_code_Y = a.area_code,area_code_w_Y = a.area_code_w,lname_Y = a.lname,fname_Y = a.fname,
address_Y = a.address,city_Y = a.city,state_Y = a.state,zip_Y = a.zip,county_Y = a.county,address_w_Y = a.address_w,city_w_Y = a.city_w,state_w_Y = a.state_w,zip_w_Y = a.zip_w,county_w_Y = a.county_w,employer_Y = a.employer,
Occ_title_Y = a.Occ_title,jobcode_Y = a.jobcode,hours_Y = a.hours,datebirth_Y = a.datebirth,gender_Y = a.gender,maritalstatus_Y = a.maritalstatus,income_Y = a.income,education_Y = a.education,race_Y = a.race,Party_Y = a.Party,
typehome_Y = a.typehome,spousejobcode_Y = a.spousejobcode,spousehours_Y = a.spousehours,childgen1_Y = a.childgen1,childbd1_Y = a.childbd1,childgen2_Y = a.childgen2,childbd2_Y = a.childbd2,childgen3_Y = a.childgen3,childbd3_Y = a.childbd3,
childgen4_Y = a.childgen4,childbd4_Y = a.childbd4,childgen5_Y = a.childgen5,childbd5_Y = a.childbd5,childgen6_Y = a.childgen6,childbd6_Y = a.childbd6,resp_type_Y = a.resp_type,dateenter_Y = a.dateenter,dateupdated_Y = a.dateupdated,
referred_by_resp_Y = a.referred_by_resp,Pro_resp_Y = a.Pro_resp,Caution_Flag_Y = a.Caution_Flag,last_selection_Y = a.last_selection,last_participation_Y = a.last_participation,number_parts_Y = a.number_parts,calling_note_Y = a.calling_note,
notes_Y = a.notes,CC1_Y = a.CC1,CC2_Y = a.CC2,CC3_Y = a.CC3,CC4_Y = a.CC4,CC5_Y = a.CC5,CC6_Y = a.CC6,CC7_Y = a.CC7,CC8_Y = a.CC8,CC9_Y = a.CC9,CC10_Y = a.CC10,CC11_Y = a.CC11,CC12_Y = a.CC12,CC13_Y = a.CC13,CC14_Y = a.CC14,CC15_Y = a.CC15,
CC16_Y = a.CC16,CC17_Y = a.CC17,CC18_Y = a.CC18,CC19_Y = a.CC19,CC20_Y = a.CC20,CC21_Y = a.CC21,CC22_Y = a.CC22,CC23_Y = a.CC23,CC24_Y = a.CC24,CC25_Y = a.CC25,CC26_Y = a.CC26,CC27_Y = a.CC27,CC28_Y = a.CC28,CC29_Y = a.CC29,CC30_Y = a.CC30,
CC31_Y = a.CC31,CC32_Y = a.CC32,CC33_Y = a.CC33,CC34_Y = a.CC34,CC35_Y = a.CC35,CC36_Y = a.CC36,CC37_Y = a.CC37,CC38_Y = a.CC38,CC39_Y = a.CC39,CC40_Y = a.CC40,CC41_Y = a.CC41,CC42_Y = a.CC42,CC43_Y = a.CC43,CC44_Y = a.CC44,CC45_Y = a.CC45,
CC46_Y = a.CC46,CC47_Y = a.CC47,CC48_Y = a.CC48,CC49_Y = a.CC49,CC50_Y = a.CC50,c_brand_Y = a.c_brand,c_flavor_Y = a.c_flavor,c_length_Y = a.c_length,c_type_Y = a.c_type,c_past_purchases_Y = a.c_past_purchases,c_other_brands_Y = a.c_other_brands,
car_make_1_Y = a.car_make_1,car_model_1_Y = a.car_model_1,car_year_1_Y = a.car_year_1,car_options_1_Y = a.car_options_1,car_make_2_Y = a.car_make_2,car_model_2_Y = a.car_model_2,car_year_2_Y = a.car_year_2,car_options_2_Y = a.car_options_2
};
LNQH.RespondentFiltereds.InsertOnSubmit(f);
try { LNQH.SubmitChanges(); }
catch (Exception ex)
{
Console.WriteLine("\tError Occurred Moving Record To Staging Database: Details => " + ex);
Console.ReadLine();
}
}
var del = from b in LNQH.RespondentStagings
where b.recordid == recid
select b;
foreach (var b in del)
{
LNQH.RespondentStagings.DeleteOnSubmit(b);
}
try { LNQH.SubmitChanges(); }
catch (Exception ex)
{
Console.WriteLine("\tError Occurred Deleting Record From Staging Database: Details => " + ex);
Console.ReadLine();
}
}
public static void InsRespondent(int recid)
{
var LNQH = new LNQHDataContext();
var sel = from a in LNQH.RespondentStagings
where a.recordid == recid
select new
{ a.recordid,a.phone,a.wphone,a.wphone_ext,a.fax,a.cellphone,a.email,a.area_code,a.area_code_w,a.lname,a.fname,a.address,a.city,a.state,a.zip,a.county,a.address_w,a.city_w,a.state_w,a.zip_w,
a.county_w,a.employer,a.Occ_title,a.jobcode,a.hours,a.datebirth,a.gender,a.maritalstatus,a.income,a.education,a.race,a.Party,a.typehome,a.spousejobcode,a.spousehours,a.childgen1,a.childbd1,a.childgen2,
a.childbd2,a.childgen3,a.childbd3,a.childgen4,a.childbd4,a.childgen5,a.childbd5,a.childgen6,a.childbd6,a.resp_type,a.dateenter,a.dateupdated,a.referred_by_resp,a.Pro_resp,a.Caution_Flag,a.last_selection,
a.last_participation,a.number_parts,a.calling_note,a.notes,a.CC1,a.CC2,a.CC3,a.CC4,a.CC5,a.CC6,a.CC7,a.CC8,a.CC9,a.CC10,a.CC11,a.CC12,a.CC13,a.CC14,a.CC15,a.CC16,a.CC17,a.CC18,a.CC19,a.CC20,a.CC21,a.CC22,
a.CC23,a.CC24,a.CC25,a.CC26,a.CC27,a.CC28,a.CC29,a.CC30,a.CC31,a.CC32,a.CC33,a.CC34,a.CC35,a.CC36,a.CC37,a.CC38,a.CC39,a.CC40,a.CC41,a.CC42,a.CC43,a.CC44,a.CC45,a.CC46,a.CC47,a.CC48,a.CC49,a.CC50,a.c_brand,
a.c_flavor,a.c_length,a.c_type,a.c_past_purchases,a.c_other_brands,a.car_make_1,a.car_model_1,a.car_year_1,a.car_options_1,a.car_make_2,a.car_model_2,a.car_year_2,a.car_options_2,
};
foreach (var a in sel)
{
#region SQL_INSERT
using (var con = new SqlConnection())
{
con.ConnectionString = @"Data Source=xxxx;Initial Catalog=xxxx;User ID=sa;Password=xxxx";
try
{
con.Open();
var cmd = new SqlCommand("INS_Respond_Local", con) {CommandType = CommandType.StoredProcedure};
var del = new SqlCommand("DELETE FROM dbo.RespondentStaging WHERE recordid = '" + recid + "'", con) {CommandType = CommandType.Text};
#region DeclareSQL
//Bunchof Markup
#endregion
cmd.ExecuteNonQuery();
del.ExecuteNonQuery();
}
finally
{
con.Close();
}
#endregion
}
}
}
private static void GetLists(out List<string> nam, out List<string> phn, out List<string> wph, out List<string> cph)
{
var nam_x = new List<String>();
var phn_x = new List<String>();
var wph_x = new List<String>();
var cph_x = new List<String>();
using (var con = new SqlConnection())
{
con.ConnectionString = @"Data Source=xxxx;Initial Catalog=xxxx;User ID=sa;Password=xxxx";
con.Open();
var cmd = new SqlCommand("SELECT fname + lname as 'N', phone as 'P', wphone as 'W', cellphone as 'C' FROM dbo.Respondent WHERE fname is not null and lname is not null order by fname + lname", con) { CommandType = CommandType.Text };
try
{
var red = cmd.ExecuteReader();
while (red.Read())
{
nam_x.Add(red["N"].ToString());
phn_x.Add(red["P"].ToString());
wph_x.Add(red["W"].ToString());
cph_x.Add(red["C"].ToString());
}
}
catch { }
finally { con.Close(); }
}
nam = nam_x;
phn = phn_x;
wph = wph_x;
cph = cph_x;
}
}
}
| c# | linq-to-sql | null | null | null | 12/10/2011 02:32:24 | too localized | LINQ code works fine in w7 bombs in xp?
===
I have the following little import application, basically it
1) connects to a hosted sql server
2) pulls down a signup list
3) inserts to staging table
4) checks for duplication
5) filters non dupes into main table
oh BTW i came to the above conclusion by testing this on like 10 computers. Everywindows 7 box it ran no prob xp it gets to the first bit of LINQ and throws all kinds of crazy linq errors.
meat of code: (criticism welcome i'm still learning : ) )
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Threading;
//using System.Threading.Tasks;
namespace AfocImport
{
internal class Program
{
private static void Main(string[] args)
{
var LNQ = new LNQDataContext();
var sel = from a in LNQ.Respondents
where a.dateenter > Convert.ToDateTime(DateTime.Today.ToShortDateString())
select new
{
a.recordid,a.phone,a.wphone,a.wphone_ext,a.fax,a.cellphone,a.email,a.area_code,a.area_code_w,a.lname,a.fname,a.address,a.city,a.state,a.zip,a.county,a.address_w,a.city_w,a.state_w,
a.zip_w,a.county_w,a.employer,a.Occ_title,a.jobcode,a.hours,a.datebirth,a.gender,a.maritalstatus,a.income,a.education,a.race,a.Party,a.typehome,a.spousejobcode,a.spousehours,a.childgen1,
a.childbd1,a.childgen2,a.childbd2,a.childgen3,a.childbd3,a.childgen4,a.childbd4,a.childgen5,a.childbd5,a.childgen6,a.childbd6,a.resp_type,a.dateenter,a.dateupdated,a.referred_by_resp,
a.Pro_resp,a.Caution_Flag,a.last_selection,a.last_participation,a.number_parts,a.calling_note,a.notes,a.CC1,a.CC2,a.CC3,a.CC4,a.CC5,a.CC6,a.CC7,a.CC8,a.CC9,a.CC10,a.CC11,a.CC12,a.CC13,
a.CC14,a.CC15,a.CC16,a.CC17,a.CC18,a.CC19,a.CC20,a.CC21,a.CC22,a.CC23,a.CC24,a.CC25,a.CC26,a.CC27,a.CC28,a.CC29,a.CC30,a.CC31,a.CC32,a.CC33,a.CC34,a.CC35,a.CC36,a.CC37,a.CC38,a.CC39,
a.CC40,a.CC41,a.CC42,a.CC43,a.CC44,a.CC45,a.CC46,a.CC47,a.CC48,a.CC49,a.CC50,a.c_brand,a.c_flavor,a.c_length,a.c_type,a.c_past_purchases,a.c_other_brands,a.car_make_1,a.car_model_1,
a.car_year_1,a.car_options_1,a.car_make_2,a.car_model_2,a.car_year_2,a.car_options_2,
};
var LNQH = new LNQHDataContext();
foreach (var a in sel)
{
Console.WriteLine("\tInserting to Staging: " + a.fname + " " + a.lname);
var r = new RespondentStaging
{
recordid = a.recordid,phone = a.phone,wphone = a.wphone,wphone_ext = a.wphone_ext,fax = a.fax,cellphone = a.cellphone,email = a.email,area_code = a.area_code,area_code_w = a.area_code_w,
lname = a.lname,fname = a.fname,address = a.address,city = a.city,state = a.state,zip = a.zip,county = a.county,address_w = a.address_w,city_w = a.city_w,state_w = a.state_w,zip_w = a.zip_w,
county_w = a.county_w,employer = a.employer,Occ_title = a.Occ_title,jobcode = a.jobcode,hours = a.hours,datebirth = a.datebirth,gender = a.gender,maritalstatus = a.maritalstatus,income = a.income,
education = a.education,race = a.race,Party = a.Party,typehome = a.typehome,spousejobcode = a.spousejobcode,spousehours = a.spousehours,childgen1 = a.childgen1,childbd1 = a.childbd1,childgen2 = a.childgen2,
childbd2 = a.childbd2,childgen3 = a.childgen3,childbd3 = a.childbd3,childgen4 = a.childgen4,childbd4 = a.childbd4,childgen5 = a.childgen5,childbd5 = a.childbd5,childgen6 = a.childgen6,childbd6 = a.childbd6,
resp_type = a.resp_type,dateenter = a.dateenter,dateupdated = a.dateupdated,referred_by_resp = a.referred_by_resp,Pro_resp = a.Pro_resp,Caution_Flag = a.Caution_Flag,last_selection = a.last_selection,
last_participation = a.last_participation,number_parts = a.number_parts,calling_note = a.calling_note,notes = a.notes,CC1 = a.CC1,CC2 = a.CC2,CC3 = a.CC3,CC4 = a.CC4,CC5 = a.CC5,CC6 = a.CC6,CC7 = a.CC7,
CC8 = a.CC8,CC9 = a.CC9,CC10 = a.CC10,CC11 = a.CC11,CC12 = a.CC12,CC13 = a.CC13,CC14 = a.CC14,CC15 = a.CC15,CC16 = a.CC16,CC17 = a.CC17,CC18 = a.CC18,CC19 = a.CC19,CC20 = a.CC20,CC21 = a.CC21,CC22 = a.CC22,
CC23 = a.CC23,CC24 = a.CC24,CC25 = a.CC25,CC26 = a.CC26,CC27 = a.CC27,CC28 = a.CC28,CC29 = a.CC29,CC30 = a.CC30,CC31 = a.CC31,CC32 = a.CC32,CC33 = a.CC33,CC34 = a.CC34,CC35 = a.CC35,CC36 = a.CC36,CC37 = a.CC37,
CC38 = a.CC38,CC39 = a.CC39,CC40 = a.CC40,CC41 = a.CC41,CC42 = a.CC42,CC43 = a.CC43,CC44 = a.CC44,CC45 = a.CC45,CC46 = a.CC46,CC47 = a.CC47,CC48 = a.CC48,CC49 = a.CC49,CC50 = a.CC50,c_brand = a.c_brand,c_flavor = a.c_flavor,
c_length = a.c_length,c_type = a.c_type,c_past_purchases = a.c_past_purchases,c_other_brands = a.c_other_brands,car_make_1 = a.car_make_1,car_model_1 = a.car_model_1,car_year_1 = a.car_year_1,car_options_1 = a.car_options_1,
car_make_2 = a.car_make_2,car_model_2 = a.car_model_2,car_year_2 = a.car_year_2,car_options_2 = a.car_options_2
};
LNQH.RespondentStagings.InsertOnSubmit(r);
try
{
LNQH.SubmitChanges();
}
catch (Exception ex)
{
Console.WriteLine("\tError Occurred Getting Record From Remote Server: Details => " + ex);
Console.ReadLine();
}
}
var cnt = Convert.ToInt32(LNQH.RespondentStagings.Count());
if (cnt != 0)
{
List<string> nam;
List<string> phn;
List<string> wph;
List<string> cph;
List<string> good = new List<string>();
List<string> bad = new List<string>();
GetLists(out nam, out phn, out wph, out cph);
var fln = from a in LNQH.RespondentStagings
select new { a.recordid, a.fname, a.lname, a.phone, a.wphone, a.cellphone };
foreach(var a in fln) //was in parrallel for loop but scraped that
{
if (nam.Contains(a.fname + a.lname) && (phn.Contains(a.phone) || wph.Contains(a.wphone) || cph.Contains(a.cellphone)))
{
//Add To Filter Table
InsFilter(a.recordid);
bad.Add("\tAdded to Filter Table: " + a.fname + " " + a.lname);
}
else
{
//Add To Respondent Table
InsRespondent(a.recordid);
good.Add("\tAdded to Respondent Table: " + a.fname + " " + a.lname);
nam.Add(a.fname + a.lname);
phn.Add(a.phone);
wph.Add(a.wphone);
cph.Add(a.cellphone);
}
}
Console.WriteLine("The Following Records Have Been Added to the Main Table... ");
foreach (var a in good) { Console.WriteLine(a); }
Console.WriteLine("The Following Records Are Potential Duplicates and Have Been Added to Quarantine ... ");
foreach (var a in bad) { Console.WriteLine(a); }
}
else
{
Console.WriteLine("Zero Records Inserted ... ");
}
using (var con = new SqlConnection())
{
con.ConnectionString = @"Data Source=xxxxx;Initial Catalog=xxxx;User ID=xxxx;Password=xxxxx";
try
{
con.Open();
var del = new SqlCommand("DELETE FROM dbo.Respondent", con) {CommandType = CommandType.Text};
del.ExecuteNonQuery();
}
finally
{
con.Close();
}
}
//Console.ReadLine();
}
public static void InsFilter(int recid)
{
var LNQH = new LNQHDataContext();
var sel = from a in LNQH.RespondentStagings
where a.recordid == recid
select new
{ a.recordid,a.phone,a.wphone,a.wphone_ext,a.fax,a.cellphone,a.email,a.area_code,a.area_code_w,a.lname,a.fname,a.address,a.city,a.state,a.zip,a.county,a.address_w,a.city_w,a.state_w,a.zip_w,a.county_w,
a.employer,a.Occ_title,a.jobcode,a.hours,a.datebirth,a.gender,a.maritalstatus,a.income,a.education,a.race,a.Party,a.typehome,a.spousejobcode,a.spousehours,a.childgen1,a.childbd1,a.childgen2,a.childbd2,
a.childgen3,a.childbd3,a.childgen4,a.childbd4,a.childgen5,a.childbd5,a.childgen6,a.childbd6,a.resp_type,a.dateenter,a.dateupdated,a.referred_by_resp,a.Pro_resp,a.Caution_Flag,a.last_selection,a.last_participation,
a.number_parts,a.calling_note,a.notes,a.CC1,a.CC2,a.CC3,a.CC4,a.CC5,a.CC6,a.CC7,a.CC8,a.CC9,a.CC10,a.CC11,a.CC12,a.CC13,a.CC14,a.CC15,a.CC16,a.CC17,a.CC18,a.CC19,a.CC20,a.CC21,a.CC22,a.CC23,a.CC24,a.CC25,a.CC26,a.CC27,
a.CC28,a.CC29,a.CC30,a.CC31,a.CC32,a.CC33,a.CC34,a.CC35,a.CC36,a.CC37,a.CC38,a.CC39,a.CC40,a.CC41,a.CC42,a.CC43,a.CC44,a.CC45,a.CC46,a.CC47,a.CC48,a.CC49,a.CC50,a.c_brand,a.c_flavor,a.c_length,a.c_type,a.c_past_purchases,
a.c_other_brands,a.car_make_1,a.car_model_1,a.car_year_1,a.car_options_1,a.car_make_2,a.car_model_2,a.car_year_2,a.car_options_2,
};
foreach (var a in sel)
{
var f = new RespondentFiltered
{
phone_Y = a.phone,wphone_Y = a.wphone,wphone_ext_Y = a.wphone_ext,fax_Y = a.fax,cellphone_Y = a.cellphone,email_Y = a.email,area_code_Y = a.area_code,area_code_w_Y = a.area_code_w,lname_Y = a.lname,fname_Y = a.fname,
address_Y = a.address,city_Y = a.city,state_Y = a.state,zip_Y = a.zip,county_Y = a.county,address_w_Y = a.address_w,city_w_Y = a.city_w,state_w_Y = a.state_w,zip_w_Y = a.zip_w,county_w_Y = a.county_w,employer_Y = a.employer,
Occ_title_Y = a.Occ_title,jobcode_Y = a.jobcode,hours_Y = a.hours,datebirth_Y = a.datebirth,gender_Y = a.gender,maritalstatus_Y = a.maritalstatus,income_Y = a.income,education_Y = a.education,race_Y = a.race,Party_Y = a.Party,
typehome_Y = a.typehome,spousejobcode_Y = a.spousejobcode,spousehours_Y = a.spousehours,childgen1_Y = a.childgen1,childbd1_Y = a.childbd1,childgen2_Y = a.childgen2,childbd2_Y = a.childbd2,childgen3_Y = a.childgen3,childbd3_Y = a.childbd3,
childgen4_Y = a.childgen4,childbd4_Y = a.childbd4,childgen5_Y = a.childgen5,childbd5_Y = a.childbd5,childgen6_Y = a.childgen6,childbd6_Y = a.childbd6,resp_type_Y = a.resp_type,dateenter_Y = a.dateenter,dateupdated_Y = a.dateupdated,
referred_by_resp_Y = a.referred_by_resp,Pro_resp_Y = a.Pro_resp,Caution_Flag_Y = a.Caution_Flag,last_selection_Y = a.last_selection,last_participation_Y = a.last_participation,number_parts_Y = a.number_parts,calling_note_Y = a.calling_note,
notes_Y = a.notes,CC1_Y = a.CC1,CC2_Y = a.CC2,CC3_Y = a.CC3,CC4_Y = a.CC4,CC5_Y = a.CC5,CC6_Y = a.CC6,CC7_Y = a.CC7,CC8_Y = a.CC8,CC9_Y = a.CC9,CC10_Y = a.CC10,CC11_Y = a.CC11,CC12_Y = a.CC12,CC13_Y = a.CC13,CC14_Y = a.CC14,CC15_Y = a.CC15,
CC16_Y = a.CC16,CC17_Y = a.CC17,CC18_Y = a.CC18,CC19_Y = a.CC19,CC20_Y = a.CC20,CC21_Y = a.CC21,CC22_Y = a.CC22,CC23_Y = a.CC23,CC24_Y = a.CC24,CC25_Y = a.CC25,CC26_Y = a.CC26,CC27_Y = a.CC27,CC28_Y = a.CC28,CC29_Y = a.CC29,CC30_Y = a.CC30,
CC31_Y = a.CC31,CC32_Y = a.CC32,CC33_Y = a.CC33,CC34_Y = a.CC34,CC35_Y = a.CC35,CC36_Y = a.CC36,CC37_Y = a.CC37,CC38_Y = a.CC38,CC39_Y = a.CC39,CC40_Y = a.CC40,CC41_Y = a.CC41,CC42_Y = a.CC42,CC43_Y = a.CC43,CC44_Y = a.CC44,CC45_Y = a.CC45,
CC46_Y = a.CC46,CC47_Y = a.CC47,CC48_Y = a.CC48,CC49_Y = a.CC49,CC50_Y = a.CC50,c_brand_Y = a.c_brand,c_flavor_Y = a.c_flavor,c_length_Y = a.c_length,c_type_Y = a.c_type,c_past_purchases_Y = a.c_past_purchases,c_other_brands_Y = a.c_other_brands,
car_make_1_Y = a.car_make_1,car_model_1_Y = a.car_model_1,car_year_1_Y = a.car_year_1,car_options_1_Y = a.car_options_1,car_make_2_Y = a.car_make_2,car_model_2_Y = a.car_model_2,car_year_2_Y = a.car_year_2,car_options_2_Y = a.car_options_2
};
LNQH.RespondentFiltereds.InsertOnSubmit(f);
try { LNQH.SubmitChanges(); }
catch (Exception ex)
{
Console.WriteLine("\tError Occurred Moving Record To Staging Database: Details => " + ex);
Console.ReadLine();
}
}
var del = from b in LNQH.RespondentStagings
where b.recordid == recid
select b;
foreach (var b in del)
{
LNQH.RespondentStagings.DeleteOnSubmit(b);
}
try { LNQH.SubmitChanges(); }
catch (Exception ex)
{
Console.WriteLine("\tError Occurred Deleting Record From Staging Database: Details => " + ex);
Console.ReadLine();
}
}
public static void InsRespondent(int recid)
{
var LNQH = new LNQHDataContext();
var sel = from a in LNQH.RespondentStagings
where a.recordid == recid
select new
{ a.recordid,a.phone,a.wphone,a.wphone_ext,a.fax,a.cellphone,a.email,a.area_code,a.area_code_w,a.lname,a.fname,a.address,a.city,a.state,a.zip,a.county,a.address_w,a.city_w,a.state_w,a.zip_w,
a.county_w,a.employer,a.Occ_title,a.jobcode,a.hours,a.datebirth,a.gender,a.maritalstatus,a.income,a.education,a.race,a.Party,a.typehome,a.spousejobcode,a.spousehours,a.childgen1,a.childbd1,a.childgen2,
a.childbd2,a.childgen3,a.childbd3,a.childgen4,a.childbd4,a.childgen5,a.childbd5,a.childgen6,a.childbd6,a.resp_type,a.dateenter,a.dateupdated,a.referred_by_resp,a.Pro_resp,a.Caution_Flag,a.last_selection,
a.last_participation,a.number_parts,a.calling_note,a.notes,a.CC1,a.CC2,a.CC3,a.CC4,a.CC5,a.CC6,a.CC7,a.CC8,a.CC9,a.CC10,a.CC11,a.CC12,a.CC13,a.CC14,a.CC15,a.CC16,a.CC17,a.CC18,a.CC19,a.CC20,a.CC21,a.CC22,
a.CC23,a.CC24,a.CC25,a.CC26,a.CC27,a.CC28,a.CC29,a.CC30,a.CC31,a.CC32,a.CC33,a.CC34,a.CC35,a.CC36,a.CC37,a.CC38,a.CC39,a.CC40,a.CC41,a.CC42,a.CC43,a.CC44,a.CC45,a.CC46,a.CC47,a.CC48,a.CC49,a.CC50,a.c_brand,
a.c_flavor,a.c_length,a.c_type,a.c_past_purchases,a.c_other_brands,a.car_make_1,a.car_model_1,a.car_year_1,a.car_options_1,a.car_make_2,a.car_model_2,a.car_year_2,a.car_options_2,
};
foreach (var a in sel)
{
#region SQL_INSERT
using (var con = new SqlConnection())
{
con.ConnectionString = @"Data Source=xxxx;Initial Catalog=xxxx;User ID=sa;Password=xxxx";
try
{
con.Open();
var cmd = new SqlCommand("INS_Respond_Local", con) {CommandType = CommandType.StoredProcedure};
var del = new SqlCommand("DELETE FROM dbo.RespondentStaging WHERE recordid = '" + recid + "'", con) {CommandType = CommandType.Text};
#region DeclareSQL
//Bunchof Markup
#endregion
cmd.ExecuteNonQuery();
del.ExecuteNonQuery();
}
finally
{
con.Close();
}
#endregion
}
}
}
private static void GetLists(out List<string> nam, out List<string> phn, out List<string> wph, out List<string> cph)
{
var nam_x = new List<String>();
var phn_x = new List<String>();
var wph_x = new List<String>();
var cph_x = new List<String>();
using (var con = new SqlConnection())
{
con.ConnectionString = @"Data Source=xxxx;Initial Catalog=xxxx;User ID=sa;Password=xxxx";
con.Open();
var cmd = new SqlCommand("SELECT fname + lname as 'N', phone as 'P', wphone as 'W', cellphone as 'C' FROM dbo.Respondent WHERE fname is not null and lname is not null order by fname + lname", con) { CommandType = CommandType.Text };
try
{
var red = cmd.ExecuteReader();
while (red.Read())
{
nam_x.Add(red["N"].ToString());
phn_x.Add(red["P"].ToString());
wph_x.Add(red["W"].ToString());
cph_x.Add(red["C"].ToString());
}
}
catch { }
finally { con.Close(); }
}
nam = nam_x;
phn = phn_x;
wph = wph_x;
cph = cph_x;
}
}
}
| 3 |
11,057,696 | 06/15/2012 20:21:48 | 1,361,315 | 04/27/2012 14:12:23 | 77 | 0 | Overview of backbone, nodejs etc. | Can someone give me a birds eye view of backbone, nodejs etc.
How do these different technologies/frameworks fit together.
Meaning, if I use nodejs, do I have to use backbone?
What about cofeescript, does it work with backbone?
| java | nio | netty | null | null | 06/16/2012 01:00:29 | not constructive | Overview of backbone, nodejs etc.
===
Can someone give me a birds eye view of backbone, nodejs etc.
How do these different technologies/frameworks fit together.
Meaning, if I use nodejs, do I have to use backbone?
What about cofeescript, does it work with backbone?
| 4 |
9,728,252 | 03/15/2012 21:13:21 | 1,094,268 | 12/12/2011 17:45:27 | 89 | 1 | How to configure Netbeans to format class field declarations (or even local variables) to line up? | I can't find an option in Netbeans (7) to align variables. For example, I want to change this:
private int hello = 1;
private static int hello2 = 1;
public static String hello3 = "yo";
private final static int HELLO3 = 1;
private String stringy = "testing hello";
private char c = 'a';
into this (or something similar):
private int hello = 1;
private static int hello2 = 1;
private final static int HELLO3 = 1;
private char c = 'a';
private String stringy = "testing hello";
public static String hello3 = "yo";
when I press Format (`alt+shift+f`).
Also, I'd like it to be applicable to local variables, so that this:
private void Test()
{
int x = 2;
String z = "test";
int[] y = {1, 2, 3};
}
would change into this:
private void Test()
{
int x = 2;
int[] y = {1, 2, 3};
String z = "test";
}
I've looked in `Tools->Options->Editor->Language "Java"->Category "Alignment"`, however, I found nothing that affects this. | java | netbeans | formatting | settings | netbeans-7 | null | open | How to configure Netbeans to format class field declarations (or even local variables) to line up?
===
I can't find an option in Netbeans (7) to align variables. For example, I want to change this:
private int hello = 1;
private static int hello2 = 1;
public static String hello3 = "yo";
private final static int HELLO3 = 1;
private String stringy = "testing hello";
private char c = 'a';
into this (or something similar):
private int hello = 1;
private static int hello2 = 1;
private final static int HELLO3 = 1;
private char c = 'a';
private String stringy = "testing hello";
public static String hello3 = "yo";
when I press Format (`alt+shift+f`).
Also, I'd like it to be applicable to local variables, so that this:
private void Test()
{
int x = 2;
String z = "test";
int[] y = {1, 2, 3};
}
would change into this:
private void Test()
{
int x = 2;
int[] y = {1, 2, 3};
String z = "test";
}
I've looked in `Tools->Options->Editor->Language "Java"->Category "Alignment"`, however, I found nothing that affects this. | 0 |
6,418,963 | 06/21/2011 00:07:04 | 638,577 | 03/01/2011 00:49:50 | 66 | 3 | ruby rails https | I have an administration namespace in Rails and it uses SslRequirement to protect the controllers that are in administration.
I also user the following in my routes.
namespace :administration, :constraints => { :protocol => secure_protocol } do
The problem is that I have certain controllers that I need to access from within the administration namespace that exist outside the administration namespace. I want these controllers to be accessible via http or https but Rails seems to redirect back to http.
Is it because of the routes that they are redirecting? Can I specify in the routes that they can be either http or https? | ruby | ruby-on-rails-3 | https | routes | null | null | open | ruby rails https
===
I have an administration namespace in Rails and it uses SslRequirement to protect the controllers that are in administration.
I also user the following in my routes.
namespace :administration, :constraints => { :protocol => secure_protocol } do
The problem is that I have certain controllers that I need to access from within the administration namespace that exist outside the administration namespace. I want these controllers to be accessible via http or https but Rails seems to redirect back to http.
Is it because of the routes that they are redirecting? Can I specify in the routes that they can be either http or https? | 0 |
9,999,242 | 04/03/2012 18:32:52 | 642,022 | 03/02/2011 21:55:20 | 513 | 6 | how to run a php file from another server? | i am trying to do a video converter that grabs some files from a html form and converts them.
i would like to do the conversion on another server, `.11`, since i don't want to overload the main server `.10`
i can set up a network folder between the two servers, `/media`, and have a `convert.php` on `.11` that will run the ffmpeg command.
if i run that php file from `.10` then will the video conversion process take resources from `.11` or from `.10` ? Seems to me that `.10` will be affected even if the php file is on `.11`.
I could do a cron job, but i really don't want to.
For this project i am using zend framework
Any ideas how to solve this issue?
thanks | php | video-processing | remote-server | cron-task | null | null | open | how to run a php file from another server?
===
i am trying to do a video converter that grabs some files from a html form and converts them.
i would like to do the conversion on another server, `.11`, since i don't want to overload the main server `.10`
i can set up a network folder between the two servers, `/media`, and have a `convert.php` on `.11` that will run the ffmpeg command.
if i run that php file from `.10` then will the video conversion process take resources from `.11` or from `.10` ? Seems to me that `.10` will be affected even if the php file is on `.11`.
I could do a cron job, but i really don't want to.
For this project i am using zend framework
Any ideas how to solve this issue?
thanks | 0 |
6,705,709 | 07/15/2011 10:32:53 | 846,257 | 07/15/2011 10:32:53 | 1 | 0 | Login and registration form on one page with Django. | I have been stuck on this for a while. I am trying to put both the login and registration forms on the same page, however I have been getting multiple errors depending on which approach I try. The page is actually able to load fine, however neither of the form fields will load. And then when I hit the register or login button (both type submit), I most recently am getting a csrf related error. Any suggestions on how to implement both forms on the same page would be greatly appreciated. | python | django | django-forms | django-authentication | null | null | open | Login and registration form on one page with Django.
===
I have been stuck on this for a while. I am trying to put both the login and registration forms on the same page, however I have been getting multiple errors depending on which approach I try. The page is actually able to load fine, however neither of the form fields will load. And then when I hit the register or login button (both type submit), I most recently am getting a csrf related error. Any suggestions on how to implement both forms on the same page would be greatly appreciated. | 0 |
11,275,712 | 06/30/2012 16:26:45 | 968,153 | 09/28/2011 00:56:02 | 160 | 14 | wxwidgets in win7 virtual alloc invalid address | Quick question,how am i going to fix up "**VirtualAlloc(commit):** attempt to access invalid address"?
I am using **wxwidgets2.8** in **code blocks** under **win7** to develop a simple application which basically upload an image and do something around this image in wxStaticBitmap.
So I just added a wxStaticBitmap in a sizer and actually did nothing furthermore and I tried to compile and run then the compiler(gcc) gave me that error info. | wxwidgets | codeblocks | vc | null | null | null | open | wxwidgets in win7 virtual alloc invalid address
===
Quick question,how am i going to fix up "**VirtualAlloc(commit):** attempt to access invalid address"?
I am using **wxwidgets2.8** in **code blocks** under **win7** to develop a simple application which basically upload an image and do something around this image in wxStaticBitmap.
So I just added a wxStaticBitmap in a sizer and actually did nothing furthermore and I tried to compile and run then the compiler(gcc) gave me that error info. | 0 |
10,515,381 | 05/09/2012 11:44:07 | 927,554 | 09/04/2011 13:07:00 | 349 | 26 | Validating the phone number with a regex ruby | I am trying to validate if the phone number is a digit or not :-
This is my user.rg
number_regex = /\d[0-9]\)*\z/
validates_format_of :phone, :with => number_regex, :massage => "Only positive number without spaces are allowed"
This is my view.html.haml
%li
%strong=f.label :phone, "Phone Number"
=f.text_field :phone, :placeholder => "Your phone number"
This is controller
def edit_profile
@user = current_user
request.method.inspect
if request.method == "POST"
if @user.update_attributes(params[:user])
sign_in(@user, :bypass => true)
flash[:success] = "You have updated your profile successfully"
redirect_to dashboard_index_path
else
flash[:error] = "Profile could not be updated"
render :action => "edit_profile"
end
end
end
When I enter the number in the text field for the first time it validates prperly, but if I enter the correct format and then try to enter the wrong format it skips validations and I get a flash message that profile has been successfully updated, however the wrong value (with letters) is not saved.
What could be the problem here? | ruby-on-rails | ruby-on-rails-3.1 | null | null | null | null | open | Validating the phone number with a regex ruby
===
I am trying to validate if the phone number is a digit or not :-
This is my user.rg
number_regex = /\d[0-9]\)*\z/
validates_format_of :phone, :with => number_regex, :massage => "Only positive number without spaces are allowed"
This is my view.html.haml
%li
%strong=f.label :phone, "Phone Number"
=f.text_field :phone, :placeholder => "Your phone number"
This is controller
def edit_profile
@user = current_user
request.method.inspect
if request.method == "POST"
if @user.update_attributes(params[:user])
sign_in(@user, :bypass => true)
flash[:success] = "You have updated your profile successfully"
redirect_to dashboard_index_path
else
flash[:error] = "Profile could not be updated"
render :action => "edit_profile"
end
end
end
When I enter the number in the text field for the first time it validates prperly, but if I enter the correct format and then try to enter the wrong format it skips validations and I get a flash message that profile has been successfully updated, however the wrong value (with letters) is not saved.
What could be the problem here? | 0 |
10,680,669 | 05/21/2012 06:53:54 | 1,350,925 | 04/23/2012 09:14:26 | 1 | 0 | how do i change my JSONdata value in TextView(id1) onClick? | // here is my textview
TextView ci = new TextView(this);
ci = (TextView)findViewById(R.id.id1);
//here is my JSONdata value
String idn= j3.getString("id");
ci.setText(idn);
//here is my function
public void getdata(String name, int id, String url1)
{
ImageView i1 = new ImageView(this);
TextView t1 = new TextView(this);
TextView t2 = new TextView(this);
RelativeLayout rl1 = (RelativeLayout)findViewById(R.id.layout1);
RelativeLayout.LayoutParams innerLP1 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
innerLP1.addRule(RelativeLayout.CENTER_IN_PARENT);
innerLP1.topMargin=(30);
rl1.setLayoutParams(innerLP1);
rl1.addView(i1);
rl1.addView(t1);
rl1.addView(t2);
flipper.addView(rl1); | android | dynamic-data | null | null | null | 05/21/2012 19:25:52 | not a real question | how do i change my JSONdata value in TextView(id1) onClick?
===
// here is my textview
TextView ci = new TextView(this);
ci = (TextView)findViewById(R.id.id1);
//here is my JSONdata value
String idn= j3.getString("id");
ci.setText(idn);
//here is my function
public void getdata(String name, int id, String url1)
{
ImageView i1 = new ImageView(this);
TextView t1 = new TextView(this);
TextView t2 = new TextView(this);
RelativeLayout rl1 = (RelativeLayout)findViewById(R.id.layout1);
RelativeLayout.LayoutParams innerLP1 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
innerLP1.addRule(RelativeLayout.CENTER_IN_PARENT);
innerLP1.topMargin=(30);
rl1.setLayoutParams(innerLP1);
rl1.addView(i1);
rl1.addView(t1);
rl1.addView(t2);
flipper.addView(rl1); | 1 |
9,594,549 | 03/07/2012 01:29:03 | 352,335 | 05/27/2010 20:03:28 | 42 | 0 | IF NOT EXISTS in save function causing error | In order to not save a user that already exists in the stage, I am using the following IF NOT EXISTS statement in my query.
public function save() {
// new record
if ( $this->id == null ) {
$query = "IF NOT EXISTS(SELECT * FROM Table_A WHERE user_id ='{$this->user_id}' and stage_id = '{$this->stage_id}') INSERT INTO Table_A(".
'id, '.
'user_id, '.
'stage_id, '.
'create_date '.
') OUTPUT inserted.id '.
'VALUES ('.
'newid(), '.
'%s, '.
'%s, '.
'getdate()'.
')';
$rs = $this->db->Execute($query);
if ( $rs->EOF ) {
return false;
}
$rs->Close();
}
**..It does the job, but when the user does exist it's throwing this error:**
PHP Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> ADODB.Recordset<br/><b>Description:</b> Operation is not allowed when the object is closed.'
Wasn't sure the best way to handle this was, any help is appreciated, thank you! | php | sql | null | null | null | null | open | IF NOT EXISTS in save function causing error
===
In order to not save a user that already exists in the stage, I am using the following IF NOT EXISTS statement in my query.
public function save() {
// new record
if ( $this->id == null ) {
$query = "IF NOT EXISTS(SELECT * FROM Table_A WHERE user_id ='{$this->user_id}' and stage_id = '{$this->stage_id}') INSERT INTO Table_A(".
'id, '.
'user_id, '.
'stage_id, '.
'create_date '.
') OUTPUT inserted.id '.
'VALUES ('.
'newid(), '.
'%s, '.
'%s, '.
'getdate()'.
')';
$rs = $this->db->Execute($query);
if ( $rs->EOF ) {
return false;
}
$rs->Close();
}
**..It does the job, but when the user does exist it's throwing this error:**
PHP Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> ADODB.Recordset<br/><b>Description:</b> Operation is not allowed when the object is closed.'
Wasn't sure the best way to handle this was, any help is appreciated, thank you! | 0 |
9,707,957 | 03/14/2012 18:31:55 | 846,351 | 07/15/2011 11:20:02 | 435 | 12 | Parsin String " [ word1 ] word2 [ word3 ] " | I have an input string I know it is a valid Cstring that ends with `'\0'`
I need to recognize if the string is in the format
" word1 [ %word2 ] "
when `word1` and `word2` are **expresssions** that are **strings of alphanumericals**.
there maybe **any number of white-spaces** (tabs and spaces) in the places iv put spaces
got a similar problem with
" [ word1 ] word2 [ word3 ] "
I thought about strtok. but it wouldn't separate between
" [ word1 ] word2 [ word3 ] "
and
" [ word1 [ word2 [ word3 [ "
P.S.
**all code must be strict Ansi C89 Pedantic.** | c | string-parsing | null | null | null | 03/15/2012 06:01:21 | not a real question | Parsin String " [ word1 ] word2 [ word3 ] "
===
I have an input string I know it is a valid Cstring that ends with `'\0'`
I need to recognize if the string is in the format
" word1 [ %word2 ] "
when `word1` and `word2` are **expresssions** that are **strings of alphanumericals**.
there maybe **any number of white-spaces** (tabs and spaces) in the places iv put spaces
got a similar problem with
" [ word1 ] word2 [ word3 ] "
I thought about strtok. but it wouldn't separate between
" [ word1 ] word2 [ word3 ] "
and
" [ word1 [ word2 [ word3 [ "
P.S.
**all code must be strict Ansi C89 Pedantic.** | 1 |
10,359,993 | 04/28/2012 02:07:17 | 1,348,509 | 04/21/2012 15:47:26 | 81 | 0 | Going to a certain position in a string | I want to get to a certain point on a string that is opposite (from the negative side) to that of what I am given.
AAAAAAAAAACCCCCCCCCCTTTTTTTTTTGGGGGGGGGG
TTTTTTTTTTGGGGGGGGGGAAAAAAAAAACCCCCCCCCC
So you need to convert coordinates. On the bottom strand, base 0 (the right-most C) is opposed to base 39 on the top strand. Base 1 is against base 38. Base 2 is against case 37. (Important point: notice what happens when you add these two numbers up — every time.) So base 10 is against base 29, and base 19 is against base 20.
So: if I want to find base 10-20 on the bottom strand, I can look at base 20-29 on the top (and then reverse-complement it).
I have written the following:
fp = open(infile, 'r')
for line in fp:
tokens = line.split()
exonstarts = tokens[8][:-1].split(',')
exonends = tokens[9][:-1].split(',')
zipped = list(zip(exonstarts, exonends))
chrom_len = len(chr_string)
s = ''.join(bc[base.upper()] for base in chr_string[-starts-1:-ends-1] for starts, ends in zipped)+'\n'
Yet, every time I do this I get:
Error: global name 'starts' is not defined
How do I fix this?? | python | string | coordinates | null | null | 04/30/2012 15:33:43 | too localized | Going to a certain position in a string
===
I want to get to a certain point on a string that is opposite (from the negative side) to that of what I am given.
AAAAAAAAAACCCCCCCCCCTTTTTTTTTTGGGGGGGGGG
TTTTTTTTTTGGGGGGGGGGAAAAAAAAAACCCCCCCCCC
So you need to convert coordinates. On the bottom strand, base 0 (the right-most C) is opposed to base 39 on the top strand. Base 1 is against base 38. Base 2 is against case 37. (Important point: notice what happens when you add these two numbers up — every time.) So base 10 is against base 29, and base 19 is against base 20.
So: if I want to find base 10-20 on the bottom strand, I can look at base 20-29 on the top (and then reverse-complement it).
I have written the following:
fp = open(infile, 'r')
for line in fp:
tokens = line.split()
exonstarts = tokens[8][:-1].split(',')
exonends = tokens[9][:-1].split(',')
zipped = list(zip(exonstarts, exonends))
chrom_len = len(chr_string)
s = ''.join(bc[base.upper()] for base in chr_string[-starts-1:-ends-1] for starts, ends in zipped)+'\n'
Yet, every time I do this I get:
Error: global name 'starts' is not defined
How do I fix this?? | 3 |
6,672,294 | 07/12/2011 23:07:43 | 841,730 | 07/12/2011 23:07:31 | 1 | 0 | Where do I start with a Java project that carries out menial Windows tasks? | I'm a novice Java programmer and I am trying to figure out where I should go to figure out how to make a Java program that interacts with my operating system.
E.g. a program with a button that upon clicking will rename all files in a folder to random numbers.
Anything that will allow me to write a program that will save me time later down the road. I am very curious.
Thanks, SO. | java | windows | null | null | null | 07/14/2011 01:59:31 | not a real question | Where do I start with a Java project that carries out menial Windows tasks?
===
I'm a novice Java programmer and I am trying to figure out where I should go to figure out how to make a Java program that interacts with my operating system.
E.g. a program with a button that upon clicking will rename all files in a folder to random numbers.
Anything that will allow me to write a program that will save me time later down the road. I am very curious.
Thanks, SO. | 1 |
10,269,416 | 04/22/2012 15:48:31 | 1,334,195 | 04/15/2012 06:53:20 | 56 | 10 | Extracting pages from a PDF file using PHP | I'm using php and I want to open an existing pdf file, extract (clone) a range of pages to a new one and then save the new one to disk. I know there are several classes like FPDF, TCPDF, Zend Framework etc. I would like to know which is best and, if possible, to have an example. | php | zend-framework | pdf | tcpdf | fpdf | 04/23/2012 18:36:51 | not constructive | Extracting pages from a PDF file using PHP
===
I'm using php and I want to open an existing pdf file, extract (clone) a range of pages to a new one and then save the new one to disk. I know there are several classes like FPDF, TCPDF, Zend Framework etc. I would like to know which is best and, if possible, to have an example. | 4 |
10,126,591 | 04/12/2012 15:18:28 | 388,053 | 07/09/2010 19:06:09 | 332 | 31 | How to defeat this java.net.ProtocolException: Connection already established in Android | I having this code for make a request.
@Override
protected Boolean doInBackground(Object... argList) {
/*
* filling all the variables here..
String method = (String) argList[3];
**/
HttpsURLConnection connection = null;
try {
URL connectURL = new URL(url);
connection = (HttpsURLConnection) connectURL.openConnection();
connection.setRequestProperty("connection", "close");
connection.setRequestMethod(method); // this line
connection.setReadTimeout(10000);
/*
* futher code for process GET AND POST Request.
**/
} catch (IOException e) {
connection.disconnect();
} finally{
connection.disconnect();
}
### Exception ###
> A standard blockquote is indented
04-12 19:30:27.147: WARN/System.err(431): java.net.ProtocolException: Connection already established
04-12 19:30:27.419: WARN/System.err(431): at java.net.HttpURLConnection.setRequestMethod(HttpURLConnection.java:429)
04-12 19:30:27.447: WARN/System.err(431): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.setRequestMethod(HttpsURLConnectionImpl.java:127)
04-12 19:30:27.487: WARN/System.err(431): at com.app.services.AppServiceManager.doInBackground(AppServiceManager.java:297)
04-12 19:30:27.526: WARN/System.err(431): at com.app.services.AppServiceManager.doInBackground(AppServiceManager.java:1)
04-12 19:30:27.559: WARN/System.err(431): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-12 19:30:27.617: WARN/System.err(431): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-12 19:30:27.636: WARN/System.err(431): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-12 19:30:27.716: WARN/System.err(431): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-12 19:30:27.751: WARN/System.err(431): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-12 19:30:27.798: WARN/System.err(431): at java.lang.Thread.run(Thread.java:1096)
| java | android | null | null | null | null | open | How to defeat this java.net.ProtocolException: Connection already established in Android
===
I having this code for make a request.
@Override
protected Boolean doInBackground(Object... argList) {
/*
* filling all the variables here..
String method = (String) argList[3];
**/
HttpsURLConnection connection = null;
try {
URL connectURL = new URL(url);
connection = (HttpsURLConnection) connectURL.openConnection();
connection.setRequestProperty("connection", "close");
connection.setRequestMethod(method); // this line
connection.setReadTimeout(10000);
/*
* futher code for process GET AND POST Request.
**/
} catch (IOException e) {
connection.disconnect();
} finally{
connection.disconnect();
}
### Exception ###
> A standard blockquote is indented
04-12 19:30:27.147: WARN/System.err(431): java.net.ProtocolException: Connection already established
04-12 19:30:27.419: WARN/System.err(431): at java.net.HttpURLConnection.setRequestMethod(HttpURLConnection.java:429)
04-12 19:30:27.447: WARN/System.err(431): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.setRequestMethod(HttpsURLConnectionImpl.java:127)
04-12 19:30:27.487: WARN/System.err(431): at com.app.services.AppServiceManager.doInBackground(AppServiceManager.java:297)
04-12 19:30:27.526: WARN/System.err(431): at com.app.services.AppServiceManager.doInBackground(AppServiceManager.java:1)
04-12 19:30:27.559: WARN/System.err(431): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-12 19:30:27.617: WARN/System.err(431): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-12 19:30:27.636: WARN/System.err(431): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-12 19:30:27.716: WARN/System.err(431): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-12 19:30:27.751: WARN/System.err(431): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-12 19:30:27.798: WARN/System.err(431): at java.lang.Thread.run(Thread.java:1096)
| 0 |
9,585,587 | 03/06/2012 14:28:24 | 1,227,183 | 02/23/2012 00:20:09 | 1 | 0 | I can't make apps to my domine .me | i have domine .me
http://www.e3la.me/wp-content/uploads/face.jpg
any help plz | facebook-graph-api | facebook-apps | facebook-iframe | mysite | null | 03/06/2012 22:44:33 | not a real question | I can't make apps to my domine .me
===
i have domine .me
http://www.e3la.me/wp-content/uploads/face.jpg
any help plz | 1 |
298,459 | 11/18/2008 11:13:04 | 29,623 | 10/20/2008 14:14:45 | 1 | 0 | which HTML element lost focus? | in javascript, when I receive a focus event, how can I work out which element has lost focus? I'm trying to avoid having to put an onblur event handler on all elements within my web page. | javascript | focus | null | null | null | null | open | which HTML element lost focus?
===
in javascript, when I receive a focus event, how can I work out which element has lost focus? I'm trying to avoid having to put an onblur event handler on all elements within my web page. | 0 |
7,012,333 | 08/10/2011 14:21:24 | 878,802 | 08/04/2011 14:35:47 | 1 | 0 | MFC Handling messages from a separate window | I have created a window with some controls and currently work with it. On some message I open a separate class as
inPUT* ppFrame = new inPUT(hmm::n,hmm::yDim);
ppFrame->ShowWindow(SW_SHOW);
and input some data there, save it somewhere in that class and close it.
Question: how can I get that data back to the original class ON_WM_CLOSE()of ppFrame not an original class for example, when I know that the data was already received by ppFrame | c++ | mfc | window | message | separate | null | open | MFC Handling messages from a separate window
===
I have created a window with some controls and currently work with it. On some message I open a separate class as
inPUT* ppFrame = new inPUT(hmm::n,hmm::yDim);
ppFrame->ShowWindow(SW_SHOW);
and input some data there, save it somewhere in that class and close it.
Question: how can I get that data back to the original class ON_WM_CLOSE()of ppFrame not an original class for example, when I know that the data was already received by ppFrame | 0 |
10,717,296 | 05/23/2012 09:40:22 | 608,356 | 02/08/2011 15:34:19 | 620 | 40 | .NET MVC: return HTML from BBCode on page (Razor) | Task: text styled with bbcode (b, i, u, color) should be exchanged to real html on the view.
What done: replacment from bbcode to html
Problem: on view html tags is encoded. so < is > and so on.
Does anybody know how to make it return normal markup?
Problem here is that solution is already done (this is new requirement from client), we have more than 500 views and of course Html.Raw is not the solution. We need inteligent way how to do this :) | c# | asp.net-mvc-3 | bbcode | null | null | null | open | .NET MVC: return HTML from BBCode on page (Razor)
===
Task: text styled with bbcode (b, i, u, color) should be exchanged to real html on the view.
What done: replacment from bbcode to html
Problem: on view html tags is encoded. so < is > and so on.
Does anybody know how to make it return normal markup?
Problem here is that solution is already done (this is new requirement from client), we have more than 500 views and of course Html.Raw is not the solution. We need inteligent way how to do this :) | 0 |
7,092,801 | 08/17/2011 12:30:32 | 429,433 | 08/24/2010 11:19:35 | 57 | 2 | xCode 4 doesn't show "EXC_BAD_ACCESS" in debug area | I'm intentionally creating an "EXC_BAD_ACCESS" fault..
The app crushes of course, BUT the debugger somehow lacks the "EXC_BAD_ACCESS" message..
Why is that?
This is the code I'm using:
NSString *str = [[NSString alloc] initWithFormat:@"Foo"];
NSArray *a = [[NSArray alloc ]initWithObjects:str, nil];
[str release];
[a release];
NSLog(@"%@",str);
And this is the debugger log:
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 41313.
sharedlibrary apply-load-rules all
(gdb) | iphone | objective-c | ios | ios4 | xcode4 | null | open | xCode 4 doesn't show "EXC_BAD_ACCESS" in debug area
===
I'm intentionally creating an "EXC_BAD_ACCESS" fault..
The app crushes of course, BUT the debugger somehow lacks the "EXC_BAD_ACCESS" message..
Why is that?
This is the code I'm using:
NSString *str = [[NSString alloc] initWithFormat:@"Foo"];
NSArray *a = [[NSArray alloc ]initWithObjects:str, nil];
[str release];
[a release];
NSLog(@"%@",str);
And this is the debugger log:
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 41313.
sharedlibrary apply-load-rules all
(gdb) | 0 |
9,710,098 | 03/14/2012 20:53:02 | 1,270,086 | 03/14/2012 20:35:36 | 1 | 0 | PHP ZipArchive is zipping the lower directories also | I found this script on stackoverflow but am having an issue. The zip is being created with the file I am telling it to but it's also zipping the lower directories to that file. The zipped file contains: \uploads\1\assets\2\ai\filename.ai
<code>
$zip = new ZipArchive();
$zip->open('uploads/1/assets/2/ai/filename.zip', ZIPARCHIVE::CREATE);
$zip->addFile('uploads/1/assets/2/ai/filename.ai');
$zip->close();
</code> | php | zip | null | null | null | null | open | PHP ZipArchive is zipping the lower directories also
===
I found this script on stackoverflow but am having an issue. The zip is being created with the file I am telling it to but it's also zipping the lower directories to that file. The zipped file contains: \uploads\1\assets\2\ai\filename.ai
<code>
$zip = new ZipArchive();
$zip->open('uploads/1/assets/2/ai/filename.zip', ZIPARCHIVE::CREATE);
$zip->addFile('uploads/1/assets/2/ai/filename.ai');
$zip->close();
</code> | 0 |
5,337,945 | 03/17/2011 10:43:58 | 587,144 | 01/24/2011 07:06:57 | 33 | 0 | How to implement BSD socket network code in Objectice c | i need to imlement BSD socket network code in Objectice c .Please help me. | iphone | null | null | null | null | 03/17/2011 11:30:32 | not a real question | How to implement BSD socket network code in Objectice c
===
i need to imlement BSD socket network code in Objectice c .Please help me. | 1 |
6,934,413 | 08/03/2011 23:12:10 | 737,124 | 05/04/2011 00:41:02 | 5 | 0 | Implementation of associative array | write a function which decodes a URL-encoded string into an associative array. If there are two parameters with same name, the value should be stacked as an array.
For example, the string "a=1&b=2&a=hello&apple=9&apple=digital" would be converted to the associative array: array( 'a' => array(1,'hello'), 'b'=> 2, 'apple' => array(9,'digital') ) | java | data-structures | null | null | null | 08/04/2011 01:48:45 | not a real question | Implementation of associative array
===
write a function which decodes a URL-encoded string into an associative array. If there are two parameters with same name, the value should be stacked as an array.
For example, the string "a=1&b=2&a=hello&apple=9&apple=digital" would be converted to the associative array: array( 'a' => array(1,'hello'), 'b'=> 2, 'apple' => array(9,'digital') ) | 1 |
8,696,506 | 01/02/2012 00:21:30 | 1,103,263 | 12/17/2011 08:57:32 | 32 | 1 | Listview force closing | I am getting the error in my logcat "Your content must have a ListView whose id attribute is 'android.R.id.list'. My code compiles and runs but force closes when i start my listview activity. I've checked on many similar questions, it seems to be a common problem but i am still unable to fix my code.
The Declaration:
private ListView lv;
Context mContext;
List mList;
String[] testcontacts;
MessageView aa = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.firstlist);
testcontacts = getResources()
.getStringArray(R.array.testcontacts_array);
aa = new MessageView();
lv = (ListView) lv.findViewById(R.id.list);
lv.setAdapter(aa);
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// When clicked, show a toast with the TextView text
Toast.makeText(getApplicationContext(),
((TextView) view).getText(), Toast.LENGTH_SHORT).show();
}
});
}
My XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/top_control_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="#cc252a"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:text="This will be Changed"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<LinearLayout
android:id="@+id/bottom_control_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
</LinearLayout>
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_above="@id/bottom_control_bar"
android:layout_below="@id/top_control_bar"
android:choiceMode="multipleChoice" />
</RelativeLayout>
| listview | layout | android-intent | arrayadapter | listviewitem | null | open | Listview force closing
===
I am getting the error in my logcat "Your content must have a ListView whose id attribute is 'android.R.id.list'. My code compiles and runs but force closes when i start my listview activity. I've checked on many similar questions, it seems to be a common problem but i am still unable to fix my code.
The Declaration:
private ListView lv;
Context mContext;
List mList;
String[] testcontacts;
MessageView aa = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.firstlist);
testcontacts = getResources()
.getStringArray(R.array.testcontacts_array);
aa = new MessageView();
lv = (ListView) lv.findViewById(R.id.list);
lv.setAdapter(aa);
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// When clicked, show a toast with the TextView text
Toast.makeText(getApplicationContext(),
((TextView) view).getText(), Toast.LENGTH_SHORT).show();
}
});
}
My XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/top_control_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="#cc252a"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:text="This will be Changed"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<LinearLayout
android:id="@+id/bottom_control_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
</LinearLayout>
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_above="@id/bottom_control_bar"
android:layout_below="@id/top_control_bar"
android:choiceMode="multipleChoice" />
</RelativeLayout>
| 0 |
6,808,839 | 07/24/2011 18:38:51 | 773,879 | 05/27/2011 23:38:28 | 347 | 25 | How are objects stored in the memory in C#? | <BR>
I was wondering - how are objects stored int the memory?<BR>
I already know that there's a reference (like a pointer) that is an int value containing the place in the memory where that object is stored - but how exactly is it stored?<BR>
Lets say I have `ClassC` that has `int a, char b, long c, float d` and `short e` - I know how each is stored each have their own set of bit but the amount of bits in each different - so how exactly does C# knows which bits should it access when I write `OBJ.c` or `OBJ.b` ?<BR>
Is it somewhat possible to convert a whole (nonstatic) object to an array of bytes\bit AND back?<BR><BR>
OBVIOUSLY - If there's something like `ClassC.TcpListener tcp` - it's a reference and stored as an `int` (? Atleast it has the same size in bytes) - but still, how can it different between an `int` and a pointer?<BR> | c# | oop | memory | null | null | 07/24/2011 19:57:35 | not constructive | How are objects stored in the memory in C#?
===
<BR>
I was wondering - how are objects stored int the memory?<BR>
I already know that there's a reference (like a pointer) that is an int value containing the place in the memory where that object is stored - but how exactly is it stored?<BR>
Lets say I have `ClassC` that has `int a, char b, long c, float d` and `short e` - I know how each is stored each have their own set of bit but the amount of bits in each different - so how exactly does C# knows which bits should it access when I write `OBJ.c` or `OBJ.b` ?<BR>
Is it somewhat possible to convert a whole (nonstatic) object to an array of bytes\bit AND back?<BR><BR>
OBVIOUSLY - If there's something like `ClassC.TcpListener tcp` - it's a reference and stored as an `int` (? Atleast it has the same size in bytes) - but still, how can it different between an `int` and a pointer?<BR> | 4 |
11,618,834 | 07/23/2012 19:05:28 | 717,051 | 04/20/2011 11:42:39 | 18 | 0 | Load balancing in Nginx - TCP, SSL, HTTPS | I am new to load balancing. Is it possible to load balance TCP, SSL and HTTPS request in Nginx and if yes can you give me some examples to do so?. I can load balance all my http request? but was wondering whether I can do the same things for TCP? I browsed a lot but couldn't find any clue about it
Thanks in advance | ssl | tcp | https | nginx | load-balancing | 07/25/2012 14:22:12 | off topic | Load balancing in Nginx - TCP, SSL, HTTPS
===
I am new to load balancing. Is it possible to load balance TCP, SSL and HTTPS request in Nginx and if yes can you give me some examples to do so?. I can load balance all my http request? but was wondering whether I can do the same things for TCP? I browsed a lot but couldn't find any clue about it
Thanks in advance | 2 |
10,845,558 | 06/01/2012 06:40:43 | 1,073,196 | 11/30/2011 11:10:51 | 1 | 0 | HTTP 304 message in caching | What does this specify??? As far as i can get by reading the document is: Server sends 304 when the browser had asked for a resource which server thinks browser already has in cache.
Now my problem is, I changed few resources(js) in my code and added a version to it. QA while testing cleared the cache of the browser hit the live server(which has the resources as unversioned) and got them all cached.
Now QA mapped to the QA server which has new versioned resources. Now what i see browser has got all the modified resources from the QA server which is absolutely fine but shows 304 code(which means server is saying the file you have in the cache is correct.)
I hope i am getting the meaning of 304 message correctly. | httpwebrequest | null | null | null | null | 06/02/2012 18:40:05 | off topic | HTTP 304 message in caching
===
What does this specify??? As far as i can get by reading the document is: Server sends 304 when the browser had asked for a resource which server thinks browser already has in cache.
Now my problem is, I changed few resources(js) in my code and added a version to it. QA while testing cleared the cache of the browser hit the live server(which has the resources as unversioned) and got them all cached.
Now QA mapped to the QA server which has new versioned resources. Now what i see browser has got all the modified resources from the QA server which is absolutely fine but shows 304 code(which means server is saying the file you have in the cache is correct.)
I hope i am getting the meaning of 304 message correctly. | 2 |
9,355,332 | 02/20/2012 02:04:10 | 482,473 | 10/21/2010 02:30:33 | 437 | 0 | I played around the config.inc.php file and now MyPHPAdmin seem to not working | my original config.inc.php's $cfg['Servers'][$i]['password'] = ''; which has no password. Then I put a password there, but I reverted back to no password.
but now PHPMyAdmin now has a giant red error "Access denied for root@localhost"
underneath if I Open new phpMyAdmin window then I can enter .
Sum it up everytimes I enter http://localhost/ and hit PhpMyAdmin it gives me a giant red error and only allows me enter if I hit the little link underneath of open new phpmyadmin. | php | null | null | null | null | 02/21/2012 03:33:44 | not a real question | I played around the config.inc.php file and now MyPHPAdmin seem to not working
===
my original config.inc.php's $cfg['Servers'][$i]['password'] = ''; which has no password. Then I put a password there, but I reverted back to no password.
but now PHPMyAdmin now has a giant red error "Access denied for root@localhost"
underneath if I Open new phpMyAdmin window then I can enter .
Sum it up everytimes I enter http://localhost/ and hit PhpMyAdmin it gives me a giant red error and only allows me enter if I hit the little link underneath of open new phpmyadmin. | 1 |
9,514,505 | 03/01/2012 10:27:13 | 692,389 | 04/05/2011 07:26:06 | 11 | 1 | how good is the rest support in symfony php framework? | I am making a REST based web server in PHP and wanted to know if using symfony would be a good idea. | php | rest | symfony | null | null | 03/01/2012 15:21:43 | not constructive | how good is the rest support in symfony php framework?
===
I am making a REST based web server in PHP and wanted to know if using symfony would be a good idea. | 4 |
6,420,499 | 06/21/2011 04:54:31 | 790,431 | 06/09/2011 07:02:16 | 178 | 2 | Application download doesn't start | I am trying to install Angry Birds from Android market on my HTC Desire A8181. But surprisingly the download doesn't start. All I get is **Starting Download** which never actually starts. This holds for every application.
Also if I get any application from **Bluetooth** from some other device, will it successfully run on my phone? | android | null | null | null | null | 06/21/2011 08:37:46 | off topic | Application download doesn't start
===
I am trying to install Angry Birds from Android market on my HTC Desire A8181. But surprisingly the download doesn't start. All I get is **Starting Download** which never actually starts. This holds for every application.
Also if I get any application from **Bluetooth** from some other device, will it successfully run on my phone? | 2 |
10,264,881 | 04/22/2012 03:04:45 | 1,294,690 | 03/27/2012 05:29:30 | 1 | 0 | PHP 5.4 + Nginx + APC = 502 Bad Gateway? | I recently upgraded to PHP 5.4 and a month ago, APC wasn't compatible, so I downgraded back to PHP 5.3 and everything worked fine and dandy. However, I'd like to take advantage of the new features of PHP 5.4 and I cant seem to get it to work with my current setup. Supposedly, APC is now "compatible" as of their latest beta version, however I get the following errors:
[21-Apr-2012 22:56:53] WARNING: [pool www] child 12245 exited on signal 11 (SIGSEGV) after 61.544928 seconds from start
[21-Apr-2012 22:56:51] WARNING: [pool www] child 12250 exited on signal 11 (SIGSEGV) after 43.367441 seconds from start
etc etc.
My setup is: nginx + php 5.4 via php-fpm plus APC. If I disable APC, everything works fine (albeit slowly haha).
Ive installed both the beta and the trunk versions and neither seem to work. I just get a 502 Bad Gateway error on all pages EXCEPT for a phpinfo(); page, which works just fine.
What can I do? I've googled everywhere. | php | nginx | apc | php-fpm | php-5.4 | 04/30/2012 15:43:32 | off topic | PHP 5.4 + Nginx + APC = 502 Bad Gateway?
===
I recently upgraded to PHP 5.4 and a month ago, APC wasn't compatible, so I downgraded back to PHP 5.3 and everything worked fine and dandy. However, I'd like to take advantage of the new features of PHP 5.4 and I cant seem to get it to work with my current setup. Supposedly, APC is now "compatible" as of their latest beta version, however I get the following errors:
[21-Apr-2012 22:56:53] WARNING: [pool www] child 12245 exited on signal 11 (SIGSEGV) after 61.544928 seconds from start
[21-Apr-2012 22:56:51] WARNING: [pool www] child 12250 exited on signal 11 (SIGSEGV) after 43.367441 seconds from start
etc etc.
My setup is: nginx + php 5.4 via php-fpm plus APC. If I disable APC, everything works fine (albeit slowly haha).
Ive installed both the beta and the trunk versions and neither seem to work. I just get a 502 Bad Gateway error on all pages EXCEPT for a phpinfo(); page, which works just fine.
What can I do? I've googled everywhere. | 2 |
10,295,692 | 04/24/2012 10:00:07 | 405,383 | 07/29/2010 07:15:23 | 564 | 18 | change the color of texview inside a custom tab | I am creating a custom Tab the only problem i am facing that changing color text when it gets selected or unselected.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected" />
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected" />
<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_focus" />
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_focus" />
<!-- Pressed -->
<item android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_focus" />
<item android:state_pressed="true" android:drawable="@drawable/tab_press" />
</selector>
in `@drawable/tab_selected` i am create a tab shapes but i don't know where i change the color of text ?
my tab item contains
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dip"
android:layout_height="50dip"
android:layout_weight="1"
android:orientation="vertical"
android:background="@drawable/tab_indicator"
>
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon"
android:layout_centerVertical="true"
android:textSize="16dp"
android:layout_marginLeft="10dp"
android:textStyle="bold"
/> | android | android-tabhost | android-2.3 | null | null | 04/25/2012 11:43:13 | too localized | change the color of texview inside a custom tab
===
I am creating a custom Tab the only problem i am facing that changing color text when it gets selected or unselected.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected" />
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected" />
<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_focus" />
<item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_focus" />
<!-- Pressed -->
<item android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_focus" />
<item android:state_pressed="true" android:drawable="@drawable/tab_press" />
</selector>
in `@drawable/tab_selected` i am create a tab shapes but i don't know where i change the color of text ?
my tab item contains
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dip"
android:layout_height="50dip"
android:layout_weight="1"
android:orientation="vertical"
android:background="@drawable/tab_indicator"
>
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon"
android:layout_centerVertical="true"
android:textSize="16dp"
android:layout_marginLeft="10dp"
android:textStyle="bold"
/> | 3 |
7,208,872 | 08/26/2011 18:10:42 | 67,875 | 02/18/2009 15:10:56 | 1,127 | 62 | Cant substitue SQL UNION query for table name | I have two tables with identical schema in SQL Server 2008 R2. If I execute the following query, with parentheses intact, I get results from both tables.
/*
select distinct Name, Rank, SerNo, OtherStuff from
*/
(
select Name, Rank, SerNo, OtherStuff from OldPlayers
union
select Name, Rank, SerNo, OtherStuff from NewPlayers
)
/*
OldPlayers
*/
go
If I then uncomment both comments, and comment out the expression in parentheses, I also get results (from one table, of course).
If I now re-comment the table name at the end, and uncomment the parenthetical expression so that it can replace the table name, I get the error "Incorrect syntax near ')'."
Why can't I substitute the union expression for the table name? | sql | union | sql-server-2008-r2 | null | null | null | open | Cant substitue SQL UNION query for table name
===
I have two tables with identical schema in SQL Server 2008 R2. If I execute the following query, with parentheses intact, I get results from both tables.
/*
select distinct Name, Rank, SerNo, OtherStuff from
*/
(
select Name, Rank, SerNo, OtherStuff from OldPlayers
union
select Name, Rank, SerNo, OtherStuff from NewPlayers
)
/*
OldPlayers
*/
go
If I then uncomment both comments, and comment out the expression in parentheses, I also get results (from one table, of course).
If I now re-comment the table name at the end, and uncomment the parenthetical expression so that it can replace the table name, I get the error "Incorrect syntax near ')'."
Why can't I substitute the union expression for the table name? | 0 |
4,005,257 | 10/23/2010 17:39:02 | 137,557 | 07/13/2009 16:59:22 | 31 | 16 | who are the current thought leaders in the area of software metrics? | I wonder who are the best thought leaders working in the field of software metrics today? | metrics | null | null | null | null | 10/23/2010 17:55:03 | not constructive | who are the current thought leaders in the area of software metrics?
===
I wonder who are the best thought leaders working in the field of software metrics today? | 4 |
9,117,959 | 02/02/2012 18:37:05 | 143,765 | 07/23/2009 14:07:46 | 1,136 | 66 | changing a directory structure in mercurial | I have a single-person single-folder mercurial repository. The directory structure is simple:
P104
lecture_notes
files under version control live here
After a while I realize I want to have two directories within the repository, like this
P104
lecture_notes
files under version control live here (.hg is here)
homework
more files under version control
Now, if I'm just trying to add files to the repository, it fails:
br@ymir:~/P104/lecture_notes$ ll ..
total 16
drwxr-xr-x 4 br br 4096 2012-02-02 18:05 ./
drwxr-xr-x 4 br br 4096 2012-02-01 20:46 ../
drwxr-xr-x 2 br br 4096 2012-02-02 17:44 homework/
drwxr-xr-x 4 br br 4096 2012-02-02 18:06 lecture_notes/
br@ymir:~/P104/lecture_notes$ hg add ../homework/hw1_P104.tex
abort: ../homework/hw1_P104.tex not under root
My first idea was to clone the repo one level up in the directory structure, add files to the clone, and delete the original repo. But even cloning fails:
br@ymir:~/P104/2011/lecture_notes$ hg clone . ..
abort: destination '..' is not empty
So the question is whether there's a `mercurial`ish way of doing this other than creating a clean repository somewhere else and copying files manually?
| version-control | mercurial | null | null | null | null | open | changing a directory structure in mercurial
===
I have a single-person single-folder mercurial repository. The directory structure is simple:
P104
lecture_notes
files under version control live here
After a while I realize I want to have two directories within the repository, like this
P104
lecture_notes
files under version control live here (.hg is here)
homework
more files under version control
Now, if I'm just trying to add files to the repository, it fails:
br@ymir:~/P104/lecture_notes$ ll ..
total 16
drwxr-xr-x 4 br br 4096 2012-02-02 18:05 ./
drwxr-xr-x 4 br br 4096 2012-02-01 20:46 ../
drwxr-xr-x 2 br br 4096 2012-02-02 17:44 homework/
drwxr-xr-x 4 br br 4096 2012-02-02 18:06 lecture_notes/
br@ymir:~/P104/lecture_notes$ hg add ../homework/hw1_P104.tex
abort: ../homework/hw1_P104.tex not under root
My first idea was to clone the repo one level up in the directory structure, add files to the clone, and delete the original repo. But even cloning fails:
br@ymir:~/P104/2011/lecture_notes$ hg clone . ..
abort: destination '..' is not empty
So the question is whether there's a `mercurial`ish way of doing this other than creating a clean repository somewhere else and copying files manually?
| 0 |
731,902 | 04/08/2009 21:18:18 | 56,555 | 01/19/2009 04:24:38 | 1,022 | 46 | How to get rid of multiple columns in a database? | I'm creating an Access DB for use in an C# application at school. I've not had much experience working with DB's so if this sounds stupid just ignore it. I want the user to be able to select <b>all</b> the classes that a certain student has had in our IT department. We have about 30 in all and the maximum that a person can take in 4 years of high school is 15. Right now my DB has 15 different columns for each class that a user could have. How can I compress this down to one column (if there is a way)? | c# | database | oledb | null | null | null | open | How to get rid of multiple columns in a database?
===
I'm creating an Access DB for use in an C# application at school. I've not had much experience working with DB's so if this sounds stupid just ignore it. I want the user to be able to select <b>all</b> the classes that a certain student has had in our IT department. We have about 30 in all and the maximum that a person can take in 4 years of high school is 15. Right now my DB has 15 different columns for each class that a user could have. How can I compress this down to one column (if there is a way)? | 0 |
11,133,554 | 06/21/2012 07:33:53 | 1,471,342 | 06/21/2012 07:26:17 | 1 | 0 | largest in a row & smallest in a column of a n by n matrix | I would like to find a element which is largest in a row & smallest in a column of a given n by n matrix.
for example take the below example.
9 5 6
4 7 2
3 2 1
it has to return answer as "3"
Please let me know a optimal solution for this problem.
| arrays | multidimensional-array | null | null | null | 06/27/2012 09:40:43 | not a real question | largest in a row & smallest in a column of a n by n matrix
===
I would like to find a element which is largest in a row & smallest in a column of a given n by n matrix.
for example take the below example.
9 5 6
4 7 2
3 2 1
it has to return answer as "3"
Please let me know a optimal solution for this problem.
| 1 |
11,044,378 | 06/15/2012 03:57:04 | 1,000,804 | 10/18/2011 09:36:44 | 360 | 9 | Syntax highlighting bugs of VIM 7.3 for BASH scripts | I just upgraded OS from Ubuntu 8.04 to Ubuntu 12.04, as well as the corresponding VIM package. However, I found the syntax highlighting of newer VIM for BASH scripts is strange: (1) the colors of open and close parenthesis are different; (2) the color of comments seems wrong; (3) the BASH keyword in comment should not be highlighted. I have already add `let g:is_bash=1` and `syntax on` into my ".vimrc" file
The screenshot of wrong syntax highlighting.
![enter image description here][1]
The screenshot of corresponding correct syntax highlighting:
![enter image description here][2]
The new (wrong) VIM version is: VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:21:49) Included patches: 1-429
The old (correct) VIM version is: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Sep 21 2009 11:21:42) Included patches: 1-245
[1]: http://i.stack.imgur.com/fpTEl.png
[2]: http://i.stack.imgur.com/6h5tH.png | bash | vim | syntax-highlighting | null | null | 06/18/2012 03:47:01 | off topic | Syntax highlighting bugs of VIM 7.3 for BASH scripts
===
I just upgraded OS from Ubuntu 8.04 to Ubuntu 12.04, as well as the corresponding VIM package. However, I found the syntax highlighting of newer VIM for BASH scripts is strange: (1) the colors of open and close parenthesis are different; (2) the color of comments seems wrong; (3) the BASH keyword in comment should not be highlighted. I have already add `let g:is_bash=1` and `syntax on` into my ".vimrc" file
The screenshot of wrong syntax highlighting.
![enter image description here][1]
The screenshot of corresponding correct syntax highlighting:
![enter image description here][2]
The new (wrong) VIM version is: VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:21:49) Included patches: 1-429
The old (correct) VIM version is: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Sep 21 2009 11:21:42) Included patches: 1-245
[1]: http://i.stack.imgur.com/fpTEl.png
[2]: http://i.stack.imgur.com/6h5tH.png | 2 |
5,898,497 | 05/05/2011 13:29:49 | 740,005 | 05/05/2011 13:17:34 | 1 | 1 | Java Microsoft Excel API | Does anyone know if there is an API for java by Microsoft Excel? | java | excel | api | microsoft | null | 03/22/2012 14:42:07 | not constructive | Java Microsoft Excel API
===
Does anyone know if there is an API for java by Microsoft Excel? | 4 |
9,982,839 | 04/02/2012 19:47:29 | 1,063,093 | 11/24/2011 02:29:58 | 326 | 8 | Set An Empty DateTime Variable C# | I would declare an empty String variable like this:
string myString = string.Empty;
Is there an equivalent for a 'DateTime' variable ? | c# | datetime | null | null | null | null | open | Set An Empty DateTime Variable C#
===
I would declare an empty String variable like this:
string myString = string.Empty;
Is there an equivalent for a 'DateTime' variable ? | 0 |
3,696,482 | 09/12/2010 20:28:44 | 433,417 | 06/07/2010 07:35:50 | 402 | 2 | py2exe, problems |
I tried all the steps in this [tutorial][1].
Yet I keep geting this ouput
'python' is not recognized as an internal or external command operable program or batch file.
when I run
python setup.py py2exe
in command prompt
What am I doing wrong?
[1]: http://logix4u.net/Python/Tutorials/How_to_create_Windows_executable_exe_from_Python_script.html
| python | py2exe | null | null | null | null | open | py2exe, problems
===
I tried all the steps in this [tutorial][1].
Yet I keep geting this ouput
'python' is not recognized as an internal or external command operable program or batch file.
when I run
python setup.py py2exe
in command prompt
What am I doing wrong?
[1]: http://logix4u.net/Python/Tutorials/How_to_create_Windows_executable_exe_from_Python_script.html
| 0 |
10,994,343 | 06/12/2012 10:01:20 | 1,448,769 | 06/11/2012 10:54:09 | 10 | 0 | how to concatenate three string in iphone | I have three string i want them to concatenate but they are not concatenating i am using this code
I want that my last string should display like
Cerenia Results 12Jun 2012.pdf like this
NSString *fileName = @"Cerenia Results";
NSString* str = [formatter stringFromDate:date];
NSString*extention=@".pdf";
NSString * strRR = [NSString stringWithFormat:@"Cerenia Results_%@ [%@].pdf", extension];
| iphone | xcode | null | null | null | 06/12/2012 16:28:46 | too localized | how to concatenate three string in iphone
===
I have three string i want them to concatenate but they are not concatenating i am using this code
I want that my last string should display like
Cerenia Results 12Jun 2012.pdf like this
NSString *fileName = @"Cerenia Results";
NSString* str = [formatter stringFromDate:date];
NSString*extention=@".pdf";
NSString * strRR = [NSString stringWithFormat:@"Cerenia Results_%@ [%@].pdf", extension];
| 3 |
6,059,796 | 05/19/2011 13:55:22 | 739,419 | 05/05/2011 07:36:28 | 1 | 0 | how to get location(coordinates) from city name in iphone sdk? | friends,
as we have geocoder getfromlocation(locationname,maximumResults) function of google api in android.
i dont see such function in iphone sdk to obtain latitude and longitude values from city name.
any one guide me how to achieve this functionality?
any help would be appreciated. | iphone | google-maps | null | null | null | null | open | how to get location(coordinates) from city name in iphone sdk?
===
friends,
as we have geocoder getfromlocation(locationname,maximumResults) function of google api in android.
i dont see such function in iphone sdk to obtain latitude and longitude values from city name.
any one guide me how to achieve this functionality?
any help would be appreciated. | 0 |
11,258,597 | 06/29/2012 08:41:14 | 1,542,788 | 05/20/2010 08:59:21 | 5 | 0 | "Create Database" error | I'm trying to create a database. But i get an error while i'm doing.
**This is the code :**
<?php
$link = mysql_connect("localhost","xxx","xxx")
$db_selected = mysql_select_db("alpMuhendislik",$link);
if (!$db_selected) {
$sql = 'CREATE DATABASE alpMuhendislik';
if (mysql_query($sql, $link)) {
echo "Database alpMuhendislik created successfully\n";
}
else {
echo 'Error creating database: ' . mysql_error() . "\n";
}
}
?>
**And this is the error :**
> Parse error: syntax error, unexpected T_VARIABLE in ..../load_data.php on line 3
I just couldn't see any problem about syntax. I checked marks and semicolons.
Thanks! | php | mysql | sql | mysql-error-1064 | null | 06/29/2012 08:47:28 | too localized | "Create Database" error
===
I'm trying to create a database. But i get an error while i'm doing.
**This is the code :**
<?php
$link = mysql_connect("localhost","xxx","xxx")
$db_selected = mysql_select_db("alpMuhendislik",$link);
if (!$db_selected) {
$sql = 'CREATE DATABASE alpMuhendislik';
if (mysql_query($sql, $link)) {
echo "Database alpMuhendislik created successfully\n";
}
else {
echo 'Error creating database: ' . mysql_error() . "\n";
}
}
?>
**And this is the error :**
> Parse error: syntax error, unexpected T_VARIABLE in ..../load_data.php on line 3
I just couldn't see any problem about syntax. I checked marks and semicolons.
Thanks! | 3 |
11,261,884 | 06/29/2012 12:35:41 | 1,489,352 | 06/28/2012 17:32:08 | 1 | 0 | Change Image.Source in C# | I'd like to change the source of an Image-Object which I have declared in the XAML-Code, during the Runtime. So that I can load a Picture from my local resources into this Image-Object. I hope someone is able to help me. The name of the Image-Object is "imgWappen", the name of te picture is "Bayer_Leverkusen.png". Sorry for my bad English.
Creeps | c# | null | null | null | null | 06/29/2012 13:27:59 | too localized | Change Image.Source in C#
===
I'd like to change the source of an Image-Object which I have declared in the XAML-Code, during the Runtime. So that I can load a Picture from my local resources into this Image-Object. I hope someone is able to help me. The name of the Image-Object is "imgWappen", the name of te picture is "Bayer_Leverkusen.png". Sorry for my bad English.
Creeps | 3 |
10,238,823 | 04/20/2012 00:47:33 | 1,333,766 | 04/14/2012 21:04:41 | 1 | 0 | What is causing the NullPointerException in this line? | canvas.drawBitmap(gBall, (canvas.getWidth() / 2), 0, null); | android | null | null | null | null | 04/20/2012 02:59:26 | too localized | What is causing the NullPointerException in this line?
===
canvas.drawBitmap(gBall, (canvas.getWidth() / 2), 0, null); | 3 |
11,114,689 | 06/20/2012 07:22:08 | 1,377,824 | 05/06/2012 08:44:07 | 8 | 0 | Recording voice with mp3 file? | i was looking around but didn't manage to find the answer or something that would help me to start a research. So, is it possible to record the voice plus mp3 file(which is playing in background). If it is please give me some tips(links) for further work. | android | mediarecorder | null | null | null | 06/20/2012 12:00:32 | not a real question | Recording voice with mp3 file?
===
i was looking around but didn't manage to find the answer or something that would help me to start a research. So, is it possible to record the voice plus mp3 file(which is playing in background). If it is please give me some tips(links) for further work. | 1 |
5,354,416 | 03/18/2011 15:44:19 | 493,876 | 11/01/2010 17:43:32 | 86 | 0 | UIWebView eats ~20mb memory | So, after running spme tests with my app to determine the cause for extremely high memory usage, I found out that UIWebview was behind it. I got a hidden webView where I perform some operations, but the point is when I tell the webview to download the URL requests, memory consuption rises like 20-25mb which is not very good. I am not doing anything else with the view, I only tell it to load the page. Any solutions or has someone encountered similar? Thanks.. | memory-leaks | uikit | uiwebview | null | null | null | open | UIWebView eats ~20mb memory
===
So, after running spme tests with my app to determine the cause for extremely high memory usage, I found out that UIWebview was behind it. I got a hidden webView where I perform some operations, but the point is when I tell the webview to download the URL requests, memory consuption rises like 20-25mb which is not very good. I am not doing anything else with the view, I only tell it to load the page. Any solutions or has someone encountered similar? Thanks.. | 0 |
7,811,190 | 10/18/2011 17:20:08 | 997,102 | 10/15/2011 17:57:16 | 2 | 3 | Multiple Inheritance in C++ vs Java | When i came across the reason why Multiple Inheritance was not included in Java, the reasons given were to keep 'simplicity' and 'reduce complication'.
However working with Java environment coming from a C++ background, don't you think that Interface concept to support multi inheritance has complicated the matter rather than solving it? Does it lead to the inference that:
1. We must NOT use multiple inheritance in Java, and our code architecture should be designed accordingly?
2. Use concept of Interface for multiple inheritance, which i think is less favorable (atleast for me) compared to the st | java | c++ | inheritance | null | null | 10/18/2011 17:30:00 | not constructive | Multiple Inheritance in C++ vs Java
===
When i came across the reason why Multiple Inheritance was not included in Java, the reasons given were to keep 'simplicity' and 'reduce complication'.
However working with Java environment coming from a C++ background, don't you think that Interface concept to support multi inheritance has complicated the matter rather than solving it? Does it lead to the inference that:
1. We must NOT use multiple inheritance in Java, and our code architecture should be designed accordingly?
2. Use concept of Interface for multiple inheritance, which i think is less favorable (atleast for me) compared to the st | 4 |
10,520,110 | 05/09/2012 16:20:45 | 233,196 | 12/16/2009 18:29:15 | 8,475 | 391 | How do I delete all data in a Cassandra column family? | I'm looking for a way to delete all of the rows from a given column family in cassandra.
This is the equivalent of `TRUNCATE TABLE` in SQL. | cassandra | null | null | null | null | null | open | How do I delete all data in a Cassandra column family?
===
I'm looking for a way to delete all of the rows from a given column family in cassandra.
This is the equivalent of `TRUNCATE TABLE` in SQL. | 0 |
8,784,874 | 01/09/2012 06:57:24 | 1,138,138 | 01/09/2012 06:52:12 | 1 | 0 | Need Help in writing sql query? | I have a table with fields
Season Namee, Statrt date , end date, start month, End month.
I want to get a season based on the current system date.
Eg.
Season name =------Karif
Start month---june
Start date---15
End month----October
End Date----15
Please help me | mysql | sql | null | null | null | null | open | Need Help in writing sql query?
===
I have a table with fields
Season Namee, Statrt date , end date, start month, End month.
I want to get a season based on the current system date.
Eg.
Season name =------Karif
Start month---june
Start date---15
End month----October
End Date----15
Please help me | 0 |
3,862,994 | 10/05/2010 10:58:07 | 368,440 | 06/16/2010 16:10:18 | 73 | 6 | change button to his binding color when pressed | i want to change my button color when is pressed :
<ItemsControl.ItemTemplate>
<DataTemplate>
<!--Click="btn_Click"-->
<ItemsControl DataContext="{Binding}" ItemsSource="{Binding}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button
Name="btn"
DataContext="{Binding}"
Height="65" Width="79"
Background="Gray"
>
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Ellipse Name="elipse1" Height="65" Width="79" Fill="{Binding Path=ButtonColor}" Visibility="Collapsed"></Ellipse>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="elipse1" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
it doesnt seem to work farther then that wjen i use the all triger <> the gray button is not showen has if this template is stronger then the binding ?is it true ? how to outcome it ? | wpf-controls | null | null | null | null | null | open | change button to his binding color when pressed
===
i want to change my button color when is pressed :
<ItemsControl.ItemTemplate>
<DataTemplate>
<!--Click="btn_Click"-->
<ItemsControl DataContext="{Binding}" ItemsSource="{Binding}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button
Name="btn"
DataContext="{Binding}"
Height="65" Width="79"
Background="Gray"
>
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Ellipse Name="elipse1" Height="65" Width="79" Fill="{Binding Path=ButtonColor}" Visibility="Collapsed"></Ellipse>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="elipse1" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
it doesnt seem to work farther then that wjen i use the all triger <> the gray button is not showen has if this template is stronger then the binding ?is it true ? how to outcome it ? | 0 |
9,213,057 | 02/09/2012 14:51:51 | 980,557 | 10/05/2011 14:26:49 | 3 | 1 | Regexp replace all dots in string, except when between round braces | I'm trying to find the right regexp to do the following:
input: '$MM.Player.Panning(1, 0.1)';
output '$MM->Player->Panning(1, 0.1)';
I can't figure out how to replace the dots with '->', without replacing dots between the round braces.
Any input or suggestions would be highly appreciated | regex | null | null | null | null | null | open | Regexp replace all dots in string, except when between round braces
===
I'm trying to find the right regexp to do the following:
input: '$MM.Player.Panning(1, 0.1)';
output '$MM->Player->Panning(1, 0.1)';
I can't figure out how to replace the dots with '->', without replacing dots between the round braces.
Any input or suggestions would be highly appreciated | 0 |
6,584,644 | 07/05/2011 14:50:01 | 410,273 | 08/04/2010 00:51:12 | 917 | 61 | What is your favorite life saver CSS syntax? | What is your favorite life saver CSS syntax?
Have you had one of those days, where you tried tried and were almost about to give up and you find a simple syntax to solve the problem.
For me it has to be `pointer-events:none;` which allows you to click through a fixed div. I never knew it existed until about a month ago.
Also `!important` would be my second favorite.
Please share yours.
ps: feel free to migrate this to a proper place if it's not. | css | syntax | null | null | null | 07/05/2011 14:52:57 | not constructive | What is your favorite life saver CSS syntax?
===
What is your favorite life saver CSS syntax?
Have you had one of those days, where you tried tried and were almost about to give up and you find a simple syntax to solve the problem.
For me it has to be `pointer-events:none;` which allows you to click through a fixed div. I never knew it existed until about a month ago.
Also `!important` would be my second favorite.
Please share yours.
ps: feel free to migrate this to a proper place if it's not. | 4 |
4,318,983 | 11/30/2010 21:42:41 | 477,415 | 10/15/2010 20:07:08 | 192 | 18 | How to tell if an Android device will be able to provide a location? | I'm writing a geo app and it all works nicely, but I'm considering how it'll work on devices that don't have GPS or 3G, and the wifi may be off or not provide location info.
Is my best bet to just request a location update (or use the last known) and assume there is a way to get the location (whether GPS or network) or does the framework include a way to see what's available, and avoid the geo-lookup delay?
I figure on a device with no GPS my app should provide a UI for the user to specify the location, AND remember it in the sharedprefs so they don't have to keep re-entering it (I'm thinking devices like Google TV, and tablets).
I'd appreciate suggestions on how to handle the process of acquiring location in the context of various devices that have different levels of geo-awareness, and how to handle that.
| android | null | null | null | null | null | open | How to tell if an Android device will be able to provide a location?
===
I'm writing a geo app and it all works nicely, but I'm considering how it'll work on devices that don't have GPS or 3G, and the wifi may be off or not provide location info.
Is my best bet to just request a location update (or use the last known) and assume there is a way to get the location (whether GPS or network) or does the framework include a way to see what's available, and avoid the geo-lookup delay?
I figure on a device with no GPS my app should provide a UI for the user to specify the location, AND remember it in the sharedprefs so they don't have to keep re-entering it (I'm thinking devices like Google TV, and tablets).
I'd appreciate suggestions on how to handle the process of acquiring location in the context of various devices that have different levels of geo-awareness, and how to handle that.
| 0 |
6,085,915 | 05/22/2011 03:58:07 | 764,481 | 05/22/2011 03:58:07 | 1 | 0 | Will i be able to create websites with a Macbook Pro by using the usuall website development s/w like PHP,CSS,XHTML or HTML. | Will i be able to use the usuall website designing s/w on a MAcbook pro ro should i have to bother creating a website using Macbook pro.? | php | null | null | null | null | 05/22/2011 05:38:18 | not a real question | Will i be able to create websites with a Macbook Pro by using the usuall website development s/w like PHP,CSS,XHTML or HTML.
===
Will i be able to use the usuall website designing s/w on a MAcbook pro ro should i have to bother creating a website using Macbook pro.? | 1 |
8,688,054 | 12/31/2011 12:22:23 | 621,350 | 02/17/2011 12:11:27 | 11 | 0 | Convert to utf-8 - from email | Im using Zend_Mail_Storage_Pop3 to retrieve mail messages.
My subject on a mail is
Foo/æøå
`$message->getHeader('content-type')`
gives me `text/plain; charset=ISO-8859-1; format=flowed`
Before any encoding my `$message->subject` looks like this
`Foo/µ°Õ - 2h - comment`
Then I try to do a iconv on the subject
`$message->subject = iconv('ISO-8859-1','UTF-8', $message->subject);`
Now my subject looks like this
`Foo/├ª├©├Ñ - 2h - comment`
Which is not utf-8 :)
So what should I do?
I also tried with utf8_encode and mb_convert_encoding
but these gives the same result | php | email | encode | null | null | null | open | Convert to utf-8 - from email
===
Im using Zend_Mail_Storage_Pop3 to retrieve mail messages.
My subject on a mail is
Foo/æøå
`$message->getHeader('content-type')`
gives me `text/plain; charset=ISO-8859-1; format=flowed`
Before any encoding my `$message->subject` looks like this
`Foo/µ°Õ - 2h - comment`
Then I try to do a iconv on the subject
`$message->subject = iconv('ISO-8859-1','UTF-8', $message->subject);`
Now my subject looks like this
`Foo/├ª├©├Ñ - 2h - comment`
Which is not utf-8 :)
So what should I do?
I also tried with utf8_encode and mb_convert_encoding
but these gives the same result | 0 |
8,403,510 | 12/06/2011 16:41:29 | 720,323 | 04/22/2011 09:18:02 | 596 | 1 | Checking if List<T> contains specified integer number | I am using List<T> array to store all ID's that I have read from my database file.
do lets say I have ID: 5, 8, 15
What I am trying to do is to check if user input matches one of the elements in this array.
How do I do this?
I have tried using Contains or Find, but I cannot manage to make it work. | c# | .net | arraylist | null | null | 12/07/2011 17:10:33 | too localized | Checking if List<T> contains specified integer number
===
I am using List<T> array to store all ID's that I have read from my database file.
do lets say I have ID: 5, 8, 15
What I am trying to do is to check if user input matches one of the elements in this array.
How do I do this?
I have tried using Contains or Find, but I cannot manage to make it work. | 3 |
9,310,843 | 02/16/2012 11:55:07 | 1,171,483 | 01/26/2012 14:41:53 | 11 | 8 | Set Value of EdiTextPreference in android | in Android i want to set EditTextprefernce value i tried
EditTextPreference etp = (EditTextPreference)getPreferenceScreen().findPreference("mykey");
etp.setText("123");
tell me how can i set EditTextpreference value in program dont suffest me in xml/preference.xml to write android:default="123" want to do programmatically
| android | null | null | null | null | null | open | Set Value of EdiTextPreference in android
===
in Android i want to set EditTextprefernce value i tried
EditTextPreference etp = (EditTextPreference)getPreferenceScreen().findPreference("mykey");
etp.setText("123");
tell me how can i set EditTextpreference value in program dont suffest me in xml/preference.xml to write android:default="123" want to do programmatically
| 0 |
10,941,823 | 06/08/2012 00:50:23 | 127,671 | 06/23/2009 15:49:06 | 46 | 5 | SQL database backups methods-tools-procedures | Currently, I am investigating some way to more efficiently backup 4 Production SQL Databases (3 different servers/instances) and would like to know if anyone else has had the problems we are having and if anyone has any recommendations.
Database 1: 80GB
Database 2: 74GB
Database 3: 5GB
Database 4: 30GB
Database 3 & 4 are for new systems and will be growing rapidly over the next several months. Currently Mirrored.
The problem we are running into is that there are maintenance tasks on the servers that run for these databases for backups that take roughly 30 min for Database 1 & 2. Now these all run at the same time as several other environment backups that the Sys Eng have running.
After the backup, a schedules task using 7-zip is run to compress the backups. All of this is killing the CPU during that time frame and if for whatever reason a job/task gets locked up, it will affect the entire system.
Now due to the business we are in, we have a very limited timeframe we can run these backup jobs, and these backups need to be done. We also need to start encrypting the backups after the compression to further our HIPPA compliance... yep...
Another part of the problem that we are are aware of is we have 20 other databases doing the same thing at the same time, which is killing the SAN, all of which we know and believe don't need these backup tasks.
So aside from that which we are working on, we are trying new methods of backing up databases to try to take the CPU load off the database servers as much as possible and hopefully do the backups for the databases incrementally.
Any suggestions? Tools, methods? We've tested Red-Gates SQL backup pro tool, SQL backupandftp freeware and using SSIS but none have seemed to accomplish what we were hoping for (ability to quickly accomplish the task and/or run on another server taking the CPU off the DB server). | sql | sql-server-2008 | backup | null | null | 06/10/2012 15:24:38 | off topic | SQL database backups methods-tools-procedures
===
Currently, I am investigating some way to more efficiently backup 4 Production SQL Databases (3 different servers/instances) and would like to know if anyone else has had the problems we are having and if anyone has any recommendations.
Database 1: 80GB
Database 2: 74GB
Database 3: 5GB
Database 4: 30GB
Database 3 & 4 are for new systems and will be growing rapidly over the next several months. Currently Mirrored.
The problem we are running into is that there are maintenance tasks on the servers that run for these databases for backups that take roughly 30 min for Database 1 & 2. Now these all run at the same time as several other environment backups that the Sys Eng have running.
After the backup, a schedules task using 7-zip is run to compress the backups. All of this is killing the CPU during that time frame and if for whatever reason a job/task gets locked up, it will affect the entire system.
Now due to the business we are in, we have a very limited timeframe we can run these backup jobs, and these backups need to be done. We also need to start encrypting the backups after the compression to further our HIPPA compliance... yep...
Another part of the problem that we are are aware of is we have 20 other databases doing the same thing at the same time, which is killing the SAN, all of which we know and believe don't need these backup tasks.
So aside from that which we are working on, we are trying new methods of backing up databases to try to take the CPU load off the database servers as much as possible and hopefully do the backups for the databases incrementally.
Any suggestions? Tools, methods? We've tested Red-Gates SQL backup pro tool, SQL backupandftp freeware and using SSIS but none have seemed to accomplish what we were hoping for (ability to quickly accomplish the task and/or run on another server taking the CPU off the DB server). | 2 |
6,805,983 | 07/24/2011 09:19:46 | 852,935 | 07/19/2011 22:51:02 | 22 | 0 | Take SQL input in PHP and output query results to the page | Basically I'm looking to create a page using PHP that will take SQL input, and output the results returned by the DB (MySQL). This is not for a production website (I understand the security implications). It's more for learning and practice. Kind of like the SQL console section of phpMyAdmin, or even similar to what sqlzoo.net can do (I think they are using perl, but I'd like to do it in PHP). Is there a practical way to accomplish this?
For example, how can I create a page in PHP/HTML to display a table of results when I don't know how many columns the query will return?
Also, what is the most practical way to allow a visitor to this web page to restore the DB to a default state with the original data? (e.g. create a sql dump of the original state and make a button that runs it? or is there a better way?)
Thanks! | php | mysql | null | null | null | null | open | Take SQL input in PHP and output query results to the page
===
Basically I'm looking to create a page using PHP that will take SQL input, and output the results returned by the DB (MySQL). This is not for a production website (I understand the security implications). It's more for learning and practice. Kind of like the SQL console section of phpMyAdmin, or even similar to what sqlzoo.net can do (I think they are using perl, but I'd like to do it in PHP). Is there a practical way to accomplish this?
For example, how can I create a page in PHP/HTML to display a table of results when I don't know how many columns the query will return?
Also, what is the most practical way to allow a visitor to this web page to restore the DB to a default state with the original data? (e.g. create a sql dump of the original state and make a button that runs it? or is there a better way?)
Thanks! | 0 |
10,748,976 | 05/25/2012 05:34:42 | 1,416,610 | 05/25/2012 05:29:13 | 1 | 0 | can't find the usb_driver folder, please install the Google USB Driver Packager using the Android SDK manager windows 7 32 | After getting my app to work in the emulator, I now want to test it on my Sony Xperia Arc Android phone. I follow the instructions from google here http://developer.android.com/sdk/win-usb.html but can't get their USB driver to load.
When I plug the phone into the computer via the supplied USB data cable, Windows 7 installs it's own driver and doesn't give me a chance to point to the google driver located here: C:\Program Files\Android\android-sdk\extras\google\usb_driver\android_winusb.inf.
When I go to the device manager and right-click on the Device Manage and try to Update Driver Software to point to the Google driver, it says it already has the best one and won't change it! (even though it doesn't work, ie. no drive label appears for the phone plus the device manager shows an ! for it)
I've spent many hours reading dozens of posts with similar problems but no solutions work for me. Any ideas? | google | usb | driver | packager | null | null | open | can't find the usb_driver folder, please install the Google USB Driver Packager using the Android SDK manager windows 7 32
===
After getting my app to work in the emulator, I now want to test it on my Sony Xperia Arc Android phone. I follow the instructions from google here http://developer.android.com/sdk/win-usb.html but can't get their USB driver to load.
When I plug the phone into the computer via the supplied USB data cable, Windows 7 installs it's own driver and doesn't give me a chance to point to the google driver located here: C:\Program Files\Android\android-sdk\extras\google\usb_driver\android_winusb.inf.
When I go to the device manager and right-click on the Device Manage and try to Update Driver Software to point to the Google driver, it says it already has the best one and won't change it! (even though it doesn't work, ie. no drive label appears for the phone plus the device manager shows an ! for it)
I've spent many hours reading dozens of posts with similar problems but no solutions work for me. Any ideas? | 0 |
11,132,961 | 06/21/2012 06:51:12 | 601,168 | 02/03/2011 08:21:43 | 39 | 0 | Working with PHP and J2EE simultaneously | I am borrowing a complete eCommerce website with backend(admin) interface built in PHP from my friend. What I want to do is to parallelly build a OMS in J2EE, but restriction is that I can not used DB that PHP website is using. I want to track all orders right from the PHP controller class and build up a separate backend(admin) system.
I want to know what are the best possible ways by which I can let J2EE and PHP to communicate to track some specific HTTP requests | java | php | java-ee | null | null | 06/21/2012 08:20:56 | not a real question | Working with PHP and J2EE simultaneously
===
I am borrowing a complete eCommerce website with backend(admin) interface built in PHP from my friend. What I want to do is to parallelly build a OMS in J2EE, but restriction is that I can not used DB that PHP website is using. I want to track all orders right from the PHP controller class and build up a separate backend(admin) system.
I want to know what are the best possible ways by which I can let J2EE and PHP to communicate to track some specific HTTP requests | 1 |
2,359,803 | 03/01/2010 23:10:15 | 165,839 | 08/31/2009 06:37:25 | 33 | 2 | Normal IT Project cost percetages | As a percent what is the average percent cost of the to the total project budget in each of the following:
Project Management
Project Overheads
Requirements
Design
Development
Testing
Deployment | project-management | cost | null | null | null | 03/01/2010 23:35:49 | not a real question | Normal IT Project cost percetages
===
As a percent what is the average percent cost of the to the total project budget in each of the following:
Project Management
Project Overheads
Requirements
Design
Development
Testing
Deployment | 1 |
6,656,842 | 07/11/2011 21:29:51 | 484,390 | 10/22/2010 15:45:33 | 504 | 0 | Recommended php tool | What recommended php tool do you guys suggest?
I wanna use a php tool without doing any difficult installation. It should go smoothly with the same level as Visual studio 2010.
// Johan Truong | php | null | null | null | null | 07/11/2011 21:39:17 | not constructive | Recommended php tool
===
What recommended php tool do you guys suggest?
I wanna use a php tool without doing any difficult installation. It should go smoothly with the same level as Visual studio 2010.
// Johan Truong | 4 |
6,952,097 | 08/05/2011 06:04:16 | 862,774 | 07/26/2011 05:08:00 | 1 | 0 | How to draw charts in PHP using PHP Excel | i need to develop charts in my PHP project, can some one suggest me how to draw charts in PhP using data inside Excel file which can change Dynamically. | php | phpexcel | null | null | null | 06/19/2012 12:22:29 | not a real question | How to draw charts in PHP using PHP Excel
===
i need to develop charts in my PHP project, can some one suggest me how to draw charts in PhP using data inside Excel file which can change Dynamically. | 1 |
9,775,274 | 03/19/2012 17:54:04 | 722,529 | 04/24/2011 10:38:42 | 84 | 0 | Text in Rect - Pygame | I'm new to Pygame (Python SDL).
Do you know if I can insert text in Rect and how ? I've found nothing on google.
Thanks ! | python | gui | sdl | pygame | null | 03/20/2012 05:51:51 | not a real question | Text in Rect - Pygame
===
I'm new to Pygame (Python SDL).
Do you know if I can insert text in Rect and how ? I've found nothing on google.
Thanks ! | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.