question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,213,672 | 6,213,972 | Gin problem using GWT - GWT.create(someClass.class) return different instance every time is called | here is my problem. I m using Gin in a gwt project, i m using GWT.create(SomeClass.class) to get instance,but the problem is that i want signleton instance and for that purpose i bind that class in the app module to be singleton. Every tome i execute GWT.create(TemplatePanel.class) it returns different instance..why?? ... | GWT.create(..) does not work with GIN, it just creates an object in a normal GWT way. You should either: Inject TemplatePanel in MainPanel, or Instantiate injector (via static method maybe) and then get TemplatePanel. I usually have a static reference to injector (since you only need one per app) so I can access it any... | Gin problem using GWT - GWT.create(someClass.class) return different instance every time is called here is my problem. I m using Gin in a gwt project, i m using GWT.create(SomeClass.class) to get instance,but the problem is that i want signleton instance and for that purpose i bind that class in the app module to be si... | TITLE:
Gin problem using GWT - GWT.create(someClass.class) return different instance every time is called
QUESTION:
here is my problem. I m using Gin in a gwt project, i m using GWT.create(SomeClass.class) to get instance,but the problem is that i want signleton instance and for that purpose i bind that class in the a... | [
"java",
"gwt",
"guice",
"gwt-gin"
] | 1 | 7 | 1,812 | 2 | 0 | 2011-06-02T11:01:33.960000 | 2011-06-02T11:34:04.267000 |
6,213,685 | 6,213,838 | Simple Magento question | I have a website in Magento, it's still very simple and unfinished. Since I'm a beginner in this field, I'd like someone to point me to a solution: How do I change the Checkout link text? Is it done inside the phtml/XML structure or inside admin panel? this is my website: [notice the Checkout link] http://gale.dev4.web... | You should be able to change the text in the the following template \app\design\frontend\enterprise\default\template\checkout\cart\cartheader.phtml Kindly note that this is a directory path from an enterprise installation. Yours might be different but the filename of the template should be the same. Another option is t... | Simple Magento question I have a website in Magento, it's still very simple and unfinished. Since I'm a beginner in this field, I'd like someone to point me to a solution: How do I change the Checkout link text? Is it done inside the phtml/XML structure or inside admin panel? this is my website: [notice the Checkout li... | TITLE:
Simple Magento question
QUESTION:
I have a website in Magento, it's still very simple and unfinished. Since I'm a beginner in this field, I'd like someone to point me to a solution: How do I change the Checkout link text? Is it done inside the phtml/XML structure or inside admin panel? this is my website: [noti... | [
"php",
"magento"
] | 0 | 0 | 82 | 2 | 0 | 2011-06-02T11:02:45.270000 | 2011-06-02T11:20:12.910000 |
6,213,690 | 6,214,440 | OutOfMemory error while joining large images | I am joining two images using the code below but it throws an OutOfMemory error my images are around 1MB each. private Bitmap overlayMark(String first, String second) { Bitmap bmp1, bmp2; bmp1 = BitmapFactory.decodeFile(first); bmp2 = BitmapFactory.decodeFile(second); if (bmp1 == null || bmp2 == null) return bmp1;
int... | Without loading the image into memory, you CAN get the size of the image, using inJustDecodeBounds. The Bitmap returns null, but all the parameters are set. You can scale down the image accordingly. If your JPEG images are 1 MiB each, conversion to a BMP will take a lot of memory indeed. You can easily calculate its BM... | OutOfMemory error while joining large images I am joining two images using the code below but it throws an OutOfMemory error my images are around 1MB each. private Bitmap overlayMark(String first, String second) { Bitmap bmp1, bmp2; bmp1 = BitmapFactory.decodeFile(first); bmp2 = BitmapFactory.decodeFile(second); if (bm... | TITLE:
OutOfMemory error while joining large images
QUESTION:
I am joining two images using the code below but it throws an OutOfMemory error my images are around 1MB each. private Bitmap overlayMark(String first, String second) { Bitmap bmp1, bmp2; bmp1 = BitmapFactory.decodeFile(first); bmp2 = BitmapFactory.decodeFi... | [
"android",
"bitmap",
"out-of-memory"
] | 12 | 13 | 4,936 | 7 | 0 | 2011-06-02T11:03:03.520000 | 2011-06-02T12:22:52.497000 |
6,213,691 | 6,233,339 | Anyways of making a Lucene field stored as well as streamed through a reader | Is there a way of creating a field in Lucene which can accept a reader or InputStream and also store the content of it? I want to store the data so that it can be used at the time of Highlighting and I want to stream the data because the content of the documents might be really large. I do not see a constructor for a f... | If your documents are not too large, just read them into memory first, and then specify the resulting value as a String when adding a new Field. If the documents are large, split them into manageable chunks and perform the above operation on each chunk. Make sure to use the same field name for each chunk, so that Lucen... | Anyways of making a Lucene field stored as well as streamed through a reader Is there a way of creating a field in Lucene which can accept a reader or InputStream and also store the content of it? I want to store the data so that it can be used at the time of Highlighting and I want to stream the data because the conte... | TITLE:
Anyways of making a Lucene field stored as well as streamed through a reader
QUESTION:
Is there a way of creating a field in Lucene which can accept a reader or InputStream and also store the content of it? I want to store the data so that it can be used at the time of Highlighting and I want to stream the data... | [
"lucene",
"stream",
"field",
"store"
] | 2 | 3 | 725 | 1 | 0 | 2011-06-02T11:03:03.553000 | 2011-06-03T22:39:24.813000 |
6,213,697 | 6,216,831 | Conditional Union in T-SQL | Currently I've a query as follows: -- Query 1 SELECT acc_code, acc_name, alias, LAmt, coalesce(LAmt,0) AS amt FROM (SELECT acc_code, acc_name, alias, (SELECT (SUM(cr_amt)-SUM(dr_amt)) FROM ledger_mcg l WHERE (l.acc_code LIKE a.acc_code + '.%' OR l.acc_code=a.acc_code) AND fy_id=1 AND posted_date BETWEEN '2010-01-01' AN... | You could store the result of the first query into a temporary table, then, if the table wasn't empty, execute the other query. IF OBJECT_ID('tempdb..#MultipleQueriesResults') IS NOT NULL DROP TABLE #MultipleQueriesResults;
SELECT acc_code, acc_name, alias, LAmt, coalesce(LAmt,0) AS amt INTO #MultipleQueriesResults FR... | Conditional Union in T-SQL Currently I've a query as follows: -- Query 1 SELECT acc_code, acc_name, alias, LAmt, coalesce(LAmt,0) AS amt FROM (SELECT acc_code, acc_name, alias, (SELECT (SUM(cr_amt)-SUM(dr_amt)) FROM ledger_mcg l WHERE (l.acc_code LIKE a.acc_code + '.%' OR l.acc_code=a.acc_code) AND fy_id=1 AND posted_d... | TITLE:
Conditional Union in T-SQL
QUESTION:
Currently I've a query as follows: -- Query 1 SELECT acc_code, acc_name, alias, LAmt, coalesce(LAmt,0) AS amt FROM (SELECT acc_code, acc_name, alias, (SELECT (SUM(cr_amt)-SUM(dr_amt)) FROM ledger_mcg l WHERE (l.acc_code LIKE a.acc_code + '.%' OR l.acc_code=a.acc_code) AND fy... | [
"t-sql",
"sql-server-2008"
] | 0 | 5 | 1,058 | 1 | 0 | 2011-06-02T11:03:51.773000 | 2011-06-02T15:41:31.067000 |
6,213,717 | 6,214,366 | What are some good resources for aspiring web designers? | What are some good resources for aspiring web designers? I've been a software developer and web app builder for nearly a decade but my UI skills are from an engineer's perspective. I appreciate quality design and great UX and I'd like to become a better designer myself, what are some good resources to get started with ... | Here are a few I think are relevant... http://www.awwwards.com http://www.smashingmagazine.com http://css-tricks.com | What are some good resources for aspiring web designers? What are some good resources for aspiring web designers? I've been a software developer and web app builder for nearly a decade but my UI skills are from an engineer's perspective. I appreciate quality design and great UX and I'd like to become a better designer ... | TITLE:
What are some good resources for aspiring web designers?
QUESTION:
What are some good resources for aspiring web designers? I've been a software developer and web app builder for nearly a decade but my UI skills are from an engineer's perspective. I appreciate quality design and great UX and I'd like to become ... | [
"css",
"user-interface",
"user-experience"
] | 2 | 1 | 203 | 1 | 0 | 2011-06-02T11:05:58.170000 | 2011-06-02T12:14:59.677000 |
6,213,736 | 6,213,828 | State list of world with country-code | Where can I found the list of all the states of world with their country code (ISO2 or ISO3). I have to insert all these states in my database. If the list is available in the.sql will be great. I need state list of world with country-code not the country list. Do you know where can I found? Thanks in Advance. | http://www.timdavis.com.au/data/ There is a link to a excel spreadsheet of all the country and state information. | State list of world with country-code Where can I found the list of all the states of world with their country code (ISO2 or ISO3). I have to insert all these states in my database. If the list is available in the.sql will be great. I need state list of world with country-code not the country list. Do you know where ca... | TITLE:
State list of world with country-code
QUESTION:
Where can I found the list of all the states of world with their country code (ISO2 or ISO3). I have to insert all these states in my database. If the list is available in the.sql will be great. I need state list of world with country-code not the country list. Do... | [
"php",
"database",
"states"
] | 10 | 4 | 15,839 | 6 | 0 | 2011-06-02T11:08:49.697000 | 2011-06-02T11:19:34.677000 |
6,213,742 | 6,214,216 | Is there away to start a phones native Navigation tool from Flex 4.5? | I am building a mobile application in Flex 4.5 and from this app I would like to start the device's native navigation tool, like Google Navigation for example. Is there a way to open the Navigation App using Flex 4.5? | As far as I knew, there was no way to launch other applications from a mobile Flex App. Some native apps can be opened using URLs. It is, basically, the Flash Platform version of saying "Let the OS Handle it." If you HTTP link to a video, for example, it may open in a native player or it may open in the browser. You ca... | Is there away to start a phones native Navigation tool from Flex 4.5? I am building a mobile application in Flex 4.5 and from this app I would like to start the device's native navigation tool, like Google Navigation for example. Is there a way to open the Navigation App using Flex 4.5? | TITLE:
Is there away to start a phones native Navigation tool from Flex 4.5?
QUESTION:
I am building a mobile application in Flex 4.5 and from this app I would like to start the device's native navigation tool, like Google Navigation for example. Is there a way to open the Navigation App using Flex 4.5?
ANSWER:
As fa... | [
"apache-flex",
"mobile",
"flex4.5",
"air-android"
] | 1 | 0 | 554 | 2 | 0 | 2011-06-02T11:09:23.203000 | 2011-06-02T11:59:25.900000 |
6,213,744 | 6,213,848 | LINQ Querying list in list | I have this situation: My ModelView: public class Subject { public int ID { get; set; } public string Name { get; set; } public int ProfessorID { get; set; } public string ProfessorFullName{ get; set; } public IList Assistants { get; set; } }
public class Assistant { public string AssistantFullName{ get; set; } } My q... | You cannot call ToList inside linq-to-entities query. Linq-to-entities query will always project to IEnumerable so if you want IList you must call it in linq-to-objects. Try this: var subjects = (from subject in Entities.Subjects from professor in subject.Lecturers where professor.Professor == true select new { ID = su... | LINQ Querying list in list I have this situation: My ModelView: public class Subject { public int ID { get; set; } public string Name { get; set; } public int ProfessorID { get; set; } public string ProfessorFullName{ get; set; } public IList Assistants { get; set; } }
public class Assistant { public string AssistantF... | TITLE:
LINQ Querying list in list
QUESTION:
I have this situation: My ModelView: public class Subject { public int ID { get; set; } public string Name { get; set; } public int ProfessorID { get; set; } public string ProfessorFullName{ get; set; } public IList Assistants { get; set; } }
public class Assistant { public... | [
"c#",
"linq",
"linq-to-entities"
] | 2 | 8 | 3,073 | 2 | 0 | 2011-06-02T11:09:33.970000 | 2011-06-02T11:20:40.257000 |
6,213,749 | 6,214,080 | MAPIFolder deprecated so workaround for Outlook programming? | MSDN says this of the MAPIFolder interface (Outlook programming with WPF): This interface is deprecated; do not use this interface. Instead use the interface Folder to access all method, property, and event members of the COM object Folder. I am trying to get the Drafts folder like so: Outlook.MAPIFolder oFolder = olNS... | You simply cast it to Outlook.Folder, i.e. Outlook.Folder oFolder = (Outlook.Folder) olNS.GetDefaultFolder( Outlook.OlDefaultFolders.olFoderDrafts) Admittedly, the MSDN is rather unclear there. You can think of the Folder interface as a wrapper around the MAPIFolder, with additional support for events. As I sidenote, I... | MAPIFolder deprecated so workaround for Outlook programming? MSDN says this of the MAPIFolder interface (Outlook programming with WPF): This interface is deprecated; do not use this interface. Instead use the interface Folder to access all method, property, and event members of the COM object Folder. I am trying to get... | TITLE:
MAPIFolder deprecated so workaround for Outlook programming?
QUESTION:
MSDN says this of the MAPIFolder interface (Outlook programming with WPF): This interface is deprecated; do not use this interface. Instead use the interface Folder to access all method, property, and event members of the COM object Folder. ... | [
"c#",
".net",
"wpf",
"office-2010",
"outlook-object-model"
] | 3 | 4 | 3,154 | 1 | 0 | 2011-06-02T11:09:52.257000 | 2011-06-02T11:43:29.617000 |
6,213,750 | 6,214,309 | Pass a range of ranges to a variadic function | The Phobos documentation shows the following example of ranges passed to a variadic function int[] a = [ 1, 2, 4, 5, 7, 9 ]; int[] b = [ 0, 1, 2, 4, 7, 8 ]; int[] c = [ 0, 1, 4, 5, 7, 8 ]; assert(equal(setIntersection(a, a), a)); assert(equal(setIntersection(a, b), [1, 2, 4, 7][])); assert(equal(setIntersection(a, b, c... | if you don't know how many elements a will have you won't be able to expand it into a tuple at compile time (and consequently pass it into a function) so that for loop is your best bet (or implement your own setIntersection that can take a range of ranges) | Pass a range of ranges to a variadic function The Phobos documentation shows the following example of ranges passed to a variadic function int[] a = [ 1, 2, 4, 5, 7, 9 ]; int[] b = [ 0, 1, 2, 4, 7, 8 ]; int[] c = [ 0, 1, 4, 5, 7, 8 ]; assert(equal(setIntersection(a, a), a)); assert(equal(setIntersection(a, b), [1, 2, 4... | TITLE:
Pass a range of ranges to a variadic function
QUESTION:
The Phobos documentation shows the following example of ranges passed to a variadic function int[] a = [ 1, 2, 4, 5, 7, 9 ]; int[] b = [ 0, 1, 2, 4, 7, 8 ]; int[] c = [ 0, 1, 4, 5, 7, 8 ]; assert(equal(setIntersection(a, a), a)); assert(equal(setIntersecti... | [
"d"
] | 2 | 2 | 134 | 1 | 0 | 2011-06-02T11:10:08.277000 | 2011-06-02T12:07:37.853000 |
6,213,755 | 6,213,919 | Application only runs if you run as administrator? | Edit: This problem only occurs on windows 7 and vista from what I've heard. I have a very simple app developed with an external graphics library. If I install this app into a program files directory and run it, it will crash immediately but it works fine normally, with exactly the same files. I have realised it is beca... | When a program cannot perform an operation, it (the operation) should fail gracefully. My guess is your application is attempting to do something that it cannot do as a normal user and then fails to check for a return code, and then subsequently crashes. You need to identify what it is your program is doing that it sho... | Application only runs if you run as administrator? Edit: This problem only occurs on windows 7 and vista from what I've heard. I have a very simple app developed with an external graphics library. If I install this app into a program files directory and run it, it will crash immediately but it works fine normally, with... | TITLE:
Application only runs if you run as administrator?
QUESTION:
Edit: This problem only occurs on windows 7 and vista from what I've heard. I have a very simple app developed with an external graphics library. If I install this app into a program files directory and run it, it will crash immediately but it works f... | [
"c++",
"windows-7",
"windows-vista",
"administrator"
] | 0 | 3 | 15,210 | 3 | 0 | 2011-06-02T11:11:00.557000 | 2011-06-02T11:28:17.950000 |
6,213,763 | 6,214,086 | mapView not zooming on second try using didUpdateUserLocation | i am loading a mapviewcontroller when the view map button is pressed from my mainviewcontroller: - (IBAction)mapButton:(id)sender { MapKitDisplayViewController *mapKitDisplayView = [[MapKitDisplayViewController alloc] init]; [self presentModalViewController:mapKitDisplayView animated:YES]; [mapKitDisplayView release]; ... | MKMapView object doesn't trigger an update on user location on its own. You need to activate the search by setting showsUserLocation = YES. This will then fetch the user's location and then the delegate method mapView:didUpdateUserLocation: is called. So set this value to YES on viewWillAppear: and once you've the user... | mapView not zooming on second try using didUpdateUserLocation i am loading a mapviewcontroller when the view map button is pressed from my mainviewcontroller: - (IBAction)mapButton:(id)sender { MapKitDisplayViewController *mapKitDisplayView = [[MapKitDisplayViewController alloc] init]; [self presentModalViewController:... | TITLE:
mapView not zooming on second try using didUpdateUserLocation
QUESTION:
i am loading a mapviewcontroller when the view map button is pressed from my mainviewcontroller: - (IBAction)mapButton:(id)sender { MapKitDisplayViewController *mapKitDisplayView = [[MapKitDisplayViewController alloc] init]; [self presentMo... | [
"ios",
"mkmapview",
"android-mapview"
] | 2 | 6 | 2,696 | 2 | 0 | 2011-06-02T11:11:32.973000 | 2011-06-02T11:43:49.397000 |
6,213,764 | 6,213,922 | how to remove the warnings in Jtidy in java | I am using Jtidy parser in java. URL url = new URL("www.yahoo.com"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); InputStream in = conn.getInputStream(); doc = new Tidy().parseDOM(in, null); when I run this, "doc = new Tidy().parseDOM(in, null);" I am getting some warnings as follows: Tidy (vers 4... | Looking at the Documentation I found a few methods which may do what you want. There is setShowErrors, setQuiet and setErrout. You may want to try the following: Tidy tidy = new Tidy(); tidy.setShowErrors(0); tidy.setQuiet(true); tidy.setErrout(null); doc = tidy.parseDOM(in, null); One of them may be enough already, th... | how to remove the warnings in Jtidy in java I am using Jtidy parser in java. URL url = new URL("www.yahoo.com"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); InputStream in = conn.getInputStream(); doc = new Tidy().parseDOM(in, null); when I run this, "doc = new Tidy().parseDOM(in, null);" I am ge... | TITLE:
how to remove the warnings in Jtidy in java
QUESTION:
I am using Jtidy parser in java. URL url = new URL("www.yahoo.com"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); InputStream in = conn.getInputStream(); doc = new Tidy().parseDOM(in, null); when I run this, "doc = new Tidy().parseDOM(i... | [
"java",
"jtidy"
] | 4 | 11 | 7,256 | 5 | 0 | 2011-06-02T11:11:39.803000 | 2011-06-02T11:28:37.423000 |
6,213,767 | 6,214,432 | Definining user libraries in Eclipse as part of a project and not a workspace | I saw that in Eclipse I can define User Libraries - to make setting the classpath easier (and probably for other reasons as well). The problem is, that these libraries are only available in the workspace, and if I want other people using the same project to use them - I need to export my user library and they need to i... | JDT has the 2 concepts, user libraries and classpath variables. In the classpath variable, you can add jars to your project. Other team members have to fill in the variables in their workspace so their classpath is complete. This is useful when external jars might be in different locations on each team members local fi... | Definining user libraries in Eclipse as part of a project and not a workspace I saw that in Eclipse I can define User Libraries - to make setting the classpath easier (and probably for other reasons as well). The problem is, that these libraries are only available in the workspace, and if I want other people using the ... | TITLE:
Definining user libraries in Eclipse as part of a project and not a workspace
QUESTION:
I saw that in Eclipse I can define User Libraries - to make setting the classpath easier (and probably for other reasons as well). The problem is, that these libraries are only available in the workspace, and if I want other... | [
"java",
"eclipse",
"classpath"
] | 7 | 5 | 8,390 | 3 | 0 | 2011-06-02T11:11:55.613000 | 2011-06-02T12:21:55.073000 |
6,213,788 | 6,213,824 | SQL where clause with case statement | I have a problem with SQL that I have not yet found a solution to, what im trying to do is a where clause for a procedure where a userID variable can contain either a valid userID or -1 to indicate all users. However im stuck at this part of the where clause: AND usertable.userid = CASE WHEN @user = -1 THEN
ELSE @user... | Perhaps the following would work: SELECT whatever FROM wherever WHERE something = somethingelse AND usertable.userid = CASE @user WHEN -1 THEN usertable.userid ELSE @user END Share and enjoy. | SQL where clause with case statement I have a problem with SQL that I have not yet found a solution to, what im trying to do is a where clause for a procedure where a userID variable can contain either a valid userID or -1 to indicate all users. However im stuck at this part of the where clause: AND usertable.userid = ... | TITLE:
SQL where clause with case statement
QUESTION:
I have a problem with SQL that I have not yet found a solution to, what im trying to do is a where clause for a procedure where a userID variable can contain either a valid userID or -1 to indicate all users. However im stuck at this part of the where clause: AND u... | [
"sql",
"stored-procedures",
"case",
"where-clause"
] | 1 | 5 | 10,548 | 4 | 0 | 2011-06-02T11:14:38.083000 | 2011-06-02T11:19:16.773000 |
6,213,794 | 6,213,860 | How to convert List of Double to List of String? | This just might be too easy for all of you, but I am just learning and implementing Java in a project and am stuck with this. How to convert List of Double to List String? | There are many ways to do this but here are two styles for you to choose from: List ds = new ArrayList (); // fill ds with Doubles List strings = new ArrayList (); for (Double d: ds) { // Apply formatting to the string if necessary strings.add(d.toString()); } But a cooler way to do this is to use a modern collections ... | How to convert List of Double to List of String? This just might be too easy for all of you, but I am just learning and implementing Java in a project and am stuck with this. How to convert List of Double to List String? | TITLE:
How to convert List of Double to List of String?
QUESTION:
This just might be too easy for all of you, but I am just learning and implementing Java in a project and am stuck with this. How to convert List of Double to List String?
ANSWER:
There are many ways to do this but here are two styles for you to choose... | [
"java",
"string",
"list",
"double"
] | 8 | 10 | 17,903 | 4 | 0 | 2011-06-02T11:15:12.500000 | 2011-06-02T11:22:23.207000 |
6,213,795 | 6,213,910 | How to get highlighted text of UITextView in UITableViewCell? | I have a custom cell (subclass of UITableViewCell) with a textView inside of it. It works great! Now, when I tap on a cell and highlight some text, the default UIMenuController appears and I can choose to copy the highlighted text. Also this function works perfectly. Now, I would like to add a custom button to the UIMe... | To explain this better, there is no method in UITextField that allows us to know what the currently selected text is. But we can leverage the copy action on the text field that is associated with the menu controller. The copy action copies the text onto the pasteboard which we will need to retrieve. I was able to imple... | How to get highlighted text of UITextView in UITableViewCell? I have a custom cell (subclass of UITableViewCell) with a textView inside of it. It works great! Now, when I tap on a cell and highlight some text, the default UIMenuController appears and I can choose to copy the highlighted text. Also this function works p... | TITLE:
How to get highlighted text of UITextView in UITableViewCell?
QUESTION:
I have a custom cell (subclass of UITableViewCell) with a textView inside of it. It works great! Now, when I tap on a cell and highlight some text, the default UIMenuController appears and I can choose to copy the highlighted text. Also thi... | [
"uitableview",
"uitextview",
"uimenucontroller"
] | 0 | 0 | 967 | 1 | 0 | 2011-06-02T11:15:20.333000 | 2011-06-02T11:27:50.087000 |
6,213,807 | 6,213,857 | Open a new tab with javascript but stay on current tab | Is it possible to open a new tab in Firefox (in background) using window.open("http://www.google.com") function, and remain the current tab? Thanks for any help | You can't open tabs in the background using javascript because this is set in the user's preferences in about:config, which you have no control over. The setting is: browser.tabs.loadDivertedInBackground=true | Open a new tab with javascript but stay on current tab Is it possible to open a new tab in Firefox (in background) using window.open("http://www.google.com") function, and remain the current tab? Thanks for any help | TITLE:
Open a new tab with javascript but stay on current tab
QUESTION:
Is it possible to open a new tab in Firefox (in background) using window.open("http://www.google.com") function, and remain the current tab? Thanks for any help
ANSWER:
You can't open tabs in the background using javascript because this is set in... | [
"javascript",
"html"
] | 18 | 13 | 39,804 | 4 | 0 | 2011-06-02T11:17:33.653000 | 2011-06-02T11:21:57.187000 |
6,213,808 | 6,219,565 | Shadowbox not registering on links inside a slider gallery | http://www.canadiandreamhouses.ca/listings/viewlisting?id=58 using jquery-1.6.1 http://shadowbox-js.com/download.html - shadowbox 3.0.3 (downloaded 02/06/11) http://pixelentity.com/previews/components/estro/index.html - Estro Slider (downloaded 02/06/11) I am having an issue in that the images which are supposed to loa... | Solved the issue, I needed to add a class to the links in the gallery script (for example.slideshadow) then, i called this code after the initial creation of shadowbox $(function(){ Shadowbox.setup("a.slideshadow"); }); The reason, I gather, is that the jQuery being done to the html in the slide show makes it so that t... | Shadowbox not registering on links inside a slider gallery http://www.canadiandreamhouses.ca/listings/viewlisting?id=58 using jquery-1.6.1 http://shadowbox-js.com/download.html - shadowbox 3.0.3 (downloaded 02/06/11) http://pixelentity.com/previews/components/estro/index.html - Estro Slider (downloaded 02/06/11) I am h... | TITLE:
Shadowbox not registering on links inside a slider gallery
QUESTION:
http://www.canadiandreamhouses.ca/listings/viewlisting?id=58 using jquery-1.6.1 http://shadowbox-js.com/download.html - shadowbox 3.0.3 (downloaded 02/06/11) http://pixelentity.com/previews/components/estro/index.html - Estro Slider (downloade... | [
"javascript",
"jquery",
"html",
"shadowbox"
] | 0 | 1 | 626 | 1 | 0 | 2011-06-02T11:17:35.797000 | 2011-06-02T19:46:24.723000 |
6,213,814 | 6,214,685 | How to populate form with JSON data using data store? | How to populate form with JSON data using data store? How are the textfields connected with store, model? Ext.define('app.formStore', { extend: 'Ext.data.Model', fields: [ {name: 'naziv', type:'string'}, {name: 'oib', type:'int'}, {name: 'email', type:'string'} ] });
var myStore = Ext.create('Ext.data.Store', { model:... | The field names of your model and form should match. Then you can load the form using loadRecord(). For example: var record = Ext.create('XYZ',{ name: 'Abc', email: 'abc@abc.com' }); formpanel.getForm().loadRecord(record); or, get the values from already loaded store. | How to populate form with JSON data using data store? How to populate form with JSON data using data store? How are the textfields connected with store, model? Ext.define('app.formStore', { extend: 'Ext.data.Model', fields: [ {name: 'naziv', type:'string'}, {name: 'oib', type:'int'}, {name: 'email', type:'string'} ] })... | TITLE:
How to populate form with JSON data using data store?
QUESTION:
How to populate form with JSON data using data store? How are the textfields connected with store, model? Ext.define('app.formStore', { extend: 'Ext.data.Model', fields: [ {name: 'naziv', type:'string'}, {name: 'oib', type:'int'}, {name: 'email', t... | [
"javascript",
"json",
"forms",
"extjs4",
"datastore"
] | 1 | 5 | 15,589 | 3 | 0 | 2011-06-02T11:18:14.987000 | 2011-06-02T12:46:29.037000 |
6,213,834 | 6,214,185 | Work with an Amazon S3 response stream after response has been disposed | I'm using the Amazon SDK and I have a method that returns a Stream for an object stored in Amazon S3 service. It contains something like this: var request = new GetObjectRequest().WithBucketName(bucketName).WithKey(keyName); using (var response = client.GetObject(request)) { return response.ResponseStream; } Obviously,... | You can't work with the stream after it's disposed, but you can postpone disposing the response object until after the response stream has been used. There are three options I can suggest. Return Response. One option is to return the response object to the caller. The caller can access the contained response stream and... | Work with an Amazon S3 response stream after response has been disposed I'm using the Amazon SDK and I have a method that returns a Stream for an object stored in Amazon S3 service. It contains something like this: var request = new GetObjectRequest().WithBucketName(bucketName).WithKey(keyName); using (var response = c... | TITLE:
Work with an Amazon S3 response stream after response has been disposed
QUESTION:
I'm using the Amazon SDK and I have a method that returns a Stream for an object stored in Amazon S3 service. It contains something like this: var request = new GetObjectRequest().WithBucketName(bucketName).WithKey(keyName); using... | [
"c#",
"asp.net",
"stream",
"amazon-s3"
] | 9 | 12 | 9,702 | 6 | 0 | 2011-06-02T11:19:57.507000 | 2011-06-02T11:56:18.850000 |
6,213,847 | 6,213,990 | Using Multi Cast transformation for destinations with different columns | What is the use of Multicast Transformation Task? With this task, is it possible to send to two destinations from a single source, while each destination has different columns? | I assume that you are referring to Multicast Transformation inside the Data Flow task. If so, yes it is possible. The purpose of the transformation is to channel data from a single source to n number of Transformation tasks or Destinations. If source has following columns Source Column 1 Column 2 Column 3 and destinati... | Using Multi Cast transformation for destinations with different columns What is the use of Multicast Transformation Task? With this task, is it possible to send to two destinations from a single source, while each destination has different columns? | TITLE:
Using Multi Cast transformation for destinations with different columns
QUESTION:
What is the use of Multicast Transformation Task? With this task, is it possible to send to two destinations from a single source, while each destination has different columns?
ANSWER:
I assume that you are referring to Multicast... | [
"ssis"
] | 4 | 8 | 13,461 | 2 | 0 | 2011-06-02T11:20:38.470000 | 2011-06-02T11:35:13.533000 |
6,213,853 | 6,213,918 | Getting JSONP via jQuery | UPDATE 1: This is what I get in the browser if I type http://www.remote_host.com/feed.php?callback=jsonpCallBack { "rss": { "channels": [ { "title": "title goes here", "link": "http://www.remote_server.com/feed.php", "description": "description goes here", "items": [ { "title": "item title goes here", "link": "item lin... | The JSONP "protocol" relies on the site replying to your request with a JavaScript statement of the form, someFunction( someJSON ) The name of the function is supplied as an argument from your code, with the idea being that the response script, once consumed and interpreted by the browser, will result in a call to that... | Getting JSONP via jQuery UPDATE 1: This is what I get in the browser if I type http://www.remote_host.com/feed.php?callback=jsonpCallBack { "rss": { "channels": [ { "title": "title goes here", "link": "http://www.remote_server.com/feed.php", "description": "description goes here", "items": [ { "title": "item title goes... | TITLE:
Getting JSONP via jQuery
QUESTION:
UPDATE 1: This is what I get in the browser if I type http://www.remote_host.com/feed.php?callback=jsonpCallBack { "rss": { "channels": [ { "title": "title goes here", "link": "http://www.remote_server.com/feed.php", "description": "description goes here", "items": [ { "title"... | [
"jquery",
"jsonp"
] | 6 | 7 | 27,292 | 3 | 0 | 2011-06-02T11:21:32.363000 | 2011-06-02T11:28:05.233000 |
6,213,855 | 6,213,895 | windows service & updating c# console app | I have a windows service that executes a console app every hour and it's running with no problems. I didn't set this up though, and I'm not familiar with windows services at all. Today I had to update the console app, so I presumed that if I just copied the exe file back into the folder were it was called from the wind... | first try to stop/start your service, then try to uninstall and install your service again you can do the first thing in administrative tools/services install/uninstall with installUtil | windows service & updating c# console app I have a windows service that executes a console app every hour and it's running with no problems. I didn't set this up though, and I'm not familiar with windows services at all. Today I had to update the console app, so I presumed that if I just copied the exe file back into t... | TITLE:
windows service & updating c# console app
QUESTION:
I have a windows service that executes a console app every hour and it's running with no problems. I didn't set this up though, and I'm not familiar with windows services at all. Today I had to update the console app, so I presumed that if I just copied the ex... | [
"c#",
"asp.net",
"windows-services",
"console-application"
] | 3 | 3 | 323 | 1 | 0 | 2011-06-02T11:21:44.423000 | 2011-06-02T11:26:22.537000 |
6,213,859 | 6,214,510 | SQL Server WITH XMLNAMESPACES dynamic declaration | I have the following query:;WITH XMLNAMESPACES ( 'Bob' AS b ) SELECT 'Test' AS [@b:Test] FOR XML PATH('root') However I'd like the name space definition to be dynamically picked up at runtime from a configuration table. I've tried the following but they don't appear to be valid SQL: -- use a sub query;WITH XMLNAMESPACE... | You should use dynamic SQL: DECLARE @d NVARCHAR(30)='Fred';WITH XMLNAMESPACES ( 'UniqueValue' AS b ) SELECT @ns=( SELECT 'Test' AS [@b:Test] FOR XML PATH('root'))
SELECT CAST(REPLACE(@ns, 'UniqueValue',@D) AS XML) | SQL Server WITH XMLNAMESPACES dynamic declaration I have the following query:;WITH XMLNAMESPACES ( 'Bob' AS b ) SELECT 'Test' AS [@b:Test] FOR XML PATH('root') However I'd like the name space definition to be dynamically picked up at runtime from a configuration table. I've tried the following but they don't appear to ... | TITLE:
SQL Server WITH XMLNAMESPACES dynamic declaration
QUESTION:
I have the following query:;WITH XMLNAMESPACES ( 'Bob' AS b ) SELECT 'Test' AS [@b:Test] FOR XML PATH('root') However I'd like the name space definition to be dynamically picked up at runtime from a configuration table. I've tried the following but the... | [
"sql",
"sql-server",
"xml"
] | 1 | 1 | 2,916 | 2 | 0 | 2011-06-02T11:22:15.670000 | 2011-06-02T12:29:26.977000 |
6,213,865 | 6,214,014 | AS3 JPGEncoder: I don't want black background | I have the following code to create a jpg file from a movieclip: var translateMatrix:Matrix = new Matrix(); translateMatrix.scale(1, 1); // (0.746, 0.746); translateMatrix.translate(100, 150);
var myBitmap:BitmapData = new BitmapData(500, 500, false, 0x00000000); myBitmap.draw(muneca, translateMatrix, null, "normal", ... | Initialize BitmapData with white: var myBitmap:BitmapData = new BitmapData(500, 500, false, 0xFFFFFFFF); | AS3 JPGEncoder: I don't want black background I have the following code to create a jpg file from a movieclip: var translateMatrix:Matrix = new Matrix(); translateMatrix.scale(1, 1); // (0.746, 0.746); translateMatrix.translate(100, 150);
var myBitmap:BitmapData = new BitmapData(500, 500, false, 0x00000000); myBitmap.... | TITLE:
AS3 JPGEncoder: I don't want black background
QUESTION:
I have the following code to create a jpg file from a movieclip: var translateMatrix:Matrix = new Matrix(); translateMatrix.scale(1, 1); // (0.746, 0.746); translateMatrix.translate(100, 150);
var myBitmap:BitmapData = new BitmapData(500, 500, false, 0x00... | [
"actionscript-3",
"background",
"transparent",
"jpeg"
] | 0 | 2 | 1,147 | 1 | 0 | 2011-06-02T11:23:24.017000 | 2011-06-02T11:37:50.503000 |
6,213,868 | 6,213,982 | Jquery mobile - Android browser | I have developed a jquery mobile application for my site http://tastykhana.in/m there is an issue when the application is opened in the Android default web-kit browser. I have to zoom in to view the UI correctly as it does not fit the screen and the fonts, input are very small. What am i doing wrong here, as the site w... | Should be something with the page's CSS, have you tried using something like content="width=device-width; initial-scale=1.0; maximum-scale=1.0; Here is a simple tutorial: http://www.engageinteractive.co.uk/blog/2008/06/19/tutorial-building-a-website-for-the-iphone/ | Jquery mobile - Android browser I have developed a jquery mobile application for my site http://tastykhana.in/m there is an issue when the application is opened in the Android default web-kit browser. I have to zoom in to view the UI correctly as it does not fit the screen and the fonts, input are very small. What am i... | TITLE:
Jquery mobile - Android browser
QUESTION:
I have developed a jquery mobile application for my site http://tastykhana.in/m there is an issue when the application is opened in the Android default web-kit browser. I have to zoom in to view the UI correctly as it does not fit the screen and the fonts, input are ver... | [
"jquery-mobile"
] | 0 | 6 | 3,400 | 1 | 0 | 2011-06-02T11:24:00.843000 | 2011-06-02T11:34:40.477000 |
6,213,869 | 6,213,898 | Finding the calculation that generates a NaN | I have a moderately large piece (a few thousand lines) of Python/Numpy/Scipy code that is throwing up NaNs with certain inputs. I've looked for, and found, some of the usual suspects ( log(0) and the like), but none of the obvious ones seem to be the culprits in this case. Is there a relatively painless way (i.e., apar... | I would start with numpy.seterr. There, an invalid operation is defined as "result is not an expressible number, typically indicates that a NaN was produced". By default, this seems to be set to "ignore". | Finding the calculation that generates a NaN I have a moderately large piece (a few thousand lines) of Python/Numpy/Scipy code that is throwing up NaNs with certain inputs. I've looked for, and found, some of the usual suspects ( log(0) and the like), but none of the obvious ones seem to be the culprits in this case. I... | TITLE:
Finding the calculation that generates a NaN
QUESTION:
I have a moderately large piece (a few thousand lines) of Python/Numpy/Scipy code that is throwing up NaNs with certain inputs. I've looked for, and found, some of the usual suspects ( log(0) and the like), but none of the obvious ones seem to be the culpri... | [
"python",
"debugging",
"numpy",
"scipy",
"nan"
] | 9 | 9 | 1,365 | 2 | 0 | 2011-06-02T11:24:16.333000 | 2011-06-02T11:26:35.187000 |
6,213,872 | 6,232,855 | How Auto bidding works in auction sites | I am having a question about Auction website. I am not asking about entire process as I know that's impossible to answer here. I just need the lead with explanation Explanation for Autobids booking:- If user gives the High and Low value for bidding price with number of bids to place in that range. The system should pla... | If it's for your own site, then what I would do when any bid is placed on an item, simply check for other auto bids on the same item and apply any which are relevant looping until all auto bids are processed. | How Auto bidding works in auction sites I am having a question about Auction website. I am not asking about entire process as I know that's impossible to answer here. I just need the lead with explanation Explanation for Autobids booking:- If user gives the High and Low value for bidding price with number of bids to pl... | TITLE:
How Auto bidding works in auction sites
QUESTION:
I am having a question about Auction website. I am not asking about entire process as I know that's impossible to answer here. I just need the lead with explanation Explanation for Autobids booking:- If user gives the High and Low value for bidding price with nu... | [
"jquery",
"mysql",
"cron"
] | 2 | 9 | 6,153 | 9 | 0 | 2011-06-02T11:24:20.803000 | 2011-06-03T21:26:54.543000 |
6,213,875 | 6,213,906 | php newsletter script duplicating body content | just done a little bit of code to send out a newsletter based on a sql table. first one with 70/80 subscribers went off fine, now when i've moved to the second one that has around 250, the body_message of the email is repeated inside the email equally to the number of people on the mailing list, in this case I was send... | Watching your code that is not possibile because in the loop you safely reset the value of $body and $subject The problem could be somewhere else. Check your sendmail log | php newsletter script duplicating body content just done a little bit of code to send out a newsletter based on a sql table. first one with 70/80 subscribers went off fine, now when i've moved to the second one that has around 250, the body_message of the email is repeated inside the email equally to the number of peop... | TITLE:
php newsletter script duplicating body content
QUESTION:
just done a little bit of code to send out a newsletter based on a sql table. first one with 70/80 subscribers went off fine, now when i've moved to the second one that has around 250, the body_message of the email is repeated inside the email equally to ... | [
"php",
"newsletter"
] | 4 | 2 | 216 | 1 | 0 | 2011-06-02T11:24:30.547000 | 2011-06-02T11:27:26.590000 |
6,213,883 | 6,214,293 | CakePHP Routing - [home]/slug as URL | I'm trying to get to grips with Cake's routing, but I'm having no luck finding a solution to my particular problem. I want to map www.example.com/slug to www.example.com/venues/view/slug, where slug is the URL friendly name of a record for a particular venue. I also want to then map www.example.com/slug/events to www.e... | You want to be careful mapping something to the first path after the domain name. This means that you would be breaking the controller/action/param/param paradigm. You can do this, but it may mean that you need to define every url for your site in your routes file rather than using Cake's routing magic. An alternative ... | CakePHP Routing - [home]/slug as URL I'm trying to get to grips with Cake's routing, but I'm having no luck finding a solution to my particular problem. I want to map www.example.com/slug to www.example.com/venues/view/slug, where slug is the URL friendly name of a record for a particular venue. I also want to then map... | TITLE:
CakePHP Routing - [home]/slug as URL
QUESTION:
I'm trying to get to grips with Cake's routing, but I'm having no luck finding a solution to my particular problem. I want to map www.example.com/slug to www.example.com/venues/view/slug, where slug is the URL friendly name of a record for a particular venue. I als... | [
"cakephp",
"routes",
"cakephp-1.3"
] | 2 | 10 | 6,685 | 2 | 0 | 2011-06-02T11:25:11.333000 | 2011-06-02T12:06:19.147000 |
6,213,901 | 6,213,977 | IDisposable - automated check for using construct | Does anybody know of a way to automatically find any variable, where the type implements IDisposable but the using construct is not used? ie. a way to check for potentially unreleased unmanaged resources? Also, is it possible to see the number and types of resource held by a running application? | There's a code analysis rule for this: http://msdn.microsoft.com/en-us/library/ms182289%28VS.100%29.aspx This can be run from VS 2010 Premium or Ultimate or separately with FxCop: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=917023f6-d5b7-41bb-bbc0-411a7d66cf3c Another thing I've seen done is to capture ... | IDisposable - automated check for using construct Does anybody know of a way to automatically find any variable, where the type implements IDisposable but the using construct is not used? ie. a way to check for potentially unreleased unmanaged resources? Also, is it possible to see the number and types of resource held... | TITLE:
IDisposable - automated check for using construct
QUESTION:
Does anybody know of a way to automatically find any variable, where the type implements IDisposable but the using construct is not used? ie. a way to check for potentially unreleased unmanaged resources? Also, is it possible to see the number and type... | [
"c#",
".net",
"using-statement"
] | 3 | 4 | 285 | 2 | 0 | 2011-06-02T11:27:06.940000 | 2011-06-02T11:34:31.333000 |
6,213,902 | 6,214,118 | Images with BBcode (php, preg_replace). Security question | Bbcode question. This: $text = preg_replace("@\[img\](.*)\[\/img\]@si", " ", $text); works fine, but at the same time it's a big security problem, for example: [img]http://www.domain.com/delete-account/[/img] or [img]http://www.domain.com/logout/[/img] Any ideas how to control this so that only image links which ends w... | According to the HTTP1.1 standard, requesting URLs with GET (the method used to acquire images) should not result in any actions, such as logout. Therefore, you don't need to restrict to URLs with a.jpg at the end, and in general, it is a bad idea because there are other image formats, and the URL is in general unrelat... | Images with BBcode (php, preg_replace). Security question Bbcode question. This: $text = preg_replace("@\[img\](.*)\[\/img\]@si", " ", $text); works fine, but at the same time it's a big security problem, for example: [img]http://www.domain.com/delete-account/[/img] or [img]http://www.domain.com/logout/[/img] Any ideas... | TITLE:
Images with BBcode (php, preg_replace). Security question
QUESTION:
Bbcode question. This: $text = preg_replace("@\[img\](.*)\[\/img\]@si", " ", $text); works fine, but at the same time it's a big security problem, for example: [img]http://www.domain.com/delete-account/[/img] or [img]http://www.domain.com/logou... | [
"php",
"security",
"preg-replace",
"csrf",
"bbcode"
] | 0 | 1 | 2,988 | 2 | 0 | 2011-06-02T11:27:09.507000 | 2011-06-02T11:47:14.483000 |
6,213,907 | 6,215,297 | Silverlight, Path.Width and Path.Height is NaN | I'm begginer in Silverlight and I have next code: private void btnAdd_Click_2(object sender, RoutedEventArgs e) { string xmlns = "xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""; string xmlnsx = "xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\""; string pathXaml = String.Format(" ", xmlns, ... | Path inherits from FrameworkElement and there the default value is set to Double.NaN (http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.width(v=vs.95).aspx). If you want to get the current width, use the ActualWidth Property of the path. This is the width of the currently rendered Path. BR, TJ | Silverlight, Path.Width and Path.Height is NaN I'm begginer in Silverlight and I have next code: private void btnAdd_Click_2(object sender, RoutedEventArgs e) { string xmlns = "xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""; string xmlnsx = "xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"... | TITLE:
Silverlight, Path.Width and Path.Height is NaN
QUESTION:
I'm begginer in Silverlight and I have next code: private void btnAdd_Click_2(object sender, RoutedEventArgs e) { string xmlns = "xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""; string xmlnsx = "xmlns:x=\"http://schemas.microsoft.com... | [
"silverlight",
"path",
"width"
] | 0 | 2 | 532 | 1 | 0 | 2011-06-02T11:27:35.157000 | 2011-06-02T13:38:22.693000 |
6,213,908 | 6,214,270 | Saving/Loading OrderedDictionary to Session | I am trying to save the OrderedDictionary into the session and reload it. basically, it is a "Last Played" game list. for some reason, the dictionary is allays NEW.... anyone can pinpoint the reason? <%@ WebHandler Language="C#" Class="LastPlayed" %>
using System; using System.Web; using System.Web.SessionState;
publ... | Ok, so i found the problem, i was using IReadOnlySessionState Instead of IRequiresSessionState <%@ WebHandler Language="C#" Class="LastPlayed" %>
using System; using System.Web; using System.Web.SessionState;
public class LastPlayed: IHttpHandler, IRequiresSessionState { public bool IsReusable { get { return false; }... | Saving/Loading OrderedDictionary to Session I am trying to save the OrderedDictionary into the session and reload it. basically, it is a "Last Played" game list. for some reason, the dictionary is allays NEW.... anyone can pinpoint the reason? <%@ WebHandler Language="C#" Class="LastPlayed" %>
using System; using Syst... | TITLE:
Saving/Loading OrderedDictionary to Session
QUESTION:
I am trying to save the OrderedDictionary into the session and reload it. basically, it is a "Last Played" game list. for some reason, the dictionary is allays NEW.... anyone can pinpoint the reason? <%@ WebHandler Language="C#" Class="LastPlayed" %>
using ... | [
"c#",
".net",
"asp.net",
"session",
"ordereddictionary"
] | 0 | 3 | 517 | 2 | 0 | 2011-06-02T11:27:41.757000 | 2011-06-02T12:04:37.650000 |
6,213,914 | 6,213,960 | java reflection issue | I have this code: public static final List populateSelectBoxForType( final Class voClass, final String fieldName) { List listSelectBox = null; final List vosList = GenericEjbProxyFactory.getGenericTopValueObjectProxy(voClass).getAllValueObjects(null); System.out.println("loaded vosList!!!!"); if (vosList!= null) { list... | m.invoke(currVo); See also: Method javadoc Also note the correct way to look for a method as suggested by Nik and Bohemian. | java reflection issue I have this code: public static final List populateSelectBoxForType( final Class voClass, final String fieldName) { List listSelectBox = null; final List vosList = GenericEjbProxyFactory.getGenericTopValueObjectProxy(voClass).getAllValueObjects(null); System.out.println("loaded vosList!!!!"); if (... | TITLE:
java reflection issue
QUESTION:
I have this code: public static final List populateSelectBoxForType( final Class voClass, final String fieldName) { List listSelectBox = null; final List vosList = GenericEjbProxyFactory.getGenericTopValueObjectProxy(voClass).getAllValueObjects(null); System.out.println("loaded v... | [
"java"
] | 4 | 3 | 164 | 5 | 0 | 2011-06-02T11:27:59.727000 | 2011-06-02T11:32:34.520000 |
6,213,917 | 6,236,274 | Zerofill with Doctrine2 | It looks like an easy task, but I can't get it done: How do I define a column to be UNSIGNED ZEROFILL with Doctrine2? I can't find any information about it in the docs. Thx for any help! | Do you need it on database level or is it required only by the application? You could append zeros on the application level: class MyEntity { public function getSomeColumn() { return sprintf('%05d', $this->someColumn); // or str_pad(...) } } However if you really need it on database level then you'll have to annotate t... | Zerofill with Doctrine2 It looks like an easy task, but I can't get it done: How do I define a column to be UNSIGNED ZEROFILL with Doctrine2? I can't find any information about it in the docs. Thx for any help! | TITLE:
Zerofill with Doctrine2
QUESTION:
It looks like an easy task, but I can't get it done: How do I define a column to be UNSIGNED ZEROFILL with Doctrine2? I can't find any information about it in the docs. Thx for any help!
ANSWER:
Do you need it on database level or is it required only by the application? You co... | [
"php",
"doctrine-orm"
] | 5 | 11 | 2,888 | 3 | 0 | 2011-06-02T11:28:01.757000 | 2011-06-04T10:47:39.303000 |
6,213,930 | 6,218,326 | SWF object - why should I use it | All my sites need to be search engine friendly - ie readable by search engines. However, I kind of like flash and would like to integrate it in a friendly way. I have the option of swfobject, which allows proper page names and serves different pages to the user vs search engine. However, I am wondering why there would ... | First of all, the html code you have to write to embed an swf file is different for some browsers. Firefox, Chrome,.. use tags while IE uses tags. SWFObject is a javascript 'library' (kinda silly since it is only one file:P) that can inject the proper html tags directly into the DOM tree, and handles those browser diff... | SWF object - why should I use it All my sites need to be search engine friendly - ie readable by search engines. However, I kind of like flash and would like to integrate it in a friendly way. I have the option of swfobject, which allows proper page names and serves different pages to the user vs search engine. However... | TITLE:
SWF object - why should I use it
QUESTION:
All my sites need to be search engine friendly - ie readable by search engines. However, I kind of like flash and would like to integrate it in a friendly way. I have the option of swfobject, which allows proper page names and serves different pages to the user vs sear... | [
"flash",
"seo",
"swfobject"
] | 2 | 6 | 1,668 | 1 | 0 | 2011-06-02T11:29:35.800000 | 2011-06-02T17:57:57.960000 |
6,213,948 | 6,214,002 | Clicking on tab always open rootviewController | I am creating a tabBarApplication in which there is one tab on which camera opens.After clicking on the use tab of the imagepicker I push a new class. Now my problem is when I again press camera tab that class gets open AND I want that camera should gets opened basically my rootviewcontroller of that tab. Any suggestio... | You can implement this delegate method, when the selected view controller is camera controller, you can popToRootViewController. - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController | Clicking on tab always open rootviewController I am creating a tabBarApplication in which there is one tab on which camera opens.After clicking on the use tab of the imagepicker I push a new class. Now my problem is when I again press camera tab that class gets open AND I want that camera should gets opened basically m... | TITLE:
Clicking on tab always open rootviewController
QUESTION:
I am creating a tabBarApplication in which there is one tab on which camera opens.After clicking on the use tab of the imagepicker I push a new class. Now my problem is when I again press camera tab that class gets open AND I want that camera should gets ... | [
"iphone",
"objective-c",
"uitabbarcontroller",
"uitabbar"
] | 0 | 2 | 356 | 1 | 0 | 2011-06-02T11:31:08.623000 | 2011-06-02T11:36:23.173000 |
6,213,965 | 6,233,965 | How to deal with form size issues from Delphi 6 and WinXP to Delphi 2007 and Vista/Win7 | I have an application written in Delphi 6 and compiled on Windows XP. Usually I leave 8px free between controls and the edges of forms. When this app runs on Vista or Win 7 this gap is smaller or not present at all. I think this might be because these versions of Windows have thicker form borders. Now I am moving the a... | Short version: change all form's to AutoScroll = False The problem is the form's AutoScroll property, and how it affects which form size is stored in the DFM. If AutoScroll is true (the default) the DFM will store Width and Height: object Form1: TForm1 Left = 192 Top = 114 Width = 544 Height = 375 Caption = 'Form1'... ... | How to deal with form size issues from Delphi 6 and WinXP to Delphi 2007 and Vista/Win7 I have an application written in Delphi 6 and compiled on Windows XP. Usually I leave 8px free between controls and the edges of forms. When this app runs on Vista or Win 7 this gap is smaller or not present at all. I think this mig... | TITLE:
How to deal with form size issues from Delphi 6 and WinXP to Delphi 2007 and Vista/Win7
QUESTION:
I have an application written in Delphi 6 and compiled on Windows XP. Usually I leave 8px free between controls and the edges of forms. When this app runs on Vista or Win 7 this gap is smaller or not present at all... | [
"windows",
"delphi",
"forms",
"size",
"border"
] | 6 | 11 | 4,741 | 1 | 0 | 2011-06-02T11:33:33.253000 | 2011-06-04T00:54:54.630000 |
6,213,968 | 6,224,569 | nlg building a sentence | I would like to generate a sentence having as input words. E.g. Input: Mary chase the monkey Output: Mary chases the monkey. This could be done using a simpleNLG library: http://code.google.com/p/simplenlg/ in the following way: String subject = "Mary"; String verb = "chase"; String object = "the monkey";
p.setSubject... | In order to obtain the subject, verb or object for the input sentence you need to perform syntactic analysis or parsing. There are two main groups of parsing tools, constituent parsers and dependency parsers, but usually the former is the more direct path to obtain what you need. These are some research constituent par... | nlg building a sentence I would like to generate a sentence having as input words. E.g. Input: Mary chase the monkey Output: Mary chases the monkey. This could be done using a simpleNLG library: http://code.google.com/p/simplenlg/ in the following way: String subject = "Mary"; String verb = "chase"; String object = "th... | TITLE:
nlg building a sentence
QUESTION:
I would like to generate a sentence having as input words. E.g. Input: Mary chase the monkey Output: Mary chases the monkey. This could be done using a simpleNLG library: http://code.google.com/p/simplenlg/ in the following way: String subject = "Mary"; String verb = "chase"; S... | [
"nlp"
] | 7 | 1 | 4,245 | 3 | 0 | 2011-06-02T11:33:40.297000 | 2011-06-03T08:10:39.163000 |
6,213,969 | 6,214,178 | Binding datatemplate to ContentControl's Content | How to bind textbox text property, within datatemplate, to ContentControl Content property? (Without bindng via ElementName) This is my code( that doesn't work): | Use a relative source binding: Text="{Binding RelativeSource={RelativeSource AncestorType=ContentControl}, Path=Content}" Edit: I probably should note that, in terms of what the binding targets, this is equivalent to {Binding}, as the DataContext in the ContentTemplate is the Content. However binding directly to the Da... | Binding datatemplate to ContentControl's Content How to bind textbox text property, within datatemplate, to ContentControl Content property? (Without bindng via ElementName) This is my code( that doesn't work): | TITLE:
Binding datatemplate to ContentControl's Content
QUESTION:
How to bind textbox text property, within datatemplate, to ContentControl Content property? (Without bindng via ElementName) This is my code( that doesn't work):
ANSWER:
Use a relative source binding: Text="{Binding RelativeSource={RelativeSource Ances... | [
"wpf",
"xaml",
"data-binding",
"datatemplate"
] | 3 | 5 | 6,864 | 1 | 0 | 2011-06-02T11:33:44.713000 | 2011-06-02T11:55:37.637000 |
6,213,980 | 6,214,082 | zend two forms same page are submitted together | I built two custom Zend_Form classes: form_1 and form_2.I instanciated both of them in the same controller. $form_1=new form_1(); $form_2=new form_2(); form_1 and form_2 have respectively submit buttons named 'submit_form_1' the first and 'submit_form_2' the second. (Ex. new Zend_Form_Element_Submit('submit_form_1')..)... | Zend_Controller_Request_Http::isPost() does not take (or use) any arguments. Both of your conditions are evaluating to true because the request method is POST. I think you want to use Zend_Controller_Request_Http::getPost() instead, eg if ($this->_request->getPost('submit_form_1', false)) { echo "you clicked for form_1... | zend two forms same page are submitted together I built two custom Zend_Form classes: form_1 and form_2.I instanciated both of them in the same controller. $form_1=new form_1(); $form_2=new form_2(); form_1 and form_2 have respectively submit buttons named 'submit_form_1' the first and 'submit_form_2' the second. (Ex. ... | TITLE:
zend two forms same page are submitted together
QUESTION:
I built two custom Zend_Form classes: form_1 and form_2.I instanciated both of them in the same controller. $form_1=new form_1(); $form_2=new form_2(); form_1 and form_2 have respectively submit buttons named 'submit_form_1' the first and 'submit_form_2'... | [
"php",
"zend-framework",
"form-submit"
] | 2 | 5 | 2,329 | 1 | 0 | 2011-06-02T11:34:38.463000 | 2011-06-02T11:43:33.763000 |
6,213,987 | 6,214,041 | Java: Handling ' - ' character in custom component text field | I have a custom text field that only accepts numbers in it. Everything works fine except when I try to handle the negative ( - ) sign. public void processKeyEvent(KeyEvent ev) {
char c = ev.getKeyChar(); [...]
if(c == '-' && getDocument().getLength() > 0 ){ ev.consume(); }else{ super.processKeyEvent(ev); } } This wor... | You can get the current position inside a text field via the method JTextComponent.getCaretPosition(). It might be easier to fulfill this task with either a DocumentListener or an InputVerifier on your text component. | Java: Handling ' - ' character in custom component text field I have a custom text field that only accepts numbers in it. Everything works fine except when I try to handle the negative ( - ) sign. public void processKeyEvent(KeyEvent ev) {
char c = ev.getKeyChar(); [...]
if(c == '-' && getDocument().getLength() > 0 )... | TITLE:
Java: Handling ' - ' character in custom component text field
QUESTION:
I have a custom text field that only accepts numbers in it. Everything works fine except when I try to handle the negative ( - ) sign. public void processKeyEvent(KeyEvent ev) {
char c = ev.getKeyChar(); [...]
if(c == '-' && getDocument()... | [
"java",
"components",
"keyevent"
] | 0 | 3 | 179 | 2 | 0 | 2011-06-02T11:35:04.630000 | 2011-06-02T11:40:19.397000 |
6,213,993 | 6,214,030 | how to load a file into memory stream | I have a filename pointing to a text file, including its path, as a string. Now I'd like to load this.csv file into memory stream. How should I do that? For example, I have this: Dim filename as string="C:\Users\Desktop\abc.csv" | You don't need to load a file into a MemoryStream. You can simply call File.OpenRead to get a FileStream containing the file. If you really want the file to be in a MemoryStream, you can call CopyTo to copy the FileStream to a MemoryStream. | how to load a file into memory stream I have a filename pointing to a text file, including its path, as a string. Now I'd like to load this.csv file into memory stream. How should I do that? For example, I have this: Dim filename as string="C:\Users\Desktop\abc.csv" | TITLE:
how to load a file into memory stream
QUESTION:
I have a filename pointing to a text file, including its path, as a string. Now I'd like to load this.csv file into memory stream. How should I do that? For example, I have this: Dim filename as string="C:\Users\Desktop\abc.csv"
ANSWER:
You don't need to load a f... | [
".net",
"vb.net"
] | 53 | 50 | 119,392 | 4 | 0 | 2011-06-02T11:35:20.937000 | 2011-06-02T11:38:44.717000 |
6,213,997 | 6,217,146 | "not a function" error when referencing jquery library in ASP.NET MVC View with Telerik MVC Extensions | In the script below, the.cluetip() function call results in "$(".tip").cluetip is not a function". I'm certain that the library is properly referenced b/c I can follow the link from the source. Also, the.click() function works fine. What am I missing? Many thanks! | There was a jQuery conflict. The Telerik MVC extension templates automatically add the following line to _layout.cshtml: @(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Combined(true).Compress(true)) At the time of this writing, this statement will add jQuery version 1.5.1. By default, jQuery is also inc... | "not a function" error when referencing jquery library in ASP.NET MVC View with Telerik MVC Extensions In the script below, the.cluetip() function call results in "$(".tip").cluetip is not a function". I'm certain that the library is properly referenced b/c I can follow the link from the source. Also, the.click() funct... | TITLE:
"not a function" error when referencing jquery library in ASP.NET MVC View with Telerik MVC Extensions
QUESTION:
In the script below, the.cluetip() function call results in "$(".tip").cluetip is not a function". I'm certain that the library is properly referenced b/c I can follow the link from the source. Also,... | [
"jquery",
"asp.net-mvc",
"telerik"
] | 0 | 1 | 2,714 | 1 | 0 | 2011-06-02T11:35:53.970000 | 2011-06-02T16:10:22.087000 |
6,214,010 | 6,214,033 | PHP- Send mail with SMTP authentication without mail() | I am working on a website which is hosted on a server that has the function "mail()" disabled for security reasons. I would like to know if there is another way around to bypass this and send an email with SMTP authentication? I don't own the server and I can't install any add-ons or plugins. There isn't PEAR nor Swift... | You don't need to "install" PHPMailer. Just upload the script in your server and include it in your script. I believe if you could use mail() function you can upload files to the server. If you cannot, then you can't do nothing. | PHP- Send mail with SMTP authentication without mail() I am working on a website which is hosted on a server that has the function "mail()" disabled for security reasons. I would like to know if there is another way around to bypass this and send an email with SMTP authentication? I don't own the server and I can't ins... | TITLE:
PHP- Send mail with SMTP authentication without mail()
QUESTION:
I am working on a website which is hosted on a server that has the function "mail()" disabled for security reasons. I would like to know if there is another way around to bypass this and send an email with SMTP authentication? I don't own the serv... | [
"php",
"email",
"authentication",
"smtp"
] | 2 | 2 | 2,271 | 1 | 0 | 2011-06-02T11:37:38.737000 | 2011-06-02T11:39:17.230000 |
6,214,016 | 6,214,136 | jQuery UI Range Slider - Tooltips for each handle | I'm using a jQuery Range slider to let users select a time range in a day (i.e. 10:00 - 18:00). At the moment it's all working fine and I have the output being displayed in a text box but this isn't ideal. I would prefer to have an individual tooltip for each handle that display the 2 values seperately and that follow ... | If you just need to access each value independently, you can attach the slide function to update each target seperately. Additionally, if you want to be able to change the slider from each of those 2 targets seperately, that works just as easily with the values method. EDIT Guess I misunderstood your question a bit. Yo... | jQuery UI Range Slider - Tooltips for each handle I'm using a jQuery Range slider to let users select a time range in a day (i.e. 10:00 - 18:00). At the moment it's all working fine and I have the output being displayed in a text box but this isn't ideal. I would prefer to have an individual tooltip for each handle tha... | TITLE:
jQuery UI Range Slider - Tooltips for each handle
QUESTION:
I'm using a jQuery Range slider to let users select a time range in a day (i.e. 10:00 - 18:00). At the moment it's all working fine and I have the output being displayed in a text box but this isn't ideal. I would prefer to have an individual tooltip f... | [
"jquery",
"jquery-ui",
"jquery-ui-slider"
] | 0 | 2 | 13,289 | 3 | 0 | 2011-06-02T11:37:55.733000 | 2011-06-02T11:49:16.553000 |
6,214,018 | 6,214,065 | To Inline an External Function Written in Assembly | I have a separate function written in assembly and want to call it in my C/C++ code. Is it possible to tell my compiler (MS Visual C++ 2010) to inline that module written in assembly into my C/C++ function? Note, I am not talking about using inline assembly code (__asm {}) in my C/C++ function. All assembly codes are w... | Is it possible to tell my compiler … to inline that module written in assembly into my C/C++ function? No. The compiler doesn’t even see the assembly code – it’s in a different compilation unit. You can ask your linker to inline the function though. In order to do that, you need to enable link-time optimizations. There... | To Inline an External Function Written in Assembly I have a separate function written in assembly and want to call it in my C/C++ code. Is it possible to tell my compiler (MS Visual C++ 2010) to inline that module written in assembly into my C/C++ function? Note, I am not talking about using inline assembly code (__asm... | TITLE:
To Inline an External Function Written in Assembly
QUESTION:
I have a separate function written in assembly and want to call it in my C/C++ code. Is it possible to tell my compiler (MS Visual C++ 2010) to inline that module written in assembly into my C/C++ function? Note, I am not talking about using inline as... | [
"c++",
"inline-assembly"
] | 2 | 3 | 526 | 1 | 0 | 2011-06-02T11:37:57.620000 | 2011-06-02T11:42:33.657000 |
6,214,020 | 6,214,135 | How to reload data in UIView | I am working on a project in which As you can see that there is a horizontal view in which images are shown. I have provide facility of scroll. Therefore I have put UIView on UIScrollView than after UIButton on UIView. Images on UIButton come from plist. Problem is that when I delete the selected image from the plist I... | The most straight forward solution for reloading the view is to remove all the subviews from the scroll view and then only add the ones that have a corresponding entry in the plist. You could make a smarter reload that only removes the subviews that have been removed from the plist and then moves the other views, so th... | How to reload data in UIView I am working on a project in which As you can see that there is a horizontal view in which images are shown. I have provide facility of scroll. Therefore I have put UIView on UIScrollView than after UIButton on UIView. Images on UIButton come from plist. Problem is that when I delete the se... | TITLE:
How to reload data in UIView
QUESTION:
I am working on a project in which As you can see that there is a horizontal view in which images are shown. I have provide facility of scroll. Therefore I have put UIView on UIScrollView than after UIButton on UIView. Images on UIButton come from plist. Problem is that wh... | [
"ipad"
] | 0 | 0 | 368 | 1 | 0 | 2011-06-02T11:38:00.803000 | 2011-06-02T11:49:05.280000 |
6,214,035 | 6,214,250 | is there any way to make Silent installation to my C# program - on Visual-Studio 2008 | is there any way to make Silent installation to my C# program - on Visual-Studio 2008 (i mean that i dont want that when the user install my program he will need to press next->next...) thanks in advance | If you make a normal Visual Studio Deployment Project the msi can be installed silently if you pass the right command line parameters, I believe /passive is the one you are after. | is there any way to make Silent installation to my C# program - on Visual-Studio 2008 is there any way to make Silent installation to my C# program - on Visual-Studio 2008 (i mean that i dont want that when the user install my program he will need to press next->next...) thanks in advance | TITLE:
is there any way to make Silent installation to my C# program - on Visual-Studio 2008
QUESTION:
is there any way to make Silent installation to my C# program - on Visual-Studio 2008 (i mean that i dont want that when the user install my program he will need to press next->next...) thanks in advance
ANSWER:
If ... | [
"c#",
"visual-studio-2008",
"installation"
] | 1 | 1 | 1,312 | 2 | 0 | 2011-06-02T11:39:39.803000 | 2011-06-02T12:02:45.233000 |
6,214,047 | 6,214,095 | Create List of child objects from list of parent object | I would like to create list of child objects from list of parent object. Like If i have list of bookingroom which has one member room then i would like to create list of room from it. eg. code: Dim BookingRoomList As List(Of BookingRoom) = New List(Of BookingRoom) Dim RoomList As List(Of Room) = New List(Of Room)
Book... | You can use Linq and the AddRange method: RoomList.AddRange(BookingRoomList.Select(Function(room) room.RoomInfo)) Apart from that, you can shorten the declarations considerably: Dim x As T = New T() is equivalent to Dim x As New T() and you should generally prefer the latter. Furthermore, your instantiation of BookingR... | Create List of child objects from list of parent object I would like to create list of child objects from list of parent object. Like If i have list of bookingroom which has one member room then i would like to create list of room from it. eg. code: Dim BookingRoomList As List(Of BookingRoom) = New List(Of BookingRoom)... | TITLE:
Create List of child objects from list of parent object
QUESTION:
I would like to create list of child objects from list of parent object. Like If i have list of bookingroom which has one member room then i would like to create list of room from it. eg. code: Dim BookingRoomList As List(Of BookingRoom) = New Li... | [
"vb.net",
"list",
"collections"
] | 1 | 1 | 1,396 | 1 | 0 | 2011-06-02T11:41:24.140000 | 2011-06-02T11:44:53.503000 |
6,214,048 | 6,214,077 | Bug Tracker Architecture | I am creating a Bug Tracker application (toy one) with DDD in mind. I have a BugRepository with methods like Add / Delete / Save and a user Repository having the same kind of methods (Actually both derive from IRepository). Now Bug has a Property called "Assigned To" which is a column in DB where the ID of the user is ... | Is that OK? Yes. Aren't repositories for an aggregate root (Bug this case) supposed to return ONLY their entities (Bug again)? Yes. But your query isn't to a aggregate root. Your query is against a specific Bug which has one or more Assignees. | Bug Tracker Architecture I am creating a Bug Tracker application (toy one) with DDD in mind. I have a BugRepository with methods like Add / Delete / Save and a user Repository having the same kind of methods (Actually both derive from IRepository). Now Bug has a Property called "Assigned To" which is a column in DB whe... | TITLE:
Bug Tracker Architecture
QUESTION:
I am creating a Bug Tracker application (toy one) with DDD in mind. I have a BugRepository with methods like Add / Delete / Save and a user Repository having the same kind of methods (Actually both derive from IRepository). Now Bug has a Property called "Assigned To" which is ... | [
"ddd-repositories"
] | 1 | 0 | 128 | 1 | 0 | 2011-06-02T11:41:25.093000 | 2011-06-02T11:43:15.733000 |
6,214,051 | 6,214,529 | Deploy Qt ODBC application | My application uses Qt SQL this way QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+QDir::currentPath()+"/database.mdb"); and all the rest is done using QSqlRelationalTableModel. Now that deployment stage has come, the application works perfectly ... | Create this directory structure same as it was on pc having qt installation. your.app.dir/plugins/your.plugin.folder (i.e your.plugin.folder is sqldrivers) Copy your plugin under your.app.dir/plugins/your.plugin_folder Then add this code qApp->addLibraryPath( qApp->applicationDirPath() + "/plugins"); I hope this helps. | Deploy Qt ODBC application My application uses Qt SQL this way QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+QDir::currentPath()+"/database.mdb"); and all the rest is done using QSqlRelationalTableModel. Now that deployment stage has come, the a... | TITLE:
Deploy Qt ODBC application
QUESTION:
My application uses Qt SQL this way QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+QDir::currentPath()+"/database.mdb"); and all the rest is done using QSqlRelationalTableModel. Now that deployment sta... | [
"qt",
"deployment",
"qt4",
"odbc",
"qtsql"
] | 3 | 3 | 1,405 | 1 | 0 | 2011-06-02T11:41:37.713000 | 2011-06-02T12:31:08.593000 |
6,214,053 | 6,214,090 | working of tcpclient sockets in vb.net | I have an application in vb.net which will connect with an hardware device and test its functionality. The hardware device basically spits out data continuosly through ethernet. That is it recieves some data via com ports and spits out the processed data via ethernet. So my application does both. Thats pretty much the ... | You need to read the stream before sending the command to read out the stuff you're not interested in. | working of tcpclient sockets in vb.net I have an application in vb.net which will connect with an hardware device and test its functionality. The hardware device basically spits out data continuosly through ethernet. That is it recieves some data via com ports and spits out the processed data via ethernet. So my applic... | TITLE:
working of tcpclient sockets in vb.net
QUESTION:
I have an application in vb.net which will connect with an hardware device and test its functionality. The hardware device basically spits out data continuosly through ethernet. That is it recieves some data via com ports and spits out the processed data via ethe... | [
".net",
"vb.net",
"tcpclient"
] | 1 | 0 | 883 | 1 | 0 | 2011-06-02T11:41:43.603000 | 2011-06-02T11:44:20.987000 |
6,214,054 | 6,214,097 | rails, only admin can see json page | maybe someone did this before me, i cant handle with this. I have system where many users, admins. Im using extJS, JSON, Rails. So, my question is: How in rails i can do that www.mysite.com/user/54/?format=ext_json&_dc=1306937167419&start=0&limit=50&fields=["respondent[email] CAN SEE ONLY ADMINS and just average users ... | You can create before_filter in controller where you can check format, action and session and return 404 error page http://apidock.com/rails/ActionController/Filters/ClassMethods/before_filter before_filter:admin_required...
private def admin_required
case params[:format].to_sym when:ext_json #....redirect with eror ... | rails, only admin can see json page maybe someone did this before me, i cant handle with this. I have system where many users, admins. Im using extJS, JSON, Rails. So, my question is: How in rails i can do that www.mysite.com/user/54/?format=ext_json&_dc=1306937167419&start=0&limit=50&fields=["respondent[email] CAN SEE... | TITLE:
rails, only admin can see json page
QUESTION:
maybe someone did this before me, i cant handle with this. I have system where many users, admins. Im using extJS, JSON, Rails. So, my question is: How in rails i can do that www.mysite.com/user/54/?format=ext_json&_dc=1306937167419&start=0&limit=50&fields=["respond... | [
"ruby-on-rails"
] | 1 | 0 | 333 | 1 | 0 | 2011-06-02T11:41:49.460000 | 2011-06-02T11:45:31.393000 |
6,214,056 | 6,214,273 | jquery tablesorter problem | hello i get some help here yesterday for a problem i was having tablesorter. if i run the backend query on its own it displays the results ok. but i call it from another page from dropdown it displays all records and no errors are being seen in firebug. where am i going wrong? thanks this code works on its own. getuser... | I recommend you, to use the jQuery Ajax functions in userlog.php, and since the script inside getuserlog.php is constant, move it to the userlog.php, something like this: EDIT: Put all you javascript in the main page. The ajax response should only contain the data you want to get from the server. | jquery tablesorter problem hello i get some help here yesterday for a problem i was having tablesorter. if i run the backend query on its own it displays the results ok. but i call it from another page from dropdown it displays all records and no errors are being seen in firebug. where am i going wrong? thanks this cod... | TITLE:
jquery tablesorter problem
QUESTION:
hello i get some help here yesterday for a problem i was having tablesorter. if i run the backend query on its own it displays the results ok. but i call it from another page from dropdown it displays all records and no errors are being seen in firebug. where am i going wron... | [
"php",
"jquery",
"tablesorter"
] | 0 | 0 | 802 | 1 | 0 | 2011-06-02T11:42:06.823000 | 2011-06-02T12:04:47.887000 |
6,214,058 | 6,244,071 | Umbraco with bespoke application | For the my project I am currently umbraco platform as CMS to work with other Bispoke (custom) application that is going to be developed in MVC3. The scope of the project roughtly is as follows: 1) Product Download & Deployment (Bispoke) 2) Product Documentation (CMS) 3) Suport (tickts & its workflow cycle) (Bispoke) 4)... | This is quite a broad question so it's hard to answer definitively. However there are some areas that you need to watch out for. Firstly take a look at this question which talks about MVC and Umbraco integration: MVC and Umbraco integration. Next is the question of shared functionality. This is a broader architectural ... | Umbraco with bespoke application For the my project I am currently umbraco platform as CMS to work with other Bispoke (custom) application that is going to be developed in MVC3. The scope of the project roughtly is as follows: 1) Product Download & Deployment (Bispoke) 2) Product Documentation (CMS) 3) Suport (tickts &... | TITLE:
Umbraco with bespoke application
QUESTION:
For the my project I am currently umbraco platform as CMS to work with other Bispoke (custom) application that is going to be developed in MVC3. The scope of the project roughtly is as follows: 1) Product Download & Deployment (Bispoke) 2) Product Documentation (CMS) 3... | [
"umbraco"
] | 0 | 1 | 247 | 1 | 0 | 2011-06-02T11:42:21.007000 | 2011-06-05T16:06:40.487000 |
6,214,066 | 6,214,961 | How to change default validation error message in ASP.NET MVC? | Say I have this property in my model: [DisplayName("test")] [Required(ErrorMessage = "required")] public DateTime? SomeDate { get; set; } when you type in "asdf" in Html.TextBoxFor(model => model.SomeDate), you get the validation error message "The value 'asdf' is not valid for test.". How do you modify that message? A... | Apparently my question was already answered at How to replace the default ModelState error message in Asp.net MVC 2?. I'll summarize it here: Create App_GlobalResources folder for your project (right click to project -> Add -> Add ASP.NET folder -> App_GlobalResources). Add a resx file in that folder. Say MyNewResource... | How to change default validation error message in ASP.NET MVC? Say I have this property in my model: [DisplayName("test")] [Required(ErrorMessage = "required")] public DateTime? SomeDate { get; set; } when you type in "asdf" in Html.TextBoxFor(model => model.SomeDate), you get the validation error message "The value 'a... | TITLE:
How to change default validation error message in ASP.NET MVC?
QUESTION:
Say I have this property in my model: [DisplayName("test")] [Required(ErrorMessage = "required")] public DateTime? SomeDate { get; set; } when you type in "asdf" in Html.TextBoxFor(model => model.SomeDate), you get the validation error mes... | [
"asp.net-mvc",
"asp.net-mvc-2",
"data-annotations"
] | 30 | 30 | 70,036 | 1 | 0 | 2011-06-02T11:42:35.420000 | 2011-06-02T13:12:41.277000 |
6,214,076 | 6,214,107 | accessing sqlite file in android | I have a sqlite file. I want to use it in my application. Can anyone share proper example as how I can do that. I was not sure if.sqlite file can be used so I have also made.db file. | I think you need this.. http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ | accessing sqlite file in android I have a sqlite file. I want to use it in my application. Can anyone share proper example as how I can do that. I was not sure if.sqlite file can be used so I have also made.db file. | TITLE:
accessing sqlite file in android
QUESTION:
I have a sqlite file. I want to use it in my application. Can anyone share proper example as how I can do that. I was not sure if.sqlite file can be used so I have also made.db file.
ANSWER:
I think you need this.. http://www.reigndesign.com/blog/using-your-own-sqlite... | [
"android"
] | 0 | 0 | 212 | 4 | 0 | 2011-06-02T11:43:08.973000 | 2011-06-02T11:46:13.860000 |
6,214,084 | 6,257,428 | Flex Vertical Datagrid | Can i have a datagrid that displays data vertically instead of horizontally? for example, if this is my dataprovider: array('firstname':'John','lastname':'Doe'), array('firstname':'Jack','lastname':'Jill') I want the data to be displayed like this: Fields Value1 Value2 Firstname John Jack Lastname Doe Jill and so on...... | So this is a hack... but it turns out you can't easily change the flow of the spark datagrid. From what I can tell, you'd need to override just about every component inside it and it'd take a long time. The DataGrid uses its own layout and it seems very set on the subject of 1 row = 1 piece of data. So... commence hack... | Flex Vertical Datagrid Can i have a datagrid that displays data vertically instead of horizontally? for example, if this is my dataprovider: array('firstname':'John','lastname':'Doe'), array('firstname':'Jack','lastname':'Jill') I want the data to be displayed like this: Fields Value1 Value2 Firstname John Jack Lastnam... | TITLE:
Flex Vertical Datagrid
QUESTION:
Can i have a datagrid that displays data vertically instead of horizontally? for example, if this is my dataprovider: array('firstname':'John','lastname':'Doe'), array('firstname':'Jack','lastname':'Jill') I want the data to be displayed like this: Fields Value1 Value2 Firstname... | [
"apache-flex",
"datagrid"
] | 12 | 4 | 2,585 | 1 | 0 | 2011-06-02T11:43:46.213000 | 2011-06-06T20:07:44.673000 |
6,214,091 | 6,215,284 | Python and performance of list comprehensions | Suppose you have got a list comprehension in python, like Values = [ f(x) for x in range( 0, 1000 ) ] with f being just a function without side effects. So all the entries can be computed independently. Is Python able to increase the performance of this list comprehension compared with the "obvious" implementation; e.g... | In Python 3.2 they added concurrent.futures, a nice library for solving problems concurrently. Consider this example: import math, time from concurrent import futures
PRIMES = [112272535095293, 112582705942171, 112272535095293, 115280095190773, 115797848077099, 1099726899285419, 112272535095293, 112582705942171, 11227... | Python and performance of list comprehensions Suppose you have got a list comprehension in python, like Values = [ f(x) for x in range( 0, 1000 ) ] with f being just a function without side effects. So all the entries can be computed independently. Is Python able to increase the performance of this list comprehension c... | TITLE:
Python and performance of list comprehensions
QUESTION:
Suppose you have got a list comprehension in python, like Values = [ f(x) for x in range( 0, 1000 ) ] with f being just a function without side effects. So all the entries can be computed independently. Is Python able to increase the performance of this li... | [
"python",
"performance",
"list-comprehension"
] | 9 | 10 | 4,244 | 3 | 0 | 2011-06-02T11:44:22.690000 | 2011-06-02T13:37:20.993000 |
6,214,092 | 6,214,120 | Could not execute JDBC batch update | When i am going to save multiple record at that time i am getting this error. so Please give me a solution of this error. 6/2/11 5:06:13 PM (S) ActionListenerImpl.processAction: javax.persistence.PersistenceException: org.hibernate.exception.DataException: Could not execute JDBC batch update javax.faces.el.EvaluationEx... | value larger than specified precision allowed for this column Something like a String is too long for the column - eg "XXXXXX" saved into varchar(4) or a decimal with too many places, eg 1234.5678 saved into decimal(4,2) etc EDITED: It could also be a java.util.Date (which has a time component) saved into a DATE column... | Could not execute JDBC batch update When i am going to save multiple record at that time i am getting this error. so Please give me a solution of this error. 6/2/11 5:06:13 PM (S) ActionListenerImpl.processAction: javax.persistence.PersistenceException: org.hibernate.exception.DataException: Could not execute JDBC batc... | TITLE:
Could not execute JDBC batch update
QUESTION:
When i am going to save multiple record at that time i am getting this error. so Please give me a solution of this error. 6/2/11 5:06:13 PM (S) ActionListenerImpl.processAction: javax.persistence.PersistenceException: org.hibernate.exception.DataException: Could not... | [
"hibernate",
"seam"
] | 0 | 4 | 40,767 | 2 | 0 | 2011-06-02T11:44:29.163000 | 2011-06-02T11:47:21.953000 |
6,214,101 | 6,214,560 | Mapping Data To Non-Table Entites In .NET | I've got a problem I've been going round and round on, and every time I think I have a solution I seem to come back to a core requirement not being fulfilled (I will detail this later). What I'm trying to do, at a simplistic level, is to return a collection of objects from data supplied by a stored procedure. The objec... | How, if it is possible, can I load this data, from a stored procedure(s), into this structure of objects using LINQ, EF, or something else without having to base my classes on database tables? Do I understand correctly that you want stored procedure to materialize result set for you and make connection among objects wi... | Mapping Data To Non-Table Entites In .NET I've got a problem I've been going round and round on, and every time I think I have a solution I seem to come back to a core requirement not being fulfilled (I will detail this later). What I'm trying to do, at a simplistic level, is to return a collection of objects from data... | TITLE:
Mapping Data To Non-Table Entites In .NET
QUESTION:
I've got a problem I've been going round and round on, and every time I think I have a solution I seem to come back to a core requirement not being fulfilled (I will detail this later). What I'm trying to do, at a simplistic level, is to return a collection of... | [
".net",
"linq",
"entity-framework",
"orm",
"linq-to-entities"
] | 0 | 0 | 343 | 1 | 0 | 2011-06-02T11:45:36.820000 | 2011-06-02T12:34:32.590000 |
6,214,105 | 6,236,979 | hello world example for ehcache? | ehcache is a hugely configurable beast, and the examples are fairly complex, often involving many layers of interfaces. Has anyone come across the simplest example which just caches something like a single number in memory (not distributed, no XML, just as few lines of java as possible). The number is then cached for s... | EhCache comes with a failsafe configuration that has some reasonable expiration time (120 seconds). This is sufficient to get it up and running. Imports: import net.sf.ehcache.CacheManager; import net.sf.ehcache.Element; Then, creating a cache is pretty simple: CacheManager.getInstance().addCache("test"); This creates ... | hello world example for ehcache? ehcache is a hugely configurable beast, and the examples are fairly complex, often involving many layers of interfaces. Has anyone come across the simplest example which just caches something like a single number in memory (not distributed, no XML, just as few lines of java as possible)... | TITLE:
hello world example for ehcache?
QUESTION:
ehcache is a hugely configurable beast, and the examples are fairly complex, often involving many layers of interfaces. Has anyone come across the simplest example which just caches something like a single number in memory (not distributed, no XML, just as few lines of... | [
"ehcache"
] | 35 | 38 | 30,055 | 2 | 0 | 2011-06-02T11:45:54.743000 | 2011-06-04T13:24:20.040000 |
6,214,110 | 6,214,785 | Spring 3 Dependency Injcetion | I am using Spring3 with xml based configuration. The problem is when the IOC container starts it loads/caches all the properties/fields defined in com.dao.MyDAOFactory class. I want to tell spring that only load/cache specific properties/fields. The bean declaration is given below Can any one help me? | You can use the lazy-init attribute to defer the loading of your beans, but eventually all of them will be loaded. Also keep this in mind that if a non-lazy singleton bean depends on one or more lazy beans, the lazy beans will be loaded at startup. | Spring 3 Dependency Injcetion I am using Spring3 with xml based configuration. The problem is when the IOC container starts it loads/caches all the properties/fields defined in com.dao.MyDAOFactory class. I want to tell spring that only load/cache specific properties/fields. The bean declaration is given below Can any ... | TITLE:
Spring 3 Dependency Injcetion
QUESTION:
I am using Spring3 with xml based configuration. The problem is when the IOC container starts it loads/caches all the properties/fields defined in com.dao.MyDAOFactory class. I want to tell spring that only load/cache specific properties/fields. The bean declaration is gi... | [
"java",
"spring",
"jakarta-ee"
] | 1 | 1 | 145 | 1 | 0 | 2011-06-02T11:46:36.370000 | 2011-06-02T12:56:08.143000 |
6,214,116 | 6,214,588 | Combinatorica`PlanarQ doesn't work | g1=Graph[{UndirectedEdge[a,b]}]; GraphQ[g1] (* OUT: True *) (*Needs["Combinatorica`"]*) PlanarQ[g1] (* OUT: PlanarQ[.-.] *) Combinatorica`PlanarQ[g1] (* OUT: Combinatorica`PlanarQ[.-.] *) Why doesn't PlanarQ give back "True" or "False"? | Your graph is not a Combinatorica graph, rather it is a System graph. You'll need to specify the contexts explicitly. Needs["GraphUtilities`"]; g1 = System`Graph[{UndirectedEdge[a, b]}]; Combinatorica`PlanarQ[ GraphUtilities`ToCombinatoricaGraph[g1]] This returns True but, in general, this process is a pain and rather ... | Combinatorica`PlanarQ doesn't work g1=Graph[{UndirectedEdge[a,b]}]; GraphQ[g1] (* OUT: True *) (*Needs["Combinatorica`"]*) PlanarQ[g1] (* OUT: PlanarQ[.-.] *) Combinatorica`PlanarQ[g1] (* OUT: Combinatorica`PlanarQ[.-.] *) Why doesn't PlanarQ give back "True" or "False"? | TITLE:
Combinatorica`PlanarQ doesn't work
QUESTION:
g1=Graph[{UndirectedEdge[a,b]}]; GraphQ[g1] (* OUT: True *) (*Needs["Combinatorica`"]*) PlanarQ[g1] (* OUT: PlanarQ[.-.] *) Combinatorica`PlanarQ[g1] (* OUT: Combinatorica`PlanarQ[.-.] *) Why doesn't PlanarQ give back "True" or "False"?
ANSWER:
Your graph is not a C... | [
"wolfram-mathematica",
"mathematica-8"
] | 4 | 4 | 393 | 4 | 0 | 2011-06-02T11:47:11.127000 | 2011-06-02T12:37:06.477000 |
6,214,125 | 6,214,276 | Button Action on login Button click in FBConnect API | I am using fbconnect api in my project.When the login dialog gets opened where we entered our credentials,when I click on login button there is something performed and it is redirected to the publish page. My problem is I am not getting which action is performed on that login button so that I can put an indicator over ... | Do you want to steal others' Facebook passwords?:) It seems, FBConnect uses UIWebView to load the pages from web. Those form elements are not created from the code. So you can not have the access to those methods/actions. Tracking the login button action using UIWebViewDelegate: In webView:shouldStartLoadWithRequest:na... | Button Action on login Button click in FBConnect API I am using fbconnect api in my project.When the login dialog gets opened where we entered our credentials,when I click on login button there is something performed and it is redirected to the publish page. My problem is I am not getting which action is performed on t... | TITLE:
Button Action on login Button click in FBConnect API
QUESTION:
I am using fbconnect api in my project.When the login dialog gets opened where we entered our credentials,when I click on login button there is something performed and it is redirected to the publish page. My problem is I am not getting which action... | [
"iphone",
"objective-c",
"ios",
"fbconnect"
] | 9 | 4 | 1,146 | 2 | 0 | 2011-06-02T11:47:49.597000 | 2011-06-02T12:04:59.880000 |
6,214,132 | 6,222,275 | Add complex markup with event handlers | How to put into a grid cell not just a string text, but a string with an event handler? This option does not suit me: click me I need to add, for example, such elements in one grid cell: var $el1 = $(' clck me 1 ').click(function(){...}); var $el2 = $(' clck me 2 ').click(function(){...});... I use slick.dataview. | Don't. Either handle click events via SlickGrid by using the onClick event it exposes or use event delegation on a higher level (container or document) to catch it. Add an attribute to the buttons to distinguish them later and decide which handler to execute. | Add complex markup with event handlers How to put into a grid cell not just a string text, but a string with an event handler? This option does not suit me: click me I need to add, for example, such elements in one grid cell: var $el1 = $(' clck me 1 ').click(function(){...}); var $el2 = $(' clck me 2 ').click(function... | TITLE:
Add complex markup with event handlers
QUESTION:
How to put into a grid cell not just a string text, but a string with an event handler? This option does not suit me: click me I need to add, for example, such elements in one grid cell: var $el1 = $(' clck me 1 ').click(function(){...}); var $el2 = $(' clck me 2... | [
"slickgrid"
] | 2 | 4 | 828 | 1 | 0 | 2011-06-02T11:48:24.047000 | 2011-06-03T02:00:15.500000 |
6,214,133 | 6,214,631 | Global Build Events in Visual Studio | Is there a way to have a "global" build event in SV2005? What I mean by "global" is an event that will execute for all projects without having to specify the build event for each one. Thanks, Kevin | Here is a previous Stack Overflow question that outlines how to do it using Macros. The answer is for Visual Studio 2008 but it will also work for Visual Studio 2005. | Global Build Events in Visual Studio Is there a way to have a "global" build event in SV2005? What I mean by "global" is an event that will execute for all projects without having to specify the build event for each one. Thanks, Kevin | TITLE:
Global Build Events in Visual Studio
QUESTION:
Is there a way to have a "global" build event in SV2005? What I mean by "global" is an event that will execute for all projects without having to specify the build event for each one. Thanks, Kevin
ANSWER:
Here is a previous Stack Overflow question that outlines h... | [
"c#",
"visual-studio-2005"
] | 2 | 1 | 297 | 1 | 0 | 2011-06-02T11:48:26.813000 | 2011-06-02T12:41:00.937000 |
6,214,140 | 6,214,474 | Dapper - Multi Mapping with a single return value | Below is the code I'm using to return a paged list of objects: string query2 = @" select count(*) as TotalCount from blogposts p where p.Deleted = 0 and p.PublishDate <= @date select * from ( select p.*, row_number() over(order by publishdate desc) as rownum from blogposts as p where p.Deleted = 0 and p.PublishDate <= ... | Well... you wouldn't... You would have to amend your PostModel to include a TotalCount property... which is really ugly. Or execute a dynamic and remap it in a Select which is also ugly. You see, you are returning count(*) N times with count(*) over()... it is a hack, using this hack is not necessarily faster. I have m... | Dapper - Multi Mapping with a single return value Below is the code I'm using to return a paged list of objects: string query2 = @" select count(*) as TotalCount from blogposts p where p.Deleted = 0 and p.PublishDate <= @date select * from ( select p.*, row_number() over(order by publishdate desc) as rownum from blogpo... | TITLE:
Dapper - Multi Mapping with a single return value
QUESTION:
Below is the code I'm using to return a paged list of objects: string query2 = @" select count(*) as TotalCount from blogposts p where p.Deleted = 0 and p.PublishDate <= @date select * from ( select p.*, row_number() over(order by publishdate desc) as ... | [
"dapper"
] | 7 | 6 | 4,190 | 1 | 0 | 2011-06-02T11:49:45.680000 | 2011-06-02T12:26:13.587000 |
6,214,141 | 6,214,235 | params[] element not passed into new object in create action | I have a very simple form, with the scaffold controller action. the DB schema for the relevant is as follows: create_table "uploads",:force => true do |t| t.string "name" t.string "location" t.string "type" t.datetime "created_at" t.datetime "updated_at" t.string "filename" end When the form is submitted, the params co... | In rails type is a MagicFieldName and it is reserved for table inheritance. Since in your case Upload doesn't inherit from anything, querying type on an object will return nil. It is known that using MagicFieldNames as columns names causes lots of troubles. You can check http://oldwiki.rubyonrails.org/rails/pages/Magic... | params[] element not passed into new object in create action I have a very simple form, with the scaffold controller action. the DB schema for the relevant is as follows: create_table "uploads",:force => true do |t| t.string "name" t.string "location" t.string "type" t.datetime "created_at" t.datetime "updated_at" t.st... | TITLE:
params[] element not passed into new object in create action
QUESTION:
I have a very simple form, with the scaffold controller action. the DB schema for the relevant is as follows: create_table "uploads",:force => true do |t| t.string "name" t.string "location" t.string "type" t.datetime "created_at" t.datetime... | [
"ruby-on-rails"
] | 0 | 1 | 260 | 2 | 0 | 2011-06-02T11:49:50.117000 | 2011-06-02T12:00:52.673000 |
6,214,142 | 6,214,467 | set parameter which is null in @NamedQuery (JPA QL 1.0) | I am writing a JPA QL named query that would search for documents. This should be done in only one query and I cannot switch to native SQL (that's non functional requirement). The query I wrote looks as follows: query = "select doc from Doc doc " + " join doc.Csts cst " + " where cst.cstFrstNm like:FrstNm " + " and cst... | Two solutions: First one, don't use a named query and craft a new query for each request: boolean first = true; query = query = "select doc from Doc doc " + " join doc.Csts cst " + if (firstName!= null) { query += (first? " where ": " and "); query += " cst.cstFrstNm like:FrstNm "; first = false; } query += ";"; //... ... | set parameter which is null in @NamedQuery (JPA QL 1.0) I am writing a JPA QL named query that would search for documents. This should be done in only one query and I cannot switch to native SQL (that's non functional requirement). The query I wrote looks as follows: query = "select doc from Doc doc " + " join doc.Csts... | TITLE:
set parameter which is null in @NamedQuery (JPA QL 1.0)
QUESTION:
I am writing a JPA QL named query that would search for documents. This should be done in only one query and I cannot switch to native SQL (that's non functional requirement). The query I wrote looks as follows: query = "select doc from Doc doc "... | [
"java",
"jpa",
"jpql"
] | 2 | 3 | 16,352 | 2 | 0 | 2011-06-02T11:50:00.330000 | 2011-06-02T12:25:38.833000 |
6,214,143 | 6,215,983 | Protobuf-net bug - serializing fixed array that is set to null | I'm using protobuf-net library to serialize some objects. I have a field [ProtoMember(3, DataFormat = DataFormat.FixedSize, IsPacked = true)] ushort[] foo; When I set it to say ushort[] { 3 } and then serialize the whole object and read it back it's fine. Then when I set foo to either an empty array or null and seriali... | It isn't entirely clear without a reproducible example, but IMO the most likely answer here is that you are overwriting an output stream (such as a file) without truncating it. Because the protobuf spec does not include terminators (etc) for the root object, it reads to the end of the file. If you then overwrite with l... | Protobuf-net bug - serializing fixed array that is set to null I'm using protobuf-net library to serialize some objects. I have a field [ProtoMember(3, DataFormat = DataFormat.FixedSize, IsPacked = true)] ushort[] foo; When I set it to say ushort[] { 3 } and then serialize the whole object and read it back it's fine. T... | TITLE:
Protobuf-net bug - serializing fixed array that is set to null
QUESTION:
I'm using protobuf-net library to serialize some objects. I have a field [ProtoMember(3, DataFormat = DataFormat.FixedSize, IsPacked = true)] ushort[] foo; When I set it to say ushort[] { 3 } and then serialize the whole object and read it... | [
"protobuf-net"
] | 3 | 2 | 638 | 1 | 0 | 2011-06-02T11:50:04.233000 | 2011-06-02T14:35:20.897000 |
6,214,144 | 6,214,181 | Ruby - convert string to date | I have a string like "2011-06-02T23:59:59+05:30". I want to convert it to date format and need to parse only the date, "2011-06-02". | For Ruby 1.9.2: require 'date' # If not already required. If in Rails then you don't need this line). puts DateTime.parse("2011-06-02T23:59:59+05:30").to_date.to_s | Ruby - convert string to date I have a string like "2011-06-02T23:59:59+05:30". I want to convert it to date format and need to parse only the date, "2011-06-02". | TITLE:
Ruby - convert string to date
QUESTION:
I have a string like "2011-06-02T23:59:59+05:30". I want to convert it to date format and need to parse only the date, "2011-06-02".
ANSWER:
For Ruby 1.9.2: require 'date' # If not already required. If in Rails then you don't need this line). puts DateTime.parse("2011-06... | [
"ruby",
"date"
] | 18 | 33 | 49,936 | 4 | 0 | 2011-06-02T11:50:06.167000 | 2011-06-02T11:55:50.117000 |
6,214,150 | 6,214,407 | Override a method in a single object instance | Am not sure how to put this, and I couldn't find the answer because of my inability to find the words to express what am looking for. (!) In Java, I used to do something like this (I don't remember): JPanel myButton = new JPanel("Press me"){ public void add(JComponent component){ //override add method } }; But, i could... | What you have there in Java is an anonymous subclass. This is not possible in Objective-C (well, it sort of is but you would have to do some pretty involved contortions with the Obj-C runtime library). But Objective-C as of iOS 4 or OS X 10.6 has "blocks", which is what the ^{} syntax is for. This is Objective-C's noti... | Override a method in a single object instance Am not sure how to put this, and I couldn't find the answer because of my inability to find the words to express what am looking for. (!) In Java, I used to do something like this (I don't remember): JPanel myButton = new JPanel("Press me"){ public void add(JComponent compo... | TITLE:
Override a method in a single object instance
QUESTION:
Am not sure how to put this, and I couldn't find the answer because of my inability to find the words to express what am looking for. (!) In Java, I used to do something like this (I don't remember): JPanel myButton = new JPanel("Press me"){ public void ad... | [
"objective-c",
"overriding"
] | 5 | 2 | 3,304 | 3 | 0 | 2011-06-02T11:51:35.670000 | 2011-06-02T12:19:09.447000 |
6,214,160 | 6,214,187 | How to store a const char* in std :: string? | char *buffer1 = "abc";
const char *buffer2 = (const char*) buffer;
std:: string str (buffer2); This works, but I want to declare the std::string object i.e. str, once and use it many times to store different const char *. What's the way out? | You can just re-assign: const char *buf1 = "abc"; const char *buf2 = "def";
std::string str(buf1);
str = buf2; // Calls str.operator=(const char *) | How to store a const char* in std :: string? char *buffer1 = "abc";
const char *buffer2 = (const char*) buffer;
std:: string str (buffer2); This works, but I want to declare the std::string object i.e. str, once and use it many times to store different const char *. What's the way out? | TITLE:
How to store a const char* in std :: string?
QUESTION:
char *buffer1 = "abc";
const char *buffer2 = (const char*) buffer;
std:: string str (buffer2); This works, but I want to declare the std::string object i.e. str, once and use it many times to store different const char *. What's the way out?
ANSWER:
You ... | [
"c++",
"string",
"pointers",
"stl"
] | 8 | 17 | 18,903 | 4 | 0 | 2011-06-02T11:53:18.557000 | 2011-06-02T11:56:28.603000 |
6,214,164 | 6,215,702 | How to send a single Ajax request instead of two | I have a JSP page which has a form with an input text. When I submit, it goes to a servlet. The servlet processes and creates some objects and sets in request using request.setAttribute(). It then forwards to a page which has some custom JSP tags which use the objects set in servlet. I want to replace this by Ajax. I h... | As per the comments, you just need to let the first request forward to the desired JSP instead of returning the JSON string which you in turn pass back to the JSP. request.getRequestDispatcher("/WEB-INF/next.jsp?jsonstring=" + jsonstring).forward(request, response); | How to send a single Ajax request instead of two I have a JSP page which has a form with an input text. When I submit, it goes to a servlet. The servlet processes and creates some objects and sets in request using request.setAttribute(). It then forwards to a page which has some custom JSP tags which use the objects se... | TITLE:
How to send a single Ajax request instead of two
QUESTION:
I have a JSP page which has a form with an input text. When I submit, it goes to a servlet. The servlet processes and creates some objects and sets in request using request.setAttribute(). It then forwards to a page which has some custom JSP tags which ... | [
"ajax",
"jsp",
"servlets"
] | 0 | 0 | 1,072 | 1 | 0 | 2011-06-02T11:53:28.807000 | 2011-06-02T14:12:19.903000 |
6,214,168 | 6,214,418 | crystal report use Maximum as Sum condition problem | I met a problem with sum function: the data have a datetime column and I want to get sum of who's datetime is max. And also there's anoher group condition. So I do like: Add formula maxDatetime: Maximum({datetime}, {groupcondition}) Add new formula for sum ValueToSum: if({datetime} = {@maxDatetime}) then value else 0 S... | We usually solve such kind of problems by creating additional queries and linking them to main data. Because Crystal Reports does only two passes over data - record reading and aggregate calculation, it can't easily aggregate over already aggregated values. Another possibility is to accumulate your 'totalvalue' into va... | crystal report use Maximum as Sum condition problem I met a problem with sum function: the data have a datetime column and I want to get sum of who's datetime is max. And also there's anoher group condition. So I do like: Add formula maxDatetime: Maximum({datetime}, {groupcondition}) Add new formula for sum ValueToSum:... | TITLE:
crystal report use Maximum as Sum condition problem
QUESTION:
I met a problem with sum function: the data have a datetime column and I want to get sum of who's datetime is max. And also there's anoher group condition. So I do like: Add formula maxDatetime: Maximum({datetime}, {groupcondition}) Add new formula f... | [
"crystal-reports",
"sum",
"max"
] | 1 | 1 | 6,232 | 1 | 0 | 2011-06-02T11:54:15.480000 | 2011-06-02T12:20:00.080000 |
6,214,171 | 6,214,328 | Consuming OpenRasta services | Following advice on here, I am looking at whether to replace WCF with OpenRasta. In Visual Studio, how do I consume an OpenRasta in the same way as I would a WCF/ASMX service e.g. Add a service reference, this handles the types using WSDL. I can't find any examples which don't require a custom WebRequest and parse the ... | OpenRasta is designed to give you RESTful services. To consume that, you might want to look at something like RestSharp which is designed to act as a client/consumer for RESTful services. | Consuming OpenRasta services Following advice on here, I am looking at whether to replace WCF with OpenRasta. In Visual Studio, how do I consume an OpenRasta in the same way as I would a WCF/ASMX service e.g. Add a service reference, this handles the types using WSDL. I can't find any examples which don't require a cus... | TITLE:
Consuming OpenRasta services
QUESTION:
Following advice on here, I am looking at whether to replace WCF with OpenRasta. In Visual Studio, how do I consume an OpenRasta in the same way as I would a WCF/ASMX service e.g. Add a service reference, this handles the types using WSDL. I can't find any examples which d... | [
"c#",
"wcf",
"openrasta"
] | 2 | 3 | 260 | 2 | 0 | 2011-06-02T11:54:32.543000 | 2011-06-02T12:09:50.753000 |
6,214,172 | 6,214,287 | PL/SQL call from JDBC resulting in "SQLSyntaxErrorException: ORA-00900" | I'm trying to use the following code to run a PL/SQL statement on my database server. public class Main { public static void main(String[] args) { String jdbcURL = "jdbc:oracle:thin:@172.22.88.9:1521/xavier.i.com";
Connection conn = null; Statement stmt = null; ResultSet rs = null;
String user = "bigdb"; String passw... | ANALYZE TABLE is a DDL (data definition language) statement. It's not valid within a BEGIN/END block in PL/SQL. If you wanted to execute it in PL/SQL, you'd need to use EXECUTE IMMEDIATE. To run the statement from JDBC, just create a Statement instance and use executeUpdate: Statement stmt = con.createStatement(); stmt... | PL/SQL call from JDBC resulting in "SQLSyntaxErrorException: ORA-00900" I'm trying to use the following code to run a PL/SQL statement on my database server. public class Main { public static void main(String[] args) { String jdbcURL = "jdbc:oracle:thin:@172.22.88.9:1521/xavier.i.com";
Connection conn = null; Statemen... | TITLE:
PL/SQL call from JDBC resulting in "SQLSyntaxErrorException: ORA-00900"
QUESTION:
I'm trying to use the following code to run a PL/SQL statement on my database server. public class Main { public static void main(String[] args) { String jdbcURL = "jdbc:oracle:thin:@172.22.88.9:1521/xavier.i.com";
Connection con... | [
"java",
"sql",
"jdbc",
"plsql"
] | 0 | 4 | 6,219 | 2 | 0 | 2011-06-02T11:54:38.853000 | 2011-06-02T12:05:41.753000 |
6,214,174 | 6,214,683 | How do I include another file in an httpHandler? | I'm creating a webhandler and want to include classes from another file. How do I do this? | Move the code from the.aspx file to a.vb file. If the.vb file is not in the same project as the.ashx file, then compile the file into an assembly and reference the assembly in the project where the.ashx exists. Then you can instantiate the classes in the vb file in your ashx. | How do I include another file in an httpHandler? I'm creating a webhandler and want to include classes from another file. How do I do this? | TITLE:
How do I include another file in an httpHandler?
QUESTION:
I'm creating a webhandler and want to include classes from another file. How do I do this?
ANSWER:
Move the code from the.aspx file to a.vb file. If the.vb file is not in the same project as the.ashx file, then compile the file into an assembly and ref... | [
".net",
"asp.net",
"vb.net",
"httphandler"
] | 0 | 2 | 470 | 2 | 0 | 2011-06-02T11:54:53.267000 | 2011-06-02T12:46:13.543000 |
6,214,175 | 6,220,345 | an XNA way to make a menustrip | I will preface this by I am new to XNA and I realize what I am asking for doesn't exist. However I am curious if I wanted to create something similar to a menustrip from winforms in XNA, how would I do that? Is there a best way? Or even a way? I appreciate it, thanks! | I found a possible solution, that will need further investigation: http://neoforce.codeplex.com/ This should give me UI control w/o having to recode everything, unless I can just add an XNA pane to my winforms app Edit: neoforce appears to not work well with c# 2010. I did however find this: http://create.msdn.com/en-U... | an XNA way to make a menustrip I will preface this by I am new to XNA and I realize what I am asking for doesn't exist. However I am curious if I wanted to create something similar to a menustrip from winforms in XNA, how would I do that? Is there a best way? Or even a way? I appreciate it, thanks! | TITLE:
an XNA way to make a menustrip
QUESTION:
I will preface this by I am new to XNA and I realize what I am asking for doesn't exist. However I am curious if I wanted to create something similar to a menustrip from winforms in XNA, how would I do that? Is there a best way? Or even a way? I appreciate it, thanks!
A... | [
"c#",
"winforms",
"xna",
"equivalent"
] | 0 | 0 | 326 | 2 | 0 | 2011-06-02T11:54:54.747000 | 2011-06-02T21:01:51.877000 |
6,214,184 | 6,214,212 | While executing mysql insert select query- can we do condition check? | I am trying to execute mysql select insert query as below. INSERT INTO ACCOUNTS.TABLE1 (NAME,ID,STARTTIME,ENDTIME) SELECT NAME,ID,CREATIONTIME,EXPIRYTIME FROM ACCOUNTS.TABLE2 WHERE...; Now, if EXPIRYTIME in table2 is null, then i want to update the ENDTIME in table1 to current timestamp. I have overriden the default be... | Just select what you want: INSERT INTO ACCOUNTS.TABLE1 (NAME,ID,STARTTIME,ENDTIME) SELECT NAME,ID,CREATIONTIME, ifnull(EXPIRYTIME, now()) FROM ACCOUNTS.TABLE2 WHERE...; | While executing mysql insert select query- can we do condition check? I am trying to execute mysql select insert query as below. INSERT INTO ACCOUNTS.TABLE1 (NAME,ID,STARTTIME,ENDTIME) SELECT NAME,ID,CREATIONTIME,EXPIRYTIME FROM ACCOUNTS.TABLE2 WHERE...; Now, if EXPIRYTIME in table2 is null, then i want to update the E... | TITLE:
While executing mysql insert select query- can we do condition check?
QUESTION:
I am trying to execute mysql select insert query as below. INSERT INTO ACCOUNTS.TABLE1 (NAME,ID,STARTTIME,ENDTIME) SELECT NAME,ID,CREATIONTIME,EXPIRYTIME FROM ACCOUNTS.TABLE2 WHERE...; Now, if EXPIRYTIME in table2 is null, then i wa... | [
"java",
"mysql"
] | 1 | 3 | 612 | 3 | 0 | 2011-06-02T11:56:08.167000 | 2011-06-02T11:59:16.297000 |
6,214,200 | 6,216,249 | Comprehensive JavaDoc-like documentation for Mozilla/Firefox extension developers? | Is there any thing like JavaDoc for Mozilla/Firefox that helps extension developers? For example where can I find what delayedOpenTab() does and how to use it? | May be Mozilla Cross-Reference and delayedOpenTab() is here. | Comprehensive JavaDoc-like documentation for Mozilla/Firefox extension developers? Is there any thing like JavaDoc for Mozilla/Firefox that helps extension developers? For example where can I find what delayedOpenTab() does and how to use it? | TITLE:
Comprehensive JavaDoc-like documentation for Mozilla/Firefox extension developers?
QUESTION:
Is there any thing like JavaDoc for Mozilla/Firefox that helps extension developers? For example where can I find what delayedOpenTab() does and how to use it?
ANSWER:
May be Mozilla Cross-Reference and delayedOpenTab(... | [
"documentation",
"firefox-addon",
"javadoc"
] | 1 | 1 | 189 | 2 | 0 | 2011-06-02T11:57:25.217000 | 2011-06-02T14:56:17.260000 |
6,214,202 | 6,214,314 | How to create IProject without Eclipse | I'm trying to mavenize a third part Eclipse's plugin, but I need to create an instance of IProject to pass at JavaCore.create(instance) to obtain an instance of IJavaProject. This application will not have workspace and will be better that depends from eclipse's libraries as less as I can. So I can't use: ResourcesPlug... | The short answer: no. The workspace requires the OSGi framework to start, and set the osgi.instance.area property. It also needs some of the other org.eclipse.core.runtime services to be started. JavaCore.create(*) is in JDT... parts of org.eclipse.jdt.core might run without having the UI workbench up, but that really ... | How to create IProject without Eclipse I'm trying to mavenize a third part Eclipse's plugin, but I need to create an instance of IProject to pass at JavaCore.create(instance) to obtain an instance of IJavaProject. This application will not have workspace and will be better that depends from eclipse's libraries as less ... | TITLE:
How to create IProject without Eclipse
QUESTION:
I'm trying to mavenize a third part Eclipse's plugin, but I need to create an instance of IProject to pass at JavaCore.create(instance) to obtain an instance of IJavaProject. This application will not have workspace and will be better that depends from eclipse's ... | [
"java",
"eclipse",
"eclipse-plugin"
] | 1 | 3 | 1,556 | 1 | 0 | 2011-06-02T11:57:54.273000 | 2011-06-02T12:08:00.070000 |
6,214,203 | 6,215,155 | Sharepoint. Use CAML query to search items | I need to search items inside one list. Can i use CAML query? Case need to be ignored and it should find word inside text... Or CAML not for that purposes? | You can use this CAML query: FilterValue The contains operator matches items with "FilterValue" in the given field. | Sharepoint. Use CAML query to search items I need to search items inside one list. Can i use CAML query? Case need to be ignored and it should find word inside text... Or CAML not for that purposes? | TITLE:
Sharepoint. Use CAML query to search items
QUESTION:
I need to search items inside one list. Can i use CAML query? Case need to be ignored and it should find word inside text... Or CAML not for that purposes?
ANSWER:
You can use this CAML query: FilterValue The contains operator matches items with "FilterValue... | [
"c#",
".net",
"sharepoint",
"sharepoint-2010",
"caml"
] | 1 | 2 | 2,596 | 1 | 0 | 2011-06-02T11:57:55.330000 | 2011-06-02T13:26:46.117000 |
6,214,204 | 6,214,403 | Start x86_64 code on x86 (32bit) Linux, running on x86_64 CPU | ?Is it possible to start an x86_64 code on i686 Linux (x86, 32-bit)? My CPU is modern Core 2 and it can run x86_64 64-bit code itself, but the OS is 32bit. The code to start is pure mathematic, and it need almost no interaction with OS. I want to measure, how fast will be my program in 64bit mode comparing with 32-bit ... | You won't be able to run x86_64 programs on a 32bit kernel without some form of emulation. (The other way around works just fine though, with no emulation.) To be able to run 64bit code on x86_64, you have to enter "long mode" which requires the appropriate page tables to be set up (among other things). A 32bit kernel ... | Start x86_64 code on x86 (32bit) Linux, running on x86_64 CPU ?Is it possible to start an x86_64 code on i686 Linux (x86, 32-bit)? My CPU is modern Core 2 and it can run x86_64 64-bit code itself, but the OS is 32bit. The code to start is pure mathematic, and it need almost no interaction with OS. I want to measure, ho... | TITLE:
Start x86_64 code on x86 (32bit) Linux, running on x86_64 CPU
QUESTION:
?Is it possible to start an x86_64 code on i686 Linux (x86, 32-bit)? My CPU is modern Core 2 and it can run x86_64 64-bit code itself, but the OS is 32bit. The code to start is pure mathematic, and it need almost no interaction with OS. I w... | [
"linux",
"x86",
"x86-64"
] | 2 | 4 | 4,310 | 3 | 0 | 2011-06-02T11:58:05.953000 | 2011-06-02T12:18:56.603000 |
6,214,208 | 6,224,018 | Cannot set hidden form field in symfony using jquery | I have a hidden form field called patient_id which I need to set using jquery. I set it using the following code along with another 2 fields: $('#investigation_patient_id').val($('#patient_id').html()); $('#patient_first_name').val($('#patient_fname').html()); $('#patient_last_name').val($('#patient_sname').html()); Wh... | Thanks for the comments, it was my mistake, I had two inputs with the same name and id - I hadn't realised that symfony automatically generates hidden fields, meaning I had then I rendered them too, thus two identical inputs | Cannot set hidden form field in symfony using jquery I have a hidden form field called patient_id which I need to set using jquery. I set it using the following code along with another 2 fields: $('#investigation_patient_id').val($('#patient_id').html()); $('#patient_first_name').val($('#patient_fname').html()); $('#pa... | TITLE:
Cannot set hidden form field in symfony using jquery
QUESTION:
I have a hidden form field called patient_id which I need to set using jquery. I set it using the following code along with another 2 fields: $('#investigation_patient_id').val($('#patient_id').html()); $('#patient_first_name').val($('#patient_fname... | [
"jquery",
"symfony1"
] | 0 | 0 | 536 | 1 | 0 | 2011-06-02T11:58:54.860000 | 2011-06-03T07:02:30.617000 |
6,214,213 | 6,214,503 | 3-tiers application using ASP.NET and Linq 2 Sql with multiple tables | hello everyone i have a problem with my 3-tiers application i don't know how to get data from multiple tables using linq2sql in 3 tiers architecture application here is each layers code GestionProjetCommon Project Client Class: public class Client { private int _ID; public int ID { get { return _ID; } set { _ID = value... | Create a DTO class, something like: public class ClientDTO { public int ID { get; set; } public string Name { get; set; } public string ProjectName { get; set; } } now write a good linq expression to fill the DTO class: public List GetProjectClient() { return (from prj in db.Projets join clt in db.Clients on prj.IDClie... | 3-tiers application using ASP.NET and Linq 2 Sql with multiple tables hello everyone i have a problem with my 3-tiers application i don't know how to get data from multiple tables using linq2sql in 3 tiers architecture application here is each layers code GestionProjetCommon Project Client Class: public class Client { ... | TITLE:
3-tiers application using ASP.NET and Linq 2 Sql with multiple tables
QUESTION:
hello everyone i have a problem with my 3-tiers application i don't know how to get data from multiple tables using linq2sql in 3 tiers architecture application here is each layers code GestionProjetCommon Project Client Class: publ... | [
"c#",
"asp.net",
"linq-to-sql",
"3-tier"
] | 1 | 3 | 2,490 | 1 | 0 | 2011-06-02T11:59:17.203000 | 2011-06-02T12:29:04.147000 |
6,214,214 | 6,214,252 | Getting bash to ignore bash keywords in a script | I have a script in bash which uses the HTK toolkit. One of the files that the HTK tool uses is called do and is present within a directory called hmm_1/. Now, when I need to call a particular tool from within the HTK toolkit, I do it like so: some HTK command -H hmm_1/do -H hmm_1/ and so on. I just noticed that gvim hi... | As part of a path, keywords will be ignored. They will only be interpreted as a keyword at the beginning of a command. It would be best to simply consider gvim 's highlighting to be a minor annoyance and ignore it. | Getting bash to ignore bash keywords in a script I have a script in bash which uses the HTK toolkit. One of the files that the HTK tool uses is called do and is present within a directory called hmm_1/. Now, when I need to call a particular tool from within the HTK toolkit, I do it like so: some HTK command -H hmm_1/do... | TITLE:
Getting bash to ignore bash keywords in a script
QUESTION:
I have a script in bash which uses the HTK toolkit. One of the files that the HTK tool uses is called do and is present within a directory called hmm_1/. Now, when I need to call a particular tool from within the HTK toolkit, I do it like so: some HTK c... | [
"bash",
"keyword"
] | 1 | 3 | 1,428 | 2 | 0 | 2011-06-02T11:59:22.287000 | 2011-06-02T12:03:08.497000 |
6,214,217 | 6,214,237 | How can select an element generated by jQuery? | I am trying to activate a slideDown() onclick with an element that has been generated by js. I downloaded a script from ryanfait.com which allows you to customise the look of radio buttons. This works fine but when I try and apply an action to the generated element (in this case a span) it doesn't work. How can I work ... | Use.live or.delegate to "Attach a handler to the event for all elements which match the current selector, now and in the future." //.live() $('[title="yes"]').live("click", function() { $(this).nextAll('.secondq:first').slideDown('slow'); });
//.delegate() (not entirely sure of your structure, the below may need // to... | How can select an element generated by jQuery? I am trying to activate a slideDown() onclick with an element that has been generated by js. I downloaded a script from ryanfait.com which allows you to customise the look of radio buttons. This works fine but when I try and apply an action to the generated element (in thi... | TITLE:
How can select an element generated by jQuery?
QUESTION:
I am trying to activate a slideDown() onclick with an element that has been generated by js. I downloaded a script from ryanfait.com which allows you to customise the look of radio buttons. This works fine but when I try and apply an action to the generat... | [
"javascript",
"jquery"
] | 1 | 6 | 830 | 1 | 0 | 2011-06-02T11:59:26.610000 | 2011-06-02T12:01:04.143000 |
6,214,219 | 6,216,832 | Php writes XML file with no values | I have a script that reads values from a mysql database. With the values received i want to make a XML file. The file is written but with no values. I can't figure it out. Here is the complete source code: http://www.segasiauto.ro/tmp/writexml.txt Can someone help? Thanks, Sebastian EDIT Solved. There was a problem wit... | Look carefully what you're doing: $product[] = array( 'id' => $id, 'name' => $tip, 'category' => $tip_produs, 'model' => $tip_imp, 'keywords' => $keywords, 'price' => $pret, 'available' => "1", 'canBeOrderedOnline' => "0", 'details' => $details, 'pictures' => "picture", 'currency' => $valuta, ); and then $doc->createTe... | Php writes XML file with no values I have a script that reads values from a mysql database. With the values received i want to make a XML file. The file is written but with no values. I can't figure it out. Here is the complete source code: http://www.segasiauto.ro/tmp/writexml.txt Can someone help? Thanks, Sebastian E... | TITLE:
Php writes XML file with no values
QUESTION:
I have a script that reads values from a mysql database. With the values received i want to make a XML file. The file is written but with no values. I can't figure it out. Here is the complete source code: http://www.segasiauto.ro/tmp/writexml.txt Can someone help? T... | [
"php",
"dom"
] | 0 | 1 | 77 | 2 | 0 | 2011-06-02T11:59:29.833000 | 2011-06-02T15:41:43.417000 |
6,214,227 | 6,214,296 | How can I run Tomcat with maven:run with my custom configuration file? | I want to run my Tomcat project by mvn tomcat:run In which path can I put my tomcat-user.xml to load it dynamically? | Use the tomcat-maven-plugin, it has configuration for this. See http://mojo.codehaus.org/tomcat-maven-plugin/run-mojo.html#additionalConfigFilesDir. | How can I run Tomcat with maven:run with my custom configuration file? I want to run my Tomcat project by mvn tomcat:run In which path can I put my tomcat-user.xml to load it dynamically? | TITLE:
How can I run Tomcat with maven:run with my custom configuration file?
QUESTION:
I want to run my Tomcat project by mvn tomcat:run In which path can I put my tomcat-user.xml to load it dynamically?
ANSWER:
Use the tomcat-maven-plugin, it has configuration for this. See http://mojo.codehaus.org/tomcat-maven-plu... | [
"tomcat",
"configuration",
"maven"
] | 0 | 0 | 667 | 1 | 0 | 2011-06-02T11:59:56 | 2011-06-02T12:06:46.747000 |
6,214,229 | 6,214,251 | Question about Java synchronized | The Java documentation says that "it is not possible for two invocations of synchronized methods on the same object to interleave". What I need to know is whether synchronized will also prevent a synchronized method in two different instances of the same class from interleaving. E.g. class Worker has method called proc... | No; synchronized only prevents multiple threads from simultaneously executing the method in the same instance. If you have n instances, there could be n threads, each executing the method in one of the instances. If you need to ensure that only one thread may execute the method across all instances, you should make the... | Question about Java synchronized The Java documentation says that "it is not possible for two invocations of synchronized methods on the same object to interleave". What I need to know is whether synchronized will also prevent a synchronized method in two different instances of the same class from interleaving. E.g. cl... | TITLE:
Question about Java synchronized
QUESTION:
The Java documentation says that "it is not possible for two invocations of synchronized methods on the same object to interleave". What I need to know is whether synchronized will also prevent a synchronized method in two different instances of the same class from int... | [
"java",
"synchronization"
] | 16 | 38 | 16,561 | 7 | 0 | 2011-06-02T12:00:19.823000 | 2011-06-02T12:02:49.980000 |
6,214,230 | 6,214,351 | asp.net objectdatasource pass parameter from control as well as textbox | I have configured a GridView to fill data by an ObjectDataSource. This ObjectDataSource requires only one parameter which is bound to a DropDownList. This all works well. When i load the page, it fills the DropDownList and whatever field is displayed in this DropDownList is passed as a parameter to the ObjectDataSource... | This is a rough sample but basically what you can do is instead of creating a control parameter you can create a session parameter or something similar: So when you click enter it will use the textbox value or when you change the dropdownlist it will use the dropdownlist's value. You can also have radio button's giving... | asp.net objectdatasource pass parameter from control as well as textbox I have configured a GridView to fill data by an ObjectDataSource. This ObjectDataSource requires only one parameter which is bound to a DropDownList. This all works well. When i load the page, it fills the DropDownList and whatever field is display... | TITLE:
asp.net objectdatasource pass parameter from control as well as textbox
QUESTION:
I have configured a GridView to fill data by an ObjectDataSource. This ObjectDataSource requires only one parameter which is bound to a DropDownList. This all works well. When i load the page, it fills the DropDownList and whateve... | [
"c#",
"asp.net",
"parameters",
"textbox",
"objectdatasource"
] | 5 | 2 | 15,032 | 2 | 0 | 2011-06-02T12:00:36.620000 | 2011-06-02T12:12:59.927000 |
6,214,231 | 6,214,406 | How do I append a value to each array item? | I have this code, it works but it just doesn't look right. I'm creating a string that I'm passing to the server through SSH:... chmod -R 777 #{remote_path}/#{project}/#{items_to_chmod.join(' ' + remote_path + '/' + project + '/')}... The ugly thing is the first "#{remote_path}/#{project}/", it's not being added to the ... | How about this? "... chmod -R 777 #{ items_to_chmod.map{ |item| File.join(remote_path, project, item) }.join(" ") }..." | How do I append a value to each array item? I have this code, it works but it just doesn't look right. I'm creating a string that I'm passing to the server through SSH:... chmod -R 777 #{remote_path}/#{project}/#{items_to_chmod.join(' ' + remote_path + '/' + project + '/')}... The ugly thing is the first "#{remote_path... | TITLE:
How do I append a value to each array item?
QUESTION:
I have this code, it works but it just doesn't look right. I'm creating a string that I'm passing to the server through SSH:... chmod -R 777 #{remote_path}/#{project}/#{items_to_chmod.join(' ' + remote_path + '/' + project + '/')}... The ugly thing is the fi... | [
"ruby-on-rails",
"ruby"
] | 0 | 2 | 167 | 1 | 0 | 2011-06-02T12:00:39.620000 | 2011-06-02T12:19:08.927000 |
6,214,233 | 6,214,285 | list of regular expressions | I'm looking for a concise list of all the regular expression syntax (sort of like a cheatsheet) and I found this tool: http://erik.eae.net/playground/regexp/regexp.html in which if you click on the question mark on the top right corner it will display some sort of dictionary of regular expressions... my question is....... | Regex syntax varies between different implementations. Therefore, there is unlikely to be an absolutely definitive syntax list which covers everything. You may get one which covers all possible options for regex in a given language, but you'd need a different reference for regex implementations in other languages. For ... | list of regular expressions I'm looking for a concise list of all the regular expression syntax (sort of like a cheatsheet) and I found this tool: http://erik.eae.net/playground/regexp/regexp.html in which if you click on the question mark on the top right corner it will display some sort of dictionary of regular expre... | TITLE:
list of regular expressions
QUESTION:
I'm looking for a concise list of all the regular expression syntax (sort of like a cheatsheet) and I found this tool: http://erik.eae.net/playground/regexp/regexp.html in which if you click on the question mark on the top right corner it will display some sort of dictionar... | [
"regex"
] | 0 | 4 | 1,141 | 6 | 0 | 2011-06-02T12:00:46.823000 | 2011-06-02T12:05:39.353000 |
6,214,236 | 6,242,422 | Sproutcore 2 - Class methods and variables | I have been implementing class methods as shown in this answer Basic Sproutcore: class method, class variables help but it no longer works in Sproutcore 2:- MyFooClass.mixin({ barClassMethod: function() { /*... */ } }) gives error MyFooClass.mixin [undefined] is not a function I have tried reading through the Sproutcor... | Two things you should keep in mind when extending a sproutcore class. First you have to define your class before you can mix something into it. So start by creating your class/object either with MyFooClass = SC.Object.extend({... }); or MyFooClass = SC.Object.create({... }); whereas the first statement would create a c... | Sproutcore 2 - Class methods and variables I have been implementing class methods as shown in this answer Basic Sproutcore: class method, class variables help but it no longer works in Sproutcore 2:- MyFooClass.mixin({ barClassMethod: function() { /*... */ } }) gives error MyFooClass.mixin [undefined] is not a function... | TITLE:
Sproutcore 2 - Class methods and variables
QUESTION:
I have been implementing class methods as shown in this answer Basic Sproutcore: class method, class variables help but it no longer works in Sproutcore 2:- MyFooClass.mixin({ barClassMethod: function() { /*... */ } }) gives error MyFooClass.mixin [undefined]... | [
"sproutcore"
] | 3 | 2 | 563 | 2 | 0 | 2011-06-02T12:00:55.407000 | 2011-06-05T10:45:57.030000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.