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
9,143,270
02/04/2012 18:25:04
199,700
10/30/2009 14:43:43
1,541
30
How's my data structure?
I've put together a simple database for storing information on awards and nominations. I've tried to remove as much data redundancy as possible. Here's how it's presently looking: ![enter image description here][1] The reason for the Nominated table is that I realised that one nomination would have many nominees. For example, the award `Best Screenplay` could go to `Ken Levine and David Isaacs` or `Woody Allen` or `Joss Whedon, Andrew Stanton, Joel Cohen and Alec Sokolow`. Thanks for pointing out any possible improvements. [1]: http://i.stack.imgur.com/QV0XF.png
mysql
sql
database
database-design
data-structures
02/08/2012 06:45:09
off topic
How's my data structure? === I've put together a simple database for storing information on awards and nominations. I've tried to remove as much data redundancy as possible. Here's how it's presently looking: ![enter image description here][1] The reason for the Nominated table is that I realised that one nomination would have many nominees. For example, the award `Best Screenplay` could go to `Ken Levine and David Isaacs` or `Woody Allen` or `Joss Whedon, Andrew Stanton, Joel Cohen and Alec Sokolow`. Thanks for pointing out any possible improvements. [1]: http://i.stack.imgur.com/QV0XF.png
2
3,994,252
10/22/2010 05:50:40
244,118
01/05/2010 17:06:45
1
0
git precommit hook to ensure HEAD is up to date from master repo
I am moving my team over from an old CVS repository to using git. I was hoping to add in a precommit hook to ensure before a commit is done locally (and pushed) each person has an up to date repo. For instance, in CVS everyone would do a 'cvs up' before making changes, and then committing. I want to force it so people can't commit changes unless they have done a 'git pull origin master' first (we won't be using extra branches) Is there an easy way to do this? cheers for any help :)
git
hook
pre-commit-hook
null
null
null
open
git precommit hook to ensure HEAD is up to date from master repo === I am moving my team over from an old CVS repository to using git. I was hoping to add in a precommit hook to ensure before a commit is done locally (and pushed) each person has an up to date repo. For instance, in CVS everyone would do a 'cvs up' before making changes, and then committing. I want to force it so people can't commit changes unless they have done a 'git pull origin master' first (we won't be using extra branches) Is there an easy way to do this? cheers for any help :)
0
10,621,936
05/16/2012 15:39:07
203,948
11/05/2009 18:36:57
585
2
iTextSharp exception: PDF header signature not found
I'm using iTextSharp to read the contents of PDF documents: PdfReader reader = new PdfReader(pdfPath); using (StringWriter output = new StringWriter()) { for (int i = 1; i <= reader.NumberOfPages; i++) output.WriteLine(PdfTextExtractor.GetTextFromPage(reader, i, new SimpleTextExtractionStrategy())); reader.Close(); pdfText = output.ToString(); } 99% of the time it works just fine. However, there is this one PDF file that will sometimes throw this exception: Message: PDF header signature not found. StackTrace: at iTextSharp.text.pdf.PRTokeniser.CheckPdfHeader() at iTextSharp.text.pdf.PdfReader.ReadPdf() at iTextSharp.text.pdf.PdfReader..ctor(String filename, Byte[] ownerPassword) at Reader.PDF.DownloadPdf(String url) in C:\Documents\Visual Studio What's annoying is that I can't always reproduce the error. Sometimes it works, sometimes it doesn't. Has anyone encountered this problem?
c#
.net
pdf
itextsharp
null
null
open
iTextSharp exception: PDF header signature not found === I'm using iTextSharp to read the contents of PDF documents: PdfReader reader = new PdfReader(pdfPath); using (StringWriter output = new StringWriter()) { for (int i = 1; i <= reader.NumberOfPages; i++) output.WriteLine(PdfTextExtractor.GetTextFromPage(reader, i, new SimpleTextExtractionStrategy())); reader.Close(); pdfText = output.ToString(); } 99% of the time it works just fine. However, there is this one PDF file that will sometimes throw this exception: Message: PDF header signature not found. StackTrace: at iTextSharp.text.pdf.PRTokeniser.CheckPdfHeader() at iTextSharp.text.pdf.PdfReader.ReadPdf() at iTextSharp.text.pdf.PdfReader..ctor(String filename, Byte[] ownerPassword) at Reader.PDF.DownloadPdf(String url) in C:\Documents\Visual Studio What's annoying is that I can't always reproduce the error. Sometimes it works, sometimes it doesn't. Has anyone encountered this problem?
0
9,816,739
03/22/2012 05:08:03
1,200,334
02/09/2012 18:11:35
58
0
find files not equal to pattern
I want to find all files/dirs that are not equal to `.git*`, so I tried the following commands, but it has the opposite effect (it prints the paths that contain `.git`). $ find . ! -name "*.git" $ find . ! -name ".*.git" $ find . ! -name "*.git*" $ find . ! -regex "*.git" $ find . ! \( -name "*.git*" \) I also tried the above commands with a `\!` escape, as in `find . \! -name "*.git"`. **Q:** What's the correct syntax for `find` "not equal to"?
osx
find
null
null
null
03/23/2012 17:44:12
off topic
find files not equal to pattern === I want to find all files/dirs that are not equal to `.git*`, so I tried the following commands, but it has the opposite effect (it prints the paths that contain `.git`). $ find . ! -name "*.git" $ find . ! -name ".*.git" $ find . ! -name "*.git*" $ find . ! -regex "*.git" $ find . ! \( -name "*.git*" \) I also tried the above commands with a `\!` escape, as in `find . \! -name "*.git"`. **Q:** What's the correct syntax for `find` "not equal to"?
2
10,016,852
04/04/2012 18:08:10
1,277,019
03/18/2012 14:43:47
1
0
Seeking LinkedList variant of fixed length, sort of
I know that the title doesn't really say what I'm actually looking for, as its hard to explain in few words. What I'm looking for is a Linked List variant for Java I can iterate over, but which has something of a fixed length in a way. You see, I want to track a ground path of simulated satellite in Kerbal Space Program, with data I get from a Telemetry Plugin. But I only want to display the ground path over the last about two hours. Now the entire data would be written into the Linked List, but as time goes by the list grows longer and longer and eventually its so large that it takes longer to iterate over this list to get the data of the last two hours of the orbit then it takes for a new set of data to come in. So the Linked List variant I'm looking for would be of a somewhat fixed length that deletes the last entry(entries) if the time between the eldest and the newest entry are over two hours mission time. So that I only have to iterate over a relatively low number of entries and not the entire dataset of the previous flight (which is saved to bump it to CSV). I appreciate any help that may be rendered by the helpful people around here.
java
null
null
null
null
null
open
Seeking LinkedList variant of fixed length, sort of === I know that the title doesn't really say what I'm actually looking for, as its hard to explain in few words. What I'm looking for is a Linked List variant for Java I can iterate over, but which has something of a fixed length in a way. You see, I want to track a ground path of simulated satellite in Kerbal Space Program, with data I get from a Telemetry Plugin. But I only want to display the ground path over the last about two hours. Now the entire data would be written into the Linked List, but as time goes by the list grows longer and longer and eventually its so large that it takes longer to iterate over this list to get the data of the last two hours of the orbit then it takes for a new set of data to come in. So the Linked List variant I'm looking for would be of a somewhat fixed length that deletes the last entry(entries) if the time between the eldest and the newest entry are over two hours mission time. So that I only have to iterate over a relatively low number of entries and not the entire dataset of the previous flight (which is saved to bump it to CSV). I appreciate any help that may be rendered by the helpful people around here.
0
5,294,984
03/14/2011 05:12:13
510,555
11/17/2010 08:53:50
12
0
Is it possible to submit same app with different name?
Has anybody tried to submit the same app with different name to the app store? Assumed that the app is under the same iOS developer program account, and is not a lite version. Thanks ^m^
iphone
ios
apple
app-store
name
05/06/2012 19:50:20
off topic
Is it possible to submit same app with different name? === Has anybody tried to submit the same app with different name to the app store? Assumed that the app is under the same iOS developer program account, and is not a lite version. Thanks ^m^
2
10,956,819
06/08/2012 22:39:32
1,397,765
05/16/2012 05:40:23
7
0
Parse picture from HTML
I am trying to retrieve the image from this html data. <div class="image"> <a href="http://www.website.com/en/105/News/10217/"><img src="/images/cache/105x110/crop/images%7Ccms-image-000005554.gif" width="105" height="110" alt="kollsge (photo: author)" /></a> </div> This is my code: HTMLNode *bodyNode = [parser body]; NSArray *imageNodes = [bodyNode findChildTags:@"div"]; for (HTMLNode *imageNode in imageNodes) { if ([[imageNode getAttributeNamed:@"class"] isEqualToString:@"image"]) { NSLog(@"%@", [imageNode getAttributeNamed:@"img src"]); } } Help would be much appreciated.
html
image
parsing
null
null
null
open
Parse picture from HTML === I am trying to retrieve the image from this html data. <div class="image"> <a href="http://www.website.com/en/105/News/10217/"><img src="/images/cache/105x110/crop/images%7Ccms-image-000005554.gif" width="105" height="110" alt="kollsge (photo: author)" /></a> </div> This is my code: HTMLNode *bodyNode = [parser body]; NSArray *imageNodes = [bodyNode findChildTags:@"div"]; for (HTMLNode *imageNode in imageNodes) { if ([[imageNode getAttributeNamed:@"class"] isEqualToString:@"image"]) { NSLog(@"%@", [imageNode getAttributeNamed:@"img src"]); } } Help would be much appreciated.
0
312,003
11/23/2008 01:48:21
23,903
09/16/2008 16:05:24
647
25
What is the most ridiculous pessimization you've seen?
We all know that premature optimization is the root of all evil because it leads to unreadable/unmaintainable code. Even worse is pessimization, when someone implements an "optimization" because they *think* it will be faster, but it ends up being slower, as well as being buggy, unmaintainable, etc. What is the most ridiculous example of this that you've seen?
performance
optimization
fun
null
null
10/25/2011 15:30:27
not constructive
What is the most ridiculous pessimization you've seen? === We all know that premature optimization is the root of all evil because it leads to unreadable/unmaintainable code. Even worse is pessimization, when someone implements an "optimization" because they *think* it will be faster, but it ends up being slower, as well as being buggy, unmaintainable, etc. What is the most ridiculous example of this that you've seen?
4
2,825,535
05/13/2010 09:09:51
225,872
12/06/2009 17:32:31
38
2
Emacs CEDET and system include paths
I'd like to add path to the openMPI library headers. So, after i found all openMPI headers are in /usr/lib/openmpi/include/* i added these two lines to my .emacs: (semantic-add-system-include "/usr/lib/openmpi/include" 'c-mode) (semantic-add-system-include "/usr/lib/openmpi/include" 'c++-mode) I think this is ok, but it's not working! This is the result of semantic-c-describe-envirnoment command: >This file's system include path is: /usr/include /usr/local/include/ /usr/lib/gcc/i486-linux-gnu/4.4.3/include/ /usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/ /usr/include/ Can't figure out what's wrong or what i'm missing Thanks
emacs
cedet
null
null
null
null
open
Emacs CEDET and system include paths === I'd like to add path to the openMPI library headers. So, after i found all openMPI headers are in /usr/lib/openmpi/include/* i added these two lines to my .emacs: (semantic-add-system-include "/usr/lib/openmpi/include" 'c-mode) (semantic-add-system-include "/usr/lib/openmpi/include" 'c++-mode) I think this is ok, but it's not working! This is the result of semantic-c-describe-envirnoment command: >This file's system include path is: /usr/include /usr/local/include/ /usr/lib/gcc/i486-linux-gnu/4.4.3/include/ /usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/ /usr/include/ Can't figure out what's wrong or what i'm missing Thanks
0
7,317,168
09/06/2011 08:43:57
585,919
01/22/2011 20:47:22
380
5
Mobile IP basics
I am a newbie in Mobile IP. Can somebody explain me the meaning of the phrase "changing the link-layer point of attachment to the Internet, yet without changing its IP address". Thanks in advance
mobile
null
null
null
null
09/06/2011 17:42:46
off topic
Mobile IP basics === I am a newbie in Mobile IP. Can somebody explain me the meaning of the phrase "changing the link-layer point of attachment to the Internet, yet without changing its IP address". Thanks in advance
2
9,954,837
03/31/2012 09:46:53
864,113
07/26/2011 18:57:53
13
2
Hash table in bynary file
There is a hash_table structure written by me. Hash_table stores huge structure, that keeps strings, numbers, other structures etc. I want dumping to file and pick up hash_table as fast as possible. If all data will be converted in string representation, it will not be effective. I can't invent format of binary file. Working with file will be simply: - read all hash_table at first time; - write all hash_table later. Thanks in advance.
c
hashtable
binaryfiles
null
null
03/31/2012 10:00:46
not a real question
Hash table in bynary file === There is a hash_table structure written by me. Hash_table stores huge structure, that keeps strings, numbers, other structures etc. I want dumping to file and pick up hash_table as fast as possible. If all data will be converted in string representation, it will not be effective. I can't invent format of binary file. Working with file will be simply: - read all hash_table at first time; - write all hash_table later. Thanks in advance.
1
10,648,345
05/18/2012 07:20:36
1,324,419
04/10/2012 15:21:02
25
1
timer to count up the time and displaying from login onwards in jsp
In my application i want to show the timer to the end user from his login in to the application.i.e, Count time up only.. in jsp either using javascript or java code.. I want to display the time in multiple jsp pages till user log out of the application. So which is good using java code or java script?? Thanks in Advance.
javascript
jsp
timer
stopwatch
null
05/18/2012 15:08:47
not a real question
timer to count up the time and displaying from login onwards in jsp === In my application i want to show the timer to the end user from his login in to the application.i.e, Count time up only.. in jsp either using javascript or java code.. I want to display the time in multiple jsp pages till user log out of the application. So which is good using java code or java script?? Thanks in Advance.
1
11,547,382
07/18/2012 17:50:15
665,578
03/18/2011 05:49:54
127
15
sublime - how to save file on close automatically
How do I configure Sublime 2 to save files automatically that I close? It should behave like, User opens file, makes edits, closes file, and the edits are automatically saved even though the user did not manually save the edited file. This is close, but I want it to save on file close rather than lose focus. http://docs.sublimetext.info/en/latest/reference/settings.html save_on_focus_lost
editor
text-editor
sublimetext2
null
null
null
open
sublime - how to save file on close automatically === How do I configure Sublime 2 to save files automatically that I close? It should behave like, User opens file, makes edits, closes file, and the edits are automatically saved even though the user did not manually save the edited file. This is close, but I want it to save on file close rather than lose focus. http://docs.sublimetext.info/en/latest/reference/settings.html save_on_focus_lost
0
5,670,260
04/14/2011 22:04:28
682,216
03/29/2011 14:10:20
1
0
Android: Best way to automatic connect to a webservice, without user interaction
I am new in android development and I am doing an application that needs to auto-connect to a webservice every X amount of time. For example connect to retrieve data every 30 seconds, without the user's interaction. I tried with android.os.Handler but the problem with this Object is that it is running in the ui thread, so when the connection takes to much time the UI freeze... The only way that I found to do this is to use asynctast and in onPostexecute() call again to the same Asynctask Object, something like that: public class ScheduledAsyncTask extends AsyncTasc<Void..., Void..., Void..> { doInBackground() { Thread.sleep(30000); //30 seconds... // connect to the server and retrieve data... } onPostExecute() { // show new data to the user ScheduledAsyncTask task = new ScheduledAsyncTask(); task.execute(); } } This works great but I assume is not the best way to do it. All suggestions are welcome. Thanks in advance,
android
null
null
null
null
null
open
Android: Best way to automatic connect to a webservice, without user interaction === I am new in android development and I am doing an application that needs to auto-connect to a webservice every X amount of time. For example connect to retrieve data every 30 seconds, without the user's interaction. I tried with android.os.Handler but the problem with this Object is that it is running in the ui thread, so when the connection takes to much time the UI freeze... The only way that I found to do this is to use asynctast and in onPostexecute() call again to the same Asynctask Object, something like that: public class ScheduledAsyncTask extends AsyncTasc<Void..., Void..., Void..> { doInBackground() { Thread.sleep(30000); //30 seconds... // connect to the server and retrieve data... } onPostExecute() { // show new data to the user ScheduledAsyncTask task = new ScheduledAsyncTask(); task.execute(); } } This works great but I assume is not the best way to do it. All suggestions are welcome. Thanks in advance,
0
1,169,527
07/23/2009 03:55:40
63,235
02/06/2009 08:35:13
913
1
Windows Forms class partial public issue
I am using VSTS 2008 + C# + .Net 2.0 to develop Windows Forms application. I found by default, the new Form we created will be marked as public partial. My concern is whether expose class as public has any security risks? Should we mark it as private? Any impact for functionality if we mark it as private? BTW: I met with compile error when marking the class from public partial as private. Here is the compile error message, any ideas what is wrong? Error 1 Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal C:\FooTest\Form1.Designer.cs thanks in advance, George
.net
c#
vsts2008
winforms
class
null
open
Windows Forms class partial public issue === I am using VSTS 2008 + C# + .Net 2.0 to develop Windows Forms application. I found by default, the new Form we created will be marked as public partial. My concern is whether expose class as public has any security risks? Should we mark it as private? Any impact for functionality if we mark it as private? BTW: I met with compile error when marking the class from public partial as private. Here is the compile error message, any ideas what is wrong? Error 1 Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal C:\FooTest\Form1.Designer.cs thanks in advance, George
0
7,795,318
10/17/2011 14:35:21
999,344
10/17/2011 14:23:58
1
0
Using Org-Mode With the Gnome 3 Calendar
Gnome 3 has [a beautiful calendar panel][1] that drops down from the menu bar, and includes a space for your upcoming appointments. By default this appointment manager reads from the calendar in Evolution Mail. I was curious as to whether it's possible to get it working with Org-Mode. I know Evolution can import .ics files and Org-Mode can write them, so that's a start. Does anyone have thoughts as to how you might (a) get the Gnome 3 Calendar working directly with Org-Mode, or (b) set up an efficient sync between Org-Mode and Evolution Mail's calendar, such that it would be reflected in the Gnome 3 Calendar panel? [1]: http://davidz25.blogspot.com/2011/01/gnome-3-calendar.html
org-mode
gnome-3
null
null
null
null
open
Using Org-Mode With the Gnome 3 Calendar === Gnome 3 has [a beautiful calendar panel][1] that drops down from the menu bar, and includes a space for your upcoming appointments. By default this appointment manager reads from the calendar in Evolution Mail. I was curious as to whether it's possible to get it working with Org-Mode. I know Evolution can import .ics files and Org-Mode can write them, so that's a start. Does anyone have thoughts as to how you might (a) get the Gnome 3 Calendar working directly with Org-Mode, or (b) set up an efficient sync between Org-Mode and Evolution Mail's calendar, such that it would be reflected in the Gnome 3 Calendar panel? [1]: http://davidz25.blogspot.com/2011/01/gnome-3-calendar.html
0
11,558,756
07/19/2012 10:21:53
1,537,577
07/19/2012 10:19:57
1
0
Embedding gimp in another application
Just wondering if it is possible to embed GIMP into another application. I am building an app that requires some image editing within that app; how do I use GIMP as an embedded editor? The application uses gtkmm.
gtkmm
null
null
null
null
null
open
Embedding gimp in another application === Just wondering if it is possible to embed GIMP into another application. I am building an app that requires some image editing within that app; how do I use GIMP as an embedded editor? The application uses gtkmm.
0
6,641,956
07/10/2011 15:31:10
830,651
07/06/2011 00:22:24
1
0
Delete old files from document directory
I would like to delete old files (15 days) from my document directory
objective-c
xcode
null
null
null
07/12/2011 02:28:59
not a real question
Delete old files from document directory === I would like to delete old files (15 days) from my document directory
1
5,181,905
03/03/2011 14:18:54
561,621
01/03/2011 18:44:09
3
1
C# adding data to SQL database
Background: I am trying to add data to a SQL DB with C#. I am currently doing so in my script in another class so im using the same code (the code works). However, my current class is using a bunch of recycled code and i am having issues narrowing down why i can not write to the DB. Below is the code i am using and it is broken down to the bare bones minimum code. What I'm asking for: anyone to point out some dumb mistake i made or ideas where to troubleshoot. Currently i am just staring at this code and cant see whats wrong. Thanks in advance! public void AddAttachmentToDB(XmlNode root, XmlNamespaceManager xmlns, string MessageID, string MailBoxAliasName) { //open DB #region Open DB if (DbConnection.State != System.Data.ConnectionState.Open) { try { this.DbConnection.ConnectionString = DbConnectionString; this.DbConnection.Open(); MailboxListener._logging.LogWrite("[{0}] opened DB Connection in AddAttachmentToDB!", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.DbConnectionString); } catch (Exception ex) { MailboxListener._logging.LogWrite("[{0}] Failed to open DB Connection! For Machine: {1}", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.DbConnectionString); MailboxListener._logging.LogWrite("[{0}] Error Returned: {1}", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex.Message.ToString()); } } else { MailboxListener._logging.LogWrite("[{0}] Failed to open DB Connection in AddAttachmentToDB!", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.DbConnectionString); } #endregion //once db is open try this try { //create test variables string strMailBoxAliasName = MailBoxAliasName; string AttachmentFilename = string.Empty; string strfiletype = string.Empty; string AttachmentStream = string.Empty; string strAttachmentID = string.Empty; string strMessageID = string.Empty; string dates123 = string.Empty; strMessageID = MessageID; //fill test variables AttachmentFilename = "yumyum"; AttachmentStream = "Cheetos"; strMessageID = "123"; strMailBoxAliasName = "user"; strfiletype = ".txt"; strAttachmentID = "12345"; dates123 = "03/02/11"; //create sql insert string String insString = @"INSERT INTO MailboxListenerAttachments Values (@attachmentfilename, @attachmentbody, @messageID, @mailboxname, @filetype, @attachmentID, @DateAddedToDB)"; //create sql command string SqlCommand myCommand = new SqlCommand(insString, this.DbConnection); //add fill test variables to sql insert string myCommand.Parameters.Add("@attachmentfilename", SqlDbType.VarChar, 100); myCommand.Parameters["@attachmentfilename"].Value = AttachmentFilename; myCommand.Parameters.Add("@attachmentbody", SqlDbType.VarChar, 8000); myCommand.Parameters["@attachmentbody"].Value = AttachmentStream.Trim(); myCommand.Parameters.Add("@messageID", SqlDbType.VarChar, 500); myCommand.Parameters["@messageID"].Value = strMessageID; myCommand.Parameters.Add("@mailboxname", SqlDbType.VarChar, 100); myCommand.Parameters["@mailboxname"].Value = strMailBoxAliasName; myCommand.Parameters.Add("@filetype", SqlDbType.VarChar, 50); myCommand.Parameters["@filetype"].Value = strfiletype; myCommand.Parameters.Add("@attachmentID", SqlDbType.VarChar, 50); myCommand.Parameters["@attachmentID"].Value = strAttachmentID; myCommand.Parameters.Add("@DateAddedToDB", SqlDbType.DateTime); myCommand.Parameters["@DateAddedToDB"].Value = dates123; //run sql command myCommand.ExecuteNonQuery(); //log sql command events MailboxListener._logging.LogWrite( "[{0}] Added attachment {1} to database for messageID: {2}", LoggingLevels.Informational, System.Reflection.MethodBase.GetCurrentMethod().ToString(), AttachmentFilename, strMessageID ); //if DB is open, close it if (DbConnection.State == System.Data.ConnectionState.Open) { this.DbConnection.Close(); } } //catch errors catch (Exception ex) { MailboxListener._logging.LogWrite("[{0}] Error Returned: {1}", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex.Message.ToString()); } }
c#
sql
null
null
null
null
open
C# adding data to SQL database === Background: I am trying to add data to a SQL DB with C#. I am currently doing so in my script in another class so im using the same code (the code works). However, my current class is using a bunch of recycled code and i am having issues narrowing down why i can not write to the DB. Below is the code i am using and it is broken down to the bare bones minimum code. What I'm asking for: anyone to point out some dumb mistake i made or ideas where to troubleshoot. Currently i am just staring at this code and cant see whats wrong. Thanks in advance! public void AddAttachmentToDB(XmlNode root, XmlNamespaceManager xmlns, string MessageID, string MailBoxAliasName) { //open DB #region Open DB if (DbConnection.State != System.Data.ConnectionState.Open) { try { this.DbConnection.ConnectionString = DbConnectionString; this.DbConnection.Open(); MailboxListener._logging.LogWrite("[{0}] opened DB Connection in AddAttachmentToDB!", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.DbConnectionString); } catch (Exception ex) { MailboxListener._logging.LogWrite("[{0}] Failed to open DB Connection! For Machine: {1}", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.DbConnectionString); MailboxListener._logging.LogWrite("[{0}] Error Returned: {1}", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex.Message.ToString()); } } else { MailboxListener._logging.LogWrite("[{0}] Failed to open DB Connection in AddAttachmentToDB!", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), this.DbConnectionString); } #endregion //once db is open try this try { //create test variables string strMailBoxAliasName = MailBoxAliasName; string AttachmentFilename = string.Empty; string strfiletype = string.Empty; string AttachmentStream = string.Empty; string strAttachmentID = string.Empty; string strMessageID = string.Empty; string dates123 = string.Empty; strMessageID = MessageID; //fill test variables AttachmentFilename = "yumyum"; AttachmentStream = "Cheetos"; strMessageID = "123"; strMailBoxAliasName = "user"; strfiletype = ".txt"; strAttachmentID = "12345"; dates123 = "03/02/11"; //create sql insert string String insString = @"INSERT INTO MailboxListenerAttachments Values (@attachmentfilename, @attachmentbody, @messageID, @mailboxname, @filetype, @attachmentID, @DateAddedToDB)"; //create sql command string SqlCommand myCommand = new SqlCommand(insString, this.DbConnection); //add fill test variables to sql insert string myCommand.Parameters.Add("@attachmentfilename", SqlDbType.VarChar, 100); myCommand.Parameters["@attachmentfilename"].Value = AttachmentFilename; myCommand.Parameters.Add("@attachmentbody", SqlDbType.VarChar, 8000); myCommand.Parameters["@attachmentbody"].Value = AttachmentStream.Trim(); myCommand.Parameters.Add("@messageID", SqlDbType.VarChar, 500); myCommand.Parameters["@messageID"].Value = strMessageID; myCommand.Parameters.Add("@mailboxname", SqlDbType.VarChar, 100); myCommand.Parameters["@mailboxname"].Value = strMailBoxAliasName; myCommand.Parameters.Add("@filetype", SqlDbType.VarChar, 50); myCommand.Parameters["@filetype"].Value = strfiletype; myCommand.Parameters.Add("@attachmentID", SqlDbType.VarChar, 50); myCommand.Parameters["@attachmentID"].Value = strAttachmentID; myCommand.Parameters.Add("@DateAddedToDB", SqlDbType.DateTime); myCommand.Parameters["@DateAddedToDB"].Value = dates123; //run sql command myCommand.ExecuteNonQuery(); //log sql command events MailboxListener._logging.LogWrite( "[{0}] Added attachment {1} to database for messageID: {2}", LoggingLevels.Informational, System.Reflection.MethodBase.GetCurrentMethod().ToString(), AttachmentFilename, strMessageID ); //if DB is open, close it if (DbConnection.State == System.Data.ConnectionState.Open) { this.DbConnection.Close(); } } //catch errors catch (Exception ex) { MailboxListener._logging.LogWrite("[{0}] Error Returned: {1}", LoggingLevels.Error, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex.Message.ToString()); } }
0
2,941,946
05/31/2010 07:16:23
140,803
07/18/2009 22:24:32
1,219
71
Does GAE/OpenID/OAuth support xmlhttp proxy?
Currently, my code would construct the GWT form, which user would submit directly to openId (or any authenticaiton service). Such a method works fine. However, what if I had the gwt page server access the OpenID provider, is there a way/strategy for the server to mediate authentication between its client and the auth provider? I wish to know the answers with respect to - GAE as the proxy and, regardless if GAE or Tomcat is the intended proxy, answers wrt - Google Accounts - OpenID - OAuth If so, it would be wonderful if someone could describe the installation strategy.
java
openid
oauth
http-proxy
gae
null
open
Does GAE/OpenID/OAuth support xmlhttp proxy? === Currently, my code would construct the GWT form, which user would submit directly to openId (or any authenticaiton service). Such a method works fine. However, what if I had the gwt page server access the OpenID provider, is there a way/strategy for the server to mediate authentication between its client and the auth provider? I wish to know the answers with respect to - GAE as the proxy and, regardless if GAE or Tomcat is the intended proxy, answers wrt - Google Accounts - OpenID - OAuth If so, it would be wonderful if someone could describe the installation strategy.
0
8,630,906
12/25/2011 18:32:05
986,739
10/09/2011 20:41:24
27
0
How to save WebBrowser page in wp7?
I have WebBrowser control in my WP7 app I want to save the page in HTML or PDF or JPG file in isolated memory for read it later.
c#
silverlight
windows-phone-7
webbrowser
null
null
open
How to save WebBrowser page in wp7? === I have WebBrowser control in my WP7 app I want to save the page in HTML or PDF or JPG file in isolated memory for read it later.
0
8,972,242
01/23/2012 13:16:53
938,268
09/10/2011 14:37:12
125
1
adding focus listener to a textarea that doesnt get created until the tree cell is clicked
I have two classes `LayoutListener` and `LayoutClass` `LayoutListener` contains the listeners for the JButtons and a focus listener for the TextArea. A JTextArea is created when a tree cell is clicked. The buttons are created when the class is created. `LayoutListener` only knows about `LayoutClass` I can create the ActionListeners for the buttons fine because the buttons are actually created with the class, however because the textarea isn't actually created until the cell is clicked I can't set a focus listener from `LayoutListener` . What I've tried to do it put a method in `LayoutClass` public void addTextAreaFocusListener(FocusListener action){ focusAction = action; } when the textArea gets created I do textArea.addFocusListener(focusAction); This doesn't work. I'm not sure what else to try. :(
java
null
null
null
null
02/01/2012 17:23:00
too localized
adding focus listener to a textarea that doesnt get created until the tree cell is clicked === I have two classes `LayoutListener` and `LayoutClass` `LayoutListener` contains the listeners for the JButtons and a focus listener for the TextArea. A JTextArea is created when a tree cell is clicked. The buttons are created when the class is created. `LayoutListener` only knows about `LayoutClass` I can create the ActionListeners for the buttons fine because the buttons are actually created with the class, however because the textarea isn't actually created until the cell is clicked I can't set a focus listener from `LayoutListener` . What I've tried to do it put a method in `LayoutClass` public void addTextAreaFocusListener(FocusListener action){ focusAction = action; } when the textArea gets created I do textArea.addFocusListener(focusAction); This doesn't work. I'm not sure what else to try. :(
3
1,051,428
06/26/2009 21:53:46
129,421
06/26/2009 13:24:33
1
0
What are the best tools for the beta version of Silverlight 3?
What is the best set of tools to use for developing Silverlight 3 applications while it is in beta? I want to be able to easily transition into the released version when it comes out.
silverlight-3.0
null
null
null
null
09/20/2011 14:16:55
not constructive
What are the best tools for the beta version of Silverlight 3? === What is the best set of tools to use for developing Silverlight 3 applications while it is in beta? I want to be able to easily transition into the released version when it comes out.
4
11,010,106
06/13/2012 07:30:36
459,863
09/27/2010 19:37:25
1,271
54
What search engine API is both general purpose and returns the number of results?
It seems surprisingly difficult to run search queries programmatically via an API against the major engines. * Google doesn't have a general purpose API for its search, apparently and surprisingly. They have a "custom search engine" which is designed to for adding a Google-powered search box to a given site and to return results only from a couple of domains. Their [signup page][1] demands the entry of the sites to search. I tried entering "*.google.com/*" and some variations here, but that's not giving me the same results (in particular no hits when the web search is giving me results) on some obscure terms that I care about. * Bing search does have an [API][2], but the API doesn't report the total number of hits, which is a requirement for my application. * DuckDuckGo has an [API][3], but it doesn't seem to query the same database as the web search. * Blekko has an [API][4], but it's rate limited at 1 request/second. I haven't tried asking what they pricing structure is. * I haven't tried Yahoo. Note that I'm happy and willing to pay for this, but still I can't find a service. Any help is appreciated. [1]: http://www.google.com/cse/manage/create [2]: https://datamarket.azure.com/dataset/8818f55e-2fe5-4ce3-a617-0b8ba8419f65 [3]: http://duckduckgo.com/api.html [4]: http://help.blekko.com/index.php/does-blekko-have-an-api/
search
google-api
bing-api
null
null
07/14/2012 14:17:01
not constructive
What search engine API is both general purpose and returns the number of results? === It seems surprisingly difficult to run search queries programmatically via an API against the major engines. * Google doesn't have a general purpose API for its search, apparently and surprisingly. They have a "custom search engine" which is designed to for adding a Google-powered search box to a given site and to return results only from a couple of domains. Their [signup page][1] demands the entry of the sites to search. I tried entering "*.google.com/*" and some variations here, but that's not giving me the same results (in particular no hits when the web search is giving me results) on some obscure terms that I care about. * Bing search does have an [API][2], but the API doesn't report the total number of hits, which is a requirement for my application. * DuckDuckGo has an [API][3], but it doesn't seem to query the same database as the web search. * Blekko has an [API][4], but it's rate limited at 1 request/second. I haven't tried asking what they pricing structure is. * I haven't tried Yahoo. Note that I'm happy and willing to pay for this, but still I can't find a service. Any help is appreciated. [1]: http://www.google.com/cse/manage/create [2]: https://datamarket.azure.com/dataset/8818f55e-2fe5-4ce3-a617-0b8ba8419f65 [3]: http://duckduckgo.com/api.html [4]: http://help.blekko.com/index.php/does-blekko-have-an-api/
4
6,478,837
06/25/2011 15:55:14
636,741
02/27/2011 19:00:03
1
0
Popen falling in Solaris platform
I am facing a weird problem. I was using popen call to get a particular work done and if worked successfully until now. Recently i am getting broken pipe error when i execute the program. I just want to know why was this problem not seen earlier. And one more thing, there was no changes made to the environment on Solaris platform. The same code work on Linux(RHEL) with out throwing broken pipe error. Can you help me in figuring out why??? Thanks in Advance!!!!!!!! Manoj
c++
solaris
popen
null
null
06/27/2011 03:03:12
not a real question
Popen falling in Solaris platform === I am facing a weird problem. I was using popen call to get a particular work done and if worked successfully until now. Recently i am getting broken pipe error when i execute the program. I just want to know why was this problem not seen earlier. And one more thing, there was no changes made to the environment on Solaris platform. The same code work on Linux(RHEL) with out throwing broken pipe error. Can you help me in figuring out why??? Thanks in Advance!!!!!!!! Manoj
1
8,734,424
01/04/2012 21:37:48
1,006,878
10/21/2011 10:15:05
21
0
Granularity in Hibernate
Can anybody please explain me the term 'Problem of Granularity' in Hibernate? I'm new to Hibernate & i appreciate any suggestion/advice/opinion regarding this. Thanks, Sourav
hibernate
null
null
null
null
01/05/2012 14:50:11
not a real question
Granularity in Hibernate === Can anybody please explain me the term 'Problem of Granularity' in Hibernate? I'm new to Hibernate & i appreciate any suggestion/advice/opinion regarding this. Thanks, Sourav
1
11,110,088
06/19/2012 21:56:57
130,768
06/30/2009 01:39:30
166
4
Load on Heroku Instance seen in heroku run top
When I run `heroku run top` on my server I see a very high load, currently 36.37 I realise this is probably not the dyno that runs the app, but it does seem very high to me, does this explain poor performance in heroku from time to time? Additionally, where in the architecture is heroku running my command? Any insight would be much appreciated
ruby-on-rails
heroku
cedar
null
null
null
open
Load on Heroku Instance seen in heroku run top === When I run `heroku run top` on my server I see a very high load, currently 36.37 I realise this is probably not the dyno that runs the app, but it does seem very high to me, does this explain poor performance in heroku from time to time? Additionally, where in the architecture is heroku running my command? Any insight would be much appreciated
0
5,607,946
04/09/2011 21:12:08
700,330
04/09/2011 21:12:08
1
0
"Bresenham's" circle algorithm filling question
I've implemented "Bresenham's" (midpoint) algorithm to plot circles, and everything went well (C++ and OpenGL). I am wondering now if it is possible to use the same algorithm to fill the circles? Take the following few circles for example: http://imgur.com/S0Qy6 which are plotted with the following algorithm: void circle(Point p, int r) { int x = 0; int y = r; int f = 1-r; // plot vert/horiz points indepedently while (x<y) { x++; if (f<0) { f += 2*x+1; } else { y--; f += 2*(x-y+1); } glRecti(p.x+x, p.y+y, p.x+x+1, p.y+y+1); // plot other points using 8 way symmetry // attempt to fill the circle - didn't go well plotLine(Point(p.x, p.y+x), Point(p.x+x, p.y+x)); } } I think the best place to put the filling bit would be in my main loop, as I want to essentially fill each quadrant again via 8-way symmetry. So I added my plotLine call, but what I ended up with was a strangely filled circle instead: http://imgur.com/jQW7B If I then color the circles differently, I end up with horizontal banded stripes rather than actual filled circles - my approach is obviously wrong, but I'm not sure how to fix it.
c++
algorithm
null
null
null
null
open
"Bresenham's" circle algorithm filling question === I've implemented "Bresenham's" (midpoint) algorithm to plot circles, and everything went well (C++ and OpenGL). I am wondering now if it is possible to use the same algorithm to fill the circles? Take the following few circles for example: http://imgur.com/S0Qy6 which are plotted with the following algorithm: void circle(Point p, int r) { int x = 0; int y = r; int f = 1-r; // plot vert/horiz points indepedently while (x<y) { x++; if (f<0) { f += 2*x+1; } else { y--; f += 2*(x-y+1); } glRecti(p.x+x, p.y+y, p.x+x+1, p.y+y+1); // plot other points using 8 way symmetry // attempt to fill the circle - didn't go well plotLine(Point(p.x, p.y+x), Point(p.x+x, p.y+x)); } } I think the best place to put the filling bit would be in my main loop, as I want to essentially fill each quadrant again via 8-way symmetry. So I added my plotLine call, but what I ended up with was a strangely filled circle instead: http://imgur.com/jQW7B If I then color the circles differently, I end up with horizontal banded stripes rather than actual filled circles - my approach is obviously wrong, but I'm not sure how to fix it.
0
8,839,287
01/12/2012 17:17:11
1,145,954
01/12/2012 16:28:14
1
0
How to edit inline objects with reverse generic relation in Admin Panel?
I would like to be able to add inline Image objects to Gallery in Admin (as I try it in admin.py below). Problem is that Image model doesn't have content_type field. It raises exception. I would like to do the same with Videos objects. Here are my models.py and admin.py and more description below **My models.py** # -*- coding: utf-8 -*- # Create your models here. from apps.util import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils.translation import ugettext_lazy as _ class Image(models.Model): """ """ title = models.CharField(_('Title'), max_length=255) image = models.ImageField(upload_to="images") pub_date = models.DateTimeField(_('Date published')) def __unicode__(self): return self.title class Video(models.Model): title = models.CharField(_('Title'), max_length=255) video = models.FileField(upload_to="videos") pub_date = models.DateTimeField(_('Date published')) def __unicode__(self): return self.title class Gallery(models.Model): title = models.CharField(_('Title'), max_length=255) pub_date = models.DateTimeField(_('Date published')) def __unicode__(self): return self.title class GalleryItem(models.Model): gallery = models.ForeignKey(Gallery) content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') def __unicode__(self): return str(self.object_id) **My admin.py** from django.contrib import admin from apps.webmachinist.media.models import * from apps.webmachinist.portfolio.models import * from django.contrib.contenttypes import generic class GalleryInline(generic.GenericTabularInline): model = Image class GalleryAdmin(admin.ModelAdmin): inlines = [ GalleryInline, ] admin.site.register(Image) admin.site.register(Video) admin.site.register(Gallery, GalleryAdmin) admin.site.register(GalleryItem) admin.site.register(PortfolioEntry) **I can do it easily in reverse way: to add Gallery to an Image, like that:** class GalleryInline(generic.GenericTabularInline): model = GalleryItem class GalleryAdmin(admin.ModelAdmin): inlines = [ GalleryInline, ] admin.site.register(Image, GalleryAdmin) **Then I can choose by Gallery title, though inline is for GalleryItems But it's not what I want. I just want to add Images to Galleries (and later Videos) not Galleries to Images.** **Can it be done easily?**
django
django-admin
contenttype
inlines
null
null
open
How to edit inline objects with reverse generic relation in Admin Panel? === I would like to be able to add inline Image objects to Gallery in Admin (as I try it in admin.py below). Problem is that Image model doesn't have content_type field. It raises exception. I would like to do the same with Videos objects. Here are my models.py and admin.py and more description below **My models.py** # -*- coding: utf-8 -*- # Create your models here. from apps.util import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils.translation import ugettext_lazy as _ class Image(models.Model): """ """ title = models.CharField(_('Title'), max_length=255) image = models.ImageField(upload_to="images") pub_date = models.DateTimeField(_('Date published')) def __unicode__(self): return self.title class Video(models.Model): title = models.CharField(_('Title'), max_length=255) video = models.FileField(upload_to="videos") pub_date = models.DateTimeField(_('Date published')) def __unicode__(self): return self.title class Gallery(models.Model): title = models.CharField(_('Title'), max_length=255) pub_date = models.DateTimeField(_('Date published')) def __unicode__(self): return self.title class GalleryItem(models.Model): gallery = models.ForeignKey(Gallery) content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') def __unicode__(self): return str(self.object_id) **My admin.py** from django.contrib import admin from apps.webmachinist.media.models import * from apps.webmachinist.portfolio.models import * from django.contrib.contenttypes import generic class GalleryInline(generic.GenericTabularInline): model = Image class GalleryAdmin(admin.ModelAdmin): inlines = [ GalleryInline, ] admin.site.register(Image) admin.site.register(Video) admin.site.register(Gallery, GalleryAdmin) admin.site.register(GalleryItem) admin.site.register(PortfolioEntry) **I can do it easily in reverse way: to add Gallery to an Image, like that:** class GalleryInline(generic.GenericTabularInline): model = GalleryItem class GalleryAdmin(admin.ModelAdmin): inlines = [ GalleryInline, ] admin.site.register(Image, GalleryAdmin) **Then I can choose by Gallery title, though inline is for GalleryItems But it's not what I want. I just want to add Images to Galleries (and later Videos) not Galleries to Images.** **Can it be done easily?**
0
9,107,917
02/02/2012 06:12:45
49,644
12/28/2008 22:01:09
654
18
Ruby gem to generate GIF CSS sprites from PNGs?
Is there a Ruby gem that can generate CSS sprites from PNG images by combining them into a GIF? I am looking for one that supports command line. I found several but they either work only with Rails or can only produce PNG sprites, never gifs.
css
ruby
gem
png
css-sprites
null
open
Ruby gem to generate GIF CSS sprites from PNGs? === Is there a Ruby gem that can generate CSS sprites from PNG images by combining them into a GIF? I am looking for one that supports command line. I found several but they either work only with Rails or can only produce PNG sprites, never gifs.
0
6,690,876
07/14/2011 09:08:29
631,613
02/24/2011 04:04:24
26
1
Do you know a similar program for watch (unix watch command) on Windows ?
I find unxutils and and gnuwin32 Packages don't have this command...
windows
unix
unix-utils
null
null
null
open
Do you know a similar program for watch (unix watch command) on Windows ? === I find unxutils and and gnuwin32 Packages don't have this command...
0
8,815,727
01/11/2012 07:36:12
1,074,781
12/01/2011 05:22:18
6
0
how to add attachment with MailCore frameWork
Hello I am new and I am making an application with send and recieve mail through smtp ,MailCore is working with simple mail trasfer and recieving but I am not able to attach any file ,please tell me if anyone knows how to add attachment.please tell me if there is any source code.. Thanks in Advance
xcode
cocoa
mailcore
null
null
01/12/2012 16:20:50
not a real question
how to add attachment with MailCore frameWork === Hello I am new and I am making an application with send and recieve mail through smtp ,MailCore is working with simple mail trasfer and recieving but I am not able to attach any file ,please tell me if anyone knows how to add attachment.please tell me if there is any source code.. Thanks in Advance
1
9,886,369
03/27/2012 09:04:53
1,079,392
12/03/2011 20:34:46
117
0
Javascript : call a C# function
firstly i have searched a lot and all topics seems to be C# : call or invoke a JavaScript function but i want to do the opposite , i want to create a function on C# and also on JavaScript and i want the JavaScript function call the C# function and retrieve it`s data , it seems like a good questions . The problem is that i have no knowledge on web and i do not know how does it work , but i tried a sample : Created a class : public interface IFoo { string Bar { get; set; } } public class Foo : IFoo { public string Bar { get; set; } } Then public partial class Form1 : Form { public Form1() { InitializeComponent(); } public IFoo CreateFoo() { return new Foo() { Bar = "somevalue" }; } public string Bar(IFoo foo) { return foo.Bar; } } And Javascript Code : <script type="text/javascript" language="javascript" > function Callme(){ alert('Js function start . keep pressing OK') var foo = external.CreateFoo(); alert(foo.Bar); foo.Bar = "qwer"; alert(external.Bar(foo)); } </script> I get Error from the webbrowser control : Error : "external" is null or not an object But the javascript is not showing anything , please guide me if i missed something.
c#
javascript
.net
connection
webbrowser
null
open
Javascript : call a C# function === firstly i have searched a lot and all topics seems to be C# : call or invoke a JavaScript function but i want to do the opposite , i want to create a function on C# and also on JavaScript and i want the JavaScript function call the C# function and retrieve it`s data , it seems like a good questions . The problem is that i have no knowledge on web and i do not know how does it work , but i tried a sample : Created a class : public interface IFoo { string Bar { get; set; } } public class Foo : IFoo { public string Bar { get; set; } } Then public partial class Form1 : Form { public Form1() { InitializeComponent(); } public IFoo CreateFoo() { return new Foo() { Bar = "somevalue" }; } public string Bar(IFoo foo) { return foo.Bar; } } And Javascript Code : <script type="text/javascript" language="javascript" > function Callme(){ alert('Js function start . keep pressing OK') var foo = external.CreateFoo(); alert(foo.Bar); foo.Bar = "qwer"; alert(external.Bar(foo)); } </script> I get Error from the webbrowser control : Error : "external" is null or not an object But the javascript is not showing anything , please guide me if i missed something.
0
3,656,905
09/07/2010 08:15:44
120,392
06/10/2009 08:31:07
11
0
Visual Studio 2010 Ultimate Beta 2 ISO
Has anyone got a copy of VS2010 ultimate beta 2 iso?? Really need a copy, I have the full version but I need to install the beta to compare for some work stuff and I deleted my iso a few months back. Thanks
visual-studio-2010
visual
null
null
null
09/07/2010 08:54:23
off topic
Visual Studio 2010 Ultimate Beta 2 ISO === Has anyone got a copy of VS2010 ultimate beta 2 iso?? Really need a copy, I have the full version but I need to install the beta to compare for some work stuff and I deleted my iso a few months back. Thanks
2
11,743,761
07/31/2012 15:34:46
427,762
08/22/2010 17:42:43
114
1
Shouldn't having a jit reduce the need for invokeDynamic?
After doing much reading on invokeDynamic, i am still a bit confused.One repeating theme seems to be how Clojure doesn't really need it, or at least need it less than other dynamic language implementations on the JVM (Jruby,JPython,Groovy etc.).I didn't understand all the details but it seems that having type annotations is the main reason, which simply eliminate the dynamic dispatch problem. 1- Is it safe to describe invoke-dynamic as way to efficiently implement complex method dispatch scenarios ? (is there more to it ?) 2- Shouldn't having a jit eliminate the need for invoke-dynamic ? The problem seems to arise from the lack of runtime type informations and a jit *should* have this information. 3-JRuby seems to booth have a jit and use invokdynamic,Why ?
clojure
jvm
jruby
invokedynamic
null
null
open
Shouldn't having a jit reduce the need for invokeDynamic? === After doing much reading on invokeDynamic, i am still a bit confused.One repeating theme seems to be how Clojure doesn't really need it, or at least need it less than other dynamic language implementations on the JVM (Jruby,JPython,Groovy etc.).I didn't understand all the details but it seems that having type annotations is the main reason, which simply eliminate the dynamic dispatch problem. 1- Is it safe to describe invoke-dynamic as way to efficiently implement complex method dispatch scenarios ? (is there more to it ?) 2- Shouldn't having a jit eliminate the need for invoke-dynamic ? The problem seems to arise from the lack of runtime type informations and a jit *should* have this information. 3-JRuby seems to booth have a jit and use invokdynamic,Why ?
0
7,613,132
09/30/2011 16:10:10
973,087
09/30/2011 12:43:23
1
0
Match with Facebook users' Interest
Can I use the Graph API to display users with the same interest in my website?
facebook-graph-api
match
null
null
null
10/01/2011 06:46:05
not a real question
Match with Facebook users' Interest === Can I use the Graph API to display users with the same interest in my website?
1
3,809,219
09/28/2010 02:10:11
453,438
09/21/2010 03:49:15
20
1
How do I determine if there are two or one numbers at the start of my string and then remove them?
reffering to my previous question([http://stackoverflow.com/questions/3809021/how-do-i-determine-if-there-are-two-or-one-numbers-at-the-start-of-my-string][1]) I now want to remove the number once I have found it and stored it in a variable. [1]: http://stackoverflow.com/questions/3809021/how-do-i-determine-if-there-are-two-or-one-numbers-at-the-start-of-my-string
c#
html
parsing
text-parsing
null
07/23/2012 19:59:59
not a real question
How do I determine if there are two or one numbers at the start of my string and then remove them? === reffering to my previous question([http://stackoverflow.com/questions/3809021/how-do-i-determine-if-there-are-two-or-one-numbers-at-the-start-of-my-string][1]) I now want to remove the number once I have found it and stored it in a variable. [1]: http://stackoverflow.com/questions/3809021/how-do-i-determine-if-there-are-two-or-one-numbers-at-the-start-of-my-string
1
9,131,243
02/03/2012 15:37:41
839,471
07/11/2011 18:53:54
1,154
1
What are the limiations of windows server web edition?
I'm trying to understand the practical differences between windows server 2008 r2 standard and web edition. I need to run IIS7, sql server express. What am I missing when I get web edition over standard?
c#
asp.net
windows-server-2008
null
null
02/03/2012 15:42:12
off topic
What are the limiations of windows server web edition? === I'm trying to understand the practical differences between windows server 2008 r2 standard and web edition. I need to run IIS7, sql server express. What am I missing when I get web edition over standard?
2
6,464,781
06/24/2011 07:37:45
569,015
01/09/2011 18:23:28
14
4
How many databases can I create on xeround for 149$/month plan.
I've hosting my ROR applications on heroku and I wanted to host my database on xeround. They didn't mention how many databases I can create on their site for 149$/month. Or are they charging 149$ for a single database? I have many small applications.
ruby-on-rails
heroku
null
null
null
06/24/2011 17:02:55
off topic
How many databases can I create on xeround for 149$/month plan. === I've hosting my ROR applications on heroku and I wanted to host my database on xeround. They didn't mention how many databases I can create on their site for 149$/month. Or are they charging 149$ for a single database? I have many small applications.
2
5,649,097
04/13/2011 12:20:12
158,548
08/18/2009 15:07:57
58
2
iOS: Non-square hit areas for buttons
I need to make some triangular buttons that overlap each other. While UIButtons can take transparent images as backgrounds, and UIControls can have custom views, the hit area of these is always square. How can I create a triangular hitarea for my buttons? I come from a FLash background so I would normally create a hitarea for my view, but I don't believe I can do this in Cocoa. Any tips?
cocoa-touch
ios
button
uikit
null
null
open
iOS: Non-square hit areas for buttons === I need to make some triangular buttons that overlap each other. While UIButtons can take transparent images as backgrounds, and UIControls can have custom views, the hit area of these is always square. How can I create a triangular hitarea for my buttons? I come from a FLash background so I would normally create a hitarea for my view, but I don't believe I can do this in Cocoa. Any tips?
0
8,496,310
12/13/2011 21:20:10
814,861
06/24/2011 23:25:30
232
8
Hide UISearchBar Cancel Button
I have a UISearchDisplayController and UISearchBar hooked up to my ViewController via Outlets from my nib. I'd like to hide the cancel button so that the user never sees it. The problem is that the following code hides the button, but only after displaying it to the user for a millisecond (e.g., it flashes on the simulator and device and then disappears out of view). - (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller { controller.searchBar.showsCancelButton = NO; } Is there a better way to hide it?
objective-c
ios
cocoa-touch
uisearchbar
uisearchdisplaycontroller
null
open
Hide UISearchBar Cancel Button === I have a UISearchDisplayController and UISearchBar hooked up to my ViewController via Outlets from my nib. I'd like to hide the cancel button so that the user never sees it. The problem is that the following code hides the button, but only after displaying it to the user for a millisecond (e.g., it flashes on the simulator and device and then disappears out of view). - (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller { controller.searchBar.showsCancelButton = NO; } Is there a better way to hide it?
0
6,955,184
08/05/2011 10:55:50
571,319
01/11/2011 13:32:48
116
2
Embedding XLS files on a webpage
I am having many XLS files and i want to embed that on a webpage. How can i do this Dynamically ? I just want to provide the location to the XLS file and see the Content on the webpage I am free to use both PHP / ASP
php
apache
excel
asp
xls
null
open
Embedding XLS files on a webpage === I am having many XLS files and i want to embed that on a webpage. How can i do this Dynamically ? I just want to provide the location to the XLS file and see the Content on the webpage I am free to use both PHP / ASP
0
6,343,922
06/14/2011 13:05:59
36,383
11/11/2008 00:08:22
432
15
Fluent NHibernate HasMany not inserting parent id
I cannot figure out why NHibernate is inserting a child entity without the foreign key. Here are my classes public class Order { public Order() { this.Notes = new List<OrderNote>(); } public virtual int OrderId {get; private set;} public virtual IList<OrderNote> Notes {get; private set;} } public class OrderNote { public OrderNote(string noteBy, string note) { this.OrderNoteId = Guid.NewGuid(); this.NoteBy = noteBy; this.Note = note; } public virtual Guid OrderNoteId {get; private set;} public virtual string NoteBy {get; private set;} public virtual string Note {get; private set; } Here are my Fluent NHibernate mapping files public class OrderClassMap : ClassMap<Order> { public OrderClassMap() { Id(x => x.OrderId).GeneratedBy.Native(); HasMany(x => x.Notes).Inverse.KeyColumn("OrderId").Cascase.AllDeleteOrphan(); } } public class OrderNoteClassMap : ClassMap<OrderNote> { public OrderNoteClassMap() { Id(x => x.OrderNoteId).GeneratedBy.Assigned(); Map(x => x.NoteBy); Map(x => x.Note); } } When I add a note to the order's notes collection and save the order, the order note gets inserted into the database without the foreign key. Order order = session.Query<Order>().Where(o => (o.OrderId == orderId)).Single(); order.Notes.Add(new OrderNote("Name", "This is a note")); session.SaveOrUpdate(order); The insert statement that gets generated is this: INSERT INTO OrderNotes(OrderNoteId, NoteBy, Note) It should be: INSERT INTO OrderNotes(OrderNoteId, NoteBy, Note, OrderId) Why is this happening? What am I doing wrong?
nhibernate
fluent-nhibernate
null
null
null
null
open
Fluent NHibernate HasMany not inserting parent id === I cannot figure out why NHibernate is inserting a child entity without the foreign key. Here are my classes public class Order { public Order() { this.Notes = new List<OrderNote>(); } public virtual int OrderId {get; private set;} public virtual IList<OrderNote> Notes {get; private set;} } public class OrderNote { public OrderNote(string noteBy, string note) { this.OrderNoteId = Guid.NewGuid(); this.NoteBy = noteBy; this.Note = note; } public virtual Guid OrderNoteId {get; private set;} public virtual string NoteBy {get; private set;} public virtual string Note {get; private set; } Here are my Fluent NHibernate mapping files public class OrderClassMap : ClassMap<Order> { public OrderClassMap() { Id(x => x.OrderId).GeneratedBy.Native(); HasMany(x => x.Notes).Inverse.KeyColumn("OrderId").Cascase.AllDeleteOrphan(); } } public class OrderNoteClassMap : ClassMap<OrderNote> { public OrderNoteClassMap() { Id(x => x.OrderNoteId).GeneratedBy.Assigned(); Map(x => x.NoteBy); Map(x => x.Note); } } When I add a note to the order's notes collection and save the order, the order note gets inserted into the database without the foreign key. Order order = session.Query<Order>().Where(o => (o.OrderId == orderId)).Single(); order.Notes.Add(new OrderNote("Name", "This is a note")); session.SaveOrUpdate(order); The insert statement that gets generated is this: INSERT INTO OrderNotes(OrderNoteId, NoteBy, Note) It should be: INSERT INTO OrderNotes(OrderNoteId, NoteBy, Note, OrderId) Why is this happening? What am I doing wrong?
0
10,954,703
06/08/2012 19:07:14
240,386
12/29/2009 18:50:54
298
15
Reading a openGL ES texture to a raw array
So, I'm trying to get the bytes from a RGBA texture in openGL ES. I am very much a beginner with openGL in general, so I hope I'm close, but it's not working just yet. I think I'm trying to imitate `glGetTexImage` from vanilla openGL. -(NSMutableData *) getPixelsFromTexture { GLsizei width = (GLsizei) self.width; GLsizei height = (GLsizei) self.height; GLint oldBind = 0; glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldBind); glBindTexture(GL_TEXTURE_2D, self.textureID); GLuint fbo[1]; glGenFramebuffersOES(1, fbo); glBindFramebufferOES(GL_FRAMEBUFFER_OES, fbo[0]); GLuint rbo[1]; glGenRenderbuffersOES(1, rbo); glBindRenderbufferOES(GL_RENDERBUFFER_OES, rbo[0]); glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_RGBA4_OES, width, height); glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, rbo[0]); GLenum status = glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES); if (status != GL_FRAMEBUFFER_COMPLETE_OES) { NSLog(@"Incomplete FBO"); } // draw static float texCoords[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }; static float vertexCoords[8] = { -1.0f, -1.0f, 1-.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f }; glMatrixMode (GL_PROJECTION); glPushMatrix(); glLoadIdentity (); glOrthof(0.0f, self.width, self.height, 0.0f, 0.0f, 1.0f); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); glTexCoordPointer(2, GL_FLOAT, 0, texCoords); glVertexPointer(2, GL_FLOAT, 0, vertexCoords); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); // end draw GLsizei count = width * height * 4; GLubyte * pixels = (GLubyte *)malloc((sizeof(GLubyte) * count)); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); glBindRenderbufferOES(GL_RENDERBUFFER_OES, 0); glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); glBindTexture(GL_TEXTURE_2D, oldBind); glDeleteRenderbuffersOES(1, rbo); glDeleteFramebuffersOES(1, fbo); return [NSMutableData dataWithBytes:pixels length:count]; } If someone can see what I'm doing wrong, it would be excellent. This has had me stumped for a couple of days now.
objective-c
opengl
textures
null
null
null
open
Reading a openGL ES texture to a raw array === So, I'm trying to get the bytes from a RGBA texture in openGL ES. I am very much a beginner with openGL in general, so I hope I'm close, but it's not working just yet. I think I'm trying to imitate `glGetTexImage` from vanilla openGL. -(NSMutableData *) getPixelsFromTexture { GLsizei width = (GLsizei) self.width; GLsizei height = (GLsizei) self.height; GLint oldBind = 0; glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldBind); glBindTexture(GL_TEXTURE_2D, self.textureID); GLuint fbo[1]; glGenFramebuffersOES(1, fbo); glBindFramebufferOES(GL_FRAMEBUFFER_OES, fbo[0]); GLuint rbo[1]; glGenRenderbuffersOES(1, rbo); glBindRenderbufferOES(GL_RENDERBUFFER_OES, rbo[0]); glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_RGBA4_OES, width, height); glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, rbo[0]); GLenum status = glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES); if (status != GL_FRAMEBUFFER_COMPLETE_OES) { NSLog(@"Incomplete FBO"); } // draw static float texCoords[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }; static float vertexCoords[8] = { -1.0f, -1.0f, 1-.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f }; glMatrixMode (GL_PROJECTION); glPushMatrix(); glLoadIdentity (); glOrthof(0.0f, self.width, self.height, 0.0f, 0.0f, 1.0f); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); glTexCoordPointer(2, GL_FLOAT, 0, texCoords); glVertexPointer(2, GL_FLOAT, 0, vertexCoords); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); // end draw GLsizei count = width * height * 4; GLubyte * pixels = (GLubyte *)malloc((sizeof(GLubyte) * count)); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); glBindRenderbufferOES(GL_RENDERBUFFER_OES, 0); glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); glBindTexture(GL_TEXTURE_2D, oldBind); glDeleteRenderbuffersOES(1, rbo); glDeleteFramebuffersOES(1, fbo); return [NSMutableData dataWithBytes:pixels length:count]; } If someone can see what I'm doing wrong, it would be excellent. This has had me stumped for a couple of days now.
0
8,314,422
11/29/2011 16:44:36
73,747
03/04/2009 16:00:54
628
84
Which DB support 'virtual' tables which contents can be dynamically generated by external services
I need gate into some external storage via DB interface
database
table
null
null
null
11/30/2011 16:06:54
not a real question
Which DB support 'virtual' tables which contents can be dynamically generated by external services === I need gate into some external storage via DB interface
1
10,367,627
04/28/2012 21:20:39
1,118,038
12/27/2011 17:28:16
57
3
Ruby is very slow
I have a PC with 2 processors of 2GHz and 4go of ram. I use RVM with ruby-1.9.3-p194-perf and rails 3.2.3. When I load my rails application, it take a few time and I think it's not normal. This is some example : time rails new speed_test ... real 0m7.240s user 0m4.484s sys 0m0.184s time rails g scaffold Articles title:string description:text ... real 0m4.910s user 0m4.052s sys 0m0.348s time rake db:migrate ... real 0m4.172s user 0m3.716s sys 0m0.244s time rake ... real 0m15.981s user 0m14.045s sys 0m1.048s This is some short commands but, with some hundred of tests, it's very long, even with spork. Do you have a solution? Thanks a lot!
ruby
ruby-on-rails-3
null
null
null
04/28/2012 23:56:43
not a real question
Ruby is very slow === I have a PC with 2 processors of 2GHz and 4go of ram. I use RVM with ruby-1.9.3-p194-perf and rails 3.2.3. When I load my rails application, it take a few time and I think it's not normal. This is some example : time rails new speed_test ... real 0m7.240s user 0m4.484s sys 0m0.184s time rails g scaffold Articles title:string description:text ... real 0m4.910s user 0m4.052s sys 0m0.348s time rake db:migrate ... real 0m4.172s user 0m3.716s sys 0m0.244s time rake ... real 0m15.981s user 0m14.045s sys 0m1.048s This is some short commands but, with some hundred of tests, it's very long, even with spork. Do you have a solution? Thanks a lot!
1
9,146,144
02/05/2012 01:25:27
1,181,517
01/31/2012 22:29:32
3
0
Calling Timer Tick event after enabling timer in another class c#
I must be doing something completely wrong but I cannot figure it out. I have a form and I add in VS a timer control. I also have a class that is watching for an application to start (notepad.exe). When the event arrives it is supposed to enable the timer, set the interval and on each tick do something (like firing a messagebox or changing a label). This seems not to be happening. A look in the code make help someone give me a clue. The code is below: public partial class Monitor : Form { EventWatcher eventWatch = new EventWatcher(); ManagementEventWatcher startWatcher = new ManagementEventWatcher(); ManagementEventWatcher endWatcher = new ManagementEventWatcher(); public Monitor() { InitializeComponent(); startWatcher = eventWatch.WatchForProcessStart("notepad.exe"); endWatcher = eventWatch.WatchForProcessEnd("notepad.exe"); } private void appTimer_Tick(object sender, EventArgs e) { label1.Text = "tick"; MessageBox.Show("Tick"); } } And the watcher class is class EventWatcher { public ManagementEventWatcher WatchForProcessStart(string processName) { string queryString = "SELECT TargetInstance" + " FROM __InstanceCreationEvent " + "WITHIN 2 " + " WHERE TargetInstance ISA 'Win32_Process' " + " AND TargetInstance.Name = '" + processName + "'"; // The dot in the scope means use the current machine string scope = @"\\.\root\CIMV2"; // Create a watcher and listen for events ManagementEventWatcher watcher = new ManagementEventWatcher(scope, queryString); watcher.EventArrived += ProcessStarted; watcher.Start(); return watcher; } public void ProcessStarted(object sender, EventArrivedEventArgs e) { Monitor monitor = new Monitor(); //set timer interval and start time for Monitor class. (form) monitor.appTimer.Interval = 5000; monitor.appTimer.Enabled = true; MessageBox.Show("notepad started"); } } I noticed two things: When notepad.exe starts and I have the MessageBox.Show("notpad started"); line commented out the messabox in the timer tick event won't fire. If it is as displayed above it will show me both messaboxes (notepad started and tick). However the label1.Text will not change no matter what. I am not sure what I am doing wrongly. I am sure it has something to do with how the timer event is handled but I am not sure what I should be doing. Any ideas? Thanks
c#
timer
null
null
null
null
open
Calling Timer Tick event after enabling timer in another class c# === I must be doing something completely wrong but I cannot figure it out. I have a form and I add in VS a timer control. I also have a class that is watching for an application to start (notepad.exe). When the event arrives it is supposed to enable the timer, set the interval and on each tick do something (like firing a messagebox or changing a label). This seems not to be happening. A look in the code make help someone give me a clue. The code is below: public partial class Monitor : Form { EventWatcher eventWatch = new EventWatcher(); ManagementEventWatcher startWatcher = new ManagementEventWatcher(); ManagementEventWatcher endWatcher = new ManagementEventWatcher(); public Monitor() { InitializeComponent(); startWatcher = eventWatch.WatchForProcessStart("notepad.exe"); endWatcher = eventWatch.WatchForProcessEnd("notepad.exe"); } private void appTimer_Tick(object sender, EventArgs e) { label1.Text = "tick"; MessageBox.Show("Tick"); } } And the watcher class is class EventWatcher { public ManagementEventWatcher WatchForProcessStart(string processName) { string queryString = "SELECT TargetInstance" + " FROM __InstanceCreationEvent " + "WITHIN 2 " + " WHERE TargetInstance ISA 'Win32_Process' " + " AND TargetInstance.Name = '" + processName + "'"; // The dot in the scope means use the current machine string scope = @"\\.\root\CIMV2"; // Create a watcher and listen for events ManagementEventWatcher watcher = new ManagementEventWatcher(scope, queryString); watcher.EventArrived += ProcessStarted; watcher.Start(); return watcher; } public void ProcessStarted(object sender, EventArrivedEventArgs e) { Monitor monitor = new Monitor(); //set timer interval and start time for Monitor class. (form) monitor.appTimer.Interval = 5000; monitor.appTimer.Enabled = true; MessageBox.Show("notepad started"); } } I noticed two things: When notepad.exe starts and I have the MessageBox.Show("notpad started"); line commented out the messabox in the timer tick event won't fire. If it is as displayed above it will show me both messaboxes (notepad started and tick). However the label1.Text will not change no matter what. I am not sure what I am doing wrongly. I am sure it has something to do with how the timer event is handled but I am not sure what I should be doing. Any ideas? Thanks
0
7,249,955
08/30/2011 21:20:16
920,550
08/30/2011 21:20:16
1
0
Cocos2d Frame Rate
Is there a way to change the frame rate of one layer while keeping the frame rate of another constant? I am currently using [[CCScheduler sharedScheduler] setTimeScale:X]; which effects all layers of a scene. I want it to just affect a single layer. WORD Dave
cocos2d
null
null
null
null
null
open
Cocos2d Frame Rate === Is there a way to change the frame rate of one layer while keeping the frame rate of another constant? I am currently using [[CCScheduler sharedScheduler] setTimeScale:X]; which effects all layers of a scene. I want it to just affect a single layer. WORD Dave
0
3,651,515
09/06/2010 12:39:51
440,245
09/05/2010 23:00:20
6
0
C# listviewitem
I made a listviewitem. It's a list of files in chosen folder. I want to show what's in every file in another listview (these files contain tags and i want to show them in list). I used "Listviewitem.checked" or "listviewitem.selected" but it doesn't work. Why?
c#
listviewitem
null
null
null
09/07/2010 00:58:58
not a real question
C# listviewitem === I made a listviewitem. It's a list of files in chosen folder. I want to show what's in every file in another listview (these files contain tags and i want to show them in list). I used "Listviewitem.checked" or "listviewitem.selected" but it doesn't work. Why?
1
3,281,234
07/19/2010 13:03:34
387,142
07/08/2010 20:33:55
13
2
Getting back into the website development game.
Back in the 90's I used to develop websites using Cold Fusion. We also still used tables for most of our page layout, hehe. I just started getting back into website development again seriously. I'm getting a pretty good handle on the basics with CSS and starting to add Javascript. I'm guessing that I will eventually add PHP as a modern replacement to my CF skills. Right now I am using an old copy of Cold Fusion studio for my editor and of course Photoshop for my graphics. I have also discovered Firebug and found it to be very helpful. I was wondering if the community here could give me some pointers as I start back out in this field. Do you have any software suggestions? A new editor I should use? Other debugging tools? Languages you would recommend? Any comments or ideas that would help a website developer who is starting out would be greatly appreciated. Thanx!
php
javascript
css
getting-started
null
07/20/2010 16:33:24
not a real question
Getting back into the website development game. === Back in the 90's I used to develop websites using Cold Fusion. We also still used tables for most of our page layout, hehe. I just started getting back into website development again seriously. I'm getting a pretty good handle on the basics with CSS and starting to add Javascript. I'm guessing that I will eventually add PHP as a modern replacement to my CF skills. Right now I am using an old copy of Cold Fusion studio for my editor and of course Photoshop for my graphics. I have also discovered Firebug and found it to be very helpful. I was wondering if the community here could give me some pointers as I start back out in this field. Do you have any software suggestions? A new editor I should use? Other debugging tools? Languages you would recommend? Any comments or ideas that would help a website developer who is starting out would be greatly appreciated. Thanx!
1
9,384,258
02/21/2012 19:58:15
1,116,644
12/26/2011 18:34:25
1
0
why does this happen?
now i just need to find out why it says Old Version Every time even when $a = true if a is true it should do the if block and none of the others. maybe the version needs to be a post variable i will try it <?php $launcherv = "13"; $gamev = "1326382442000"; $sessid = math.rand(1, 1000000000000000); $ticket = math.rand(1, 1000000000000); $user = ""; $password = ""; $version = ""; $a = false; $b = false; $c = false; if ($version == $launcherv){ $a = true; } else { $a = false; } if ($user == ""){ $b = false; } else { $b = 'true'; } if ($password == ""){ $c = false; } else { $c = true; } if ($a && $b && $c){ echo ($gamev.":".$ticket.":".$user.":".$sessid); } elseif(!$a){ echo "Old Version"; } elseif(!$b){ echo "Bad Login"; } elseif(!$c){ echo "Bad Login"; } ?>
php
version
old
null
null
02/22/2012 07:59:07
too localized
why does this happen? === now i just need to find out why it says Old Version Every time even when $a = true if a is true it should do the if block and none of the others. maybe the version needs to be a post variable i will try it <?php $launcherv = "13"; $gamev = "1326382442000"; $sessid = math.rand(1, 1000000000000000); $ticket = math.rand(1, 1000000000000); $user = ""; $password = ""; $version = ""; $a = false; $b = false; $c = false; if ($version == $launcherv){ $a = true; } else { $a = false; } if ($user == ""){ $b = false; } else { $b = 'true'; } if ($password == ""){ $c = false; } else { $c = true; } if ($a && $b && $c){ echo ($gamev.":".$ticket.":".$user.":".$sessid); } elseif(!$a){ echo "Old Version"; } elseif(!$b){ echo "Bad Login"; } elseif(!$c){ echo "Bad Login"; } ?>
3
5,964,461
05/11/2011 12:45:27
517,042
11/23/2010 05:53:22
16
0
app that convert male voice to female in iphone sdk
I want to create a sample app that convert male voice to female. Is there any api or sdk that provide such functionality. Or is there any other solution for such sample. Awaiting for you reply. Thanks.
iphone
iphone-sdk-4.0
null
null
null
05/12/2011 21:15:56
off topic
app that convert male voice to female in iphone sdk === I want to create a sample app that convert male voice to female. Is there any api or sdk that provide such functionality. Or is there any other solution for such sample. Awaiting for you reply. Thanks.
2
6,540,053
06/30/2011 19:26:54
823,709
06/30/2011 19:26:54
1
0
Counting sub-document matches in a mongo document
I have a failry simple structure for my documents: {regId: 1, data: {[{val: 123456}, {val: 324234}, {val: 4353453}, .......]}} The data element array may contain between 30 and 60 sub-documents and currently the collection has ~53000 documents, but will grow much larger. Given an array of vals, INPUT, [11563012,11563011,82867218,83866648, ....], I want to return documents that have at least 3 matching data.val. Currently, I query using an $in modifier and a $where clause that calls a js function (countMatches). The $in modifier returns any document that contains at least one item for IMPUT and the $where function iterates through each document.date, counting matches in INPUT and only returns documents above the threshold: db.foo.find({"data.val": {$in: [11563012,11563011,82867218,83866648,.......]}, $where: "countMatches(this.data, [11563012,11563011,82867218,83866648,......])>=3"}).count(); Similar questions (http://groups.google.com/group/mongodb-user/browse_thread/thread/fa291575fd47c010) seem to indicate that the only way to count matchs in "sub-documents" is either with a js function in a $where clause or with a group() aggregate function. My question then is, is there a better method for counting "hits" in a sub-document? This is semantically similar to finding "tagged" documents, i.e. return the documents that have the most matching tags of [tag1, tag2, tag3, tag4,.....]
mongodb
counting
null
null
null
null
open
Counting sub-document matches in a mongo document === I have a failry simple structure for my documents: {regId: 1, data: {[{val: 123456}, {val: 324234}, {val: 4353453}, .......]}} The data element array may contain between 30 and 60 sub-documents and currently the collection has ~53000 documents, but will grow much larger. Given an array of vals, INPUT, [11563012,11563011,82867218,83866648, ....], I want to return documents that have at least 3 matching data.val. Currently, I query using an $in modifier and a $where clause that calls a js function (countMatches). The $in modifier returns any document that contains at least one item for IMPUT and the $where function iterates through each document.date, counting matches in INPUT and only returns documents above the threshold: db.foo.find({"data.val": {$in: [11563012,11563011,82867218,83866648,.......]}, $where: "countMatches(this.data, [11563012,11563011,82867218,83866648,......])>=3"}).count(); Similar questions (http://groups.google.com/group/mongodb-user/browse_thread/thread/fa291575fd47c010) seem to indicate that the only way to count matchs in "sub-documents" is either with a js function in a $where clause or with a group() aggregate function. My question then is, is there a better method for counting "hits" in a sub-document? This is semantically similar to finding "tagged" documents, i.e. return the documents that have the most matching tags of [tag1, tag2, tag3, tag4,.....]
0
10,151,803
04/14/2012 07:16:11
792,302
06/10/2011 07:20:49
120
7
Javascript replace for equal symbol
I am getting my response as following var val = {&quot;Type&quot;=&gt;&quot;D&quot;,&quot;Number&quot;=&gt;33&quot;} From above i try to change like this var MyArray = {"Type": "D", "Number": "33"}; for(key in MyArray) { alert("key " + key + " has value " + MyArray[key]); } I tried replace, replace all but those not working. Any suggestions?
javascript
jquery
null
null
null
null
open
Javascript replace for equal symbol === I am getting my response as following var val = {&quot;Type&quot;=&gt;&quot;D&quot;,&quot;Number&quot;=&gt;33&quot;} From above i try to change like this var MyArray = {"Type": "D", "Number": "33"}; for(key in MyArray) { alert("key " + key + " has value " + MyArray[key]); } I tried replace, replace all but those not working. Any suggestions?
0
5,119,300
02/25/2011 15:49:34
384,964
07/06/2010 20:47:19
63
2
Why does CSS 3d animations work on safari and not chrome if they are both build using webkit?
I was wondering why the CSS 3d animation work on safari (desktop/ipad/iphone) browser but not on latest chrome 9.0. Aren't chrome and safari both based on the webkit platform??? Also, how can I stay in the loop with Chrome (desktop/android) browser and their plans to support CSS 3d in the future? Link is here: http://girliemac.com/sandbox/flickr_3d.html Thanks.
css
google-chrome
safari
webkit
null
null
open
Why does CSS 3d animations work on safari and not chrome if they are both build using webkit? === I was wondering why the CSS 3d animation work on safari (desktop/ipad/iphone) browser but not on latest chrome 9.0. Aren't chrome and safari both based on the webkit platform??? Also, how can I stay in the loop with Chrome (desktop/android) browser and their plans to support CSS 3d in the future? Link is here: http://girliemac.com/sandbox/flickr_3d.html Thanks.
0
6,611,668
07/07/2011 13:49:41
234,316
12/18/2009 04:49:01
82
5
HOw to intercept And Change SSL TCP/IP
is ther any tool that I could use to intercept and change ssl data? I just want to change the values a bit so that the other side won't be able to encode it..... Any specific tool for this? or command? Thanks A Lot Carlo
ssl
https
tcp
sniffer
tcp-ip
11/09/2011 00:50:40
not a real question
HOw to intercept And Change SSL TCP/IP === is ther any tool that I could use to intercept and change ssl data? I just want to change the values a bit so that the other side won't be able to encode it..... Any specific tool for this? or command? Thanks A Lot Carlo
1
2,440,385
03/13/2010 23:01:25
288,097
03/07/2010 07:04:36
138
0
How to find the physical address of a variable from user-space in Linux?
I want to find the physical address of a variable defined in a user-space process? Is there any way to do it using root privileges?
c
linux
null
null
null
null
open
How to find the physical address of a variable from user-space in Linux? === I want to find the physical address of a variable defined in a user-space process? Is there any way to do it using root privileges?
0
9,881,423
03/26/2012 23:39:33
705,414
04/13/2011 06:40:40
1,597
1
what does determinant euqals to one mean of the transformation matrix?
When the determinant of transformation matrix is 1, what does it mean? Transformation can be orthogonal or perspective.
graphics
null
null
null
null
03/27/2012 08:42:45
off topic
what does determinant euqals to one mean of the transformation matrix? === When the determinant of transformation matrix is 1, what does it mean? Transformation can be orthogonal or perspective.
2
9,019,859
01/26/2012 14:46:51
485,498
10/24/2010 08:50:27
1,392
23
Java program efficiency with different OSs
I cam across a Java related question recently that was (to paraphrase): 1. What reasons are there that a Java application might run at a reasonable speed on Operating System A, but sluggishly slow on Operating System B? 2. What could a programmer do to rectify this problem? My response would be (I know I'm wrong, but I'll explain my thought process) (1) an application should run at more or less the same speed on any Operating System with a JVM, since the application is run inside the virtual machine. As long as the VM is designed correctly it shouldn't matter. (2)uhh.. My question is: what would be a correct answer to this question?
java
operating-system
jvm
null
null
01/27/2012 06:06:39
not constructive
Java program efficiency with different OSs === I cam across a Java related question recently that was (to paraphrase): 1. What reasons are there that a Java application might run at a reasonable speed on Operating System A, but sluggishly slow on Operating System B? 2. What could a programmer do to rectify this problem? My response would be (I know I'm wrong, but I'll explain my thought process) (1) an application should run at more or less the same speed on any Operating System with a JVM, since the application is run inside the virtual machine. As long as the VM is designed correctly it shouldn't matter. (2)uhh.. My question is: what would be a correct answer to this question?
4
4,806,611
01/26/2011 15:52:02
483,163
12/21/2009 14:20:57
391
16
What's a good general approach for apps like pulse, youtube, NYTimes, etc? Use UIWebView or something else?
That may seem like a broad question, but I'm talking specifically here about apps that display a lot of content (image plus some text) pulled from the net in separate cells, rows, etc. And where each of those cells can get loaded asynchronously (independently from all the others). So for example, for iOS, is it too inefficient to use uiwebview for each of these cells? It seems like this would be a simple approach, but I'm not sure about the performance. "Pulse" has a bunch of cells on the page at one time, and on iPad this could really get to a large number. Is it better to do this using lower level techniques, or is using UIWebView a decent choice?
iphone
uiwebview
youtube
null
null
null
open
What's a good general approach for apps like pulse, youtube, NYTimes, etc? Use UIWebView or something else? === That may seem like a broad question, but I'm talking specifically here about apps that display a lot of content (image plus some text) pulled from the net in separate cells, rows, etc. And where each of those cells can get loaded asynchronously (independently from all the others). So for example, for iOS, is it too inefficient to use uiwebview for each of these cells? It seems like this would be a simple approach, but I'm not sure about the performance. "Pulse" has a bunch of cells on the page at one time, and on iPad this could really get to a large number. Is it better to do this using lower level techniques, or is using UIWebView a decent choice?
0
7,790,429
10/17/2011 07:09:50
270,190
02/10/2010 10:31:34
1,687
130
Any tool available for tracing .net application events in server
Earlier I used the tool called SlikEdit for tracing .net events inside visual studio. Is there any tool available to log all the application events in server rather modifying a large code base to include tracing statements manually.
.net
events
null
null
null
null
open
Any tool available for tracing .net application events in server === Earlier I used the tool called SlikEdit for tracing .net events inside visual studio. Is there any tool available to log all the application events in server rather modifying a large code base to include tracing statements manually.
0
11,654,794
07/25/2012 16:53:52
371,174
06/19/2010 18:37:41
142
1
Add the first element to a ConcurrentLinkedQueue atomically
I want to use a [ConcurrentLinkedQueue][1] in an atomic [lock-free][2] manner: Several concurrent threads push events into the queue and some other thread will process them. The queue is not bound and I don't want any thread to wait or get locked. The reading part however may notice that the queue got empty. In a lock free implementation the reading thread must not block but will just end its task and proceeds executing other tasks (i.e. as an ExecutorService). Thus the writer pushing the first new event into an empty queue must become aware about it and should restart the reader (i.e. by submitting a new Runnable to the ExecutorService) to process the queue. Any further threads submitting a second or third event won't care about, as they may assume some reader was already prepared/submitted. Unfortunately the [add()][3] method of ConcurrentLinkedQueue always returns true. Asking the queue if isEmpty() before or after adding the event won't help, as it is not atomic. Should I use some additional AtomicInteger for monitoring the queue size() or is there some smarter solution for that? Dieter. [1]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html [2]: http://en.wikipedia.org/wiki/Non-blocking_algorithm [3]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html#add%28E%29
java
multithreading
concurrency
lock-free
null
null
open
Add the first element to a ConcurrentLinkedQueue atomically === I want to use a [ConcurrentLinkedQueue][1] in an atomic [lock-free][2] manner: Several concurrent threads push events into the queue and some other thread will process them. The queue is not bound and I don't want any thread to wait or get locked. The reading part however may notice that the queue got empty. In a lock free implementation the reading thread must not block but will just end its task and proceeds executing other tasks (i.e. as an ExecutorService). Thus the writer pushing the first new event into an empty queue must become aware about it and should restart the reader (i.e. by submitting a new Runnable to the ExecutorService) to process the queue. Any further threads submitting a second or third event won't care about, as they may assume some reader was already prepared/submitted. Unfortunately the [add()][3] method of ConcurrentLinkedQueue always returns true. Asking the queue if isEmpty() before or after adding the event won't help, as it is not atomic. Should I use some additional AtomicInteger for monitoring the queue size() or is there some smarter solution for that? Dieter. [1]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html [2]: http://en.wikipedia.org/wiki/Non-blocking_algorithm [3]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html#add%28E%29
0
9,605,179
03/07/2012 16:17:20
988,871
10/11/2011 05:35:56
119
4
Crash when UIAlertView is clicked
When I click the `UIAletView`, I receive the following error. alertView:clickedButtonAtIndex:]: message sent to deallocated instance 0x84c7010 This is the code I have used. UIAlertView *testAlert = [[ UIAlertView alloc]initWithTitle:messageTitle message:messageBody delegate:self cancelButtonTitle:messageClose otherButtonTitles:messageTryAgain, nil]; testAlert.tag = 2; [testAlert show]; [testAlert release]; And I have the delegate method - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ } When I click the `UIAlertView` , even before the control reaches the delegate method, the app crashes. What could be the reason. What am I doing wrong?
iphone
ios
uialertview
null
null
null
open
Crash when UIAlertView is clicked === When I click the `UIAletView`, I receive the following error. alertView:clickedButtonAtIndex:]: message sent to deallocated instance 0x84c7010 This is the code I have used. UIAlertView *testAlert = [[ UIAlertView alloc]initWithTitle:messageTitle message:messageBody delegate:self cancelButtonTitle:messageClose otherButtonTitles:messageTryAgain, nil]; testAlert.tag = 2; [testAlert show]; [testAlert release]; And I have the delegate method - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ } When I click the `UIAlertView` , even before the control reaches the delegate method, the app crashes. What could be the reason. What am I doing wrong?
0
10,543,273
05/10/2012 22:58:03
121,993
06/12/2009 13:11:22
8,641
224
java swing button does not repaint properly after dialog closed
I have a JButton and pressing it opens a modal dialog. When I close the dialog, the button still look like it is still in a pressed state until I move the mouse. I think this is happening because the JDialog is opened on top of an AWT component (it's a 3rd party component that uses an AWT Canvas, and I can't change that). If I open the dialog and close it over a swing component, then it works properly. I've tried adding a window listener to the dialog and repainting the entire frame (using repaint and paintImmediately) when the dialog closes, but this doesn't work. Any suggestions on how to fix this?
java
swing
awt
modal-dialog
repaint
null
open
java swing button does not repaint properly after dialog closed === I have a JButton and pressing it opens a modal dialog. When I close the dialog, the button still look like it is still in a pressed state until I move the mouse. I think this is happening because the JDialog is opened on top of an AWT component (it's a 3rd party component that uses an AWT Canvas, and I can't change that). If I open the dialog and close it over a swing component, then it works properly. I've tried adding a window listener to the dialog and repainting the entire frame (using repaint and paintImmediately) when the dialog closes, but this doesn't work. Any suggestions on how to fix this?
0
8,449,570
12/09/2011 17:45:39
1,071,822
11/29/2011 17:22:34
1
0
Adding to a mySQL database
I'm pretty new to PHP so this is probably a pretty easy answer. Anyways I have a mysql table called 'cities' with 10 columns with different city names, then I have a html drop down menu with each of the cities listed. Once they submit I want to add 1 to the mysql table to whichever city they selected. Thanks a ton.
php
null
null
null
null
12/10/2011 07:09:04
not a real question
Adding to a mySQL database === I'm pretty new to PHP so this is probably a pretty easy answer. Anyways I have a mysql table called 'cities' with 10 columns with different city names, then I have a html drop down menu with each of the cities listed. Once they submit I want to add 1 to the mysql table to whichever city they selected. Thanks a ton.
1
8,685,139
12/30/2011 23:47:52
464,956
10/03/2010 03:17:00
161
8
Django can't have quoted characters in urls?
I'm following [this thread][1] and adopt the code by peppergrower. But when I add the encrypted and quoted characters to the url and try access this url, Django failed with the following errors: > Traceback (most recent call last): > > File > "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line > 283, in run > self.result = application(self.environ, self.start_response) > > File > "C:\Python27\lib\site-packages\django\contrib\staticfiles\handlers.py", > line 68, in __call__ > return self.application(environ, start_response) > > File "C:\Python27\lib\site-packages\django\core\handlers\wsgi.py", > line 264, in __call__ > logger.warning('Bad Request (UnicodeDecodeError): %s' % request.path, > > UnboundLocalError: local variable 'request' referenced before > assignment A sample url of such kind is http://localhost:8000/customer/unsubscribe/%F1%CDE%A2%9DL%BF%21W%60%FF%04%D2%D2%3B%B1%FB%C9%8Ff%89%06O%FFY%E2_%16%9BnPM/. I notice that as long as % appears in the url, Django would throw above exceptions. It didn't make much sense since the quoted characters already have zero unicodes. I'm using Django 1.3.1 [1]: http://stackoverflow.com/questions/2291176/django-python-and-link-encryption
python
django
null
null
null
null
open
Django can't have quoted characters in urls? === I'm following [this thread][1] and adopt the code by peppergrower. But when I add the encrypted and quoted characters to the url and try access this url, Django failed with the following errors: > Traceback (most recent call last): > > File > "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line > 283, in run > self.result = application(self.environ, self.start_response) > > File > "C:\Python27\lib\site-packages\django\contrib\staticfiles\handlers.py", > line 68, in __call__ > return self.application(environ, start_response) > > File "C:\Python27\lib\site-packages\django\core\handlers\wsgi.py", > line 264, in __call__ > logger.warning('Bad Request (UnicodeDecodeError): %s' % request.path, > > UnboundLocalError: local variable 'request' referenced before > assignment A sample url of such kind is http://localhost:8000/customer/unsubscribe/%F1%CDE%A2%9DL%BF%21W%60%FF%04%D2%D2%3B%B1%FB%C9%8Ff%89%06O%FFY%E2_%16%9BnPM/. I notice that as long as % appears in the url, Django would throw above exceptions. It didn't make much sense since the quoted characters already have zero unicodes. I'm using Django 1.3.1 [1]: http://stackoverflow.com/questions/2291176/django-python-and-link-encryption
0
10,876,119
06/04/2012 03:50:12
1,369,016
05/02/2012 02:25:32
21
0
Android - How can I create a selector for Layouts (like an ImageButton selector)
I have an ImageButton and a LinearLayout wrapping that button, like this: <LinearLayout android:id="@+id/homeButtonLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/p_buttons_background" android:orientation="vertical" > <ImageButton android:id="@+id/homeButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="10px" android:background="@drawable/home_icon" android:onClick="goBackToCameraScreen" /> </LinearLayout> I put a background around the ImageButton **in the LinearLayout**, as you can see above. I want to be able to change that background (that is, **the background of the LinearLayout**, not the background of the ImageButton) when the user clicks on the ImageButton. I could do that programmatically, but I want to do that via XML. I could easily change the background **of the ImageButton** by writing a selector, like this: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/button_pressed" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/button_focused" /> <!-- focused --> <item android:drawable="@drawable/button_normal" /> <!-- default --> </selector> That's ***EXACTLY*** what I want, except that I want to **change the LinearLayout background, and not the ImageButton background**. How can I create a XML selector just like the one above, but that actually changes the background of the LinearLayout instead of the ImageButton background?? Thank you in advance!! =)
android
xml
background
selector
imagebutton
null
open
Android - How can I create a selector for Layouts (like an ImageButton selector) === I have an ImageButton and a LinearLayout wrapping that button, like this: <LinearLayout android:id="@+id/homeButtonLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/p_buttons_background" android:orientation="vertical" > <ImageButton android:id="@+id/homeButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="10px" android:background="@drawable/home_icon" android:onClick="goBackToCameraScreen" /> </LinearLayout> I put a background around the ImageButton **in the LinearLayout**, as you can see above. I want to be able to change that background (that is, **the background of the LinearLayout**, not the background of the ImageButton) when the user clicks on the ImageButton. I could do that programmatically, but I want to do that via XML. I could easily change the background **of the ImageButton** by writing a selector, like this: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/button_pressed" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/button_focused" /> <!-- focused --> <item android:drawable="@drawable/button_normal" /> <!-- default --> </selector> That's ***EXACTLY*** what I want, except that I want to **change the LinearLayout background, and not the ImageButton background**. How can I create a XML selector just like the one above, but that actually changes the background of the LinearLayout instead of the ImageButton background?? Thank you in advance!! =)
0
7,754,887
10/13/2011 13:31:40
846,689
07/15/2011 14:59:34
11
0
Jquery tab and mixed HTTP and HTTPS
I’m using a tab design with multiple tabs. There is one tab that needs to work under HTTPS. After a user clicks on the tab I’m getting an error message “Access Denied” with jquery-1.4.2.min.js. jquery-1.4.2.min.js is being loaded by the parent page using HTTP. I tried loading another version of jquery-1.4.2.min.js using HTTPS in the TAB page but still get the error. In IE I get “Access Denied”. In Firefox, I get no error message but the page doesn’t get displayed. Do I need call the parent page again using HTTPS to make this work?
jquery
null
null
null
null
null
open
Jquery tab and mixed HTTP and HTTPS === I’m using a tab design with multiple tabs. There is one tab that needs to work under HTTPS. After a user clicks on the tab I’m getting an error message “Access Denied” with jquery-1.4.2.min.js. jquery-1.4.2.min.js is being loaded by the parent page using HTTP. I tried loading another version of jquery-1.4.2.min.js using HTTPS in the TAB page but still get the error. In IE I get “Access Denied”. In Firefox, I get no error message but the page doesn’t get displayed. Do I need call the parent page again using HTTPS to make this work?
0
4,901,545
02/04/2011 18:25:18
109,941
05/20/2009 13:52:16
1,784
84
Web Applications: Allowing super users to impersonate other users - Is there a design pattern for this?
- In my web application, I'd like to allow super users to impersonate other users. My Question: > Is there a generally accepted design pattern that I could use to make this happen? - Generally speaking, I can imagine that I'll need to keep track of the current user and the impersonated user inside of the session. - But you can understand that I'd like to minimize the complexity attached to this change. - Incidentally, my application is an ASP.NET MVC 2 application, so if I could take advantage of any existing infrastructure, that would be great.
asp.net-mvc-2
design-patterns
web-applications
impersonation
architectural-patterns
null
open
Web Applications: Allowing super users to impersonate other users - Is there a design pattern for this? === - In my web application, I'd like to allow super users to impersonate other users. My Question: > Is there a generally accepted design pattern that I could use to make this happen? - Generally speaking, I can imagine that I'll need to keep track of the current user and the impersonated user inside of the session. - But you can understand that I'd like to minimize the complexity attached to this change. - Incidentally, my application is an ASP.NET MVC 2 application, so if I could take advantage of any existing infrastructure, that would be great.
0
2,074,795
01/15/2010 21:08:21
236,924
12/22/2009 14:50:13
307
1
getting RSS feeds on website
I had this code that I wrote last year and it returns RSS feeds for some term I enter: <html> <body> <form name="form" action="search.php" method="get"> <input type="text" name="q" /> <input type="submit" name="Submit" value="Search" /> </form> <?php require_once "RSS.php"; // want to parse the $row[1] variable to get out words, make new string with a + instead of spaces $college = "college"; $collegelen= strlen($college); for($i = 0; $i < $collegelen; $i++){ if ($college{$i} == " ") {$spaced = $spaced . "+";} else {$spaced = $spaced . $college{$i};} } echo("Yahoo! News RSS"); $rss_yahoo =& new XML_RSS("http://news.search.yahoo.com/news/rss?p=" . $spaced . "&ei=UTF-8&fl=0&x=wrt"); $rss_yahoo->parse(); foreach ($rss_yahoo->getItems() as $item) { echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li><br>"; //echo $item['pubDate'] ."<br>"; echo $item['description'] . "<br><br>\n"; } //echo("Google RSS"); //$rss_google =& new XML_RSS("http://news.google.com/news?hl=en&ned=us&q=" . $spaced . "&ie=UTF-8&nolr=1&output=rss"); //$rss_google->parse(); //foreach ($rss_google->getItems() as $item) { // echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li><br>"; // echo $item['description'] . "<br><br>\n"; } echo("Google RSS"); $rss_google =& new XML_RSS("http://news.google.com/news?hl=en&ned=us&q=" . $spaced . "&ie=UTF-8&nolr=1&output=rss"); $rss_google->parse(); foreach ($rss_google->getItems() as $item) { echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li><br>"; - Hide quoted text - "<br><br>\n"; } ?> </body> </html> However, this code doesn't work anymore or I am not testing it correctly...I am running it on xampp on mac. I wanted to make something like this: The user enters a term and I want to display the RSS feeds from Yahoo, Google or NYTimes. Thanks! EDIT: I got two files RSS.php and Parser.php from a site last year and now it looks like the site is down. I am trying to see if anyone can offer another solution. Thanks!
rss
null
null
null
null
null
open
getting RSS feeds on website === I had this code that I wrote last year and it returns RSS feeds for some term I enter: <html> <body> <form name="form" action="search.php" method="get"> <input type="text" name="q" /> <input type="submit" name="Submit" value="Search" /> </form> <?php require_once "RSS.php"; // want to parse the $row[1] variable to get out words, make new string with a + instead of spaces $college = "college"; $collegelen= strlen($college); for($i = 0; $i < $collegelen; $i++){ if ($college{$i} == " ") {$spaced = $spaced . "+";} else {$spaced = $spaced . $college{$i};} } echo("Yahoo! News RSS"); $rss_yahoo =& new XML_RSS("http://news.search.yahoo.com/news/rss?p=" . $spaced . "&ei=UTF-8&fl=0&x=wrt"); $rss_yahoo->parse(); foreach ($rss_yahoo->getItems() as $item) { echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li><br>"; //echo $item['pubDate'] ."<br>"; echo $item['description'] . "<br><br>\n"; } //echo("Google RSS"); //$rss_google =& new XML_RSS("http://news.google.com/news?hl=en&ned=us&q=" . $spaced . "&ie=UTF-8&nolr=1&output=rss"); //$rss_google->parse(); //foreach ($rss_google->getItems() as $item) { // echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li><br>"; // echo $item['description'] . "<br><br>\n"; } echo("Google RSS"); $rss_google =& new XML_RSS("http://news.google.com/news?hl=en&ned=us&q=" . $spaced . "&ie=UTF-8&nolr=1&output=rss"); $rss_google->parse(); foreach ($rss_google->getItems() as $item) { echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li><br>"; - Hide quoted text - "<br><br>\n"; } ?> </body> </html> However, this code doesn't work anymore or I am not testing it correctly...I am running it on xampp on mac. I wanted to make something like this: The user enters a term and I want to display the RSS feeds from Yahoo, Google or NYTimes. Thanks! EDIT: I got two files RSS.php and Parser.php from a site last year and now it looks like the site is down. I am trying to see if anyone can offer another solution. Thanks!
0
10,726,231
05/23/2012 19:02:34
1,272,295
03/15/2012 18:11:21
1
1
Running DumpRenderTree on an Android device
I have been trying to run the DumpRenderTree test in Android (on my Android device running ICS) and am unable to figure out how to run it. There is very little documentation and the only other thread I found (that is close to my question) is this: http://stackoverflow.com/questions/1520503/how-do-you-push-android-instrumentation-tests-to-emulator-device Here is my ddms output when I run this command: *********************************** 05-23 11:59:07.118: INFO/TestRunner(10253): started: warning(junit.framework.TestSuite$1) 05-23 11:59:07.118: INFO/TestRunner(10253): failed: warning(junit.framework.TestSuite$1) 05-23 11:59:07.118: INFO/TestRunner(10253): ----- begin exception ----- 05-23 11:59:07.118: INFO/TestRunner(10253): junit.framework.AssertionFailedError: No tests found in com.android.dumprendertree.LayoutTestsAutoTest 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.Assert.fail(Assert.java:47) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestSuite$1.runTest(TestSuite.java:263) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestCase.runBare(TestCase.java:127) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestResult$1.protect(TestResult.java:106) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestResult.runProtected(TestResult.java:124) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestResult.run(TestResult.java:109) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestCase.run(TestCase.java:118) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551) 05-23 11:59:07.118: INFO/TestRunner(10253): ----- end exception ----- 05-23 11:59:07.126: INFO/TestRunner(10253): finished: warning(junit.framework.TestSuite$1) 05-23 11:59:07.126: INFO/TestRunner(10253): started: warning(junit.framework.TestSuite$1) 05-23 11:59:07.126: INFO/TestRunner(10253): failed: warning(junit.framework.TestSuite$1) 05-23 11:59:07.126: INFO/TestRunner(10253): ----- begin exception ----- 05-23 11:59:07.126: INFO/TestRunner(10253): junit.framework.AssertionFailedError: No tests found in com.android.dumprendertree.LoadTestsAutoTest 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.Assert.fail(Assert.java:47) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestSuite$1.runTest(TestSuite.java:263) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestCase.runBare(TestCase.java:127) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestResult$1.protect(TestResult.java:106) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestResult.runProtected(TestResult.java:124) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestResult.run(TestResult.java:109) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestCase.run(TestCase.java:118) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551) 05-23 11:59:07.126: INFO/TestRunner(10253): ----- end exception ----- 05-23 11:59:07.126: INFO/TestRunner(10253): finished: warning(junit.framework.TestSuite$1) ******************************** Should I be pushing in some tests before I run this? Any pointers would be greatly appreciated!
android
null
null
null
null
null
open
Running DumpRenderTree on an Android device === I have been trying to run the DumpRenderTree test in Android (on my Android device running ICS) and am unable to figure out how to run it. There is very little documentation and the only other thread I found (that is close to my question) is this: http://stackoverflow.com/questions/1520503/how-do-you-push-android-instrumentation-tests-to-emulator-device Here is my ddms output when I run this command: *********************************** 05-23 11:59:07.118: INFO/TestRunner(10253): started: warning(junit.framework.TestSuite$1) 05-23 11:59:07.118: INFO/TestRunner(10253): failed: warning(junit.framework.TestSuite$1) 05-23 11:59:07.118: INFO/TestRunner(10253): ----- begin exception ----- 05-23 11:59:07.118: INFO/TestRunner(10253): junit.framework.AssertionFailedError: No tests found in com.android.dumprendertree.LayoutTestsAutoTest 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.Assert.fail(Assert.java:47) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestSuite$1.runTest(TestSuite.java:263) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestCase.runBare(TestCase.java:127) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestResult$1.protect(TestResult.java:106) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestResult.runProtected(TestResult.java:124) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestResult.run(TestResult.java:109) 05-23 11:59:07.118: INFO/TestRunner(10253): at junit.framework.TestCase.run(TestCase.java:118) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537) 05-23 11:59:07.118: INFO/TestRunner(10253): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551) 05-23 11:59:07.118: INFO/TestRunner(10253): ----- end exception ----- 05-23 11:59:07.126: INFO/TestRunner(10253): finished: warning(junit.framework.TestSuite$1) 05-23 11:59:07.126: INFO/TestRunner(10253): started: warning(junit.framework.TestSuite$1) 05-23 11:59:07.126: INFO/TestRunner(10253): failed: warning(junit.framework.TestSuite$1) 05-23 11:59:07.126: INFO/TestRunner(10253): ----- begin exception ----- 05-23 11:59:07.126: INFO/TestRunner(10253): junit.framework.AssertionFailedError: No tests found in com.android.dumprendertree.LoadTestsAutoTest 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.Assert.fail(Assert.java:47) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestSuite$1.runTest(TestSuite.java:263) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestCase.runBare(TestCase.java:127) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestResult$1.protect(TestResult.java:106) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestResult.runProtected(TestResult.java:124) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestResult.run(TestResult.java:109) 05-23 11:59:07.126: INFO/TestRunner(10253): at junit.framework.TestCase.run(TestCase.java:118) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537) 05-23 11:59:07.126: INFO/TestRunner(10253): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551) 05-23 11:59:07.126: INFO/TestRunner(10253): ----- end exception ----- 05-23 11:59:07.126: INFO/TestRunner(10253): finished: warning(junit.framework.TestSuite$1) ******************************** Should I be pushing in some tests before I run this? Any pointers would be greatly appreciated!
0
7,561,547
09/26/2011 21:29:03
965,775
09/26/2011 20:09:42
1
0
jQuery or JavaScript - Is it possible to change/switch .png's and save in cookie?
I'm looking for a way to change/switch .png's in several classes and save this to a cookie? <body> <div class="xr_ap" id="xr_xr" style="width: 955px; height: 1000px; top:0px; left:50%; margin-left: -478px;"> <i m g class="xr_ap" src="3.png" alt="" title="" style="left: 96px; top: 39px; width: 782px; height: 165px;"/> <i m g class="xr_ap" src="4.png" alt="" title="" style="left: 86px; top: 792px; width: 783px; height: 165px;"/> </div> </body> </html>
javascript
jquery
null
null
null
09/26/2011 22:19:42
not a real question
jQuery or JavaScript - Is it possible to change/switch .png's and save in cookie? === I'm looking for a way to change/switch .png's in several classes and save this to a cookie? <body> <div class="xr_ap" id="xr_xr" style="width: 955px; height: 1000px; top:0px; left:50%; margin-left: -478px;"> <i m g class="xr_ap" src="3.png" alt="" title="" style="left: 96px; top: 39px; width: 782px; height: 165px;"/> <i m g class="xr_ap" src="4.png" alt="" title="" style="left: 86px; top: 792px; width: 783px; height: 165px;"/> </div> </body> </html>
1
9,420,875
02/23/2012 20:38:00
1,226,752
02/22/2012 19:59:25
11
0
.Net 32 bits to 64 bits migration pb?
I had developed a 32 bits .Net windows application. the application had some custom control using images. When I install it on a 64 bits CPU, all images looks bigger and not on the right position. labels are bigger too. any idea about this problem ?
c#
.net
winforms
64bit
x86
null
open
.Net 32 bits to 64 bits migration pb? === I had developed a 32 bits .Net windows application. the application had some custom control using images. When I install it on a 64 bits CPU, all images looks bigger and not on the right position. labels are bigger too. any idea about this problem ?
0
11,586,058
07/20/2012 19:48:27
310,291
03/02/2010 15:22:39
4,191
21
Doest firebug delete urls after redirect?
It is said here http://www.imperialviolet.org/2012/07/19/hope9talk.html > https://www.citibank.com redirects her to http://www.citibank.com. > They've downgraded the user! From there, the HTTP site should redirect > back to HTTPS, but the damage has been done. An attacker can get in > through the hole. I wanted to see by myself and in firebug I typed https://www.citibank.com but I can only see https://online.citibank.com url domain. Seems Firebug deletes first urls. How to prevent Firebug to do so ? Or did Citibank changes something after reading the article published yesterday ?
firefox
ssl
https
firebug
null
07/22/2012 03:11:20
off topic
Doest firebug delete urls after redirect? === It is said here http://www.imperialviolet.org/2012/07/19/hope9talk.html > https://www.citibank.com redirects her to http://www.citibank.com. > They've downgraded the user! From there, the HTTP site should redirect > back to HTTPS, but the damage has been done. An attacker can get in > through the hole. I wanted to see by myself and in firebug I typed https://www.citibank.com but I can only see https://online.citibank.com url domain. Seems Firebug deletes first urls. How to prevent Firebug to do so ? Or did Citibank changes something after reading the article published yesterday ?
2
11,611,603
07/23/2012 11:26:28
1,091,692
12/10/2011 21:47:22
15
0
need to change valid session properties to invalid
hey there i want to know if there is framework for session properties as using spring in order to change some sessions properties to invalid without using request Intercepter. thanks
java
spring
session
properties
null
07/24/2012 13:11:42
not constructive
need to change valid session properties to invalid === hey there i want to know if there is framework for session properties as using spring in order to change some sessions properties to invalid without using request Intercepter. thanks
4
9,792,098
03/20/2012 17:39:45
156,300
08/14/2009 06:51:32
1
3
Leniently handling conversion exceptions (skip/ignore) using mongo spring-data
Was wondering if there's a way one can handle conversion errors in a lenient way. Given a query that returns a List[ModelObject] If there are 5 DBObjects retrieved, one of them is throwing a ConversionException when converted to ModelObject, is there a way to return the 4 convertible objects and provide a hook for the 1 conversion failure?
mongodb
spring-data
null
null
null
null
open
Leniently handling conversion exceptions (skip/ignore) using mongo spring-data === Was wondering if there's a way one can handle conversion errors in a lenient way. Given a query that returns a List[ModelObject] If there are 5 DBObjects retrieved, one of them is throwing a ConversionException when converted to ModelObject, is there a way to return the 4 convertible objects and provide a hook for the 1 conversion failure?
0
8,455,414
12/10/2011 08:43:02
670,979
03/22/2011 10:08:07
518
18
One arrow too much
There is an arrow too much and it's only occuring in IE 8. You can see it on http://www.tuxx.nl/test.htm on the right bottom in the red marked link. How can I get rid of the big orange arrow in IE 8? I couldn't find this arrow in the CSS. Many, many thanks! Regards, Kevin
html
css
image
null
null
12/10/2011 17:45:03
not a real question
One arrow too much === There is an arrow too much and it's only occuring in IE 8. You can see it on http://www.tuxx.nl/test.htm on the right bottom in the red marked link. How can I get rid of the big orange arrow in IE 8? I couldn't find this arrow in the CSS. Many, many thanks! Regards, Kevin
1
6,857,610
07/28/2011 10:38:06
848,585
07/17/2011 10:37:08
6
0
GPL license: how to fulfill in commercial applications
is the GPL license fulfilled if someone create a multiplatform application and it is free on linux (must be open source too?) while it is commercial on other paltforms?
gpl
libraries
lgpl
null
null
07/29/2011 16:33:44
off topic
GPL license: how to fulfill in commercial applications === is the GPL license fulfilled if someone create a multiplatform application and it is free on linux (must be open source too?) while it is commercial on other paltforms?
2
2,466,689
03/17/2010 23:37:25
86,537
04/03/2009 03:16:58
230
5
Books/resources for help with extracting useful feedback from clients?
I'm a web application developer looking for a book or something similar that can help with effectively communicating with clients who have a very vague or unrealistic idea of what they'd like out of the work I'm doing. Some fictional, though not by much, examples of situations: - Clients who are not familiar with using the Internet, and insist on features that are not even remotely feasible (ex. time travel) - Clients who are unable to express accurately what they're looking for (ex. "I know that's what I said and signed off on, but it's not what I meant") - Clients who refuse to attend meetings or review sessions to answer questions or define requirements (which makes any agile development impossible) For the most part, I'm trying to find best practices for how to handle these kinds of things on a team-building level. The best ways to effectively address serious project roadblocks without sounding like a total jerk. Any recommendations for reading material on this topic?
requirements
teamwork
null
null
null
null
open
Books/resources for help with extracting useful feedback from clients? === I'm a web application developer looking for a book or something similar that can help with effectively communicating with clients who have a very vague or unrealistic idea of what they'd like out of the work I'm doing. Some fictional, though not by much, examples of situations: - Clients who are not familiar with using the Internet, and insist on features that are not even remotely feasible (ex. time travel) - Clients who are unable to express accurately what they're looking for (ex. "I know that's what I said and signed off on, but it's not what I meant") - Clients who refuse to attend meetings or review sessions to answer questions or define requirements (which makes any agile development impossible) For the most part, I'm trying to find best practices for how to handle these kinds of things on a team-building level. The best ways to effectively address serious project roadblocks without sounding like a total jerk. Any recommendations for reading material on this topic?
0
6,896,834
08/01/2011 10:01:40
872,574
08/01/2011 10:01:40
1
0
Is possible to restrict the DB2 database operators must using "WHERE" clause in "DELETE" statements?
There is a Database in my project. More than 20 guys have the access to operate the data in some of the tables. However, some of them always forget to use "WHERE" clause after "DELETE" or "UPDATE". Is possible to restrict the DB2 database operators must using "WHERE" clause in "DELETE" and "UPDATE" statements? Otherwise is there any program for us to check the SQL files?
sql
db2
null
null
null
10/19/2011 19:12:35
not a real question
Is possible to restrict the DB2 database operators must using "WHERE" clause in "DELETE" statements? === There is a Database in my project. More than 20 guys have the access to operate the data in some of the tables. However, some of them always forget to use "WHERE" clause after "DELETE" or "UPDATE". Is possible to restrict the DB2 database operators must using "WHERE" clause in "DELETE" and "UPDATE" statements? Otherwise is there any program for us to check the SQL files?
1
3,961,071
10/18/2010 16:15:16
421,636
08/16/2010 10:56:31
10
0
Android: how to make a clickable map image with each country producing a different action?
I need to display a pretty image of a map of Europe, and I want my app to, e.g. bring up a different activity, when the user clicks each country - each country on the map needs to have a different onClickListener (or equivalent). Essentially, I need to be able to call a different function when the user taps on France rather than Spain in an image such as this: http://commons.wikimedia.org/wiki/File:Blank_map_of_Europe_cropped.svg How would I best go about this on Android? I've got ideas, but there may be some simple way that I'm overlooking. Many thanks in advance! Cheers, r3mo
android
image
null
null
null
null
open
Android: how to make a clickable map image with each country producing a different action? === I need to display a pretty image of a map of Europe, and I want my app to, e.g. bring up a different activity, when the user clicks each country - each country on the map needs to have a different onClickListener (or equivalent). Essentially, I need to be able to call a different function when the user taps on France rather than Spain in an image such as this: http://commons.wikimedia.org/wiki/File:Blank_map_of_Europe_cropped.svg How would I best go about this on Android? I've got ideas, but there may be some simple way that I'm overlooking. Many thanks in advance! Cheers, r3mo
0
6,480,140
06/25/2011 19:51:33
98,389
04/30/2009 09:14:47
2,504
86
AppDomain shadow copying not working (original assemblies locked)
Here's a small class I'm using to probe for a list of available plugins: internal static class PluginDirectoryLoader { public static PluginInfo[] ListPlugins(string path) { var name = Path.GetFileName(path); var setup = new AppDomainSetup { ApplicationBase = path, ShadowCopyFiles = "true" }; var appdomain = AppDomain.CreateDomain("PluginDirectoryLoader." + name, null, setup); var exts = (IServerExtensionDiscovery)appdomain.CreateInstanceAndUnwrap("ServerX.Common", "ServerX.Common.ServerExtensionDiscovery"); PluginInfo[] plugins = null; try { plugins = exts.ListPlugins(); // <-- BREAK HERE } catch { // to do } finally { AppDomain.Unload(appdomain); } return plugins ?? new PluginInfo[0]; } } The `path` parameter points to a subdirectory containing the plugin assemblies to load. The idea is to load them using a separate AppDomain with shadow copying enabled. In *this* case, shadow copying isn't really necessary seeing as the AppDomain is unloaded quickly, but when I actually load the plugins in the next block of code I intend to write, I want to use shadow copying so the binaries can be updated on the fly. I have enabled shadow copying in this class as a test to make sure I'm doing it right. Apparently I'm not doing it right because when I break in the debugger on the commented line in the code sample (i.e. `plugins = exts.ListPlugins()`), the original plugin assemblies are locked by the application! Seeing as I'm specifying that assemblies loaded by the AppDomain should be shadow copied, why are they being locked by the application?
c#
.net
reflection
appdomain
null
null
open
AppDomain shadow copying not working (original assemblies locked) === Here's a small class I'm using to probe for a list of available plugins: internal static class PluginDirectoryLoader { public static PluginInfo[] ListPlugins(string path) { var name = Path.GetFileName(path); var setup = new AppDomainSetup { ApplicationBase = path, ShadowCopyFiles = "true" }; var appdomain = AppDomain.CreateDomain("PluginDirectoryLoader." + name, null, setup); var exts = (IServerExtensionDiscovery)appdomain.CreateInstanceAndUnwrap("ServerX.Common", "ServerX.Common.ServerExtensionDiscovery"); PluginInfo[] plugins = null; try { plugins = exts.ListPlugins(); // <-- BREAK HERE } catch { // to do } finally { AppDomain.Unload(appdomain); } return plugins ?? new PluginInfo[0]; } } The `path` parameter points to a subdirectory containing the plugin assemblies to load. The idea is to load them using a separate AppDomain with shadow copying enabled. In *this* case, shadow copying isn't really necessary seeing as the AppDomain is unloaded quickly, but when I actually load the plugins in the next block of code I intend to write, I want to use shadow copying so the binaries can be updated on the fly. I have enabled shadow copying in this class as a test to make sure I'm doing it right. Apparently I'm not doing it right because when I break in the debugger on the commented line in the code sample (i.e. `plugins = exts.ListPlugins()`), the original plugin assemblies are locked by the application! Seeing as I'm specifying that assemblies loaded by the AppDomain should be shadow copied, why are they being locked by the application?
0
11,688,305
07/27/2012 13:02:32
1,364,871
04/30/2012 00:59:39
14
0
Ubuntu installer problems
I am fairly new to Ubuntu and I have some problems. My Ubuntu version is 11.10. For some time now, the Ubuntu software center hasn't been working (when I click on it, it lights up a bit, as if it will start, but nothing happens), and installing from the terminal does nothing as well. Whatever I try to install that way, I get the message: > Reading package lists... Done > Building dependency tree... 0% And then it kind of freezes. Both the installer and the software center have been working fine before, but I have no idea when they stopped, or what I did to make them this way... Does anyone have any idea how I can fix them?
linux
ubuntu
ubuntu-11.10
null
null
07/28/2012 05:41:05
off topic
Ubuntu installer problems === I am fairly new to Ubuntu and I have some problems. My Ubuntu version is 11.10. For some time now, the Ubuntu software center hasn't been working (when I click on it, it lights up a bit, as if it will start, but nothing happens), and installing from the terminal does nothing as well. Whatever I try to install that way, I get the message: > Reading package lists... Done > Building dependency tree... 0% And then it kind of freezes. Both the installer and the software center have been working fine before, but I have no idea when they stopped, or what I did to make them this way... Does anyone have any idea how I can fix them?
2
8,968,709
01/23/2012 08:15:16
1,142,527
01/11/2012 06:33:01
3
0
what this code is used for?
i was wondering what this code is used for : if (jQuery.browser.msie) jQuery(window).one("unload", function() { var global = jQuery.timer.global; for ( var label in global ) { var els = global[label], i = els.length; while ( --i ) jQuery.timer.remove(els[i], label); } }); and why should i use function unload for ? one more question : i have an example that is working on IE9 , but when i run it on IE7 , its not working, what conditions should i know about it , thank u
java
jquery
html
css
null
01/24/2012 05:27:19
not a real question
what this code is used for? === i was wondering what this code is used for : if (jQuery.browser.msie) jQuery(window).one("unload", function() { var global = jQuery.timer.global; for ( var label in global ) { var els = global[label], i = els.length; while ( --i ) jQuery.timer.remove(els[i], label); } }); and why should i use function unload for ? one more question : i have an example that is working on IE9 , but when i run it on IE7 , its not working, what conditions should i know about it , thank u
1
2,312,341
02/22/2010 16:28:14
278,835
02/22/2010 16:28:14
1
0
Any good vendors of ASP.NET themes/skins out there?
Are there any good vendors out there that supply good ASP.NET themes/skin suites? Are there any graphic artists out there that have a suite for sale? I'll be first to admit that developers are not artists (even though we think we are) and am looking for a nice drop-in theme created by talented designer(s). I'm not looking for a fancy AJAX control library (Telerik, etc.), but just a nice looking refresh of all the basic server controls. Thanks for any help.
themes
null
null
null
null
null
open
Any good vendors of ASP.NET themes/skins out there? === Are there any good vendors out there that supply good ASP.NET themes/skin suites? Are there any graphic artists out there that have a suite for sale? I'll be first to admit that developers are not artists (even though we think we are) and am looking for a nice drop-in theme created by talented designer(s). I'm not looking for a fancy AJAX control library (Telerik, etc.), but just a nice looking refresh of all the basic server controls. Thanks for any help.
0
10,624,642
05/16/2012 18:40:48
1,241,849
03/01/2012 04:57:20
14
0
How to save games?
Hello guys i am amateur programmer and i'm currently working on a breakout game a simple one of course. i'm trying to make to create a saved gamestate for how exactly would i go by approaching this. i am making the breakout game in windows forms project by the way.
c#
save
null
null
null
05/16/2012 18:49:27
not a real question
How to save games? === Hello guys i am amateur programmer and i'm currently working on a breakout game a simple one of course. i'm trying to make to create a saved gamestate for how exactly would i go by approaching this. i am making the breakout game in windows forms project by the way.
1
314,768
11/24/2008 16:54:48
40,322
11/24/2008 16:54:48
1
0
Outsourcing Classes by Supporting Unit Tests
I've got an application which developed by employing TDD as methodology (not strictly but mostly). Now I want to outsource some parts of the application because I don't have enough time to develop it. I'm planning use websites such as "Rent A Coder", "elancer" etc. I don't want to give out my code to anyone else, so I'm planning to give them a "Class Design" and bunch of "Unit Tests" that the class need to pass. After this point when I deliver the class I'll run it against my Unit Tester (with different values) and see if it can pass it. If it passes everyone will be happy, and I'll call this class from my application as planned and it'll work. Do you think this is good idea? What sort of pitfalls might happen? And this sounds too good to me, if it's why other people are not doing this? p.s. I hope this question fits to format of stackoverflow couldn't find a better place to ask this.
outsourcing
.net
business
tdd
privacy
05/06/2012 23:20:56
not constructive
Outsourcing Classes by Supporting Unit Tests === I've got an application which developed by employing TDD as methodology (not strictly but mostly). Now I want to outsource some parts of the application because I don't have enough time to develop it. I'm planning use websites such as "Rent A Coder", "elancer" etc. I don't want to give out my code to anyone else, so I'm planning to give them a "Class Design" and bunch of "Unit Tests" that the class need to pass. After this point when I deliver the class I'll run it against my Unit Tester (with different values) and see if it can pass it. If it passes everyone will be happy, and I'll call this class from my application as planned and it'll work. Do you think this is good idea? What sort of pitfalls might happen? And this sounds too good to me, if it's why other people are not doing this? p.s. I hope this question fits to format of stackoverflow couldn't find a better place to ask this.
4
11,708,898
07/29/2012 11:33:28
1,497,737
07/03/2012 04:52:50
4
1
Windows Phone 7 after ios developement
This might sound a bit of the topic, but i really wanna know whether it is a good idea to learn windows phone 7 development after ios development. I am still learning ios, but of the basic stuff is covered. So I was thinking to start windows 7 development side by side. So is it a good idea?
windows-phone-7
ios5
null
null
null
07/30/2012 12:50:30
not constructive
Windows Phone 7 after ios developement === This might sound a bit of the topic, but i really wanna know whether it is a good idea to learn windows phone 7 development after ios development. I am still learning ios, but of the basic stuff is covered. So I was thinking to start windows 7 development side by side. So is it a good idea?
4
11,695,646
07/27/2012 21:06:12
1,067,665
11/27/2011 07:15:44
34
0
how can i create a html5 calendar as the link belowe
I am wondering: how can I create a html5 calendar as the link: http://html5advent.com/ ? I need a calendar in which, when I click on a date or a day in the calendar it opens a new page with the event, for example, register some kind of job. If somebody knows some good examples or if I can downloads some codes? OBS! I use java for the backend part and need a calendar as I mentioned. Tanks
html5
calendar
null
null
null
07/27/2012 21:23:43
not a real question
how can i create a html5 calendar as the link belowe === I am wondering: how can I create a html5 calendar as the link: http://html5advent.com/ ? I need a calendar in which, when I click on a date or a day in the calendar it opens a new page with the event, for example, register some kind of job. If somebody knows some good examples or if I can downloads some codes? OBS! I use java for the backend part and need a calendar as I mentioned. Tanks
1
11,214,641
06/26/2012 19:30:11
1,483,786
06/26/2012 19:27:05
1
0
02 wordpress posts with same id
We are trying to create two wordpress posts with same id (different language, one in english and other in urdu) so that user can see posts in either language by using language filter. Would you please advise how can we make two posts with same id.
wordpress
filter
language
posts
null
06/29/2012 03:11:30
not a real question
02 wordpress posts with same id === We are trying to create two wordpress posts with same id (different language, one in english and other in urdu) so that user can see posts in either language by using language filter. Would you please advise how can we make two posts with same id.
1
3,408,735
08/04/2010 18:43:18
77,538
03/13/2009 04:01:51
2,485
102
Pushing messages to clients from a server-side application?
I have a javascript-based client that is currently polling a .NET web service for new content. While polling works...I'm not happy with this approach because I'm using system resources and creating overhead when there aren't any changes to receive. **My question is how do I notify my client(s) that there is new content for it to display? I am open to on any additional technologies I would have to implement this solution with.**
.net
javascript
client-server
null
null
null
open
Pushing messages to clients from a server-side application? === I have a javascript-based client that is currently polling a .NET web service for new content. While polling works...I'm not happy with this approach because I'm using system resources and creating overhead when there aren't any changes to receive. **My question is how do I notify my client(s) that there is new content for it to display? I am open to on any additional technologies I would have to implement this solution with.**
0
11,446,968
07/12/2012 07:29:28
1,519,973
07/12/2012 07:19:18
1
0
Flexible open source forum/discussion software needed
I'm looking at setting up a forum/BB/discussion web site. It would be different from standard sites in that - some automated checks would need to be made before a new discussion is allowed to be created (such as examining the contents of any URLs within the message) - would need to do some automated deletion or archiving of discussions based on criteria such as the discussion containing broken or expired URLs From what I have read phpBB would not be ideal for this but Joomla or Drupal could be better? I have fairly good programming skills. Thanks for any advice.
drupal
joomla
content-management-system
null
null
07/14/2012 05:09:51
not constructive
Flexible open source forum/discussion software needed === I'm looking at setting up a forum/BB/discussion web site. It would be different from standard sites in that - some automated checks would need to be made before a new discussion is allowed to be created (such as examining the contents of any URLs within the message) - would need to do some automated deletion or archiving of discussions based on criteria such as the discussion containing broken or expired URLs From what I have read phpBB would not be ideal for this but Joomla or Drupal could be better? I have fairly good programming skills. Thanks for any advice.
4
964,177
06/08/2009 10:07:22
66,353
02/14/2009 04:17:33
655
51
What is a running CRC?
I have searched and am not able to find information on what it is and how it is computed.
crc
crc32
null
null
null
null
open
What is a running CRC? === I have searched and am not able to find information on what it is and how it is computed.
0
8,917,070
01/18/2012 20:40:53
1,157,114
01/18/2012 20:33:22
1
0
Cannot get the multi selected rows in jqGrid 4.3.1
Code: ------------------------------------------------------------------------ beforeRequest: function() { try { alert(jQuery('#list').jqGrid('getGridParam','selarrrow')); alert(jQuery("#list").getGridParam("selarrrow")); } catch (e) { alert(e.message); } }, ------------------------------------------------------------------------ Both alerts return nothing. "list" is the table id. Thanks in advance.
jquery
null
null
null
null
01/18/2012 21:51:43
not a real question
Cannot get the multi selected rows in jqGrid 4.3.1 === Code: ------------------------------------------------------------------------ beforeRequest: function() { try { alert(jQuery('#list').jqGrid('getGridParam','selarrrow')); alert(jQuery("#list").getGridParam("selarrrow")); } catch (e) { alert(e.message); } }, ------------------------------------------------------------------------ Both alerts return nothing. "list" is the table id. Thanks in advance.
1
5,637,160
04/12/2011 14:46:25
82,159
03/24/2009 18:38:06
1,491
74
Guarding resources with Singleton?
I have read quite a few blog posts and answers on SO pointing to Singleton being a bad design. Previously I implemented a singleton CameraControl class. This class controls a camera which is connected to the system. Under the following knowledge: * Under no circumstance will there be more than one camera (the camera API provided by the camera maker control all cameras). * Using the API of the camera maker in multiple places at the same time have caused problems in the past (e.g. one thread trying to grab an image, the other thread trying to set the shutter speed). * My class only provides several extra methods to display the image captured in a UI. Forward the image to a face detector, ... (i.e. it is not memory intensive). Is my choice of making this class a singleton class a bad decision?
c++
design-patterns
singleton
null
null
null
open
Guarding resources with Singleton? === I have read quite a few blog posts and answers on SO pointing to Singleton being a bad design. Previously I implemented a singleton CameraControl class. This class controls a camera which is connected to the system. Under the following knowledge: * Under no circumstance will there be more than one camera (the camera API provided by the camera maker control all cameras). * Using the API of the camera maker in multiple places at the same time have caused problems in the past (e.g. one thread trying to grab an image, the other thread trying to set the shutter speed). * My class only provides several extra methods to display the image captured in a UI. Forward the image to a face detector, ... (i.e. it is not memory intensive). Is my choice of making this class a singleton class a bad decision?
0
2,857,463
05/18/2010 13:03:24
319,254
04/17/2010 14:39:50
32
0
Where to start openGL ES to create and rotate a cube in an iPhone?
I've done some apps on iPhone using Objevtive-C and Cocos2d, and I'd like to start learning 3D. My first goal is to make a simple app that: - Displays a 3D cube in the center of the screen. - And move the camera around the cube as you drag your finger. I want something very simple: no texture, no background, just a cube that can be rotated with touch event. And the rotation can juste be horizontal and vertical. Where should I start to be able to do this app? I'm searching for some tutorials or exemples. Thanks!
iphone
opengl-es
3d
null
null
02/01/2012 14:45:37
not a real question
Where to start openGL ES to create and rotate a cube in an iPhone? === I've done some apps on iPhone using Objevtive-C and Cocos2d, and I'd like to start learning 3D. My first goal is to make a simple app that: - Displays a 3D cube in the center of the screen. - And move the camera around the cube as you drag your finger. I want something very simple: no texture, no background, just a cube that can be rotated with touch event. And the rotation can juste be horizontal and vertical. Where should I start to be able to do this app? I'm searching for some tutorials or exemples. Thanks!
1
8,684,018
12/30/2011 20:55:52
1,123,502
12/30/2011 20:24:23
1
0
does non-local type inference in haskell or ocaml really usefull?
First, I assume that local type inference is type inference like Scala and C# type inference. Also, such a definition as fact 0 = 1 fact n = n * fact(n-1) seems to be local type inference. Type inference here is local to function fact. So, I wonder, is there a practical example of at least 2 mutually recusive functions or any other non-locality at your discretion that has some benefit from type inference? Please do not post a silly examples like odd 0 = false odd n = even(n-1) even 0 = true even n = odd(n-1) I suspect that non-silly, practical examples arise in parses. Also, please point a benefit for a programmer to such use of non-local type inference. // Also, feel free to correct my english.
haskell
ocaml
type-inference
example
non-local
12/31/2011 03:30:03
not constructive
does non-local type inference in haskell or ocaml really usefull? === First, I assume that local type inference is type inference like Scala and C# type inference. Also, such a definition as fact 0 = 1 fact n = n * fact(n-1) seems to be local type inference. Type inference here is local to function fact. So, I wonder, is there a practical example of at least 2 mutually recusive functions or any other non-locality at your discretion that has some benefit from type inference? Please do not post a silly examples like odd 0 = false odd n = even(n-1) even 0 = true even n = odd(n-1) I suspect that non-silly, practical examples arise in parses. Also, please point a benefit for a programmer to such use of non-local type inference. // Also, feel free to correct my english.
4
6,706,883
07/15/2011 12:22:29
329,755
04/30/2010 12:46:03
104
12
IE 6 issue - page not found
I am trying to access my application (in asp.net iis6 .Net-4.0) on IE6. The login page is displayed but just after loading, error page is shown (the page could not be found). Is there any problem in machine config ? Any idea. It is working fine in other browsers
asp.net
.net-4.0
internet-explorer-6
ie6-bug
null
07/15/2011 21:50:00
not a real question
IE 6 issue - page not found === I am trying to access my application (in asp.net iis6 .Net-4.0) on IE6. The login page is displayed but just after loading, error page is shown (the page could not be found). Is there any problem in machine config ? Any idea. It is working fine in other browsers
1
652,216
03/16/2009 21:26:25
78,775
03/16/2009 21:26:25
1
0
How do you set kAudioServicesPropertyIsUISound via AudioServicesSetProperty?
How do you set kAudioServicesPropertyIsUISound to 0 using AudioServicesSetProperty? Thanks
iphone
null
null
null
null
null
open
How do you set kAudioServicesPropertyIsUISound via AudioServicesSetProperty? === How do you set kAudioServicesPropertyIsUISound to 0 using AudioServicesSetProperty? Thanks
0
7,055,200
08/14/2011 05:25:24
262,703
01/31/2010 00:01:46
128
2
Inaccessible server after DNS server change
After configuring a domain name to use the name server of the new server, the new server had become inaccessible (even if using the IP address). Is this normal?
dns
ip-address
null
null
null
08/14/2011 11:14:37
off topic
Inaccessible server after DNS server change === After configuring a domain name to use the name server of the new server, the new server had become inaccessible (even if using the IP address). Is this normal?
2