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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,962,881 | 06/03/2010 01:55:25 | 325,400 | 04/25/2010 13:55:38 | 62 | 0 | Android: Help with tabs view | So I'm trying to build a tabs view for an Android app, and for some reason I get a force close every time I try to run it on the emulator. When I run the examples, everything shows fine, so I went as far as to just about copy most of the layout from the examples(a mix of Tabs2.java and Tabs3.java), but for some reason it still wont run, any ideas?
Here is my code(List1.class is a copy from the examples for testing purposes). It all compiles fine, just gets a force close the second it starts:
package com.jvavrik.gcm;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;
import android.widget.TextView;
public class GCM extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final TabHost tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec("tab1")
.setIndicator("Games", getResources().getDrawable(R.drawable.star_big_on))
.setContent(new Intent(this, List1.class)));
tabHost.addTab(tabHost.newTabSpec("tab2")
.setIndicator("Consoles")
.setContent(new Intent(this, List1.class))
);
tabHost.addTab(tabHost.newTabSpec("tab3")
.setIndicator("Stats")
.setContent(new Intent(this, List1.class))
);
tabHost.addTab(tabHost.newTabSpec("tab4")
.setIndicator("Add")
.setContent(new Intent(this, List1.class))
);
}
}
| java | android | null | null | null | null | open | Android: Help with tabs view
===
So I'm trying to build a tabs view for an Android app, and for some reason I get a force close every time I try to run it on the emulator. When I run the examples, everything shows fine, so I went as far as to just about copy most of the layout from the examples(a mix of Tabs2.java and Tabs3.java), but for some reason it still wont run, any ideas?
Here is my code(List1.class is a copy from the examples for testing purposes). It all compiles fine, just gets a force close the second it starts:
package com.jvavrik.gcm;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;
import android.widget.TextView;
public class GCM extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final TabHost tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec("tab1")
.setIndicator("Games", getResources().getDrawable(R.drawable.star_big_on))
.setContent(new Intent(this, List1.class)));
tabHost.addTab(tabHost.newTabSpec("tab2")
.setIndicator("Consoles")
.setContent(new Intent(this, List1.class))
);
tabHost.addTab(tabHost.newTabSpec("tab3")
.setIndicator("Stats")
.setContent(new Intent(this, List1.class))
);
tabHost.addTab(tabHost.newTabSpec("tab4")
.setIndicator("Add")
.setContent(new Intent(this, List1.class))
);
}
}
| 0 |
10,095,479 | 04/10/2012 19:52:16 | 1,267,673 | 03/13/2012 22:38:30 | 11 | 1 | Set background color of cells based on MySQL query output | I am new to PHP and trying to learn enough to do some basic functions. I've been able to create a table for my users to edit themselves, and redisplay but I've come across a question.
Using the script below, users can input their skill level for various products. I wanted to be able to highlight each cell in which they input "0" or blank. User's input will be between 0-5 (or blank if they haven't filled it in yet).
This is all being done on my localhost so I'll admit all the security measures are not quite there.
I've read a lot of posts and tried to figure it out myself, but I'm doing something fundamentally wrong I believe.
Any assistance on this would be greatly appreciated. I've been known to buy a beer (via paypal) for those who help me with coding :)
Here is my existing code for printing out the results of the database:
<?php
//This will connect to the database in order to begin this page
mysql_connect("localhost", "root", "time2start") or die (mysql_error());
//Now we will select the database we need to talk to
mysql_select_db("joomla_dev_15") or die (mysql_error());
$query = "SELECT * FROM enterprise_storage WHERE id=1";
$result = mysql_query($query) or die (mysql_error());
echo "<table border='1'>";
echo "$row";
echo "<tr> <th>Product</th> <th>Wayne Beeg</th> <th>Paul Hamke</th> <th>Steve Jaczyk</th> <th>David Jontow</th> <th>Ed MacDonald</th> <th>Michael Munozcano</th> <th>Ron Shaffer</th> <th>Luke Soares</th> <th>Josh Wenger</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['model'];
echo "</td><td>";
echo $row['beeg'];
echo "</td><td>";
echo $row['hamke'];
echo "</td><td>";
echo $row['jaczyk'];
echo "</td><td>";
echo $row['jontow'];
echo "</td><td>";
echo $row['macdonald'];
echo "</td><td>";
echo $row['munozcano'];
echo "</td><td>";
echo $row['shaffer'];
echo "</td><td>";
echo $row['soares'];
echo "</td><td>";
echo $row['wenger'];
echo "</td></tr>";
}
echo "</table>";
?>
<FORM>
<INPUT TYPE="BUTTON" VALUE="Return to the Home Page" ONCLICK="window.location.href='http://localhost/~user/joomla15/custom/skilldisplay.php'">
</FORM> | mysql | php5 | null | null | null | null | open | Set background color of cells based on MySQL query output
===
I am new to PHP and trying to learn enough to do some basic functions. I've been able to create a table for my users to edit themselves, and redisplay but I've come across a question.
Using the script below, users can input their skill level for various products. I wanted to be able to highlight each cell in which they input "0" or blank. User's input will be between 0-5 (or blank if they haven't filled it in yet).
This is all being done on my localhost so I'll admit all the security measures are not quite there.
I've read a lot of posts and tried to figure it out myself, but I'm doing something fundamentally wrong I believe.
Any assistance on this would be greatly appreciated. I've been known to buy a beer (via paypal) for those who help me with coding :)
Here is my existing code for printing out the results of the database:
<?php
//This will connect to the database in order to begin this page
mysql_connect("localhost", "root", "time2start") or die (mysql_error());
//Now we will select the database we need to talk to
mysql_select_db("joomla_dev_15") or die (mysql_error());
$query = "SELECT * FROM enterprise_storage WHERE id=1";
$result = mysql_query($query) or die (mysql_error());
echo "<table border='1'>";
echo "$row";
echo "<tr> <th>Product</th> <th>Wayne Beeg</th> <th>Paul Hamke</th> <th>Steve Jaczyk</th> <th>David Jontow</th> <th>Ed MacDonald</th> <th>Michael Munozcano</th> <th>Ron Shaffer</th> <th>Luke Soares</th> <th>Josh Wenger</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['model'];
echo "</td><td>";
echo $row['beeg'];
echo "</td><td>";
echo $row['hamke'];
echo "</td><td>";
echo $row['jaczyk'];
echo "</td><td>";
echo $row['jontow'];
echo "</td><td>";
echo $row['macdonald'];
echo "</td><td>";
echo $row['munozcano'];
echo "</td><td>";
echo $row['shaffer'];
echo "</td><td>";
echo $row['soares'];
echo "</td><td>";
echo $row['wenger'];
echo "</td></tr>";
}
echo "</table>";
?>
<FORM>
<INPUT TYPE="BUTTON" VALUE="Return to the Home Page" ONCLICK="window.location.href='http://localhost/~user/joomla15/custom/skilldisplay.php'">
</FORM> | 0 |
11,455,576 | 07/12/2012 15:44:53 | 1,319,374 | 04/07/2012 17:09:48 | 307 | 4 | Insert dynamic parameters to sqlite database statements | I want to insert parameters dynamically to statements at sqlite.
I now write as follows:
tx.executeSql('SELECT Data from Table Where something = "'+ anyvariable+ '"',[],successFn, errorCB);
But I guess there is a better (cleaner) method to do it.. Any ideas?
| javascript | jquery | sqlite | null | null | 07/12/2012 17:19:24 | off topic | Insert dynamic parameters to sqlite database statements
===
I want to insert parameters dynamically to statements at sqlite.
I now write as follows:
tx.executeSql('SELECT Data from Table Where something = "'+ anyvariable+ '"',[],successFn, errorCB);
But I guess there is a better (cleaner) method to do it.. Any ideas?
| 2 |
5,802,093 | 04/27/2011 09:41:30 | 726,942 | 04/27/2011 09:41:30 | 1 | 0 | How to create folder on photo album | I would like to create folder on photo album.
Is it possible?
I searched AssetsLibrary. But It seems to be impossible. | iphone | objective-c | photo | null | null | 04/28/2011 17:27:06 | off topic | How to create folder on photo album
===
I would like to create folder on photo album.
Is it possible?
I searched AssetsLibrary. But It seems to be impossible. | 2 |
7,846,567 | 10/21/2011 07:57:25 | 411,873 | 08/05/2010 11:03:12 | 29 | 2 | Software to analyze clients usage, bill them accordingly | We are trying to move our product from an on-premise model to a cloud model. Hence we are looking out for a software that can be "plugged-in" to the existing product and we could bill the clients based on their usage.
I looked into the below links.
1. http://cpb.codeplex.com/
2. http://wso2.org/library/articles/2011/08/billing-cloud-computing-it-done-stratoslive
The CPB seems to be tied with Azure platform, the second still seems relevant. I would like to know what is the best way to measure the client's usage of our software which is deployed on cloud and bill them accordingly. (This also has a direct correlation to our bills, say from Amazon cloud).
The product is Java based and would like to know what are the open-source or paid plug-ins available, their advantages and disadvantages per user's experience. (we would like to avoid building it from scratch, if a best fit is available).
| saas | billing | metering | null | null | 10/26/2011 02:39:16 | off topic | Software to analyze clients usage, bill them accordingly
===
We are trying to move our product from an on-premise model to a cloud model. Hence we are looking out for a software that can be "plugged-in" to the existing product and we could bill the clients based on their usage.
I looked into the below links.
1. http://cpb.codeplex.com/
2. http://wso2.org/library/articles/2011/08/billing-cloud-computing-it-done-stratoslive
The CPB seems to be tied with Azure platform, the second still seems relevant. I would like to know what is the best way to measure the client's usage of our software which is deployed on cloud and bill them accordingly. (This also has a direct correlation to our bills, say from Amazon cloud).
The product is Java based and would like to know what are the open-source or paid plug-ins available, their advantages and disadvantages per user's experience. (we would like to avoid building it from scratch, if a best fit is available).
| 2 |
10,740,292 | 05/24/2012 15:12:17 | 1,415,363 | 05/24/2012 14:53:34 | 1 | 0 | I am interested in making an android app which uses the barometric pressure sensor | The task to be achieved is to blow air near the sensor(the sensor, as far as I know is situated near the bottom of the screen). As air is blown bubbles should be formed on the screen.
And I am an absolute beginer at making android apps, so please make the explanation thorough. | android | pressure | null | null | null | 05/25/2012 19:03:17 | not a real question | I am interested in making an android app which uses the barometric pressure sensor
===
The task to be achieved is to blow air near the sensor(the sensor, as far as I know is situated near the bottom of the screen). As air is blown bubbles should be formed on the screen.
And I am an absolute beginer at making android apps, so please make the explanation thorough. | 1 |
10,369,571 | 04/29/2012 03:58:42 | 1,363,717 | 04/29/2012 03:42:12 | 1 | 0 | FTP "550 Access is denied" Error | I have two Clients who are connecting to an FTP (configured as part of IIS), both Clients can connect to the FTP successfully however Client A receives a "550 Access is denied , Error: Critical file transfer error" when they try and upload a file while Client B can successfully upload the file. They are both using Filezilla on Windows environments.
**Client A Output**
Status: Resolving address of 000.000.000.00
Status: Connecting to 000.000.000.00:21...
Status: Connection established, waiting for welcome message...
Response: 220 Microsoft FTP Service
Command: USER wg\transfer
Response: 331 Password required for wg\transfer.
Command: PASS *********
Response: 230 User wg\transfer logged in.
Status: Connected
Status: Starting upload of C:\upload.zip
Command: CWD /
Response: 250 CWD command successful.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (000,000,000,00,22,96).
Command: STOR upload.zip
Response: 550 Access is denied.
Error: Critical file transfer error
**Client B Output**
Status: Resolving address of 000.000.000.00
Status: Connecting to 000.000.000.00:21...
Status: Connection established, waiting for welcome message...
Response: 220 Microsoft FTP Service
Command: USER wg\transfer
Response: 331 Password required for wg\transfer.
Command: PASS *********
Response: 230 User wg\transfer logged in.
Status: Connected
Status: Starting upload of C:\upload.zip
Command: CWD /
Response: 250 CWD command successful.
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (000,000,000,00,22,99).
Command: STOR upload.zip
Response: 125 Data connection already open; Transfer starting.
Response: 226 Transfer complete
Status: File transfer successful, transferred 22,197 bytes in 7 seconds
Status: Retrieving directory listing...
Command: PASV
Response: 227 Entering Passive Mode (000,000,000,00,22,100).
Command: LIST
Response: 125 Data connection already open; Transfer starting.
Response: 226 Transfer complete
Can anyone shed any light on this? I'm thinking Client A has some sort of Firewall setting preventing them from uploading files but this seems quite strange.
Thanks in advance! | ftp | access-denied | filezilla | null | null | null | open | FTP "550 Access is denied" Error
===
I have two Clients who are connecting to an FTP (configured as part of IIS), both Clients can connect to the FTP successfully however Client A receives a "550 Access is denied , Error: Critical file transfer error" when they try and upload a file while Client B can successfully upload the file. They are both using Filezilla on Windows environments.
**Client A Output**
Status: Resolving address of 000.000.000.00
Status: Connecting to 000.000.000.00:21...
Status: Connection established, waiting for welcome message...
Response: 220 Microsoft FTP Service
Command: USER wg\transfer
Response: 331 Password required for wg\transfer.
Command: PASS *********
Response: 230 User wg\transfer logged in.
Status: Connected
Status: Starting upload of C:\upload.zip
Command: CWD /
Response: 250 CWD command successful.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (000,000,000,00,22,96).
Command: STOR upload.zip
Response: 550 Access is denied.
Error: Critical file transfer error
**Client B Output**
Status: Resolving address of 000.000.000.00
Status: Connecting to 000.000.000.00:21...
Status: Connection established, waiting for welcome message...
Response: 220 Microsoft FTP Service
Command: USER wg\transfer
Response: 331 Password required for wg\transfer.
Command: PASS *********
Response: 230 User wg\transfer logged in.
Status: Connected
Status: Starting upload of C:\upload.zip
Command: CWD /
Response: 250 CWD command successful.
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (000,000,000,00,22,99).
Command: STOR upload.zip
Response: 125 Data connection already open; Transfer starting.
Response: 226 Transfer complete
Status: File transfer successful, transferred 22,197 bytes in 7 seconds
Status: Retrieving directory listing...
Command: PASV
Response: 227 Entering Passive Mode (000,000,000,00,22,100).
Command: LIST
Response: 125 Data connection already open; Transfer starting.
Response: 226 Transfer complete
Can anyone shed any light on this? I'm thinking Client A has some sort of Firewall setting preventing them from uploading files but this seems quite strange.
Thanks in advance! | 0 |
9,935,107 | 03/29/2012 23:33:38 | 354,259 | 05/31/2010 02:37:08 | 50 | 0 | Haskell Trading engine | so we're doing this assignment at Uni and i have a serious craving to do the assignment in haskell. Its a simulation of a stock trading engine. Situation is that we have data coming in from a csv and we wish to parse each record and process it in a certain way dependent on which market phase its allocated to. Justification for using haskell, is that i view the trading engine as heavy functional system.
I have had haskell experience before but only minor experience, never anything this big.
We were wanting to run a thread which would import the csvs into a queue of unprocessed orders and then have the main program access this queue for processing each order. However how could i achieve this? I know in C# i would just set up the class so it could access the CSVParser class that would hold the unprocessed queue. This also means that the import thread would be continuously running through all the market phases or until it finished importing the csv file.
Any guidance on how to achieve this would be great! (not looking for a fully typed script, just what things in haskell i would need to look at) | haskell | null | null | null | null | 03/30/2012 01:45:43 | not a real question | Haskell Trading engine
===
so we're doing this assignment at Uni and i have a serious craving to do the assignment in haskell. Its a simulation of a stock trading engine. Situation is that we have data coming in from a csv and we wish to parse each record and process it in a certain way dependent on which market phase its allocated to. Justification for using haskell, is that i view the trading engine as heavy functional system.
I have had haskell experience before but only minor experience, never anything this big.
We were wanting to run a thread which would import the csvs into a queue of unprocessed orders and then have the main program access this queue for processing each order. However how could i achieve this? I know in C# i would just set up the class so it could access the CSVParser class that would hold the unprocessed queue. This also means that the import thread would be continuously running through all the market phases or until it finished importing the csv file.
Any guidance on how to achieve this would be great! (not looking for a fully typed script, just what things in haskell i would need to look at) | 1 |
7,027,915 | 08/11/2011 14:45:52 | 711,649 | 04/16/2011 23:19:17 | 1 | 0 | mysql Trigger On insert | whats wrong with my syntax?
CREATE
TRIGGER db_dhruniversity.trigger1
AFTER INSERT
ON jos_dhruprofile
FOR EACH ROW
BEGIN
UPDATE jos_users
SET jos_users.department = jos_dhruprofile.department
WHERE jos_users.id = jos_dhruprofile.uid
END | php | mysql | triggers | null | null | null | open | mysql Trigger On insert
===
whats wrong with my syntax?
CREATE
TRIGGER db_dhruniversity.trigger1
AFTER INSERT
ON jos_dhruprofile
FOR EACH ROW
BEGIN
UPDATE jos_users
SET jos_users.department = jos_dhruprofile.department
WHERE jos_users.id = jos_dhruprofile.uid
END | 0 |
5,978,365 | 05/12/2011 13:02:04 | 750,587 | 05/12/2011 13:02:04 | 1 | 0 | Loading another page before page loading using jquery | I want to open a external page and a small message before loading the original page ex: http://adf.ly/1VUM4 .
I heart it is possible with jquery.Any idea how to do this? | jquery | ajax | blockui | null | null | 03/11/2012 14:45:48 | not constructive | Loading another page before page loading using jquery
===
I want to open a external page and a small message before loading the original page ex: http://adf.ly/1VUM4 .
I heart it is possible with jquery.Any idea how to do this? | 4 |
2,484,908 | 03/20/2010 21:46:54 | 67,586 | 02/17/2009 22:04:47 | 47 | 3 | Physical storage of data in Access 2007 | I've been trying to estimate the size of an Access table with a certain number of records.
It has 4 Longs (4 bytes each), and a Currency (8 bytes).
In theory: `1 Record = 24 bytes, 500,000 = ~11.5MB`
However, the accdb file (even after compacting) increases by almost 30MB (~61 bytes per record). A few extra bytes for padding wouldn't be so bad, but 2.5X seems a bit excessive - even for Microsoft bloat.
What's with the discrepancy? The four longs are compound keys, would that matter?
| ms-access | ms-access-2007 | database | null | null | null | open | Physical storage of data in Access 2007
===
I've been trying to estimate the size of an Access table with a certain number of records.
It has 4 Longs (4 bytes each), and a Currency (8 bytes).
In theory: `1 Record = 24 bytes, 500,000 = ~11.5MB`
However, the accdb file (even after compacting) increases by almost 30MB (~61 bytes per record). A few extra bytes for padding wouldn't be so bad, but 2.5X seems a bit excessive - even for Microsoft bloat.
What's with the discrepancy? The four longs are compound keys, would that matter?
| 0 |
4,316,210 | 11/30/2010 16:47:45 | 420,008 | 08/13/2010 21:07:36 | 26 | 2 | Is it possible to read/edit shared preferences in native code? | I have an Android app that includes a C library using NDK to execute some some code. Within the C library I would like to update the applications shared preferences. My question... is it possible to read/edit shared preferences in native code?
| android | null | null | null | null | null | open | Is it possible to read/edit shared preferences in native code?
===
I have an Android app that includes a C library using NDK to execute some some code. Within the C library I would like to update the applications shared preferences. My question... is it possible to read/edit shared preferences in native code?
| 0 |
8,697,136 | 01/02/2012 03:21:56 | 234,188 | 12/17/2009 22:33:41 | 185 | 4 | Automated email from calendat control | I have a calendar control that I would like to send email notification in predetermined number of days before the event such as 10 days, then 3 days, etc.
In the create events page I have set up a dropdown list where users can select the number of days and it is then saved in database. The site will be hosted with someone like Godaddy or similar provider.
I know sql server has a database mail that can be set up, but do providers offer this service? Or will they allow me to host a windows service application that monitors a condition and fires smtp emails? I don't want to reinvent the wheel but don't really know what is involved.
Has anyone dealt with this before and what were the processes involved?
Thanks,
Risho
| asp.net | sql-server-2008 | smtp | null | null | 01/03/2012 08:25:14 | not constructive | Automated email from calendat control
===
I have a calendar control that I would like to send email notification in predetermined number of days before the event such as 10 days, then 3 days, etc.
In the create events page I have set up a dropdown list where users can select the number of days and it is then saved in database. The site will be hosted with someone like Godaddy or similar provider.
I know sql server has a database mail that can be set up, but do providers offer this service? Or will they allow me to host a windows service application that monitors a condition and fires smtp emails? I don't want to reinvent the wheel but don't really know what is involved.
Has anyone dealt with this before and what were the processes involved?
Thanks,
Risho
| 4 |
4,343,916 | 12/03/2010 09:00:28 | 354,612 | 05/31/2010 13:21:29 | 43 | 2 | How do I update existing STDOUT? | I need to print a bunch of strings to STDOUT. Instead of each string going on a newline, though, I want to have just one line that gets *updated* with each new string.
Any ideas? | bash | shell | stdout | null | null | null | open | How do I update existing STDOUT?
===
I need to print a bunch of strings to STDOUT. Instead of each string going on a newline, though, I want to have just one line that gets *updated* with each new string.
Any ideas? | 0 |
10,698,265 | 05/22/2012 08:17:36 | 655,187 | 03/11/2011 10:35:50 | 580 | 42 | changing the value of a currency based on a selected country in rails | I am building a rails ecommerce application and would like to integrate a currency exchange system were visitors can click on a check box and a list of countries will be displayed and when clicked on the value of the currencies of products on the site changes to the value of the selected countries currency. Is there a rails gem that connects to a currency exchange server and authomaticall converts the currency for me or any ideas of how i can accomplish this. Thank you. | ruby-on-rails | ruby-on-rails-3 | ruby-on-rails-3.1 | null | null | null | open | changing the value of a currency based on a selected country in rails
===
I am building a rails ecommerce application and would like to integrate a currency exchange system were visitors can click on a check box and a list of countries will be displayed and when clicked on the value of the currencies of products on the site changes to the value of the selected countries currency. Is there a rails gem that connects to a currency exchange server and authomaticall converts the currency for me or any ideas of how i can accomplish this. Thank you. | 0 |
5,813,651 | 04/28/2011 04:32:55 | 728,534 | 04/28/2011 04:32:55 | 1 | 0 | ASP .Net WebService | What happens if the webservice gets time out before the client actually gets the response.what happens if the client retries to call the webservice function before it gets the response for the previous call because of time out. | asp.net | web-services | null | null | null | null | open | ASP .Net WebService
===
What happens if the webservice gets time out before the client actually gets the response.what happens if the client retries to call the webservice function before it gets the response for the previous call because of time out. | 0 |
6,804,529 | 07/24/2011 02:02:26 | 495,452 | 11/03/2010 02:14:50 | 535 | 1 | Generate multiple dimension array in CodeIgniter | By using the code below in [**CodeIgniter**][1], we can generate a table as below
$this->load->library('table');
$data = array(
array('11', '12', '13'),
array('21', '22', '23'),
array('31', '32', '33'),
array('41', '42', '43')
);
echo $this->table->generate($data);
Output:<br />
![enter image description here][2]
I want to ask how can I put this array in for loop likes:
for ($x = 0; $x < 5; $x++) {
for ($y = 0; $y < 4; $y++) {
$data xxx;
}
}
What is the code to replace in **xxx**?
Thanks
[1]: http://codeigniter.com/user_guide/libraries/table.html
[2]: http://i.stack.imgur.com/bDKJ9.jpg | codeigniter | null | null | null | null | null | open | Generate multiple dimension array in CodeIgniter
===
By using the code below in [**CodeIgniter**][1], we can generate a table as below
$this->load->library('table');
$data = array(
array('11', '12', '13'),
array('21', '22', '23'),
array('31', '32', '33'),
array('41', '42', '43')
);
echo $this->table->generate($data);
Output:<br />
![enter image description here][2]
I want to ask how can I put this array in for loop likes:
for ($x = 0; $x < 5; $x++) {
for ($y = 0; $y < 4; $y++) {
$data xxx;
}
}
What is the code to replace in **xxx**?
Thanks
[1]: http://codeigniter.com/user_guide/libraries/table.html
[2]: http://i.stack.imgur.com/bDKJ9.jpg | 0 |
9,269,418 | 02/13/2012 23:09:31 | 1,189,717 | 02/04/2012 18:21:15 | 12 | 0 | How to maintain high performance from a database, and optimisation of code? | I am using MYSQL, How can i manage High performance from a database. which is the best way to handle the very-big amount of data. | mysql | null | null | null | null | 02/13/2012 23:40:48 | not a real question | How to maintain high performance from a database, and optimisation of code?
===
I am using MYSQL, How can i manage High performance from a database. which is the best way to handle the very-big amount of data. | 1 |
6,780,954 | 07/21/2011 18:36:21 | 599,303 | 02/02/2011 00:58:27 | 68 | 0 | Beginner book for C++ Data Structure and Algorithm | I am looking for a very neat, for beginners, book on Data Structures and Algorithms using C++ (the OOP way).
I tried [this][1] book but it is a little much for my standard. Please suggest. Thanks.
[1]: http://www.amazon.com/Data-Structures-Algorithms-Adam-Drozdek/dp/0534491820/ref=sr_1_2?ie=UTF8&qid=1311273155&sr=8-2 | c++ | algorithm | data-structures | books | null | 10/03/2011 01:06:34 | not constructive | Beginner book for C++ Data Structure and Algorithm
===
I am looking for a very neat, for beginners, book on Data Structures and Algorithms using C++ (the OOP way).
I tried [this][1] book but it is a little much for my standard. Please suggest. Thanks.
[1]: http://www.amazon.com/Data-Structures-Algorithms-Adam-Drozdek/dp/0534491820/ref=sr_1_2?ie=UTF8&qid=1311273155&sr=8-2 | 4 |
3,887,645 | 10/08/2010 04:14:23 | 392,434 | 07/15/2010 08:00:53 | 62 | 1 | how to use parameter in linq to select different columns | i want to use linq to select certain columns to populate each combobox.
right i have individual linq query to do the job. i wish to write a method to do that.
var getUserName = Entity.Select(a=>a.Username);
var getType = Entity.Select(a=>a.Type);
var getAddress = Entity.Select(a=>a.Address);
can i do something like that:
Public object GetData(string columnName) {
var q = from a in Entity
Select columnName;
return q.distinct();
}
combobox1.bindingsource = GetData("Username");
combobox2.bindingsource = GetData("Type");
combobox3.bindingsource = GetData("Address");
do i need to write a construct? | c# | linq | null | null | null | null | open | how to use parameter in linq to select different columns
===
i want to use linq to select certain columns to populate each combobox.
right i have individual linq query to do the job. i wish to write a method to do that.
var getUserName = Entity.Select(a=>a.Username);
var getType = Entity.Select(a=>a.Type);
var getAddress = Entity.Select(a=>a.Address);
can i do something like that:
Public object GetData(string columnName) {
var q = from a in Entity
Select columnName;
return q.distinct();
}
combobox1.bindingsource = GetData("Username");
combobox2.bindingsource = GetData("Type");
combobox3.bindingsource = GetData("Address");
do i need to write a construct? | 0 |
8,795,236 | 01/09/2012 21:08:33 | 1,136,662 | 01/08/2012 03:02:45 | 11 | 0 | ExistDB vs Marklogic vs Sedna performance | Has anyone done a comparison of the following technologies? I am an open source lover, but i would definitely like to know and give it a shot. My user base on the client side is going to approx 1500 users daily.
Please post if you have had any questions on this regard | xml | xslt | xquery | marklogic | existdb | 01/11/2012 13:35:41 | not constructive | ExistDB vs Marklogic vs Sedna performance
===
Has anyone done a comparison of the following technologies? I am an open source lover, but i would definitely like to know and give it a shot. My user base on the client side is going to approx 1500 users daily.
Please post if you have had any questions on this regard | 4 |
11,505,744 | 07/16/2012 13:48:50 | 1,507,346 | 07/06/2012 16:36:14 | -1 | 1 | host a SQLite .db file on dropbox.com | First of all, can anybody tell me if Dropbox.com has write access.
if so then how would you access an SQLite .db file hosted there within your Java applet
specs:
I'm using Eclipse Helios
Using David Crawshaw's SQLite jdbc driver (v. 056)
not sure what other info you might need, if you need more info then leave a comment. | java | sqlite | dropbox | sqlitejdbc | null | 07/17/2012 14:02:58 | not a real question | host a SQLite .db file on dropbox.com
===
First of all, can anybody tell me if Dropbox.com has write access.
if so then how would you access an SQLite .db file hosted there within your Java applet
specs:
I'm using Eclipse Helios
Using David Crawshaw's SQLite jdbc driver (v. 056)
not sure what other info you might need, if you need more info then leave a comment. | 1 |
3,313,094 | 07/22/2010 20:24:25 | 7,961 | 09/15/2008 14:47:10 | 1,154 | 36 | Exchange Web Services (Managed API) vs. WebDav Performance Question | I'm new to Exchange (2007) development so please bear with me. :-). There appear to be a myriad of technologies for Exchange development -- the latest being Exchange Web Services -- and it's related Managed API. I need to write a program that can -- if necessary -- run on the Exchange servers -- to scan people's mailboxes for the purpose of purging messages that meet various criteria (irrelevant for this discussion).
It is my understanding that most of the other technologies -- WebDav, MAPI, CDO -- are now deprecated with respect to Exchange 2007 and Exchange 2010. So since this is a greenfield application, I decided to use the Exchange Web Services Managed API.
**I'm concerned about the number of items I can scan per hour**. Since it is web services based there is a network hop involved. So I'd like to run this utility on the server with whom I am commnunicating. *Am I correct that I have to talk to a "Hub" server?*. I'm using Auto Discovery and it appears to resolve to a "hub" server no matter which mail server contains the actual message store I'm scanning.
When pulling multiple items down -- using ExchangeService.FindItems and specifying a page size of 500 -- I get pretty good throughput from my workstation to the hub server. I was able to retrieve 22,000 mail items in 47 seconds. That seems reasonable. **However**, turns out that not all properties are "bound" when retrieved that way. Certain properties -- like ToRecipients and CcReipients -- are not filled in. You have to explicitly bind them (individually) -- with a call to
Item.Bind(Server, Item.Id)
This is a separate round-trip to the server and this drops throughput down from about 460 items/second to 3 items per second -- which is unworkable.
So -- a few other questions. Is there any way to either force the missing properties to be bound during the call to FindItems? Failing that, is there a way to bind **multiple** items at once?
Finally, am I right in choosing Exchange Web Services at all for this type of work. I **love** the simplicity of the programming model and would not like to move to another technology if it is (a) more complex or (b) deprecated. If another technology will do this job better, and it is not deprecated, than I would consider using it if necessary. Your opinion and advice is appreciated. | exchange | webdav | mapi | exchange2007 | exchangewebservices | null | open | Exchange Web Services (Managed API) vs. WebDav Performance Question
===
I'm new to Exchange (2007) development so please bear with me. :-). There appear to be a myriad of technologies for Exchange development -- the latest being Exchange Web Services -- and it's related Managed API. I need to write a program that can -- if necessary -- run on the Exchange servers -- to scan people's mailboxes for the purpose of purging messages that meet various criteria (irrelevant for this discussion).
It is my understanding that most of the other technologies -- WebDav, MAPI, CDO -- are now deprecated with respect to Exchange 2007 and Exchange 2010. So since this is a greenfield application, I decided to use the Exchange Web Services Managed API.
**I'm concerned about the number of items I can scan per hour**. Since it is web services based there is a network hop involved. So I'd like to run this utility on the server with whom I am commnunicating. *Am I correct that I have to talk to a "Hub" server?*. I'm using Auto Discovery and it appears to resolve to a "hub" server no matter which mail server contains the actual message store I'm scanning.
When pulling multiple items down -- using ExchangeService.FindItems and specifying a page size of 500 -- I get pretty good throughput from my workstation to the hub server. I was able to retrieve 22,000 mail items in 47 seconds. That seems reasonable. **However**, turns out that not all properties are "bound" when retrieved that way. Certain properties -- like ToRecipients and CcReipients -- are not filled in. You have to explicitly bind them (individually) -- with a call to
Item.Bind(Server, Item.Id)
This is a separate round-trip to the server and this drops throughput down from about 460 items/second to 3 items per second -- which is unworkable.
So -- a few other questions. Is there any way to either force the missing properties to be bound during the call to FindItems? Failing that, is there a way to bind **multiple** items at once?
Finally, am I right in choosing Exchange Web Services at all for this type of work. I **love** the simplicity of the programming model and would not like to move to another technology if it is (a) more complex or (b) deprecated. If another technology will do this job better, and it is not deprecated, than I would consider using it if necessary. Your opinion and advice is appreciated. | 0 |
7,059,635 | 08/14/2011 20:49:52 | 44,084 | 12/07/2008 12:12:53 | 19,322 | 304 | Invoking a function from a class member in PHP | Say I have the following:
class C {
private $f;
public function __construct($f) {
$this->f = $f;
}
public function invoke ($n) {
$this->f($n); // <= error thrown here
}
}
$c = new C(function ($m) {
echo $m;
});
$c->invoke("hello");
The above throws the following error:
> Fatal error: Call to undefined method C::f()
And I'm guessing that it's because I'm trying to invoke the callback function `$this->f` using the same syntax one would invoke an object's member functions.
So what's the syntax that allows you to invoke a function which is stored in a member variable? | php | first-class-functions | null | null | null | null | open | Invoking a function from a class member in PHP
===
Say I have the following:
class C {
private $f;
public function __construct($f) {
$this->f = $f;
}
public function invoke ($n) {
$this->f($n); // <= error thrown here
}
}
$c = new C(function ($m) {
echo $m;
});
$c->invoke("hello");
The above throws the following error:
> Fatal error: Call to undefined method C::f()
And I'm guessing that it's because I'm trying to invoke the callback function `$this->f` using the same syntax one would invoke an object's member functions.
So what's the syntax that allows you to invoke a function which is stored in a member variable? | 0 |
8,162,323 | 11/17/2011 04:58:49 | 1,023,755 | 11/01/2011 13:14:33 | 37 | 0 | Monitoring a Web Application running in Linux Machiene | We have developed a Web Application which acceps some input data and which works fine in our Environment .
We have uploaded this war to one of the Linux Machiene ( For onsite people to test it)
(We dont have any http access to those Servers , but we do have acess through putty tool)
Now my question is , can we monitor the application which was deployed and running on the linux server ?? from our end ( that is from off site )
Here monitoring means , deciding whether a server restart is needed , how application is behaving ---etc)
Please share your inputs .
Thanks
| java | linux | web-applications | monitoring | null | 11/24/2011 23:56:37 | off topic | Monitoring a Web Application running in Linux Machiene
===
We have developed a Web Application which acceps some input data and which works fine in our Environment .
We have uploaded this war to one of the Linux Machiene ( For onsite people to test it)
(We dont have any http access to those Servers , but we do have acess through putty tool)
Now my question is , can we monitor the application which was deployed and running on the linux server ?? from our end ( that is from off site )
Here monitoring means , deciding whether a server restart is needed , how application is behaving ---etc)
Please share your inputs .
Thanks
| 2 |
4,034,658 | 10/27/2010 15:00:44 | 387,552 | 06/10/2010 14:47:55 | 108 | 11 | Mapkit - Zoom level keeps resetting | I have the following code in place:
-(void)viewDidLoad
{
//Set Zoom level using Span
MKCoordinateSpan span;
span.latitudeDelta = 0.05;
span.longitudeDelta = 0.05;
region.span = span;
}
-(void)locationChange:(CLLocation *)newLocation: (CLLocation *)oldLocation
{
// This zooms in on the users current loation.
curlocation = newLocation.coordinate;
region.center = curlocation;
[_mapView setRegion:region animated:TRUE];
}
Initially the zoom level is set as per the code in ViewDidLoad. How do I store the zoom level id the user zooms in or out, as everytime a new location update is received the zoom level is reset.
Is there a way of detecting the user has zoomed in or out ?
Regards,
Stephen | iphone | mkmapview | null | null | null | null | open | Mapkit - Zoom level keeps resetting
===
I have the following code in place:
-(void)viewDidLoad
{
//Set Zoom level using Span
MKCoordinateSpan span;
span.latitudeDelta = 0.05;
span.longitudeDelta = 0.05;
region.span = span;
}
-(void)locationChange:(CLLocation *)newLocation: (CLLocation *)oldLocation
{
// This zooms in on the users current loation.
curlocation = newLocation.coordinate;
region.center = curlocation;
[_mapView setRegion:region animated:TRUE];
}
Initially the zoom level is set as per the code in ViewDidLoad. How do I store the zoom level id the user zooms in or out, as everytime a new location update is received the zoom level is reset.
Is there a way of detecting the user has zoomed in or out ?
Regards,
Stephen | 0 |
11,629,332 | 07/24/2012 10:53:23 | 1,310,259 | 04/03/2012 11:08:58 | 1 | 0 | how to match a pattern in several fields and print line if encountered n times | I have a file which looks like this:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT AD0062-C AD0065-C
2L 560 . T C 30.65 PASS AC=3;AF1=0.5;AN=4;CI95=0.5,0.5;DP4=9,3,7,2;DP=21;FQ=36;MQ=31;PV4=1,1,0.00019,0.46;SF=3,15 GT:GQ:PL . .
2L 595 . G T 61.75 PASS AC=11;AF1=0.5263;AN=22;CI95=0.5,1;DP4=5,1,4,5;DP=15;FQ=-17.1;MQ=23;PV4=0.29,0.0028,1,1;SF=1,2,3,4,5,6,8,9,10,11,12 GT:GQ:PL . 0/1:13:132,0,10
The file actually has a total of 25 columns. I want to parse the file using a perl script and match the dot character (".") starting from column 10-25. However, I want the output so that only lines that have the occurrence of the dot character (tested only in columns 10-25) 8 times or more are printed. It also needs to skip comment lines which are marked by a double hash (##; the header is marked by a single hash #).
I looked into using quantifiers for pattern matching but I don't think it behaves in a way that I need it to.
P.S. Ideally I want to run it using a perl script, but I can also use the shell
Thanks in advance,
Danica | regex | linux | perl | awk | pattern-matching | 07/25/2012 03:30:17 | not a real question | how to match a pattern in several fields and print line if encountered n times
===
I have a file which looks like this:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT AD0062-C AD0065-C
2L 560 . T C 30.65 PASS AC=3;AF1=0.5;AN=4;CI95=0.5,0.5;DP4=9,3,7,2;DP=21;FQ=36;MQ=31;PV4=1,1,0.00019,0.46;SF=3,15 GT:GQ:PL . .
2L 595 . G T 61.75 PASS AC=11;AF1=0.5263;AN=22;CI95=0.5,1;DP4=5,1,4,5;DP=15;FQ=-17.1;MQ=23;PV4=0.29,0.0028,1,1;SF=1,2,3,4,5,6,8,9,10,11,12 GT:GQ:PL . 0/1:13:132,0,10
The file actually has a total of 25 columns. I want to parse the file using a perl script and match the dot character (".") starting from column 10-25. However, I want the output so that only lines that have the occurrence of the dot character (tested only in columns 10-25) 8 times or more are printed. It also needs to skip comment lines which are marked by a double hash (##; the header is marked by a single hash #).
I looked into using quantifiers for pattern matching but I don't think it behaves in a way that I need it to.
P.S. Ideally I want to run it using a perl script, but I can also use the shell
Thanks in advance,
Danica | 1 |
7,881,104 | 10/24/2011 19:48:00 | 533,049 | 12/07/2010 00:51:06 | 137 | 0 | Trying to find if there are at least 2 words in a string | I am trying to find out if a phrase entered by the user has at least 2 words in it. If it does not, keep asking them to enter a phrase until they enter one with at least 2 words.
Here is my code so far: It can successfully detect if they have entered 2 words, and it successfully detects if they don't enter 2 words the FIRST time, but if they enter below 2 words again the second time the program quit.
private static void stringfunctions() {
String phrase;
int count = 0;
Scanner input = new Scanner(System.in);
while (count < 2) {
System.out.println("Please enter a multiple word phrase: ");
phrase = input.nextLine();
String[] arrPhrase = phrase.split(" ");
for (int i = 0; i < arrPhrase.length; i++) {
if (arrPhrase[i].equals(" ")) {
} else {
count++;
}
}
} | java | null | null | null | null | null | open | Trying to find if there are at least 2 words in a string
===
I am trying to find out if a phrase entered by the user has at least 2 words in it. If it does not, keep asking them to enter a phrase until they enter one with at least 2 words.
Here is my code so far: It can successfully detect if they have entered 2 words, and it successfully detects if they don't enter 2 words the FIRST time, but if they enter below 2 words again the second time the program quit.
private static void stringfunctions() {
String phrase;
int count = 0;
Scanner input = new Scanner(System.in);
while (count < 2) {
System.out.println("Please enter a multiple word phrase: ");
phrase = input.nextLine();
String[] arrPhrase = phrase.split(" ");
for (int i = 0; i < arrPhrase.length; i++) {
if (arrPhrase[i].equals(" ")) {
} else {
count++;
}
}
} | 0 |
4,757,190 | 01/21/2011 09:25:40 | 298,683 | 03/22/2010 00:24:51 | 20 | 1 | Encoding multimedia file formats programmatically | I'm always wondered where to find rules to encode known file formats, for example: .jpg, .png, .mpg programmatically. How to write these binary formats? Some years ago, when I surfed phpBB scripts, I found that they for example don't use any gd or imagemagick, they write it in binary way. Not only for php, but for other languages as well? | encoding | binary | null | null | null | null | open | Encoding multimedia file formats programmatically
===
I'm always wondered where to find rules to encode known file formats, for example: .jpg, .png, .mpg programmatically. How to write these binary formats? Some years ago, when I surfed phpBB scripts, I found that they for example don't use any gd or imagemagick, they write it in binary way. Not only for php, but for other languages as well? | 0 |
8,659,861 | 12/28/2011 18:38:54 | 157,880 | 08/17/2009 16:40:05 | 864 | 48 | Matrix transposition on a magnetic tape | Programming pearls Problem 7 is about transposing a `4000 x 4000` matrix stored on a **magnetic tape**.<br /> My solution was to simply use a temporary variable and swap the contents of `a[i][j]` and `a[j][i]`. <br />
The solution given by the author confused me a little bit. He says we should:
1. Prepend the row and column indices to each
2. sort the records in the matrix by row
3. remove the appended indices.
Why do you have to go through so much trouble to get this done? Does it have something to do with magnetic tapes? | matrix | programming-pearls | null | null | null | null | open | Matrix transposition on a magnetic tape
===
Programming pearls Problem 7 is about transposing a `4000 x 4000` matrix stored on a **magnetic tape**.<br /> My solution was to simply use a temporary variable and swap the contents of `a[i][j]` and `a[j][i]`. <br />
The solution given by the author confused me a little bit. He says we should:
1. Prepend the row and column indices to each
2. sort the records in the matrix by row
3. remove the appended indices.
Why do you have to go through so much trouble to get this done? Does it have something to do with magnetic tapes? | 0 |
7,604,923 | 09/30/2011 00:51:40 | 818,502 | 06/28/2011 04:33:00 | 8 | 0 | Adding a Second Page To an App | I have an app that has too much information in one spot so I wanted to add in a next button
that would lead to a new page for more information. Is there an easy way to do this? (I am currently a novice user).
Thanks for the help. | android | multipage | null | null | null | 09/30/2011 18:27:42 | not a real question | Adding a Second Page To an App
===
I have an app that has too much information in one spot so I wanted to add in a next button
that would lead to a new page for more information. Is there an easy way to do this? (I am currently a novice user).
Thanks for the help. | 1 |
11,184,328 | 06/25/2012 06:23:42 | 1,479,155 | 06/25/2012 06:07:23 | 1 | 0 | FACEBOOK POST ON USERS BEHALF....? | -If You Can Help Please Make It ***Noob*** Friendly-
-I already have an app made, canvas and all that made and set up-
-just trying to get it more viral-
Trying to get this to work for my Facebook APP
Post on your behalf
This app may post on your behalf, including status updates, photos and more.
Dont understand how to do it.
This code is not working
<html>
<script>
$facebook = new Facebook(array(
'appId' => 435982639755XXXX, // YOUR APP ID
'secret' => 54b929b0be8fed908338625e856XXXXX, // YOUR API SECRET
'cookie' => true
));
$user = $facebook->getUser();
if($user) {
$attachment = array(
'name' => 'NAME',
'caption' => 'CAPTION',
'link' => 'http://yourlink.com',
'description' => 'DESCRIPTION',
'picture' => 'http://yourlink.com/yourimage.jpg'
);
try { $result = $facebook->api('/me/feed/', 'post', $attachment); } catch (Exception $e) { }
}
</script>
</html> | javascript | facebook | null | null | null | 06/25/2012 11:03:57 | too localized | FACEBOOK POST ON USERS BEHALF....?
===
-If You Can Help Please Make It ***Noob*** Friendly-
-I already have an app made, canvas and all that made and set up-
-just trying to get it more viral-
Trying to get this to work for my Facebook APP
Post on your behalf
This app may post on your behalf, including status updates, photos and more.
Dont understand how to do it.
This code is not working
<html>
<script>
$facebook = new Facebook(array(
'appId' => 435982639755XXXX, // YOUR APP ID
'secret' => 54b929b0be8fed908338625e856XXXXX, // YOUR API SECRET
'cookie' => true
));
$user = $facebook->getUser();
if($user) {
$attachment = array(
'name' => 'NAME',
'caption' => 'CAPTION',
'link' => 'http://yourlink.com',
'description' => 'DESCRIPTION',
'picture' => 'http://yourlink.com/yourimage.jpg'
);
try { $result = $facebook->api('/me/feed/', 'post', $attachment); } catch (Exception $e) { }
}
</script>
</html> | 3 |
4,204,030 | 11/17/2010 11:44:32 | 510,724 | 11/17/2010 11:44:32 | 1 | 0 | about filenames in folder | i want to get all filenames in folder in c/c++ .i use dirent.h but it shows error on the dirent.h?
how should i proceed?
Is any way rather than dirent.h?
Thanks in advance | amazon-ec2 | null | null | null | null | 11/17/2010 13:01:31 | not a real question | about filenames in folder
===
i want to get all filenames in folder in c/c++ .i use dirent.h but it shows error on the dirent.h?
how should i proceed?
Is any way rather than dirent.h?
Thanks in advance | 1 |
9,361,181 | 02/20/2012 12:33:53 | 668,410 | 03/20/2011 17:23:13 | 10 | 1 | WCF XElement serialization/deserialization | Have a WCF service, which has a DataMember with custom nodes (names and numbers of items may be different)
Example:
<AppData>
<sometag>something</sometag>
<othertag>something else</othertag>
</AppData>
Member definition as:
<DataMember(IsRequired:=False)>
Public AppData As XmlElement
it's working only for one item.
Definition like:
<DataMember(IsRequired:=False)>
Public AppData As List(Of XmlElement)
wrapped inner tags in class name tag:
<AppData>
<XmlElement><sometag>something</sometag></XmlElement>
<XmlElement><othertag>something else</othertag></XmlElement>
</AppData>
| wcf | serialization | deserialization | xmlelement | null | null | open | WCF XElement serialization/deserialization
===
Have a WCF service, which has a DataMember with custom nodes (names and numbers of items may be different)
Example:
<AppData>
<sometag>something</sometag>
<othertag>something else</othertag>
</AppData>
Member definition as:
<DataMember(IsRequired:=False)>
Public AppData As XmlElement
it's working only for one item.
Definition like:
<DataMember(IsRequired:=False)>
Public AppData As List(Of XmlElement)
wrapped inner tags in class name tag:
<AppData>
<XmlElement><sometag>something</sometag></XmlElement>
<XmlElement><othertag>something else</othertag></XmlElement>
</AppData>
| 0 |
10,426,727 | 05/03/2012 07:10:13 | 1,371,778 | 05/03/2012 07:03:45 | 1 | 0 | Page not found error when i m installing on web server ( but working fine on local server) | i have created drupal module that working fine ...but i hosted it to global URL then i m getting page not found error why?( after installing module and giving permission to it. ) | drupal | null | null | null | null | 05/05/2012 13:05:09 | not a real question | Page not found error when i m installing on web server ( but working fine on local server)
===
i have created drupal module that working fine ...but i hosted it to global URL then i m getting page not found error why?( after installing module and giving permission to it. ) | 1 |
2,760,348 | 05/03/2010 18:40:43 | 312,670 | 04/09/2010 09:58:21 | 172 | 13 | Unit Testing and Motivation to do so | I'm currently Unit Testing an application that isn't build to support unit testing very well, lot's of dependencies, refactoring and the developers who build the application didn't think of unit testing when they started developing. My job is to do research for unit testing, unit test the application and bring unit testing into the organisation.<br>
When I'm working on the application and am writing the unit tests, it sometimes can become pretty difficult to keep up being well motivated and write good tests for difficult parts of the code.
Now my question(s) related to this are: <br>
**1. How can you keep yourself motivated to write good unit tests? (for legacy code)**<br>
2. Is it important to motivate your colleagues in writing unit testing?<br>
3. As an employer, how can you keep your employees motivated in writing good unit tests?
| unit-testing | testing | motivation-techniques | organization | legacy | 10/27/2011 04:46:21 | off topic | Unit Testing and Motivation to do so
===
I'm currently Unit Testing an application that isn't build to support unit testing very well, lot's of dependencies, refactoring and the developers who build the application didn't think of unit testing when they started developing. My job is to do research for unit testing, unit test the application and bring unit testing into the organisation.<br>
When I'm working on the application and am writing the unit tests, it sometimes can become pretty difficult to keep up being well motivated and write good tests for difficult parts of the code.
Now my question(s) related to this are: <br>
**1. How can you keep yourself motivated to write good unit tests? (for legacy code)**<br>
2. Is it important to motivate your colleagues in writing unit testing?<br>
3. As an employer, how can you keep your employees motivated in writing good unit tests?
| 2 |
730,773 | 04/08/2009 16:24:36 | 87,725 | 04/06/2009 17:21:39 | 18 | 0 | c++ profiling/optimization: How to get better profiling granularity in an optimized function | I am using google's perftools (http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html) for CPU profiling---it's a wonderful tool that has helped me perform a great deal of CPU-time improvements on my application.
Unfortunately, I have gotten to the point that the code is still a bit slow, and when compiled using g++'s -O3 optimization level, all I know is that a specific function is slow, but not which aspects of it are slow.
If I remove the -O3 flag, then the unoptimized portions of the program overtake this function, and I don't get a lot of clarity into the actual parts of the function that are slow. If I leave the -O3 flag in, then the slow parts of the function are inlined, and I can't determine which parts of the function are slow.
Any suggestions? Thanks for your help! | c++ | optimization | profiler | null | null | null | open | c++ profiling/optimization: How to get better profiling granularity in an optimized function
===
I am using google's perftools (http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html) for CPU profiling---it's a wonderful tool that has helped me perform a great deal of CPU-time improvements on my application.
Unfortunately, I have gotten to the point that the code is still a bit slow, and when compiled using g++'s -O3 optimization level, all I know is that a specific function is slow, but not which aspects of it are slow.
If I remove the -O3 flag, then the unoptimized portions of the program overtake this function, and I don't get a lot of clarity into the actual parts of the function that are slow. If I leave the -O3 flag in, then the slow parts of the function are inlined, and I can't determine which parts of the function are slow.
Any suggestions? Thanks for your help! | 0 |
7,652,620 | 10/04/2011 18:46:15 | 979,092 | 10/04/2011 18:42:11 | 1 | 0 | SQL Exception Login failed for user "service account Name" | I am using a serviceaccount util.sql.TestApp on a database I created.
When I reach command.Connection.Open(); I am getting the SQL Exception Login failed for util.sql.TestApp
This what I have in my web.config
<add name="DBTest" connectionString="Server=Data.companyname.com; Database=TestApp; User Id=util.sql.TestApp; password=PWD" providerName=""/>
I opened the database and checked the serviceaccount. It does have connect previlages. I don't know what is wrong.
I am using 4.0
| .net | asp.net | .net-4.0 | null | null | null | open | SQL Exception Login failed for user "service account Name"
===
I am using a serviceaccount util.sql.TestApp on a database I created.
When I reach command.Connection.Open(); I am getting the SQL Exception Login failed for util.sql.TestApp
This what I have in my web.config
<add name="DBTest" connectionString="Server=Data.companyname.com; Database=TestApp; User Id=util.sql.TestApp; password=PWD" providerName=""/>
I opened the database and checked the serviceaccount. It does have connect previlages. I don't know what is wrong.
I am using 4.0
| 0 |
7,117,987 | 08/19/2011 06:55:18 | 864,866 | 07/27/2011 07:20:33 | 48 | 0 | CakePHP: how can i handle general model functions? | I have some "global" functions not directly related to a model that need to be called from different controllers.
Where can i put them and how can they be correctly called from a controller?
| cakephp | null | null | null | null | null | open | CakePHP: how can i handle general model functions?
===
I have some "global" functions not directly related to a model that need to be called from different controllers.
Where can i put them and how can they be correctly called from a controller?
| 0 |
10,770,973 | 05/27/2012 01:15:35 | 1,168,402 | 01/25/2012 03:25:44 | 300 | 3 | Which linux distribution is advisable to setup a server? | There are Many distributions of Linux, I have no idea for Used to mount a web server (load balancers, MySQL, Apache) and so on. | linux | web-services | null | null | null | 05/27/2012 01:21:20 | not constructive | Which linux distribution is advisable to setup a server?
===
There are Many distributions of Linux, I have no idea for Used to mount a web server (load balancers, MySQL, Apache) and so on. | 4 |
6,975,459 | 08/07/2011 20:08:35 | 302,908 | 03/26/2010 22:23:57 | 3,371 | 189 | SQL nullable bit in where clause |
create procedure [dbo].[MySproc]
@Value bit = null
as
select columna from tablea where columnb = @Value
This does not work if I pass in null to the parameter. Obviously when I change the predicate to columnb is null it works.
What can I do to get this to work without using conditional logic (if/else)?
| tsql | null | null | null | null | null | open | SQL nullable bit in where clause
===
create procedure [dbo].[MySproc]
@Value bit = null
as
select columna from tablea where columnb = @Value
This does not work if I pass in null to the parameter. Obviously when I change the predicate to columnb is null it works.
What can I do to get this to work without using conditional logic (if/else)?
| 0 |
2,462,962 | 03/17/2010 14:21:47 | 149,380 | 08/02/2009 19:50:28 | 31 | 3 | I want to select the distict value from models field and then update them (django) | I have models...
class Item(models.Model):
name = models.CharField('Item Name', max_length = 30)
item_code = models.CharField(max_length = 10)
color = models.CharField(max_length = 150, null = True, blank = True)
size = models.CharField(max_length = 30, null = True, blank = True)
fabric_code = models.CharField(max_length = 30, null = True, blank = True)
I have values in Item. in Item model name field has the similar values..(but the other values of record are change). I want to select the name field values distinctly(ie similar values select only ones). in one box(like combo box).
What kind of form or views i use??
| django-models | django | python | null | null | null | open | I want to select the distict value from models field and then update them (django)
===
I have models...
class Item(models.Model):
name = models.CharField('Item Name', max_length = 30)
item_code = models.CharField(max_length = 10)
color = models.CharField(max_length = 150, null = True, blank = True)
size = models.CharField(max_length = 30, null = True, blank = True)
fabric_code = models.CharField(max_length = 30, null = True, blank = True)
I have values in Item. in Item model name field has the similar values..(but the other values of record are change). I want to select the name field values distinctly(ie similar values select only ones). in one box(like combo box).
What kind of form or views i use??
| 0 |
11,295,493 | 07/02/2012 14:17:08 | 1,361,316 | 04/27/2012 14:12:40 | 13 | 1 | Drupal 7 - values added in hook_node_load not making its way to webform | I'm using hook_node_load to try and add some fields to a webform node. Here's the code:
function custom_node_load($nodes, $types)
{
foreach ($nodes as $node) {
if ($node->nid == '37') {
if (isset($_GET['departure'])) {
$node->departure_base_price = 'myValue';
drupal_set_message('Departure Base Price: ' . $node->departure_base_price);
//Have also tried $nodes[$node->nid]->departure_base_price
}
}
}
}
The drupal_set_message sets the message with the value properly. However, trying to access the value $node->departure_base_price in webform-form-37.tpl.php, it's not there (trying to access both in the tpl.php file and looking at Devel).
I've also tried setting $node->departure_base_price=NULL at the start of the function, thinking it might be a scope issue. In this case, the field made it to the tpl.php file, but it remained null (even though I had updated the value in hook_node_load).
What am I missing? | drupal | drupal-7 | null | null | null | null | open | Drupal 7 - values added in hook_node_load not making its way to webform
===
I'm using hook_node_load to try and add some fields to a webform node. Here's the code:
function custom_node_load($nodes, $types)
{
foreach ($nodes as $node) {
if ($node->nid == '37') {
if (isset($_GET['departure'])) {
$node->departure_base_price = 'myValue';
drupal_set_message('Departure Base Price: ' . $node->departure_base_price);
//Have also tried $nodes[$node->nid]->departure_base_price
}
}
}
}
The drupal_set_message sets the message with the value properly. However, trying to access the value $node->departure_base_price in webform-form-37.tpl.php, it's not there (trying to access both in the tpl.php file and looking at Devel).
I've also tried setting $node->departure_base_price=NULL at the start of the function, thinking it might be a scope issue. In this case, the field made it to the tpl.php file, but it remained null (even though I had updated the value in hook_node_load).
What am I missing? | 0 |
11,330,148 | 07/04/2012 13:32:54 | 959,215 | 09/22/2011 13:31:42 | 22 | 1 | slovakia traffic data not showing on map over js api | Does anyone know why google does not provide traffic info for Slovakia on web maps using javascript api ?
It used to work just fine. Now some other countires around are showing traffic but Slovakia is not.
Also maps on maps.google.sk do show traffic data in Slovakia. So what is a problem with traffic over js api in Slovakia? is there any legal issue google got into so they had to pull it off? or what's up?
Apparently similar situation is with Czech and Poland.
Thnaks. | google-maps | google-maps-api-3 | traffic | null | null | 07/05/2012 15:20:57 | off topic | slovakia traffic data not showing on map over js api
===
Does anyone know why google does not provide traffic info for Slovakia on web maps using javascript api ?
It used to work just fine. Now some other countires around are showing traffic but Slovakia is not.
Also maps on maps.google.sk do show traffic data in Slovakia. So what is a problem with traffic over js api in Slovakia? is there any legal issue google got into so they had to pull it off? or what's up?
Apparently similar situation is with Czech and Poland.
Thnaks. | 2 |
6,035,141 | 05/17/2011 18:05:17 | 402,293 | 07/26/2010 13:05:25 | 156 | 3 | Updating a Windows Form Control with its Handle outside of main UI thread ? | I've asked a [question][1] about my problem, and I've made some progress. I'm sending the Handle of a PictureBox component to my VolumeRender method, VolumeRender method binds the PictureBox component with vtkRenderWindow, process the pipeline and update the renderWindow. Okay, this process is done outside of UI thread but the problem is, as soon as volume rendering thread is out of scope, UI thread I don't know why but it frees the pictureBox component. Here are the codes;
private: System::Void volumeRenderButton_Click(System::Object^ sender, System::EventArgs^ e)
{
volumeRenderThread = gcnew System::Threading::Thread(
gcnew System::Threading::ThreadStart(this, &Form1::volumeRender));
volumeRenderThread->Start(threeDPictureBox->Handle);
}
private: void volumeRender( System::Object ^obj )
{
IntPtr ^ptr = (IntPtr ^) obj;
dicom->VolumeRender((HWND)(ptr->ToPointer()), vrSettings);
}
void Dicom::VolumeRender(HWND pictureBoxHandle, VRsettings *settings )
{
renderer = vtkSmartPointer < vtkRenderer > :: New();
renderWindow = vtkSmartPointer < vtkWin32OpenGLRenderWindow > :: New();
renderWindow->AddRenderer(renderer);
renderWindow->SetParentId(pictureBoxHandle);
renderWindow->SetSize(settings->width, settings->height);
renderWindow->Initialize();
iren = vtkSmartPointer < vtkWin32RenderWindowInteractor > :: New();
iren->SetRenderWindow(renderWindow);
/* Volume Render Pipeline
...
...
*/
renderWindow->Render();
iren->Initialize();
}
I'm sure that the problem is not VTK related. When debugging the code, after the execution renderWindow->Render() statement, in the main form, rendered image is seen on pictureBox Component, but after the volumeRender thread is out of scope, threeDPictureBox is somehow freed. Thanks for answers! really need help
[1]: http://stackoverflow.com/questions/6026126/thread-freezing-the-application%20%22%22 | .net | multithreading | c++-cli | null | null | null | open | Updating a Windows Form Control with its Handle outside of main UI thread ?
===
I've asked a [question][1] about my problem, and I've made some progress. I'm sending the Handle of a PictureBox component to my VolumeRender method, VolumeRender method binds the PictureBox component with vtkRenderWindow, process the pipeline and update the renderWindow. Okay, this process is done outside of UI thread but the problem is, as soon as volume rendering thread is out of scope, UI thread I don't know why but it frees the pictureBox component. Here are the codes;
private: System::Void volumeRenderButton_Click(System::Object^ sender, System::EventArgs^ e)
{
volumeRenderThread = gcnew System::Threading::Thread(
gcnew System::Threading::ThreadStart(this, &Form1::volumeRender));
volumeRenderThread->Start(threeDPictureBox->Handle);
}
private: void volumeRender( System::Object ^obj )
{
IntPtr ^ptr = (IntPtr ^) obj;
dicom->VolumeRender((HWND)(ptr->ToPointer()), vrSettings);
}
void Dicom::VolumeRender(HWND pictureBoxHandle, VRsettings *settings )
{
renderer = vtkSmartPointer < vtkRenderer > :: New();
renderWindow = vtkSmartPointer < vtkWin32OpenGLRenderWindow > :: New();
renderWindow->AddRenderer(renderer);
renderWindow->SetParentId(pictureBoxHandle);
renderWindow->SetSize(settings->width, settings->height);
renderWindow->Initialize();
iren = vtkSmartPointer < vtkWin32RenderWindowInteractor > :: New();
iren->SetRenderWindow(renderWindow);
/* Volume Render Pipeline
...
...
*/
renderWindow->Render();
iren->Initialize();
}
I'm sure that the problem is not VTK related. When debugging the code, after the execution renderWindow->Render() statement, in the main form, rendered image is seen on pictureBox Component, but after the volumeRender thread is out of scope, threeDPictureBox is somehow freed. Thanks for answers! really need help
[1]: http://stackoverflow.com/questions/6026126/thread-freezing-the-application%20%22%22 | 0 |
5,850,127 | 05/01/2011 17:38:42 | 721,975 | 04/23/2011 18:04:39 | 6 | 0 | How to unread a line in python | I am new to Python (2.6), and have a situation where I need to un-read a line I just read from a file. Here's basically what I am doing.
for line in file:
print line
file.seek(-len(line),1)
zz = file.readline()
print zz
However I notice that "zz" and "line" are not the same. Where am I going wrong?
Thanks. | python | file-io | null | null | null | null | open | How to unread a line in python
===
I am new to Python (2.6), and have a situation where I need to un-read a line I just read from a file. Here's basically what I am doing.
for line in file:
print line
file.seek(-len(line),1)
zz = file.readline()
print zz
However I notice that "zz" and "line" are not the same. Where am I going wrong?
Thanks. | 0 |
6,949,435 | 08/04/2011 22:34:10 | 144,776 | 07/24/2009 21:54:38 | 140 | 6 | This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK | I get the error "This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK." when trying to submit my app to the Mac app store. I'm using Xcode 4.1, which I downloaded from the Mac App Store after purchasing a MacBook Air with Lion pre-installed. What could possibly be causing this? | xcode | osx-lion | mac-app-store | null | null | null | open | This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK
===
I get the error "This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK." when trying to submit my app to the Mac app store. I'm using Xcode 4.1, which I downloaded from the Mac App Store after purchasing a MacBook Air with Lion pre-installed. What could possibly be causing this? | 0 |
4,460,038 | 12/16/2010 11:00:31 | 544,649 | 12/16/2010 11:00:31 | 1 | 0 | Code coverage without instrumentation | We have an automated regression test setup for Functional tests and
are interested in measuring the test coverage/code coverage for our
project which is based on Linux.
I would like to know if there are any tools which can be used for test
coverage/code coverage measurement without instrumenting the code.
Please suggest any tool or method that can do this.
I am aware that instrumentation provides the best method to measure
the code coverage, but it would suffice for us if the tool can just
measure the functions that were executed for the test coverage
measurement.
Thanks and Regards,
Prashnk
| testing | code-coverage | null | null | null | null | open | Code coverage without instrumentation
===
We have an automated regression test setup for Functional tests and
are interested in measuring the test coverage/code coverage for our
project which is based on Linux.
I would like to know if there are any tools which can be used for test
coverage/code coverage measurement without instrumenting the code.
Please suggest any tool or method that can do this.
I am aware that instrumentation provides the best method to measure
the code coverage, but it would suffice for us if the tool can just
measure the functions that were executed for the test coverage
measurement.
Thanks and Regards,
Prashnk
| 0 |
4,486,395 | 12/20/2010 02:15:06 | 537,268 | 12/10/2010 01:14:09 | 6 | 0 | how to design a windows appication using c# to execute command line from lightscribe? | hI Guys,
Do you all have any idea on how to design a windows appication using c# to execute command line from lightscribe? any help would be grateful | c# | null | null | null | null | null | open | how to design a windows appication using c# to execute command line from lightscribe?
===
hI Guys,
Do you all have any idea on how to design a windows appication using c# to execute command line from lightscribe? any help would be grateful | 0 |
9,627,754 | 03/09/2012 01:31:59 | 1,179,945 | 01/31/2012 09:19:19 | 34 | 0 | 32-bit and 64-bit setup projects | How to create a single setup file which target both 32 and 64 bit system? It has dependencies on .net framework and third party dll. Also when the application run for first time there is a database installation procedure which install 32 bit sqlexpress. another problem is how to get existing(already installed) sql server intance both 64 and 32 bit and select it. | sql-server | winforms | setup-project | null | null | null | open | 32-bit and 64-bit setup projects
===
How to create a single setup file which target both 32 and 64 bit system? It has dependencies on .net framework and third party dll. Also when the application run for first time there is a database installation procedure which install 32 bit sqlexpress. another problem is how to get existing(already installed) sql server intance both 64 and 32 bit and select it. | 0 |
7,229,538 | 08/29/2011 11:35:06 | 129,609 | 06/26/2009 19:26:50 | 416 | 28 | What is the methodology for developing/solving algorithms to difficult problems and how does it apply to this example? | I was working on a project for fun but it eventually led me to a difficult unrelated thought problem that I can't solve. My original question was going to be how to solve it but now that I am thinking about it, what would be really great is to know "how to go about" solving it.
Most algorithms that I run into in daily life usually seem straight forward and just involve problem breakdown/simplification...and can almost always be solved with brute force in the worst case scenario. This problem is different though.
So here is the problem
> A
>
> 1. Acme company manufactures all different kinds of components
> (everything from basic circuit boards to complete computers)
> 2. Each component are defined to be made of parts or other components
> 3. Acme receives parts from suppliers at irregular intervals
> 4. Each component has a priority (maybe it is more important to build
> motherboards than monitors)
> 5. Priorities can change based on constraints (such as if there are
> less than 3 monitors in stock, wait for parts to build monitors)
>
> Q: What should Acme build?
I think a possible way to solve this would be to have a tree of all the different components organized such that the highest priority items are at the top. Traverse each node based on priority and at each node, check if we need to wait for parts for this component or if we can build the next lower priority item. I could probably even move components up and down the priority tree based on what has been built. Fiddling around with that idea, I think I could get something to work. There could be many valid solutions to the problem but I only need to return one valid set.
However, if I want to make the problem a bit more real world, I have additional features
> B.
>
> 1. Each component requires parts + tools + human resources to build.
I think this can be solved similarly to the first case with tools and human resources just being consumable parts. But now it gets hard
> C
>
> 1. Each part, tool, human resource has some sort of quality
> associated with it
> 2. Lower quality takes more time to produce
> 3. Time is defined based on some relation between parts, tools, and human
> resources...so if you have good human resources and good tools, time
> will be less than if you have bad resources and bad tools
> 4. there may be a limited number of tools/people so they need to be scheduled
>
> The problem can be adjusted to what should we built over the next month or something
How would seasoned algorithm developers go about solving this?
| algorithm | null | null | null | null | 08/29/2011 18:10:05 | not constructive | What is the methodology for developing/solving algorithms to difficult problems and how does it apply to this example?
===
I was working on a project for fun but it eventually led me to a difficult unrelated thought problem that I can't solve. My original question was going to be how to solve it but now that I am thinking about it, what would be really great is to know "how to go about" solving it.
Most algorithms that I run into in daily life usually seem straight forward and just involve problem breakdown/simplification...and can almost always be solved with brute force in the worst case scenario. This problem is different though.
So here is the problem
> A
>
> 1. Acme company manufactures all different kinds of components
> (everything from basic circuit boards to complete computers)
> 2. Each component are defined to be made of parts or other components
> 3. Acme receives parts from suppliers at irregular intervals
> 4. Each component has a priority (maybe it is more important to build
> motherboards than monitors)
> 5. Priorities can change based on constraints (such as if there are
> less than 3 monitors in stock, wait for parts to build monitors)
>
> Q: What should Acme build?
I think a possible way to solve this would be to have a tree of all the different components organized such that the highest priority items are at the top. Traverse each node based on priority and at each node, check if we need to wait for parts for this component or if we can build the next lower priority item. I could probably even move components up and down the priority tree based on what has been built. Fiddling around with that idea, I think I could get something to work. There could be many valid solutions to the problem but I only need to return one valid set.
However, if I want to make the problem a bit more real world, I have additional features
> B.
>
> 1. Each component requires parts + tools + human resources to build.
I think this can be solved similarly to the first case with tools and human resources just being consumable parts. But now it gets hard
> C
>
> 1. Each part, tool, human resource has some sort of quality
> associated with it
> 2. Lower quality takes more time to produce
> 3. Time is defined based on some relation between parts, tools, and human
> resources...so if you have good human resources and good tools, time
> will be less than if you have bad resources and bad tools
> 4. there may be a limited number of tools/people so they need to be scheduled
>
> The problem can be adjusted to what should we built over the next month or something
How would seasoned algorithm developers go about solving this?
| 4 |
10,605,400 | 05/15/2012 16:52:23 | 976,847 | 10/03/2011 14:20:39 | 401 | 52 | OpenErp Server Error | I am new to openerp. I was able to log on. I tried on gunicorp and now I am unable to log in.
Even If I don't use gunicorp I still get the below error:
Pls advice what might be going wrong.
Client Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch
response["result"] = method(controller, self, **self.params)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 353, in
get_list
dbs = proxy.list()
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117,
in proxy
result = self.connector.send(self.service_name, method, *args)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 611, in send
raise fault
Server Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 592, in send
result = openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 117, in dispatch
return fn(*params)
File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 310, in exp_list
cr = db.cursor()
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 465, in cursor
return Cursor(self._pool, self.dbname, serialized=serialized)
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 173, in __init__
self._cnx = pool.borrow(dsn(dbname))
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 366, in _locked
return fun(self, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 421, in borrow
result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
connection_factory=connection_factory, async=async)
OperationalError: FATAL: role "vishal" does not exist
thank you,
vishal | openerp | null | null | null | null | 05/18/2012 17:01:57 | off topic | OpenErp Server Error
===
I am new to openerp. I was able to log on. I tried on gunicorp and now I am unable to log in.
Even If I don't use gunicorp I still get the below error:
Pls advice what might be going wrong.
Client Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch
response["result"] = method(controller, self, **self.params)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 353, in
get_list
dbs = proxy.list()
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117,
in proxy
result = self.connector.send(self.service_name, method, *args)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 611, in send
raise fault
Server Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 592, in send
result = openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 117, in dispatch
return fn(*params)
File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 310, in exp_list
cr = db.cursor()
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 465, in cursor
return Cursor(self._pool, self.dbname, serialized=serialized)
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 173, in __init__
self._cnx = pool.borrow(dsn(dbname))
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 366, in _locked
return fun(self, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 421, in borrow
result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
connection_factory=connection_factory, async=async)
OperationalError: FATAL: role "vishal" does not exist
thank you,
vishal | 2 |
8,077,434 | 11/10/2011 09:33:31 | 77,758 | 03/13/2009 14:54:27 | 569 | 26 | Getting started in 3D (from a developer perspective) | Does anyone know good resources (website, blog, book, etc) on how to get started in 3D?
I've done some very basic stuff in 3D in Processing or openFrameworks (C++) but I always missed knowing about 3D in general (modeling, meshes, 3D scripting languages, etc).
I saw [a similar question][1] while researching before asking but I'm looking for something not focused to Windows but Mac/Unix, and not focused to tools but to theory in general.
The idea is getting to know 3D a little bit better and get started with 3D scripting languages. Any resources related with generative graphics and 3D are welcome too.
[1]: http://stackoverflow.com/questions/2115460/getting-started-with-windows-developement-w-3d-graphics | resources | 3d | theory | getting-started | language-learning | 12/06/2011 04:30:56 | not constructive | Getting started in 3D (from a developer perspective)
===
Does anyone know good resources (website, blog, book, etc) on how to get started in 3D?
I've done some very basic stuff in 3D in Processing or openFrameworks (C++) but I always missed knowing about 3D in general (modeling, meshes, 3D scripting languages, etc).
I saw [a similar question][1] while researching before asking but I'm looking for something not focused to Windows but Mac/Unix, and not focused to tools but to theory in general.
The idea is getting to know 3D a little bit better and get started with 3D scripting languages. Any resources related with generative graphics and 3D are welcome too.
[1]: http://stackoverflow.com/questions/2115460/getting-started-with-windows-developement-w-3d-graphics | 4 |
9,882,113 | 03/27/2012 01:18:11 | 404,020 | 07/28/2010 01:02:19 | 1,800 | 6 | Why did my code fail to calculate the right answer? | I'm trying to solve this problem [here][1], which is to display the last five digits of the factorial of 1 trillion. I tested my code for smaller numbers up to 100k, and it's able to get the correct answer. Yet when I ran this and put in my answer on that website, they say it's wrong. Why did this not get the correct answer?
const long MAX = 1000000000000;
//const long MAX = 100000;
const int MODULUS = 100000;
const int MODULUS2 = MODULUS*10;
const int INTERVAL = MAX/100;
time_t beginning = time(NULL);
long a = 1;
long p = 1;
printf("Looping %ld times...\n", MAX);
for (long i = 1; i <= MAX; i++) {
a = (i % MODULUS == 0 ? 1 : i % MODULUS) * p;
while(a % 10 == 0)
a /= 10;
// printf("%ld: %d\n", i, a);
p = a % MODULUS2;
// printf("===== %d\n", i + j * INNERLOOP);
if(i % INTERVAL == 0)
printf("%ld/%ld (%0.0f%%) %ld [%ld] \n", i, MAX, (float)i/MAX*100, a, a % MODULUS);
}
time_t now = time(NULL);
printf("Finished looping %ld times in %ld seconds\n", MAX, now - beginning);
printf("Answer: %ld [%ld]\n", a, a % MODULUS);
[1]: http://projecteuler.net/problem=160 | c | algorithm | debugging | math | optimization | 03/27/2012 15:40:49 | too localized | Why did my code fail to calculate the right answer?
===
I'm trying to solve this problem [here][1], which is to display the last five digits of the factorial of 1 trillion. I tested my code for smaller numbers up to 100k, and it's able to get the correct answer. Yet when I ran this and put in my answer on that website, they say it's wrong. Why did this not get the correct answer?
const long MAX = 1000000000000;
//const long MAX = 100000;
const int MODULUS = 100000;
const int MODULUS2 = MODULUS*10;
const int INTERVAL = MAX/100;
time_t beginning = time(NULL);
long a = 1;
long p = 1;
printf("Looping %ld times...\n", MAX);
for (long i = 1; i <= MAX; i++) {
a = (i % MODULUS == 0 ? 1 : i % MODULUS) * p;
while(a % 10 == 0)
a /= 10;
// printf("%ld: %d\n", i, a);
p = a % MODULUS2;
// printf("===== %d\n", i + j * INNERLOOP);
if(i % INTERVAL == 0)
printf("%ld/%ld (%0.0f%%) %ld [%ld] \n", i, MAX, (float)i/MAX*100, a, a % MODULUS);
}
time_t now = time(NULL);
printf("Finished looping %ld times in %ld seconds\n", MAX, now - beginning);
printf("Answer: %ld [%ld]\n", a, a % MODULUS);
[1]: http://projecteuler.net/problem=160 | 3 |
125,597 | 09/24/2008 05:44:09 | 11,177 | 09/16/2008 05:53:10 | 61 | 5 | Is it reasonable to have Boost as a dependency for a C++ open source project? | Boost is meant to be **the** standard non-standard C++ library that every C++ user can use. Is it reasonable to assume it's available for an open source C++ project, or is it a large dependency too far? | c++ | boost | null | null | null | null | open | Is it reasonable to have Boost as a dependency for a C++ open source project?
===
Boost is meant to be **the** standard non-standard C++ library that every C++ user can use. Is it reasonable to assume it's available for an open source C++ project, or is it a large dependency too far? | 0 |
6,009,818 | 05/15/2011 16:49:30 | 586,687 | 01/23/2011 21:18:27 | 163 | 3 | take a photo to pc since a application c#? | I want to print all the pant with a button, and save it in any folder ( i know how to do it ) but i dont know how to take the photo ... and another thing, I want this program is HIDE and it works with a key for example f9 or f11 or any key, but i want this continue HIDE and working, how to take the print pant? and how to work if it is hide?
thanks stackoverflow and partherns | c# | folder | savefiledialog | null | null | 05/15/2011 16:56:37 | not a real question | take a photo to pc since a application c#?
===
I want to print all the pant with a button, and save it in any folder ( i know how to do it ) but i dont know how to take the photo ... and another thing, I want this program is HIDE and it works with a key for example f9 or f11 or any key, but i want this continue HIDE and working, how to take the print pant? and how to work if it is hide?
thanks stackoverflow and partherns | 1 |
9,190,433 | 02/08/2012 09:15:45 | 1,196,734 | 02/08/2012 09:12:18 | 1 | 0 | MySQL - scheduled task | my requirement is. On every insert of a record (which contains a timestamp & status fields in it), I should schedule a task based on the timestamp and update the status value. Please help me with this. Is there any way to use procedure,events,trigger and gt this done? | mysql | null | null | null | null | null | open | MySQL - scheduled task
===
my requirement is. On every insert of a record (which contains a timestamp & status fields in it), I should schedule a task based on the timestamp and update the status value. Please help me with this. Is there any way to use procedure,events,trigger and gt this done? | 0 |
7,906,969 | 10/26/2011 18:11:45 | 1,007,711 | 10/21/2011 19:05:56 | 8 | 0 | Validate input of a directory | Their input should be a directory in c:\folder\subfolder\ format. Additionally I don't want it to try to run unless the directory contains .flv files. So it needs to exist AND contain .flv files. Otherwise it should ask the user to input another directory.
The code also cleans up the slashes, and adds a trailing slash, which I need for other parts of the program. What I have works when given a directory that exists and contains the .flv files, but if it doesn't contain .flv files it just ends the program instead of asking for additional input; meaning it porceeds as long as the directory exists, even if it doesn't have any .flv files.
def is_valid_dir()
input = "nil"
until File.directory?(input) && Dir.glob("#{input}*.flv")
puts "Enter the full directory path of the flv files."
input = gets.chomp
if input[-1..-1] == '/'
# Do nothing if it already
# ends with a forward slash.
else
input += '/'
end
end
input.gsub!('\\', '/')
return input
end | ruby | validation | null | null | null | null | open | Validate input of a directory
===
Their input should be a directory in c:\folder\subfolder\ format. Additionally I don't want it to try to run unless the directory contains .flv files. So it needs to exist AND contain .flv files. Otherwise it should ask the user to input another directory.
The code also cleans up the slashes, and adds a trailing slash, which I need for other parts of the program. What I have works when given a directory that exists and contains the .flv files, but if it doesn't contain .flv files it just ends the program instead of asking for additional input; meaning it porceeds as long as the directory exists, even if it doesn't have any .flv files.
def is_valid_dir()
input = "nil"
until File.directory?(input) && Dir.glob("#{input}*.flv")
puts "Enter the full directory path of the flv files."
input = gets.chomp
if input[-1..-1] == '/'
# Do nothing if it already
# ends with a forward slash.
else
input += '/'
end
end
input.gsub!('\\', '/')
return input
end | 0 |
10,015,091 | 04/04/2012 16:11:31 | 1,313,303 | 04/04/2012 15:59:55 | 1 | 0 | Suggestions for ASP.NET Website | I am working on big application build using ASP.NET which was started 1.5 years back. The Site uses 3rd party telerik RadControls for UI. The problem with the website is it uses outdated stuffs like DataSets and all with no proper architecture. I have done some research and found some new technologies like ADO.NET Entity Framework out here. I want to know that is it worth investing to learn and migrate my site to ADO.NET Entity Framework at this stage.
Additionally are there any good technologies or tools (that can be used in ASP.NET) out there in the market which can be used to make the development life easier and be upto date with latest technologies.
ALL SUGGESTIONS WOULD BE REALLY PRECIOUS.
THANKS IN ADVANCE. | asp.net | asp.net-mvc | entity-framework | null | null | 04/04/2012 22:30:22 | not constructive | Suggestions for ASP.NET Website
===
I am working on big application build using ASP.NET which was started 1.5 years back. The Site uses 3rd party telerik RadControls for UI. The problem with the website is it uses outdated stuffs like DataSets and all with no proper architecture. I have done some research and found some new technologies like ADO.NET Entity Framework out here. I want to know that is it worth investing to learn and migrate my site to ADO.NET Entity Framework at this stage.
Additionally are there any good technologies or tools (that can be used in ASP.NET) out there in the market which can be used to make the development life easier and be upto date with latest technologies.
ALL SUGGESTIONS WOULD BE REALLY PRECIOUS.
THANKS IN ADVANCE. | 4 |
522,286 | 02/06/2009 21:38:01 | 55,159 | 01/14/2009 20:03:19 | 2,973 | 142 | Weird constants | I've seen these in real code:
#define SCREEN_DIMENSIONS 2
#define THREE_THOUSAND_FIVE_HUNDRED_TWENTY_TWO 3522
What is the weirdest constant you've ever seen? | offtopic | subjective | humor | null | null | 09/20/2011 02:06:17 | not constructive | Weird constants
===
I've seen these in real code:
#define SCREEN_DIMENSIONS 2
#define THREE_THOUSAND_FIVE_HUNDRED_TWENTY_TWO 3522
What is the weirdest constant you've ever seen? | 4 |
7,758,820 | 10/13/2011 18:36:36 | 270,322 | 02/10/2010 13:52:15 | 24 | 3 | How to deploy Signed applet with policy file? | Where I need to specify policy.URL.n??
How to deploy the Signed applet with policy file?
I want to write, create directory/file, execute some file??
Please help me to deploy the signed applet.
Thanks in advance. | java | deployment | applet | signed | policyfiles | 10/14/2011 02:35:46 | not a real question | How to deploy Signed applet with policy file?
===
Where I need to specify policy.URL.n??
How to deploy the Signed applet with policy file?
I want to write, create directory/file, execute some file??
Please help me to deploy the signed applet.
Thanks in advance. | 1 |
1,663,319 | 11/02/2009 19:56:19 | 28,351 | 10/15/2008 19:16:13 | 86 | 7 | How to allow self-registration to join a specific Wordpress MU blog. | I have a Wordpress MU instance installed.
I allow self-registration, and self-creation of blogs.
I have a user who has created a blog for a Chemistry class. He wants his 100 students to be able to self-register and become authors on this blog.
How do I do this? It would be very painful to have to add the 100 students one by one as the administrator. Besides that, we don't actually have a list of the 100 email addresses.
I need a way that people can either request to become part of the blog, or automatically start contributing right away.
| wordpress-mu | wordpress | blogs | wordpress-plugin | null | null | open | How to allow self-registration to join a specific Wordpress MU blog.
===
I have a Wordpress MU instance installed.
I allow self-registration, and self-creation of blogs.
I have a user who has created a blog for a Chemistry class. He wants his 100 students to be able to self-register and become authors on this blog.
How do I do this? It would be very painful to have to add the 100 students one by one as the administrator. Besides that, we don't actually have a list of the 100 email addresses.
I need a way that people can either request to become part of the blog, or automatically start contributing right away.
| 0 |
5,638,247 | 04/12/2011 16:02:22 | 704,419 | 04/12/2011 15:41:36 | 1 | 0 | ONVIF Authentication in .NET 4.0 with Visual Studios 2010 | stackoverflow. I've recently begun a new job, and I'm touching for the first time .NET and all related softwares, patterns, concepts and even languages.
My task is to try to establish a communication with a ONVIF camera in the building to, eventually, upgrade the company's domotic solution to automatically recognize ONVIF cameras and to be able to set them up and to use their services.
I am already able to gather some basic informations like its model, its MAC address and its firmware version this way:
> EndpointAddress endPointAddress = new EndpointAddress("<mycameraurl:<mycameraport>/onvif/device_service");
CustomBinding bind = new CustomBinding("DeviceBinding");
DeviceClient temp = new DeviceClient(bind, endPointAddress);
String[] arrayString = new String[4];
String res = temp.GetDeviceInformation(out arrayString[0], out arrayString[1], out arrayString[2], out arrayString[3]);
MessageBox.Show("Model " + arrayString[0] + ", FirmwareVersion " + arrayString[1] + ", SerialNumber " + arrayString[2] + ", HardwareId " + arrayString[3]);
I have this xml specification for the customBinding in my app.config file:
> <customBinding>
<binding name="DeviceBinding">
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Soap12" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</textMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="false" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" />
</binding>
</customBinding>
My problem is that it's impossible for me to go deeper into what I can ask the camera. I get "400 - Bad request" errors for anything I try, and according to what I have read it's because I need to handle authentication for the camera.
The problem is that, since I'm a beginner, everything I find about WS-Security (which seems to be used by the ONVIF) is really, really confused, with a lot of different solutions, and nothing really working for me. For example, <a href="http://custforum.axis.com/viewtopic.php?p=4522&sid=7990ea009d57544606efd627f3a40541">this post here </a> make it sound very simple, but I've tried to create a UserNameSecurityToken and I still get 400 bad request errors. Since I don't know if that's because I've written my Token system wrong, if it's because the camera doesn't support what I try to do...
I've already tried WSHttpBinding and putting it in Username mode, but using WSHttpBinding break the basic information discovery I was able to create (with a MustUnderstand error)...
Any pointers for me ? Simple WS-Security/.NET, C#/ONVIF tutorials, everything will be accepted.
Please forgive me for any english errors, I'm not a native speaker. I also know my request is very vague, so sorry but I'm a real noob on this one, first time ever asking for help on the Internet.
| c# | .net | authentication | null | null | null | open | ONVIF Authentication in .NET 4.0 with Visual Studios 2010
===
stackoverflow. I've recently begun a new job, and I'm touching for the first time .NET and all related softwares, patterns, concepts and even languages.
My task is to try to establish a communication with a ONVIF camera in the building to, eventually, upgrade the company's domotic solution to automatically recognize ONVIF cameras and to be able to set them up and to use their services.
I am already able to gather some basic informations like its model, its MAC address and its firmware version this way:
> EndpointAddress endPointAddress = new EndpointAddress("<mycameraurl:<mycameraport>/onvif/device_service");
CustomBinding bind = new CustomBinding("DeviceBinding");
DeviceClient temp = new DeviceClient(bind, endPointAddress);
String[] arrayString = new String[4];
String res = temp.GetDeviceInformation(out arrayString[0], out arrayString[1], out arrayString[2], out arrayString[3]);
MessageBox.Show("Model " + arrayString[0] + ", FirmwareVersion " + arrayString[1] + ", SerialNumber " + arrayString[2] + ", HardwareId " + arrayString[3]);
I have this xml specification for the customBinding in my app.config file:
> <customBinding>
<binding name="DeviceBinding">
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Soap12" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</textMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="false" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" />
</binding>
</customBinding>
My problem is that it's impossible for me to go deeper into what I can ask the camera. I get "400 - Bad request" errors for anything I try, and according to what I have read it's because I need to handle authentication for the camera.
The problem is that, since I'm a beginner, everything I find about WS-Security (which seems to be used by the ONVIF) is really, really confused, with a lot of different solutions, and nothing really working for me. For example, <a href="http://custforum.axis.com/viewtopic.php?p=4522&sid=7990ea009d57544606efd627f3a40541">this post here </a> make it sound very simple, but I've tried to create a UserNameSecurityToken and I still get 400 bad request errors. Since I don't know if that's because I've written my Token system wrong, if it's because the camera doesn't support what I try to do...
I've already tried WSHttpBinding and putting it in Username mode, but using WSHttpBinding break the basic information discovery I was able to create (with a MustUnderstand error)...
Any pointers for me ? Simple WS-Security/.NET, C#/ONVIF tutorials, everything will be accepted.
Please forgive me for any english errors, I'm not a native speaker. I also know my request is very vague, so sorry but I'm a real noob on this one, first time ever asking for help on the Internet.
| 0 |
6,182,923 | 05/31/2011 04:10:19 | 730,009 | 04/28/2011 19:53:03 | 6 | 0 | I need help with finding and replacing using regular expression. | The following is a sample string I will be searching which will be on a separate line with other strings: Chapter 1: My name is: Shojib (aka mhs)
Here is my regular expression to find that particular line: (Chapter)( )([0-9])(:)( .*)
Now I want to keep the words and integers, and remove the punctuation, and separate each words and integers with an underscore. For example, this is how the format should look after replacing: Chapter_1_My_name_is_Shojib_aka_mhs | regex | null | null | null | null | 06/02/2011 11:42:47 | too localized | I need help with finding and replacing using regular expression.
===
The following is a sample string I will be searching which will be on a separate line with other strings: Chapter 1: My name is: Shojib (aka mhs)
Here is my regular expression to find that particular line: (Chapter)( )([0-9])(:)( .*)
Now I want to keep the words and integers, and remove the punctuation, and separate each words and integers with an underscore. For example, this is how the format should look after replacing: Chapter_1_My_name_is_Shojib_aka_mhs | 3 |
4,356,620 | 12/05/2010 00:18:37 | 190,155 | 10/14/2009 20:25:13 | 250 | 2 | Cocoa: Drag and Drop any file type | I'm trying to create a drag and drop region that accepts any file type and will upload it to a server (using ASIHTTPRequest). I looked at the following example that Apple provides:
[http://developer.apple.com/library/mac/#samplecode/CocoaDragAndDrop/Introduction/Intro.html][1]
but it only covers dealing with the dragging and dropping of images. How can I set up my drag and drop operations to deal with any file type?
Thanks.
[1]: http://developer.apple.com/library/mac/#samplecode/CocoaDragAndDrop/Introduction/Intro.html | objective-c | cocoa | drag-and-drop | file-type | null | null | open | Cocoa: Drag and Drop any file type
===
I'm trying to create a drag and drop region that accepts any file type and will upload it to a server (using ASIHTTPRequest). I looked at the following example that Apple provides:
[http://developer.apple.com/library/mac/#samplecode/CocoaDragAndDrop/Introduction/Intro.html][1]
but it only covers dealing with the dragging and dropping of images. How can I set up my drag and drop operations to deal with any file type?
Thanks.
[1]: http://developer.apple.com/library/mac/#samplecode/CocoaDragAndDrop/Introduction/Intro.html | 0 |
10,346,922 | 04/27/2012 07:57:58 | 1,333,078 | 04/14/2012 08:59:27 | 24 | 3 | Regular expresion tracer | I am looking for free alternative for [Regex Match Tracer (v2.0)][1]. There is many regular expresion checkers, but they dont show matches results.
I need to check regexp and view all matches. It can by in any language (php, js, or win exe...). Did you know something that?
[1]: http://www.regexlab.com/en/mtracer/ | regex | null | null | null | null | 04/29/2012 09:27:14 | not constructive | Regular expresion tracer
===
I am looking for free alternative for [Regex Match Tracer (v2.0)][1]. There is many regular expresion checkers, but they dont show matches results.
I need to check regexp and view all matches. It can by in any language (php, js, or win exe...). Did you know something that?
[1]: http://www.regexlab.com/en/mtracer/ | 4 |
1,098,308 | 07/08/2009 14:07:23 | 61,311 | 02/01/2009 23:39:04 | 521 | 52 | Pass current user credentials to remote server | I have an application server (webservice or remoting, not yet decided) on a remote machine and a client on the same domain. I want to authenticate the user as a domain user on the server.
I can ask the user to enter their Windows username/password and send those to the server and get the server to check them against Active Directory but I would rather not. Is there any way I can get the client to send some kind of token which the server can then use to identify which domain user is sending it a request? Obviously I want to protect the server against someone sending a fake user ID and impersonating another user.
Thanks
| windows | null | null | null | null | null | open | Pass current user credentials to remote server
===
I have an application server (webservice or remoting, not yet decided) on a remote machine and a client on the same domain. I want to authenticate the user as a domain user on the server.
I can ask the user to enter their Windows username/password and send those to the server and get the server to check them against Active Directory but I would rather not. Is there any way I can get the client to send some kind of token which the server can then use to identify which domain user is sending it a request? Obviously I want to protect the server against someone sending a fake user ID and impersonating another user.
Thanks
| 0 |
8,251,706 | 11/24/2011 02:52:16 | 1,063,116 | 11/24/2011 02:48:17 | 1 | 0 | If a copyrighted file is on a unprotected web server—but not linked to from anywhere—are you violating copyright? | I placed an image on a U.S. web server inadvertently. Nothing has ever linked to it, but of course a Getty web spider was able to find it and now they are requesting payment. In this case, I'm pretty sure I actually do own the proper license to the image, but while I'm trying to track down that information, I wonder if this is even a violation of copyright?
I realize that US copyright law (http://www.copyright.gov/title17/92chap5.html#504 ) recognizes that some people "innocently infringe" others copyrights and so, if the infringer proves in court that his or her infringement was innocent, the statutory damages amount drops to $200. So in case I don't have license to the image, that would surely apply.
But I wonder if there is any copyright violation at all in that Getty sent their spider to an unlinked, non-public non-obvious sub-sub-sub directory to find this image in the first place? | copyright-law | null | null | null | null | 11/24/2011 03:34:46 | off topic | If a copyrighted file is on a unprotected web server—but not linked to from anywhere—are you violating copyright?
===
I placed an image on a U.S. web server inadvertently. Nothing has ever linked to it, but of course a Getty web spider was able to find it and now they are requesting payment. In this case, I'm pretty sure I actually do own the proper license to the image, but while I'm trying to track down that information, I wonder if this is even a violation of copyright?
I realize that US copyright law (http://www.copyright.gov/title17/92chap5.html#504 ) recognizes that some people "innocently infringe" others copyrights and so, if the infringer proves in court that his or her infringement was innocent, the statutory damages amount drops to $200. So in case I don't have license to the image, that would surely apply.
But I wonder if there is any copyright violation at all in that Getty sent their spider to an unlinked, non-public non-obvious sub-sub-sub directory to find this image in the first place? | 2 |
5,020,789 | 02/16/2011 18:54:50 | 597,272 | 01/31/2011 18:03:22 | 16 | 0 | Grooveshark code | Does anyone know what Grooveshark.com is coded in? I mean PHP, rails, flash........? | untagged | null | null | null | null | 07/20/2012 13:37:35 | off topic | Grooveshark code
===
Does anyone know what Grooveshark.com is coded in? I mean PHP, rails, flash........? | 2 |
10,860,983 | 06/02/2012 08:45:54 | 1,392,200 | 05/13/2012 13:22:44 | 6 | 0 | python proxy list check | i have some text file which contain proxy ip .
which look like following
130.14.29.111:80
130.14.29.120:80
130.159.235.31:80
14.198.198.220:8909
141.105.26.183:8000
160.79.35.27:80
164.77.196.75:80
164.77.196.78:45430
164.77.196.78:80
173.10.134.173:8081
174.132.145.80:80
174.137.152.60:8080
174.137.184.37:8080
174.142.125.161:80
after processing check this proxy , then i want to marked as following
total number of '0' = 8
total number of 'x' = 6
percentage = alive 60% , dead 40%
x 130.14.29.111:80
0 130.14.29.120:80
0 130.159.235.31:80
0 14.198.198.220:8909
0 141.105.26.183:8000
0 160.79.35.27:80
x 164.77.196.75:80
x 164.77.196.78:45430
x 164.77.196.78:80
0 173.10.134.173:8081
0 174.132.145.80:80
0 174.137.152.60:8080
x 174.137.184.37:8080
x 174.142.125.161:80
how can be done with python? or some sample
if anyone would help me or enlight me much aprreciate!
i was edited
this is script source of what i have
finally check finished proxy list are saved to 'proxy_alive.txt'
in this file i want to mark whether proxy element alive or not.
import socket
import urllib2
import threading
import sys
import Queue
import socket
socket.setdefaulttimeout(7)
print "Bobng's proxy checker. Using %s second timeout"%(socket.getdefaulttimeout())
#input_file = sys.argv[1]
#proxy_type = sys.argv[2] #options: http,s4,s5
#output_file = sys.argv[3]
input_file = 'proxylist.txt'
proxy_type = 'http'
output_file = 'proxy_alive.txt'
url = "www.seemyip.com" # Don't put http:// in here, or any /'s
check_queue = Queue.Queue()
output_queue = Queue.Queue()
threads = 20
def writer(f,rq):
while True:
line = rq.get()
f.write(line+'\n')
def checker(q,oq):
while True:
proxy_info = q.get() #ip:port
if proxy_info == None:
print "Finished"
#quit()
return
#print "Checking %s"%proxy_info
if proxy_type == 'http':
try:
listhandle = open("proxylist.txt").read().split('\n')
for line in listhandle:
saveAlive = open("proxy_alive.txt", 'a')
details = line.split(':')
email = details[0]
password = details[1].replace('\n', '')
proxy_handler = urllib2.ProxyHandler({'http':proxy_info})
opener = urllib2.build_opener(proxy_handler)
opener.addheaders = [('User-agent','Mozilla/5.0')]
urllib2.install_opener(opener)
req = urllib2.Request("http://www.google.com")
sock=urllib2.urlopen(req, timeout= 7)
rs = sock.read(1000)
if '<title>Google</title>' in rs:
oq.put(proxy_info)
print '[+] alive proxy' , proxy_info
saveAlive.write(line)
saveAlive.close()
except urllib2.HTTPError,e:
print 'url open error? slow?'
pass
except Exception,detail:
print '[-] bad proxy' ,proxy_info
else:
# gotta be socks
try:
s = socks.socksocket()
if proxy_type == "s4":
t = socks.PROXY_TYPE_SOCKS4
else:
t = socks.PROXY_TYPE_SOCKS5
ip,port = proxy_info.split(':')
s.setproxy(t,ip,int(port))
s.connect((url,80))
oq.put(proxy_info)
print proxy_info
except Exception,error:
print proxy_info
threading.Thread(target=writer,args=(open(output_file,"wb"),output_queue)).start()
for i in xrange(threads):
threading.Thread(target=checker,args=(check_queue,output_queue)).start()
for line in open(input_file).readlines():
check_queue.put(line.strip('\n'))
print "File reading done"
for i in xrange(threads):
check_queue.put(None)
raw_input("PRESS ENTER TO QUIT")
sys.exit(0) | python | null | null | null | null | null | open | python proxy list check
===
i have some text file which contain proxy ip .
which look like following
130.14.29.111:80
130.14.29.120:80
130.159.235.31:80
14.198.198.220:8909
141.105.26.183:8000
160.79.35.27:80
164.77.196.75:80
164.77.196.78:45430
164.77.196.78:80
173.10.134.173:8081
174.132.145.80:80
174.137.152.60:8080
174.137.184.37:8080
174.142.125.161:80
after processing check this proxy , then i want to marked as following
total number of '0' = 8
total number of 'x' = 6
percentage = alive 60% , dead 40%
x 130.14.29.111:80
0 130.14.29.120:80
0 130.159.235.31:80
0 14.198.198.220:8909
0 141.105.26.183:8000
0 160.79.35.27:80
x 164.77.196.75:80
x 164.77.196.78:45430
x 164.77.196.78:80
0 173.10.134.173:8081
0 174.132.145.80:80
0 174.137.152.60:8080
x 174.137.184.37:8080
x 174.142.125.161:80
how can be done with python? or some sample
if anyone would help me or enlight me much aprreciate!
i was edited
this is script source of what i have
finally check finished proxy list are saved to 'proxy_alive.txt'
in this file i want to mark whether proxy element alive or not.
import socket
import urllib2
import threading
import sys
import Queue
import socket
socket.setdefaulttimeout(7)
print "Bobng's proxy checker. Using %s second timeout"%(socket.getdefaulttimeout())
#input_file = sys.argv[1]
#proxy_type = sys.argv[2] #options: http,s4,s5
#output_file = sys.argv[3]
input_file = 'proxylist.txt'
proxy_type = 'http'
output_file = 'proxy_alive.txt'
url = "www.seemyip.com" # Don't put http:// in here, or any /'s
check_queue = Queue.Queue()
output_queue = Queue.Queue()
threads = 20
def writer(f,rq):
while True:
line = rq.get()
f.write(line+'\n')
def checker(q,oq):
while True:
proxy_info = q.get() #ip:port
if proxy_info == None:
print "Finished"
#quit()
return
#print "Checking %s"%proxy_info
if proxy_type == 'http':
try:
listhandle = open("proxylist.txt").read().split('\n')
for line in listhandle:
saveAlive = open("proxy_alive.txt", 'a')
details = line.split(':')
email = details[0]
password = details[1].replace('\n', '')
proxy_handler = urllib2.ProxyHandler({'http':proxy_info})
opener = urllib2.build_opener(proxy_handler)
opener.addheaders = [('User-agent','Mozilla/5.0')]
urllib2.install_opener(opener)
req = urllib2.Request("http://www.google.com")
sock=urllib2.urlopen(req, timeout= 7)
rs = sock.read(1000)
if '<title>Google</title>' in rs:
oq.put(proxy_info)
print '[+] alive proxy' , proxy_info
saveAlive.write(line)
saveAlive.close()
except urllib2.HTTPError,e:
print 'url open error? slow?'
pass
except Exception,detail:
print '[-] bad proxy' ,proxy_info
else:
# gotta be socks
try:
s = socks.socksocket()
if proxy_type == "s4":
t = socks.PROXY_TYPE_SOCKS4
else:
t = socks.PROXY_TYPE_SOCKS5
ip,port = proxy_info.split(':')
s.setproxy(t,ip,int(port))
s.connect((url,80))
oq.put(proxy_info)
print proxy_info
except Exception,error:
print proxy_info
threading.Thread(target=writer,args=(open(output_file,"wb"),output_queue)).start()
for i in xrange(threads):
threading.Thread(target=checker,args=(check_queue,output_queue)).start()
for line in open(input_file).readlines():
check_queue.put(line.strip('\n'))
print "File reading done"
for i in xrange(threads):
check_queue.put(None)
raw_input("PRESS ENTER TO QUIT")
sys.exit(0) | 0 |
3,036,782 | 06/14/2010 11:23:51 | 366,272 | 06/14/2010 11:23:51 | 1 | 0 | create multivalued index | How do we create multivalued index through code. | java | solr | null | null | null | 06/15/2010 22:01:33 | not a real question | create multivalued index
===
How do we create multivalued index through code. | 1 |
487,735 | 01/28/2009 14:08:52 | 41,021 | 11/26/2008 13:16:39 | 847 | 54 | How do you rate programmers? | Does any rating system exist to **rate** the capabilities of a person as a programmer, much like an **Intelligence Quotient** Test, where specific insights on **predefined aspects** are rated based on answers / multiple-choice questions.
Ideally in a **language-independent manner** because the core programmer understandings are usually similar from platform-to-platform.
Also, capabilities we take for granted which actually make us more efficient / intellegent like **visualization** of data structures and processes, **spatial-reasoning**, in-mind **simulation** of code by just glancing, etc.
Typically there might be two categories of programmer **solution** design, functional-oriented and object-oriented, so if the balance of design style can be calculated.
*Programmer-quotient? or **Software-quotient?** Any such rating system?* | language-agnostic | programmer-skills | null | null | null | 08/08/2011 14:22:25 | off topic | How do you rate programmers?
===
Does any rating system exist to **rate** the capabilities of a person as a programmer, much like an **Intelligence Quotient** Test, where specific insights on **predefined aspects** are rated based on answers / multiple-choice questions.
Ideally in a **language-independent manner** because the core programmer understandings are usually similar from platform-to-platform.
Also, capabilities we take for granted which actually make us more efficient / intellegent like **visualization** of data structures and processes, **spatial-reasoning**, in-mind **simulation** of code by just glancing, etc.
Typically there might be two categories of programmer **solution** design, functional-oriented and object-oriented, so if the balance of design style can be calculated.
*Programmer-quotient? or **Software-quotient?** Any such rating system?* | 2 |
10,127,723 | 04/12/2012 16:27:45 | 1,329,649 | 04/12/2012 16:22:25 | 1 | 0 | Windows Azure CDN using https - connection reset | I keep having a problem where I'll randomly get connection resets when trying to access static content from the Azure CDN using https.
I have enabled HTTPS on the cdn endpoint and most of the time it works fine, but sometimes it's like it just hangs and no https links to the cdn works. If I change to http it keeps working fine and after about 10 minutes or so the https "comes back up".
Anyone else seen this? | https | azure | cdn | null | null | null | open | Windows Azure CDN using https - connection reset
===
I keep having a problem where I'll randomly get connection resets when trying to access static content from the Azure CDN using https.
I have enabled HTTPS on the cdn endpoint and most of the time it works fine, but sometimes it's like it just hangs and no https links to the cdn works. If I change to http it keeps working fine and after about 10 minutes or so the https "comes back up".
Anyone else seen this? | 0 |
10,504,672 | 05/08/2012 18:53:05 | 1,127,181 | 01/03/2012 04:01:45 | 132 | 0 | Selecting area rectangle on desktop | I'm trying to create an application in C#.NET that mimics the ability of the Windows 7 snipping tool, where when the application is run (or by a particular keystroke or however I choose to initiate it), the user can draw a rectangle on the screen no matter which window has focus, in order to capture a rectangular snapshot of the desktop.
I already know how to utilize the Graphics.CopyFromScreen() method in order to save a snapshot given a particular rectangle, but where I'm stumped is the actual rectangular selection and how to obtain the bounds from that. | c# | .net | graphics | screenshot | null | 05/10/2012 09:57:32 | too localized | Selecting area rectangle on desktop
===
I'm trying to create an application in C#.NET that mimics the ability of the Windows 7 snipping tool, where when the application is run (or by a particular keystroke or however I choose to initiate it), the user can draw a rectangle on the screen no matter which window has focus, in order to capture a rectangular snapshot of the desktop.
I already know how to utilize the Graphics.CopyFromScreen() method in order to save a snapshot given a particular rectangle, but where I'm stumped is the actual rectangular selection and how to obtain the bounds from that. | 3 |
10,856,167 | 06/01/2012 19:20:41 | 899,055 | 08/17/2011 16:30:21 | 62 | 0 | Performance Issues with DB Design and Heavy Data | I asked the following question regarding DB Design and Performance issue in my application today.
http://stackoverflow.com/questions/10846340/db-design-and-data-retrieval-from-a-heavy-table/10846391#comment14126017_10846391
But, could not get much replies on that. I don't know, I may not have explained the question properly. Now, I have re-defined my question, hoping to get some suggestion from the experts.
I am facing performance issues while selecting data from a particular table. The business logic of the application is as following:
I have a number of import processes which result in creating pivot columns under their parent column names while showing them to the user. As the columns get pivoted, system takes time to convert rows into columns which results in slow performance.
The database tables related to this functionality are as following:
There can be N number of clients. CLT_Clients table stores client information.
There can be N number of projects associated to a client. PRJ_Projects table stores project information and a link to the client.
There can be N number of listings associated to a project. PRJ_Listings table stores listing information and a link to the project.
There can be N number of source entities associated to a listing. ST_Entities table stores source entity information and a link to the listing.
This source entity is the actual import that contains the InvestorID, position values, source date, active and formula status.
The name of the import e.g. L1Entity1 is stored in ST_Entities table alongwith ID field i.e. EntityID
InvestorID, Position, Source Date, Active and Formula values get stored in ST_Positions table
Database Diagram
![DB Design][1]
Data need to be view as following:
![Data View][2]
With this design I’m able to handle N number of imports because the Position, Source Date, IsActive, Formula columns get Pivoted.
The problem that I’m facing with this design is that the system performs very slow when it has to select data for more than 10-12 source entities, and the requirement is to show about 150 source entities. Because data is not stored row wise and I need to show it column wise, hence dynamic queries are written to pivot these columns which takes long.
**Ques 1:** Please comment/suggest on my current database design if it’s correct or need to be changed with the new design by taking 150 columns each for Position, Source Date, IsActive, Formula; In this new way data will already be stored in the way I need to retrieve in i.e. I’ll not have to pivot/unpivot it. But the downside is:
a) There are going to be more than 600 columns in this table?
b) There will be limit i.e. 150 on the source entities.
**Ques 2:** If I need to stick to my current, what can be done to improve the performance?
[1]: http://i.stack.imgur.com/IS9M9.jpg
[2]: http://i.stack.imgur.com/MMIO9.jpg | sql-server-2008 | database-design | query-optimization | database-performance | null | null | open | Performance Issues with DB Design and Heavy Data
===
I asked the following question regarding DB Design and Performance issue in my application today.
http://stackoverflow.com/questions/10846340/db-design-and-data-retrieval-from-a-heavy-table/10846391#comment14126017_10846391
But, could not get much replies on that. I don't know, I may not have explained the question properly. Now, I have re-defined my question, hoping to get some suggestion from the experts.
I am facing performance issues while selecting data from a particular table. The business logic of the application is as following:
I have a number of import processes which result in creating pivot columns under their parent column names while showing them to the user. As the columns get pivoted, system takes time to convert rows into columns which results in slow performance.
The database tables related to this functionality are as following:
There can be N number of clients. CLT_Clients table stores client information.
There can be N number of projects associated to a client. PRJ_Projects table stores project information and a link to the client.
There can be N number of listings associated to a project. PRJ_Listings table stores listing information and a link to the project.
There can be N number of source entities associated to a listing. ST_Entities table stores source entity information and a link to the listing.
This source entity is the actual import that contains the InvestorID, position values, source date, active and formula status.
The name of the import e.g. L1Entity1 is stored in ST_Entities table alongwith ID field i.e. EntityID
InvestorID, Position, Source Date, Active and Formula values get stored in ST_Positions table
Database Diagram
![DB Design][1]
Data need to be view as following:
![Data View][2]
With this design I’m able to handle N number of imports because the Position, Source Date, IsActive, Formula columns get Pivoted.
The problem that I’m facing with this design is that the system performs very slow when it has to select data for more than 10-12 source entities, and the requirement is to show about 150 source entities. Because data is not stored row wise and I need to show it column wise, hence dynamic queries are written to pivot these columns which takes long.
**Ques 1:** Please comment/suggest on my current database design if it’s correct or need to be changed with the new design by taking 150 columns each for Position, Source Date, IsActive, Formula; In this new way data will already be stored in the way I need to retrieve in i.e. I’ll not have to pivot/unpivot it. But the downside is:
a) There are going to be more than 600 columns in this table?
b) There will be limit i.e. 150 on the source entities.
**Ques 2:** If I need to stick to my current, what can be done to improve the performance?
[1]: http://i.stack.imgur.com/IS9M9.jpg
[2]: http://i.stack.imgur.com/MMIO9.jpg | 0 |
6,190,385 | 05/31/2011 16:06:38 | 70,942 | 02/25/2009 17:01:58 | 133 | 26 | cmake doesn't display display message | Fedora 15
cmake version 2.8.4
I am using the following CMakeLists.txt. However the status message doesn't display when I run `cmake .`
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(proj2 C)
IF(CMAKE_COMPILER_IS_GNUCXX)
MESSAGE(STATUS "==== GCC detected - Adding compiler flags")
SET(CMAKE_C_FLAGS "-pthread -ggdb -Wextra -Wall")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ADD_EXECUTABLE(crypto_app main.c)
TARGET_LINK_LIBRARIES(crypto_app crypt)
All I get is the following:
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/projects/proj1/
Many thanks for any suggestions about this.
| c | cmake | null | null | null | null | open | cmake doesn't display display message
===
Fedora 15
cmake version 2.8.4
I am using the following CMakeLists.txt. However the status message doesn't display when I run `cmake .`
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(proj2 C)
IF(CMAKE_COMPILER_IS_GNUCXX)
MESSAGE(STATUS "==== GCC detected - Adding compiler flags")
SET(CMAKE_C_FLAGS "-pthread -ggdb -Wextra -Wall")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ADD_EXECUTABLE(crypto_app main.c)
TARGET_LINK_LIBRARIES(crypto_app crypt)
All I get is the following:
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/projects/proj1/
Many thanks for any suggestions about this.
| 0 |
10,219,300 | 04/18/2012 22:58:36 | 1,342,624 | 04/18/2012 22:25:53 | 1 | 0 | Connect Pantheios logging in a DLL to the main application's logging | Here's the situation: I'm working on a MFC application and want to integrate some logging capabilities into it. I did some research and settled on Pantheios since it seems to be regarded as the best logging API out there. I had no problems getting simple logging up and running - I even threw in some callback stuff to change the formatting of the output.
My application will be making use of several DLLs. These are DLLs that I am actively developing and would like to integrate logging into them as well. Ideally all the logging from these DLLs will be routed into the main application log - but I can't figure out how to do that using Pantheios. I can have them log to their own files but I can't figure out how to attach them to the main application log.
Any ideas? | visual-c++ | mfc | pantheios | null | null | null | open | Connect Pantheios logging in a DLL to the main application's logging
===
Here's the situation: I'm working on a MFC application and want to integrate some logging capabilities into it. I did some research and settled on Pantheios since it seems to be regarded as the best logging API out there. I had no problems getting simple logging up and running - I even threw in some callback stuff to change the formatting of the output.
My application will be making use of several DLLs. These are DLLs that I am actively developing and would like to integrate logging into them as well. Ideally all the logging from these DLLs will be routed into the main application log - but I can't figure out how to do that using Pantheios. I can have them log to their own files but I can't figure out how to attach them to the main application log.
Any ideas? | 0 |
5,657,841 | 04/14/2011 02:15:13 | 285,856 | 03/03/2010 23:56:47 | 564 | 24 | Get id attribute from another element in same list item with Jquery | <li class="ui-li ui-li-static ui-body-c">
<p class="ui-li-aside ui-li-desc"></p>
<span id="122"></span>
<h3 class="ui-li-heading"></h3>
<p class="ui-li-desc"></p>
<p class="ui-li-desc"><a class="ui-link">Report</a></p>
</li>
So here is my HTML markup.
Goal: I need JQuery code that will give me the `id` value of the `<span>` element (so in this case: 122) within the same `<li>`, when I click the `<a>` in that same `<li>`.
How would I do this?
Thanks! | jquery | html | null | null | null | null | open | Get id attribute from another element in same list item with Jquery
===
<li class="ui-li ui-li-static ui-body-c">
<p class="ui-li-aside ui-li-desc"></p>
<span id="122"></span>
<h3 class="ui-li-heading"></h3>
<p class="ui-li-desc"></p>
<p class="ui-li-desc"><a class="ui-link">Report</a></p>
</li>
So here is my HTML markup.
Goal: I need JQuery code that will give me the `id` value of the `<span>` element (so in this case: 122) within the same `<li>`, when I click the `<a>` in that same `<li>`.
How would I do this?
Thanks! | 0 |
4,663,809 | 01/11/2011 23:20:42 | 408,244 | 08/02/2010 02:03:07 | 35 | 0 | Can I declare the DirectoryIndex In .htaccess Non-recursively? | In my /httpdocs/ folder I need to change the filename of index.php. I did this by writing a new line to my .htaccess file:
DirectoryIndex index2.php
However, it seems that all subfolders under /httpdocs/ were looking for index2.php for their DirectoryIndex file. Is there a way I can alter the DirectoryIndex file for my /httpdocs/ folder without it recursively affecting every folder under it? | .htaccess | recursion | directoryindex | null | null | null | open | Can I declare the DirectoryIndex In .htaccess Non-recursively?
===
In my /httpdocs/ folder I need to change the filename of index.php. I did this by writing a new line to my .htaccess file:
DirectoryIndex index2.php
However, it seems that all subfolders under /httpdocs/ were looking for index2.php for their DirectoryIndex file. Is there a way I can alter the DirectoryIndex file for my /httpdocs/ folder without it recursively affecting every folder under it? | 0 |
4,962,528 | 02/10/2011 20:51:20 | 483,777 | 10/22/2010 03:32:01 | 1 | 0 | Offline access to FB graph api from Javascript SDK. | How do you query facebook's graph api via the javascript sdk for users that have allready given you permissions (offline access) and whose auth data you have stored, but who are not currently logged in to facebook? | facebook | facebook-graph-api | facebook-javascript-sdk | null | null | null | open | Offline access to FB graph api from Javascript SDK.
===
How do you query facebook's graph api via the javascript sdk for users that have allready given you permissions (offline access) and whose auth data you have stored, but who are not currently logged in to facebook? | 0 |
10,174,936 | 04/16/2012 13:19:23 | 831,110 | 07/06/2011 08:02:20 | 33 | 4 | How to get row index of listview from custom list adapter? | I have two layouts
1. **main.xml** ----- With a single ListView (say `listview_01`).
2. **row.xml** ----- With an ImageView(say `imageView_01`) & a TextView(say `textView_01`)
I am filling my `listview_01` with `row.xml` as row using `array data` i have.
I wanted to perform an operation on `onclick()` event of `imageView_01`, its working.
i have added `onClick()` on `imageView_01` in `getView()` in my `CustomlistAdapter`.
But can anyone tell me how to get row index in `onClick()` event of `listview_01` of a `row image, in a CustomListAdapter`? | android | null | null | null | null | null | open | How to get row index of listview from custom list adapter?
===
I have two layouts
1. **main.xml** ----- With a single ListView (say `listview_01`).
2. **row.xml** ----- With an ImageView(say `imageView_01`) & a TextView(say `textView_01`)
I am filling my `listview_01` with `row.xml` as row using `array data` i have.
I wanted to perform an operation on `onclick()` event of `imageView_01`, its working.
i have added `onClick()` on `imageView_01` in `getView()` in my `CustomlistAdapter`.
But can anyone tell me how to get row index in `onClick()` event of `listview_01` of a `row image, in a CustomListAdapter`? | 0 |
859,095 | 05/13/2009 16:51:24 | 1,009 | 08/11/2008 13:01:27 | 613 | 40 | What is the reason for the rise of programmers using Apple machines | I noticed a rise in the number of developers (mostly doing web development) using Apple machines.
Does Mac OS offer a better environment for programming or is because of the hardware?
What are the reasons? | apple | null | null | null | null | 06/06/2012 12:53:10 | off topic | What is the reason for the rise of programmers using Apple machines
===
I noticed a rise in the number of developers (mostly doing web development) using Apple machines.
Does Mac OS offer a better environment for programming or is because of the hardware?
What are the reasons? | 2 |
10,378,566 | 04/30/2012 04:38:23 | 1,365,032 | 04/30/2012 04:27:09 | 1 | 0 | Videos uploaded from iPhone that are greater than ~25MB appear corrupted | I am a bit new to the iPhone development. Using the following code on an iPhone app to upload images and videos (.mov) to an IIS web server (.aspx page). Pictures upload just fine no issues. However, when I try uploading videos, videos less than ~25MB upload and play fine with no issues. If I go for bigger videos (above ~25MB) they upload fine but will not play. It is as if the videos are corrupt after the upload. I have tried many experiments and to no avail. Any pointers will be greatly appreciated.
Also, why doesn't request.shouldContinueWhenAppEntersBackground work in my code, gives a compilation error. Is there a newer version of ASIFormDataRequest library?
ASIFormDataRequest *request;
@try {
NSURL *url = [NSURL URLWithString:turl];
GlobalHandeler *obj=[GlobalHandeler getObject];
request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
//request.shouldContinueWhenAppEntersBackground = YES;
[request setPostValue:fileName forKey:@"filename"];
[request setPostValue:uuid forKey:@"uuid"];
[request setFile:file forKey:@"file"];
[request shouldCompressRequestBody];
[request setTimeOutSeconds:6000];
[request setUploadProgressDelegate:progress];
[request setDelegate:view];
request.canceled=false;
request.curPos=pos;
obj.request=request;
[request startAsynchronous];
int status_code = [ request responseStatusCode];
NSLog(@"data %@" ,[request responseString]);
if ( status_code != 200 )
{
NSLog(@"Fail-----");
bret = false;
}
else{
NSLog(@"Success-----");
}
@catch(...) {
bret = false;
}
@finally {
return request;
} | iphone | video | upload | webserver | asiformdatarequest | null | open | Videos uploaded from iPhone that are greater than ~25MB appear corrupted
===
I am a bit new to the iPhone development. Using the following code on an iPhone app to upload images and videos (.mov) to an IIS web server (.aspx page). Pictures upload just fine no issues. However, when I try uploading videos, videos less than ~25MB upload and play fine with no issues. If I go for bigger videos (above ~25MB) they upload fine but will not play. It is as if the videos are corrupt after the upload. I have tried many experiments and to no avail. Any pointers will be greatly appreciated.
Also, why doesn't request.shouldContinueWhenAppEntersBackground work in my code, gives a compilation error. Is there a newer version of ASIFormDataRequest library?
ASIFormDataRequest *request;
@try {
NSURL *url = [NSURL URLWithString:turl];
GlobalHandeler *obj=[GlobalHandeler getObject];
request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
//request.shouldContinueWhenAppEntersBackground = YES;
[request setPostValue:fileName forKey:@"filename"];
[request setPostValue:uuid forKey:@"uuid"];
[request setFile:file forKey:@"file"];
[request shouldCompressRequestBody];
[request setTimeOutSeconds:6000];
[request setUploadProgressDelegate:progress];
[request setDelegate:view];
request.canceled=false;
request.curPos=pos;
obj.request=request;
[request startAsynchronous];
int status_code = [ request responseStatusCode];
NSLog(@"data %@" ,[request responseString]);
if ( status_code != 200 )
{
NSLog(@"Fail-----");
bret = false;
}
else{
NSLog(@"Success-----");
}
@catch(...) {
bret = false;
}
@finally {
return request;
} | 0 |
4,040,888 | 10/28/2010 08:05:24 | 50,394 | 12/31/2008 04:52:41 | 9,714 | 435 | Maven directory structure | I'm new to Maven and I've been reading all morning tutorials (amazing tool).
This new Java project I started looking at however doesn't use the default directory structure. Instead of `src/main/java` for sources it uses something like `src/org/myapp`.
When I run `mvn package` on the project (where `pom.xml` is located) I get a message saying that no Sources have been compiled because it's not able to find them (the source path being different).
Is there a way to specify your own sources path in Maven? | java | maven-2 | null | null | null | null | open | Maven directory structure
===
I'm new to Maven and I've been reading all morning tutorials (amazing tool).
This new Java project I started looking at however doesn't use the default directory structure. Instead of `src/main/java` for sources it uses something like `src/org/myapp`.
When I run `mvn package` on the project (where `pom.xml` is located) I get a message saying that no Sources have been compiled because it's not able to find them (the source path being different).
Is there a way to specify your own sources path in Maven? | 0 |
10,612,495 | 05/16/2012 05:23:17 | 1,397,728 | 05/16/2012 05:12:56 | 1 | 0 | how add an access list to Switch of Cisco Catalyst 2960 | i have learned to drop a MAC address from the Switch,
so that the system with the drop MAC address cannot use be connected to the internet...
what i want is, i have a list valid MAC address,
connect the system to the internet with the MAC address specified to the switch...
if any other invalid MAC address system is connected to the switch, it should not be able access the internet...
simply telling, i have to give internet access to only specified user by using MAC address and rest systems should be dropped
i need to give commands through command line...
how to do this...
if i am wrong, let me know | java | sockets | telnet | null | null | 05/16/2012 20:27:44 | off topic | how add an access list to Switch of Cisco Catalyst 2960
===
i have learned to drop a MAC address from the Switch,
so that the system with the drop MAC address cannot use be connected to the internet...
what i want is, i have a list valid MAC address,
connect the system to the internet with the MAC address specified to the switch...
if any other invalid MAC address system is connected to the switch, it should not be able access the internet...
simply telling, i have to give internet access to only specified user by using MAC address and rest systems should be dropped
i need to give commands through command line...
how to do this...
if i am wrong, let me know | 2 |
8,601,482 | 12/22/2011 09:00:37 | 598,511 | 02/01/2011 14:16:14 | 444 | 18 | jquery on vs click methods | I know that the on method, http://api.jquery.com/on/, is supposed to replace live, delegate etc. But is there any point of using it on places where youre currently using the click event, http://api.jquery.com/click/? On elements that are not dynamically generated for example. Thanks | jquery | null | null | null | null | null | open | jquery on vs click methods
===
I know that the on method, http://api.jquery.com/on/, is supposed to replace live, delegate etc. But is there any point of using it on places where youre currently using the click event, http://api.jquery.com/click/? On elements that are not dynamically generated for example. Thanks | 0 |
9,065,498 | 01/30/2012 14:36:24 | 1,178,245 | 01/30/2012 14:24:03 | 1 | 0 | Installing Certificates Programatically using Win32 Crypto API | I am trying to programatically install certificate to Windows Certificate Store, for this i am trying to get the information from certificate to see which store i need to open, but it seems not to work properly. Can someone please help me in this, and see what i am missing from below code. When I double click the certificate it gets installed into Root store, but when I install using the below code it gets installed in CA store. Thanks.
HCERTSTORE GetCurrentStore(PCCERT_CONTEXT pContext)
{
if(!pContext) return NULL;
HCERTSTORE hReturn = NULL;
if(IsCACert(pContext) == TRUE)
{
if(IsCASelfsigned(pContext) == TRUE)
{
hReturn = ROOT;
}
else
{
hReturn = CA;
}
}
else
{
hReturn = MY;
}
return hReturn;
}
BOOL IsCACert(PCCERT_CONTEXT pContext)
{
if(!pContext) return FALSE;
PCERT_EXTENSION pCertExt = NULL;
BOOL fCA = FALSE;
PCERT_BASIC_CONSTRAINTS2_INFO pInfo = NULL;
DWORD cbInfo = 0;
pCertExt = CertFindExtension(szOID_BASIC_CONSTRAINTS2, pContext->pCertInfo->cExtension, pContext->pCertInfo->rgExtension);
if (pCertExt == NULL)
{
return FALSE;
}
if(!CryptDecodeObjectEx(X509_ASN_ENCODING, X509_BASIC_CONSTRAINTS2, pCertExt->Value.pbData, pCertExt->Value.cbData, CRYPT_DECODE_ALLOC_FLAG, (PCRYPT_DECODE_PARA)NULL, &pInfo, &cbInfo))
{
return FALSE;
}
if(pInfo)
{
fCA = pInfo->fCA;
LocalFree(pInfo);
}
return fCA;
}
BOOL IsCASelfsigned(PCCERT_CONTEXT pContext)
{
if(!pContext) return FALSE;
DWORD dwFlags = CERT_STORE_SIGNATURE_FLAG;
if (!(CertCompareCertificateName(X509_ASN_ENCODING, &pContext->pCertInfo->Issuer, &pContext->pCertInfo->Subject)))
{
return FALSE;
}
if (!(CertVerifySubjectCertificateContext(pContext, pContext, &dwFlags)))
{
return FALSE;
}
if (dwFlags != 0)
{
return FALSE;
}
return TRUE;
}
| winapi | certificate | cryptoapi | null | null | null | open | Installing Certificates Programatically using Win32 Crypto API
===
I am trying to programatically install certificate to Windows Certificate Store, for this i am trying to get the information from certificate to see which store i need to open, but it seems not to work properly. Can someone please help me in this, and see what i am missing from below code. When I double click the certificate it gets installed into Root store, but when I install using the below code it gets installed in CA store. Thanks.
HCERTSTORE GetCurrentStore(PCCERT_CONTEXT pContext)
{
if(!pContext) return NULL;
HCERTSTORE hReturn = NULL;
if(IsCACert(pContext) == TRUE)
{
if(IsCASelfsigned(pContext) == TRUE)
{
hReturn = ROOT;
}
else
{
hReturn = CA;
}
}
else
{
hReturn = MY;
}
return hReturn;
}
BOOL IsCACert(PCCERT_CONTEXT pContext)
{
if(!pContext) return FALSE;
PCERT_EXTENSION pCertExt = NULL;
BOOL fCA = FALSE;
PCERT_BASIC_CONSTRAINTS2_INFO pInfo = NULL;
DWORD cbInfo = 0;
pCertExt = CertFindExtension(szOID_BASIC_CONSTRAINTS2, pContext->pCertInfo->cExtension, pContext->pCertInfo->rgExtension);
if (pCertExt == NULL)
{
return FALSE;
}
if(!CryptDecodeObjectEx(X509_ASN_ENCODING, X509_BASIC_CONSTRAINTS2, pCertExt->Value.pbData, pCertExt->Value.cbData, CRYPT_DECODE_ALLOC_FLAG, (PCRYPT_DECODE_PARA)NULL, &pInfo, &cbInfo))
{
return FALSE;
}
if(pInfo)
{
fCA = pInfo->fCA;
LocalFree(pInfo);
}
return fCA;
}
BOOL IsCASelfsigned(PCCERT_CONTEXT pContext)
{
if(!pContext) return FALSE;
DWORD dwFlags = CERT_STORE_SIGNATURE_FLAG;
if (!(CertCompareCertificateName(X509_ASN_ENCODING, &pContext->pCertInfo->Issuer, &pContext->pCertInfo->Subject)))
{
return FALSE;
}
if (!(CertVerifySubjectCertificateContext(pContext, pContext, &dwFlags)))
{
return FALSE;
}
if (dwFlags != 0)
{
return FALSE;
}
return TRUE;
}
| 0 |
8,965,903 | 01/23/2012 00:03:02 | 1,164,099 | 01/22/2012 23:58:24 | 1 | 0 | wcf duplex binding real environments | Please i want a some examples of **real environments** of where to use wcf duplex binding, and differences between other bindings or links to any good and well explained example.
thank u | wcf-binding | null | null | null | null | 01/23/2012 15:39:21 | not a real question | wcf duplex binding real environments
===
Please i want a some examples of **real environments** of where to use wcf duplex binding, and differences between other bindings or links to any good and well explained example.
thank u | 1 |
7,290,142 | 09/02/2011 23:27:47 | 663,148 | 03/16/2011 19:31:05 | 158 | 0 | Any url that starts with the pattern.. do this | I want to compare url A (`http://www.somehost.com/citizenship/wireless-reach/news-and-resources`) with the pattern url B (`http://www.somehost/.*/wireless-reach`) and if that URL A starts with the pattern url B then do this thing.. As URL A is originated from the URL B.. As in the below case it is not matching but this url `http://www.somehost.com/citizenship/wireless-reach/news-and-resources` is from this pattern only `http://www.somehost.com/.*/wireless-reach` So any url that starts with this pattern.. just do this thing in the if loop... Any suggestions will be appreciated...!!
BufferedReader readbuffer = null;
try {
readbuffer = new BufferedReader(new FileReader("filters.txt"));
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
String strRead;
try {
while ((strRead=readbuffer.readLine())!=null){
String splitarray[] = strRead.split(",");
String firstentry = splitarray[0];
String secondentry = splitarray[1];
String thirdentry = splitarray[2];
//String fourthentry = splitarray[3];
//String fifthentry = splitarray[4];
System.out.println(firstentry + " " + secondentry+ " " +thirdentry);
URL url1 = new URL("http://www.somehost.com/citizenship/wireless-reach/news-and-resources");
//Any url that starts with this pattern then do whatever you want in the if loop... How can we implement this??
Pattern p = Pattern.compile("http://www.somehost/.*/wireless-reach");
Matcher m = p.matcher(url1.toString());
if (m.matches()) {
//Do whatever
System.out.println("Yes Done");
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} | java | regex | pattern-matching | null | null | null | open | Any url that starts with the pattern.. do this
===
I want to compare url A (`http://www.somehost.com/citizenship/wireless-reach/news-and-resources`) with the pattern url B (`http://www.somehost/.*/wireless-reach`) and if that URL A starts with the pattern url B then do this thing.. As URL A is originated from the URL B.. As in the below case it is not matching but this url `http://www.somehost.com/citizenship/wireless-reach/news-and-resources` is from this pattern only `http://www.somehost.com/.*/wireless-reach` So any url that starts with this pattern.. just do this thing in the if loop... Any suggestions will be appreciated...!!
BufferedReader readbuffer = null;
try {
readbuffer = new BufferedReader(new FileReader("filters.txt"));
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
String strRead;
try {
while ((strRead=readbuffer.readLine())!=null){
String splitarray[] = strRead.split(",");
String firstentry = splitarray[0];
String secondentry = splitarray[1];
String thirdentry = splitarray[2];
//String fourthentry = splitarray[3];
//String fifthentry = splitarray[4];
System.out.println(firstentry + " " + secondentry+ " " +thirdentry);
URL url1 = new URL("http://www.somehost.com/citizenship/wireless-reach/news-and-resources");
//Any url that starts with this pattern then do whatever you want in the if loop... How can we implement this??
Pattern p = Pattern.compile("http://www.somehost/.*/wireless-reach");
Matcher m = p.matcher(url1.toString());
if (m.matches()) {
//Do whatever
System.out.println("Yes Done");
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} | 0 |
3,655,727 | 09/07/2010 04:16:11 | 239,786 | 12/28/2009 20:41:13 | 22 | 1 | How can I make a window or NSPanel out of an image? | I'm trying to add some style to my app and it's driving me crazy. I'm wanting to take a image that is transparent and use it as a window or NSPanel. I'm thinking this will have to be done programmatically but I would like to do it in Interface Builder. How can I achieve this effect either way. So far, I've tried both ways and can't achieve it. Any code examples would be much appreciated. Thanks | objective-c | cocoa | xcode | osx | null | null | open | How can I make a window or NSPanel out of an image?
===
I'm trying to add some style to my app and it's driving me crazy. I'm wanting to take a image that is transparent and use it as a window or NSPanel. I'm thinking this will have to be done programmatically but I would like to do it in Interface Builder. How can I achieve this effect either way. So far, I've tried both ways and can't achieve it. Any code examples would be much appreciated. Thanks | 0 |
514,948 | 02/05/2009 07:52:33 | 4,093 | 09/01/2008 18:31:02 | 423 | 12 | What are the pros and cons for using a IOC container? | Using a IOC container will decrease the speed of your application because most of them uses reflection under the hood. They also can make your code more difficult to understand(?). On the bright side; they help you create more loosely coupled applications and makes unit testing easier. Are there other pros and cons for using/not using a IOC container? | inversion-of-control | ioc-container | pros-cons | null | null | null | open | What are the pros and cons for using a IOC container?
===
Using a IOC container will decrease the speed of your application because most of them uses reflection under the hood. They also can make your code more difficult to understand(?). On the bright side; they help you create more loosely coupled applications and makes unit testing easier. Are there other pros and cons for using/not using a IOC container? | 0 |
10,450,387 | 05/04/2012 14:01:27 | 1,323,140 | 04/10/2012 03:51:05 | 1 | 0 | DOUBLY LINKED LIST FORTRAN. PRINT FROM TAIL TO HEAD | I AM TRYING TO PRINT OUT A DOUBLY LINKED LIST. I AM ABLE TO GET THE LIST TO PRINT FROM HEAD TO TAIL.. HOWEVER WHEN I PRINT TAIL TO HEAD ONLY THE HEAD WILL PRINT. THIS IS THE LAST PART OF THE CODE. I HAVE INCLUDED THE LINK LIST CODE. ANY SUGGESTIONS?
*INPUT UP TO EOF
NULLIFY(HEAD,TAIL)
DO WHILE(.TRUE.)
READ(1,*,END=999)NAMEIN
READ(1,*,END=999)AGEIN
*INITIALIZE THE POINTERS TO NULL
NULLIFY(CURRENT)
ALLOCATE(CURRENT)
CURRENT%PERSON = NAMEIN
CURRENT%AGE = AGEIN
*IF THERE IS NOT AT LEAST ONE NODE
IF(.NOT.ASSOCIATED(HEAD))THEN
HEAD => CURRENT
TAIL => CURRENT
NULLIFY(HEAD%NEXT,HEAD%PREV)
*IF THE CURRENT IS LAST NODE
ELSE
*PLACE AT END OF LIST
TAIL%NEXT =>CURRENT
CURRENT%PREV=>TAIL
NULLIFY(CURRENT%NEXT)
*CHANGE TAIL POINTER TO NEW END
TAIL => CURRENT
NULLIFY(CURRENT%NEXT)
NULLIFY(CURRENT%PREV)
END IF
END DO
999 CONTINUE
*PRINT FROM HEAD TO TAIL
*POINT TO THE BEGINNING
NULLIFY(TEMP)
TEMP => HEAD
*PRINT EACH NODE
PRINT *,'-----PRINTING fROM HEAD TO TAIL-----'
DO WHILE(ASSOCIATED(TEMP))
PRINT 5,TEMP%PERSON
PRINT 10,TEMP%AGE
TEMP => TEMP%NEXT
END DO
*PRINT FROM TAIL TO HEAD
*POINT TO THE BEGINNING
*PRINT EACH NODE
CURRENT => TAIL
PRINT *,'-----PRINTING fROM TAIL TO HEAD------'
DO WHILE(ASSOCIATED(TEMP))
PRINT 5,CURRENT%PERSON
PRINT 10,CURRENT%AGE
CURRENT => CURRENT%PREV
END DO | algorithm | linked-list | fortran | fortran90 | null | 05/15/2012 06:54:11 | too localized | DOUBLY LINKED LIST FORTRAN. PRINT FROM TAIL TO HEAD
===
I AM TRYING TO PRINT OUT A DOUBLY LINKED LIST. I AM ABLE TO GET THE LIST TO PRINT FROM HEAD TO TAIL.. HOWEVER WHEN I PRINT TAIL TO HEAD ONLY THE HEAD WILL PRINT. THIS IS THE LAST PART OF THE CODE. I HAVE INCLUDED THE LINK LIST CODE. ANY SUGGESTIONS?
*INPUT UP TO EOF
NULLIFY(HEAD,TAIL)
DO WHILE(.TRUE.)
READ(1,*,END=999)NAMEIN
READ(1,*,END=999)AGEIN
*INITIALIZE THE POINTERS TO NULL
NULLIFY(CURRENT)
ALLOCATE(CURRENT)
CURRENT%PERSON = NAMEIN
CURRENT%AGE = AGEIN
*IF THERE IS NOT AT LEAST ONE NODE
IF(.NOT.ASSOCIATED(HEAD))THEN
HEAD => CURRENT
TAIL => CURRENT
NULLIFY(HEAD%NEXT,HEAD%PREV)
*IF THE CURRENT IS LAST NODE
ELSE
*PLACE AT END OF LIST
TAIL%NEXT =>CURRENT
CURRENT%PREV=>TAIL
NULLIFY(CURRENT%NEXT)
*CHANGE TAIL POINTER TO NEW END
TAIL => CURRENT
NULLIFY(CURRENT%NEXT)
NULLIFY(CURRENT%PREV)
END IF
END DO
999 CONTINUE
*PRINT FROM HEAD TO TAIL
*POINT TO THE BEGINNING
NULLIFY(TEMP)
TEMP => HEAD
*PRINT EACH NODE
PRINT *,'-----PRINTING fROM HEAD TO TAIL-----'
DO WHILE(ASSOCIATED(TEMP))
PRINT 5,TEMP%PERSON
PRINT 10,TEMP%AGE
TEMP => TEMP%NEXT
END DO
*PRINT FROM TAIL TO HEAD
*POINT TO THE BEGINNING
*PRINT EACH NODE
CURRENT => TAIL
PRINT *,'-----PRINTING fROM TAIL TO HEAD------'
DO WHILE(ASSOCIATED(TEMP))
PRINT 5,CURRENT%PERSON
PRINT 10,CURRENT%AGE
CURRENT => CURRENT%PREV
END DO | 3 |
7,784,841 | 10/16/2011 14:14:46 | 466,192 | 10/04/2010 20:10:16 | 865 | 31 | Ideas on a recipe editor (in jquery) | I have to write a recipe editor (for web, using jquery), and I would like to hear your ideas on it.
The goal is that in a first step, all the ingredients are entered (amount, unit and ingredient name; for example '1, kg, flower'); and in a second step the actual recipe is entered, using these ingredients. The idea is that I have to validate that all defined ingredients are used in the recipe).
Is it a crazy idea to try to implement this? How would you functionally handle this (so that it's technically possible of course)? | c# | jquery | asp.net-mvc-3 | validation | editor | 10/16/2011 15:05:24 | off topic | Ideas on a recipe editor (in jquery)
===
I have to write a recipe editor (for web, using jquery), and I would like to hear your ideas on it.
The goal is that in a first step, all the ingredients are entered (amount, unit and ingredient name; for example '1, kg, flower'); and in a second step the actual recipe is entered, using these ingredients. The idea is that I have to validate that all defined ingredients are used in the recipe).
Is it a crazy idea to try to implement this? How would you functionally handle this (so that it's technically possible of course)? | 2 |
5,438,301 | 03/25/2011 21:26:36 | 117,527 | 06/04/2009 17:43:15 | 729 | 23 | Common uses of AI techniques | I am a build engineer in my current position but I dabble in applying AI techniques to improve our capabilities. What I am interested in is how your teams use AI Techniques (Pattern Recognition, Machine Learning, Bayesian Classification, or Neural Networks) in real life. I am looking for ideas on other ways of improving our processes and fun projects to start.
Examples of things I have tried:
- Naive bayesian classifier for automatically assigning class labels (misdemeanor, felony, traffic violation) to free form text entered by court reporters.
- Generated team schedule for the year using a genetic algorithm using a fitness function that assigned demerits for any scheduling conflicts, over / under allocation of team members, holidays, personal time off.
- Binary associative memory for quickly querying environment configuration information for all applications deployed to all environments; including URLs, ports, source control location, environment, server, os, etc
| artificial-intelligence | machine-learning | null | null | null | 03/26/2011 00:42:19 | not a real question | Common uses of AI techniques
===
I am a build engineer in my current position but I dabble in applying AI techniques to improve our capabilities. What I am interested in is how your teams use AI Techniques (Pattern Recognition, Machine Learning, Bayesian Classification, or Neural Networks) in real life. I am looking for ideas on other ways of improving our processes and fun projects to start.
Examples of things I have tried:
- Naive bayesian classifier for automatically assigning class labels (misdemeanor, felony, traffic violation) to free form text entered by court reporters.
- Generated team schedule for the year using a genetic algorithm using a fitness function that assigned demerits for any scheduling conflicts, over / under allocation of team members, holidays, personal time off.
- Binary associative memory for quickly querying environment configuration information for all applications deployed to all environments; including URLs, ports, source control location, environment, server, os, etc
| 1 |
7,591,968 | 09/29/2011 02:53:21 | 438,822 | 09/03/2010 09:38:01 | 240 | 0 | counting number of occurrences of an object in a list | I am trying to find the number of occurrences of an object in a list:
class Complex{
double re, im;
public:
Complex (double r, double i):re(r), im(i){}
Complex (){re = im = 0;}
friend bool operator == (Complex, Complex);
};
bool operator == (Complex a, Complex b){
return a.re == b.re and a.im == b.im;
}
template <class ContainerType, class ElementType>
int const count (ContainerType const & container, ElementType const & element){
int count = 0;
typename ContainerType::const_iterator i = std::find (container.begin(), container.end(), element);
while (i != container.end()){
++count;
i = std::find (i + 1, container.end(), element);
}
return count;
}
int main(){
std::list <Complex> lc;
lc.push_front (Complex (1.2, 3.4));
std::cout << count (std::string("abhi"), 'a') << '\n';
std::cout << count (lc, Complex (1.2, 3.4)) << '\n';
return 0;
}
I get this error with g++ 4.5:
templatizedcharOccurences.c++: In function ‘const int count(const ContainerType&, const ElementType&) [with ContainerType = std::list<Complex>, ElementType = Complex]’:
templatizedcharOccurences.c++:51:44: instantiated from here
templatizedcharOccurences.c++:41:4: error: no match for ‘operator+’ in ‘i + 1’
templatizedcharOccurences.c++:22:9: note: candidate is: Complex operator+(Complex, Complex)
Why is it complaining about `i+1`? Clearly, isn't i an iterator (pointer) and not a Complex object? | c++ | list | compiler-errors | null | null | null | open | counting number of occurrences of an object in a list
===
I am trying to find the number of occurrences of an object in a list:
class Complex{
double re, im;
public:
Complex (double r, double i):re(r), im(i){}
Complex (){re = im = 0;}
friend bool operator == (Complex, Complex);
};
bool operator == (Complex a, Complex b){
return a.re == b.re and a.im == b.im;
}
template <class ContainerType, class ElementType>
int const count (ContainerType const & container, ElementType const & element){
int count = 0;
typename ContainerType::const_iterator i = std::find (container.begin(), container.end(), element);
while (i != container.end()){
++count;
i = std::find (i + 1, container.end(), element);
}
return count;
}
int main(){
std::list <Complex> lc;
lc.push_front (Complex (1.2, 3.4));
std::cout << count (std::string("abhi"), 'a') << '\n';
std::cout << count (lc, Complex (1.2, 3.4)) << '\n';
return 0;
}
I get this error with g++ 4.5:
templatizedcharOccurences.c++: In function ‘const int count(const ContainerType&, const ElementType&) [with ContainerType = std::list<Complex>, ElementType = Complex]’:
templatizedcharOccurences.c++:51:44: instantiated from here
templatizedcharOccurences.c++:41:4: error: no match for ‘operator+’ in ‘i + 1’
templatizedcharOccurences.c++:22:9: note: candidate is: Complex operator+(Complex, Complex)
Why is it complaining about `i+1`? Clearly, isn't i an iterator (pointer) and not a Complex object? | 0 |
5,190,369 | 03/04/2011 06:16:53 | 644,218 | 03/04/2011 06:16:53 | 1 | 0 | Facebook app develop - get only friends with birthday | I was searching for this topic but with no luck.
I currently got all the friends from user (name,id,birthday).
Is there any way to prevent from checking all the friend birthday list and just get from
the user a list of friends that have birthday? (**from the Facebook birthday app reminder** )
thanks | php | facebook-graph-api | null | null | null | null | open | Facebook app develop - get only friends with birthday
===
I was searching for this topic but with no luck.
I currently got all the friends from user (name,id,birthday).
Is there any way to prevent from checking all the friend birthday list and just get from
the user a list of friends that have birthday? (**from the Facebook birthday app reminder** )
thanks | 0 |
11,076,058 | 06/18/2012 01:20:41 | 64,668 | 02/10/2009 17:06:41 | 1,514 | 60 | querying data from client using signalR | We are planning to use signalR in place of wcf dual communication, since the latter has firewall issues because of port
Everything works great so far, i am able to
1. subscribe to hub event from proxy `proxy.On<Type>()`
2. send data to clients using `Clients.MethodName(arg1, arg2)`
but iam not able to figure out if its possible for hub to query data from client. | c# | signalr | null | null | null | 06/18/2012 04:44:41 | too localized | querying data from client using signalR
===
We are planning to use signalR in place of wcf dual communication, since the latter has firewall issues because of port
Everything works great so far, i am able to
1. subscribe to hub event from proxy `proxy.On<Type>()`
2. send data to clients using `Clients.MethodName(arg1, arg2)`
but iam not able to figure out if its possible for hub to query data from client. | 3 |
6,115,615 | 05/24/2011 19:13:05 | 584,610 | 01/21/2011 15:05:55 | 72 | 0 | C code question | When I entry a value for J variable,I am receive the error.
#include<stdio.h>
int main(void)
{
int num[0][0];
int ave, i, j;
int a ,b;
int sum = 0;
printf("Enter numbers of row for i");
scanf ("%d", a);
printf("Enter numbers of column for j");
scanf ("%d", b);
printf("Input matrix elements :");
for (i = 0; i < a; i++) {
for (j = 0; j < b; j++) {
printf("\nInput element [%d][%d] : ", i, j);
scanf("%f", &num[i][j]);
}
}
printf("Your numbers are: \n");
for(i = 0; i < a; i++)
for(j = 0; j < b; j++)
printf("%4d",num[i][j]);
system("pause");
return 0;
}
Thanks, | c | null | null | null | null | 05/24/2011 20:51:25 | not a real question | C code question
===
When I entry a value for J variable,I am receive the error.
#include<stdio.h>
int main(void)
{
int num[0][0];
int ave, i, j;
int a ,b;
int sum = 0;
printf("Enter numbers of row for i");
scanf ("%d", a);
printf("Enter numbers of column for j");
scanf ("%d", b);
printf("Input matrix elements :");
for (i = 0; i < a; i++) {
for (j = 0; j < b; j++) {
printf("\nInput element [%d][%d] : ", i, j);
scanf("%f", &num[i][j]);
}
}
printf("Your numbers are: \n");
for(i = 0; i < a; i++)
for(j = 0; j < b; j++)
printf("%4d",num[i][j]);
system("pause");
return 0;
}
Thanks, | 1 |
2,194,432 | 02/03/2010 18:32:49 | 18,926 | 09/19/2008 14:55:03 | 492 | 17 | Web User Controls, Javascript and Script Managers | Is there a way to only add a script manager to your Web User Control if there is not one already on the page (on the main page or if you are using the Web User Control multiple times)?
Same question about adding javascript files to the page, many times I have controls that add the javascript into the head of the page for the control.
| asp.net | web-user-controls | null | null | null | null | open | Web User Controls, Javascript and Script Managers
===
Is there a way to only add a script manager to your Web User Control if there is not one already on the page (on the main page or if you are using the Web User Control multiple times)?
Same question about adding javascript files to the page, many times I have controls that add the javascript into the head of the page for the control.
| 0 |
10,663,168 | 05/19/2012 07:13:49 | 931,303 | 09/06/2011 18:15:59 | 598 | 15 | Add LAteX to Blender | Is it possible to add LateX symbols to blender?
For instance if I want to generate a 3D \theta on the Blender.
I've searched on google and I've got no luck. | latex | blender | null | null | null | 05/20/2012 01:27:01 | not a real question | Add LAteX to Blender
===
Is it possible to add LateX symbols to blender?
For instance if I want to generate a 3D \theta on the Blender.
I've searched on google and I've got no luck. | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.