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,203,217 | 6,203,621 | Is there an edit control for Delphi that allows path editing? | I have various hierarchical structures and would like to allow navigation around then using an editor like the Microsoft one found in the explorer address bar below. Is there such a Delphi component? (Paid for or free)? | TAdvExplorerTreeview from TMS might be what your looking for: http://www.tmssoftware.com/site/advexptree.asp | Is there an edit control for Delphi that allows path editing? I have various hierarchical structures and would like to allow navigation around then using an editor like the Microsoft one found in the explorer address bar below. Is there such a Delphi component? (Paid for or free)? | TITLE:
Is there an edit control for Delphi that allows path editing?
QUESTION:
I have various hierarchical structures and would like to allow navigation around then using an editor like the Microsoft one found in the explorer address bar below. Is there such a Delphi component? (Paid for or free)?
ANSWER:
TAdvExplore... | [
"delphi",
"path",
"explorer",
"edit-control"
] | 9 | 9 | 2,233 | 4 | 0 | 2011-06-01T14:56:07.220000 | 2011-06-01T15:22:30.930000 |
6,203,218 | 6,203,286 | JQuery - addClass when the class is bound to an id | I have this CSS rule: #panelSeparator.active { background: #fff url(../img/vgrabber.gif) no-repeat center; opacity: 0.7; } I would like to do something like this in JS: $('#panelSeparator').addClass('active'); How should I change the parameter of addClass in order to make that work? Thanks, Dan | Try removing the space between # panelSeparator.active so it is #panelSeparator.active. | JQuery - addClass when the class is bound to an id I have this CSS rule: #panelSeparator.active { background: #fff url(../img/vgrabber.gif) no-repeat center; opacity: 0.7; } I would like to do something like this in JS: $('#panelSeparator').addClass('active'); How should I change the parameter of addClass in order to m... | TITLE:
JQuery - addClass when the class is bound to an id
QUESTION:
I have this CSS rule: #panelSeparator.active { background: #fff url(../img/vgrabber.gif) no-repeat center; opacity: 0.7; } I would like to do something like this in JS: $('#panelSeparator').addClass('active'); How should I change the parameter of addC... | [
"jquery",
"css"
] | 2 | 8 | 142 | 4 | 0 | 2011-06-01T14:56:08.180000 | 2011-06-01T14:59:56.190000 |
6,203,220 | 6,203,261 | Mysql join query | I have table users and another table premium_users in which I hold the userid and the date when he bought premium membership. How can I use mysql join, so that in a single query I can select all the columns from the table users and also know for each premium user the date he joined on. USERS: ID USERNAME 1 JOHN 2 BILL ... | select u.*, pu.DATE from USERS u LEFT OUTER JOIN PREMIUM_USERS pu on u.ID = pu.USERID You can check if a row is empty with: if (!$row['DATE']) {... } | Mysql join query I have table users and another table premium_users in which I hold the userid and the date when he bought premium membership. How can I use mysql join, so that in a single query I can select all the columns from the table users and also know for each premium user the date he joined on. USERS: ID USERNA... | TITLE:
Mysql join query
QUESTION:
I have table users and another table premium_users in which I hold the userid and the date when he bought premium membership. How can I use mysql join, so that in a single query I can select all the columns from the table users and also know for each premium user the date he joined on... | [
"mysql",
"sql",
"join"
] | 0 | 1 | 85 | 5 | 0 | 2011-06-01T14:56:17.300000 | 2011-06-01T14:58:43.953000 |
6,203,226 | 6,203,291 | How to create an array of vector in Java? | So, I want an array of Vector of Integer in Java. If I put Vector [] matrix; matrix = new Vector [100]; I get cannot the compilation error cannot create a generic array of Vector Should I use matrix = new Vector[100]; instead? (which gives a warning) Or should I simply not use an array of vectors and use vector of vect... | Java simply doesn't have any means to create arrays of a parameterized type without getting or suppressing a warning. So the best you can get is this: @SuppressWarnings("unchecked") Vector [] anArray = (Vector []) new Vector [100]; You can get around this problem if you avoid arrays entirely. I.e.: Vector > list = new ... | How to create an array of vector in Java? So, I want an array of Vector of Integer in Java. If I put Vector [] matrix; matrix = new Vector [100]; I get cannot the compilation error cannot create a generic array of Vector Should I use matrix = new Vector[100]; instead? (which gives a warning) Or should I simply not use ... | TITLE:
How to create an array of vector in Java?
QUESTION:
So, I want an array of Vector of Integer in Java. If I put Vector [] matrix; matrix = new Vector [100]; I get cannot the compilation error cannot create a generic array of Vector Should I use matrix = new Vector[100]; instead? (which gives a warning) Or should... | [
"java",
"arrays",
"vector"
] | 9 | 6 | 48,708 | 5 | 0 | 2011-06-01T14:56:47.797000 | 2011-06-01T15:00:19.913000 |
6,203,231 | 6,210,103 | Which HTTP methods match up to which CRUD methods? | In RESTful style programming, we should use HTTP methods as our building blocks. I'm a little confused though which methods match up to the classic CRUD methods. GET/Read and DELETE/Delete are obvious enough. However, what is the difference between PUT/POST? Do they match one to one with Create and Update? | Create = PUT with a new URI POST to a base URI returning a newly created URI Read = GET Update = PUT with an existing URI Delete = DELETE PUT can map to both Create and Update depending on the existence of the URI used with the PUT. POST maps to Create. Correction: POST can also map to Update although it's typically us... | Which HTTP methods match up to which CRUD methods? In RESTful style programming, we should use HTTP methods as our building blocks. I'm a little confused though which methods match up to the classic CRUD methods. GET/Read and DELETE/Delete are obvious enough. However, what is the difference between PUT/POST? Do they ma... | TITLE:
Which HTTP methods match up to which CRUD methods?
QUESTION:
In RESTful style programming, we should use HTTP methods as our building blocks. I'm a little confused though which methods match up to the classic CRUD methods. GET/Read and DELETE/Delete are obvious enough. However, what is the difference between PU... | [
"http",
"rest",
"crud",
"http-method"
] | 229 | 317 | 139,860 | 9 | 0 | 2011-06-01T14:57:08.997000 | 2011-06-02T03:38:42.187000 |
6,203,232 | 6,203,341 | Fastest way to read QR codes Client vs Server side | I am in the design stages of an app involving QR codes. It will be a contest where a user sees a QR code and scans it. The first user to scan the QR code is the winner. Because the contest is on a first come first serve basis I want to make sure that the first user who scans the code is the winner. I have noticed that ... | There are two stages to scanning a QR code. Capturing the image Converting the image to text Step 1 has to be done on the client. Then it becomes a question of "Client CPU power + time to send the text data" Vs. "Server CPU power (shared between clients) + time to send the image data". Client CPU power is variable. Ban... | Fastest way to read QR codes Client vs Server side I am in the design stages of an app involving QR codes. It will be a contest where a user sees a QR code and scans it. The first user to scan the QR code is the winner. Because the contest is on a first come first serve basis I want to make sure that the first user who... | TITLE:
Fastest way to read QR codes Client vs Server side
QUESTION:
I am in the design stages of an app involving QR codes. It will be a contest where a user sees a QR code and scans it. The first user to scan the QR code is the winner. Because the contest is on a first come first serve basis I want to make sure that ... | [
"c#",
"javascript",
"jquery",
"qr-code"
] | 0 | 4 | 2,579 | 3 | 0 | 2011-06-01T14:57:10.007000 | 2011-06-01T15:04:17.400000 |
6,203,236 | 6,203,265 | How does pointer increment compare with index increment in C | consider the following two code: void PrintLetter(char *src) { while(*src!= '\0') { printf("%c",*src); src++; } } and void PrintLetter(char *src) { int i; for(i=0;src[i];i++) printf("%c",src[i]); } Is there any performance difference between the two? | None whatsoever. The compiler will perform its optimizations regardless of the form you are writing. The underlying assembly code is the same. | How does pointer increment compare with index increment in C consider the following two code: void PrintLetter(char *src) { while(*src!= '\0') { printf("%c",*src); src++; } } and void PrintLetter(char *src) { int i; for(i=0;src[i];i++) printf("%c",src[i]); } Is there any performance difference between the two? | TITLE:
How does pointer increment compare with index increment in C
QUESTION:
consider the following two code: void PrintLetter(char *src) { while(*src!= '\0') { printf("%c",*src); src++; } } and void PrintLetter(char *src) { int i; for(i=0;src[i];i++) printf("%c",src[i]); } Is there any performance difference between... | [
"c",
"pointers",
"integer",
"increment"
] | 6 | 5 | 667 | 2 | 0 | 2011-06-01T14:57:40.257000 | 2011-06-01T14:58:56.950000 |
6,203,238 | 6,215,716 | Adding an Image to a Current UIGraphics Context | I've got a slideshow that allows users to annotate slides with a simple drawing tool. Just allows you to draw on the screen with your finger and then 'save'. The save feature uses UIImagePNGRepresentation and works rather well. What I need to work out is how to 'continue' existing annotations so when a save happens it ... | I achieved this by adding this between my Start and End lines: UIImage *image = [[UIImage alloc] initWithContentsOfFile:saveFilePath]; CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height); CGContextTranslateCTM(UIGraphicsGetCurrentContext(), 0, image.size.height); CGContextScaleCTM(UIGraphicsGetCurr... | Adding an Image to a Current UIGraphics Context I've got a slideshow that allows users to annotate slides with a simple drawing tool. Just allows you to draw on the screen with your finger and then 'save'. The save feature uses UIImagePNGRepresentation and works rather well. What I need to work out is how to 'continue'... | TITLE:
Adding an Image to a Current UIGraphics Context
QUESTION:
I've got a slideshow that allows users to annotate slides with a simple drawing tool. Just allows you to draw on the screen with your finger and then 'save'. The save feature uses UIImagePNGRepresentation and works rather well. What I need to work out is... | [
"objective-c",
"uiimageview"
] | 3 | 10 | 7,010 | 1 | 0 | 2011-06-01T14:57:43.790000 | 2011-06-02T14:13:48.747000 |
6,203,240 | 6,203,312 | How to run logcat on multiple devices? | How can I run logcat on multiple devices at the same time? "adb logcat" command gives an error: error: more than one device and emulator | Use the -s option of adb: adb -s Example C:\Users\lel>adb devices List of devices attached 192.168.198.101:5555 device 0123456789ABCDEF device
adb -s 0123456789ABCDEF logcat adb -s 192.168.198.101:5555 logcat You can combine grep whit this, to get all lines that contain it. an example is with System.out Example: adb -... | How to run logcat on multiple devices? How can I run logcat on multiple devices at the same time? "adb logcat" command gives an error: error: more than one device and emulator | TITLE:
How to run logcat on multiple devices?
QUESTION:
How can I run logcat on multiple devices at the same time? "adb logcat" command gives an error: error: more than one device and emulator
ANSWER:
Use the -s option of adb: adb -s Example C:\Users\lel>adb devices List of devices attached 192.168.198.101:5555 devic... | [
"android",
"device",
"adb",
"logcat"
] | 54 | 99 | 37,282 | 3 | 0 | 2011-06-01T14:57:45.050000 | 2011-06-01T15:01:35.940000 |
6,203,244 | 6,203,460 | iPhone: What are the Alert Sound supported in Push Notification Payload? | I have implemented Push Notification and have been using Default sounds every time. I know that there are many other sounds as well that I can use but I don't know the names of all sounds that Apple support for Push Notification. Can someone please help me to get the list? Thanks. | You can use any sound you desire (and you have the rights to) - but you need to correctly encode the sound to work on the device (caf, aiff, wav). You must embed the sound as a resource within your project bundle, you cannot use "Any sound" on the device. Once embedded, you can reference it by filename in your payload ... | iPhone: What are the Alert Sound supported in Push Notification Payload? I have implemented Push Notification and have been using Default sounds every time. I know that there are many other sounds as well that I can use but I don't know the names of all sounds that Apple support for Push Notification. Can someone pleas... | TITLE:
iPhone: What are the Alert Sound supported in Push Notification Payload?
QUESTION:
I have implemented Push Notification and have been using Default sounds every time. I know that there are many other sounds as well that I can use but I don't know the names of all sounds that Apple support for Push Notification.... | [
"iphone",
"apple-push-notifications"
] | 0 | 1 | 3,330 | 2 | 0 | 2011-06-01T14:58:01.340000 | 2011-06-01T15:13:25.393000 |
6,203,257 | 6,203,367 | ASP.net shorthand in TextBox | I am trying to do the following: When I execute my page it gets output as <%= Name %> instead of actually doing a response.write. I tried modifying it to use the <% Response.Write(Name) %> instead but it did the same thing, putting the text there instead. I can do this just fine: That will actually work. Why doesn't th... | Either use code behind: txtName.Text = Name; Or, add Page.DataBind() in your code behind and change the syntax of your control to: Note the # rather than the =. # represents a data-binding expression | ASP.net shorthand in TextBox I am trying to do the following: When I execute my page it gets output as <%= Name %> instead of actually doing a response.write. I tried modifying it to use the <% Response.Write(Name) %> instead but it did the same thing, putting the text there instead. I can do this just fine: That will ... | TITLE:
ASP.net shorthand in TextBox
QUESTION:
I am trying to do the following: When I execute my page it gets output as <%= Name %> instead of actually doing a response.write. I tried modifying it to use the <% Response.Write(Name) %> instead but it did the same thing, putting the text there instead. I can do this jus... | [
"c#",
"asp.net",
"webforms",
"response.write",
"shorthand"
] | 2 | 4 | 425 | 2 | 0 | 2011-06-01T14:58:34.393000 | 2011-06-01T15:06:33.657000 |
6,203,262 | 6,203,372 | C# XNA - Calculating next point in a vector direction | lets say i have two points A & B in my 3D Space now i want to start calculate points from A to B in direction of B and i want to continue calculation farther from B on the same line. How t do it? what i am actually working on is bullets from plane. | If I understood your question correctly, you should first get the direction vector by calculating dir = B - A and then you can continue the travel by C = B + dir Otherwise, please clarify your question, like for example what you mean by "calculate points from A to B", because mathematically there is an infinite amount ... | C# XNA - Calculating next point in a vector direction lets say i have two points A & B in my 3D Space now i want to start calculate points from A to B in direction of B and i want to continue calculation farther from B on the same line. How t do it? what i am actually working on is bullets from plane. | TITLE:
C# XNA - Calculating next point in a vector direction
QUESTION:
lets say i have two points A & B in my 3D Space now i want to start calculate points from A to B in direction of B and i want to continue calculation farther from B on the same line. How t do it? what i am actually working on is bullets from plane.... | [
"c#",
"vector",
"xna"
] | 0 | 3 | 5,288 | 2 | 0 | 2011-06-01T14:58:45.297000 | 2011-06-01T15:07:13.267000 |
6,203,266 | 6,203,316 | cannot open source file "stdafx.h" | I have two include file headers #include "stdafx.h" #include "psapi.h" However it gives a cannot open source file "stdafx.h" compile time error. I am using Visual Studios 2010. Is "stdafx.h" even necessary? I think so because the program cannot compile if i take it away. | Visual Studio uses it for "precompiled headers" feature. If you are not experienced with Visual Studio, I would recommend to keep the stdafx.h in the project. And of course, if you #include it, you ought to have it. | cannot open source file "stdafx.h" I have two include file headers #include "stdafx.h" #include "psapi.h" However it gives a cannot open source file "stdafx.h" compile time error. I am using Visual Studios 2010. Is "stdafx.h" even necessary? I think so because the program cannot compile if i take it away. | TITLE:
cannot open source file "stdafx.h"
QUESTION:
I have two include file headers #include "stdafx.h" #include "psapi.h" However it gives a cannot open source file "stdafx.h" compile time error. I am using Visual Studios 2010. Is "stdafx.h" even necessary? I think so because the program cannot compile if i take it a... | [
"c++",
"visual-c++"
] | 6 | 8 | 40,899 | 2 | 0 | 2011-06-01T14:58:56.970000 | 2011-06-01T15:01:56.373000 |
6,203,285 | 6,203,566 | how to release a object which has a NStimer working | i don't want to write a code like "myview.timer invalidate" before [myview release]. but if the timer is working, i can't release myview, because timer retain myview. how can i do? i want to make the class"myview" simple, just call [myview init] and [myview release] myview.h @interface MyView: UIView { NSString *str; N... | Repetitive timer retains its target. So if you use repetitive timer then you must invalidate it, and the place to invalidate must not be dealloc. dealloc won't be called unless you invalidate the timer. That's the way NSTimer is designed. As you have a start method, you can write a stop method which will invalidate the... | how to release a object which has a NStimer working i don't want to write a code like "myview.timer invalidate" before [myview release]. but if the timer is working, i can't release myview, because timer retain myview. how can i do? i want to make the class"myview" simple, just call [myview init] and [myview release] m... | TITLE:
how to release a object which has a NStimer working
QUESTION:
i don't want to write a code like "myview.timer invalidate" before [myview release]. but if the timer is working, i can't release myview, because timer retain myview. how can i do? i want to make the class"myview" simple, just call [myview init] and ... | [
"iphone",
"objective-c"
] | 4 | 3 | 568 | 3 | 0 | 2011-06-01T14:59:53.727000 | 2011-06-01T15:19:27.113000 |
6,203,300 | 6,203,665 | Is there a meaningful way to use context managers inside generators? | from contextlib import contextmanager
@contextmanager def context(): print "entering" yield print "exiting"
def test(): with context(): for x in range(10): yield x
for x in test(): if x == 5: break # or raise output: entering Is there a way to make python automatically invoke the __exit__ method of context() when th... | Well, you could wrap the yield in context() function with a try/finally clause: from contextlib import contextmanager
@contextmanager def context(): print "entering" try: yield finally: print "exiting"
def test(): with context(): for x in range(10): yield x
for x in test(): if x == 5: break # or raise output: enteri... | Is there a meaningful way to use context managers inside generators? from contextlib import contextmanager
@contextmanager def context(): print "entering" yield print "exiting"
def test(): with context(): for x in range(10): yield x
for x in test(): if x == 5: break # or raise output: entering Is there a way to make... | TITLE:
Is there a meaningful way to use context managers inside generators?
QUESTION:
from contextlib import contextmanager
@contextmanager def context(): print "entering" yield print "exiting"
def test(): with context(): for x in range(10): yield x
for x in test(): if x == 5: break # or raise output: entering Is t... | [
"python",
"generator",
"contextmanager"
] | 12 | 18 | 2,383 | 1 | 0 | 2011-06-01T15:00:48.977000 | 2011-06-01T15:25:27.033000 |
6,203,308 | 6,210,945 | Navigation Properties on Join Tables in Entity Framework | So I have a table in my SQL database: CompanyRelationships -------------------- ID CompanyID RelatedCompanyID PermissionGroupID Which defines when a company allows access to it's records to another company. The "CompanyID" is the company that is granting access, the "RelatedCompanyID" is the company that is getting the... | You Could always Click on the Navigational Property on the Entity in the Model Browser, and look up the Properties Window. The Window Shows the Association Name (created when adding Table relationships in database). Once you identify the Relation, you could always rename the Navigational Property Name to a name of your... | Navigation Properties on Join Tables in Entity Framework So I have a table in my SQL database: CompanyRelationships -------------------- ID CompanyID RelatedCompanyID PermissionGroupID Which defines when a company allows access to it's records to another company. The "CompanyID" is the company that is granting access, ... | TITLE:
Navigation Properties on Join Tables in Entity Framework
QUESTION:
So I have a table in my SQL database: CompanyRelationships -------------------- ID CompanyID RelatedCompanyID PermissionGroupID Which defines when a company allows access to it's records to another company. The "CompanyID" is the company that is... | [
".net",
"database",
"entity-framework-4"
] | 1 | 2 | 1,099 | 2 | 0 | 2011-06-01T15:01:21.160000 | 2011-06-02T05:51:43.217000 |
6,203,313 | 6,203,859 | Resolving imports by namespace with MEF | I'm using MEF as an IoC container. If the requesting class is in the Foo.UI.* namespace, I want ILogger to resolve to ClientLogger, otherwise it should resolve to Logger. Can I do this? | Maybe with such a workaround, using named exports? [Export("clientLogger", typeof(ILogger))] public class ClientLogger: ILogger {}
[Export("logger", typeof(ILogger))] public class logger: ILogger {} And the requesting type in the Foo.UI.* decorate like this [ImportingConstructor] public MyService([Import("clientLogger... | Resolving imports by namespace with MEF I'm using MEF as an IoC container. If the requesting class is in the Foo.UI.* namespace, I want ILogger to resolve to ClientLogger, otherwise it should resolve to Logger. Can I do this? | TITLE:
Resolving imports by namespace with MEF
QUESTION:
I'm using MEF as an IoC container. If the requesting class is in the Foo.UI.* namespace, I want ILogger to resolve to ClientLogger, otherwise it should resolve to Logger. Can I do this?
ANSWER:
Maybe with such a workaround, using named exports? [Export("clientL... | [
".net",
"dependency-injection",
"namespaces",
"ioc-container",
"mef"
] | 2 | 2 | 385 | 2 | 0 | 2011-06-01T15:01:43.920000 | 2011-06-01T15:39:33.813000 |
6,203,314 | 6,204,640 | Pivot in sqlserver | How do i transform the table of format based on the value in the "Col1" Let the initial table content be Col1 Col2 Cnt color ---------------------------- 1 1 5 green 1 2 0 blue 1 3 7 red 2 1 0 gray 2 2 10 yellow 2 3 8 orange INTO the table of following format c11 d11 e11 color11 c12 d12 e12 color12 c13 d13 e13 color13 ... | I don't think a PIVOT solution is what you're really after. Instead you can do the following WITH TestData AS ( SELECT 1 Col1, 1 Col2, 5 Cnt, 'green' color UNION SELECT 1, 2, 0 Cnt, 'blue' UNION SELECT 1, 3, 7 Cnt, 'red' UNION SELECT 2, 1, 0 Cnt, 'gray' UNION SELECT 2, 2, 10 Cnt, 'yellow' UNION SELECT 2, 3, 8 Cnt, 'ora... | Pivot in sqlserver How do i transform the table of format based on the value in the "Col1" Let the initial table content be Col1 Col2 Cnt color ---------------------------- 1 1 5 green 1 2 0 blue 1 3 7 red 2 1 0 gray 2 2 10 yellow 2 3 8 orange INTO the table of following format c11 d11 e11 color11 c12 d12 e12 color12 c... | TITLE:
Pivot in sqlserver
QUESTION:
How do i transform the table of format based on the value in the "Col1" Let the initial table content be Col1 Col2 Cnt color ---------------------------- 1 1 5 green 1 2 0 blue 1 3 7 red 2 1 0 gray 2 2 10 yellow 2 3 8 orange INTO the table of following format c11 d11 e11 color11 c12... | [
"sql",
"sql-server-2008",
"pivot"
] | 1 | 0 | 175 | 1 | 0 | 2011-06-01T15:01:54.250000 | 2011-06-01T16:36:26.277000 |
6,203,317 | 6,203,648 | Creating a SQL Stored Procedure to aggregate data from multiple tables to create End of Month report | Currently I am using MS Sql2000, though we are discussing upgrading this to 2005 (if that affects anything, Im guessing that it is pretty standard SQL that I need) One of our products Tracks Sales from various departments around the country. Currently, I run 3 Almost identical Stored Procedures in Query Analyzer, and t... | I'm not sure what the "and so on" indicates, but up until that point the following should work: SELECT S.id AS SiteId, S.site AS Location, SUM(CASE WHEN SE.status = 1 THEN 1 ELSE 0 END) AS TotalDeposits, SUM(CASE WHEN SE.status = 2 THEN 1 ELSE 0 END) AS TotalCompleted, SUM(CASE WHEN SE.status = 3 THEN 1 ELSE 0 END) AS ... | Creating a SQL Stored Procedure to aggregate data from multiple tables to create End of Month report Currently I am using MS Sql2000, though we are discussing upgrading this to 2005 (if that affects anything, Im guessing that it is pretty standard SQL that I need) One of our products Tracks Sales from various departmen... | TITLE:
Creating a SQL Stored Procedure to aggregate data from multiple tables to create End of Month report
QUESTION:
Currently I am using MS Sql2000, though we are discussing upgrading this to 2005 (if that affects anything, Im guessing that it is pretty standard SQL that I need) One of our products Tracks Sales from... | [
"sql",
"stored-procedures"
] | 1 | 1 | 3,751 | 1 | 0 | 2011-06-01T15:01:56.720000 | 2011-06-01T15:24:44.063000 |
6,203,320 | 6,203,394 | MPMoviePlayerController won't change rotation automatically to landscape | Hey, I do have my App with Tabbar Navigation and everything else in portrait mode where no rotation is supported. Now I have to stream this video, that has to be landscape. I'm using MPMoviePlayerController which works fine basically, but although it's said to rotate automatically to landscape mode, it stays in portrai... | MPMoviePlayerController no longer works in landscape by default so to make it work in landscape you need to apply a transform to the view. UIView * playerView = [moviePlayerController view]; [playerView setFrame: CGRectMake(0, 0, 480, 320)];
CGAffineTransform landscapeTransform; landscapeTransform = CGAffineTransformM... | MPMoviePlayerController won't change rotation automatically to landscape Hey, I do have my App with Tabbar Navigation and everything else in portrait mode where no rotation is supported. Now I have to stream this video, that has to be landscape. I'm using MPMoviePlayerController which works fine basically, but although... | TITLE:
MPMoviePlayerController won't change rotation automatically to landscape
QUESTION:
Hey, I do have my App with Tabbar Navigation and everything else in portrait mode where no rotation is supported. Now I have to stream this video, that has to be landscape. I'm using MPMoviePlayerController which works fine basic... | [
"iphone",
"objective-c",
"video",
"orientation"
] | 4 | 5 | 4,005 | 1 | 0 | 2011-06-01T15:02:08.123000 | 2011-06-01T15:09:00.373000 |
6,203,321 | 6,203,647 | How can I check on debug symbol status with Eclipse? | While discussing another question I asked, @Aaron Digulla pointed out the following: If you installed the Java SDK, there should be a "src.zip" file in the root directory of the Java installation. If it's missing, download Java again. Eclipse should find the source automatically and show it to you when you open the typ... | a) Eclipse comes with it's own Java compiler, so if you are using the Java Runtime Environment, you won't run into many issues, except that extras like jarsigner and possibly the JRE source code may be missing. The best way to verify your installation is through your package manager; however, if you installed by some o... | How can I check on debug symbol status with Eclipse? While discussing another question I asked, @Aaron Digulla pointed out the following: If you installed the Java SDK, there should be a "src.zip" file in the root directory of the Java installation. If it's missing, download Java again. Eclipse should find the source a... | TITLE:
How can I check on debug symbol status with Eclipse?
QUESTION:
While discussing another question I asked, @Aaron Digulla pointed out the following: If you installed the Java SDK, there should be a "src.zip" file in the root directory of the Java installation. If it's missing, download Java again. Eclipse should... | [
"java",
"eclipse",
"sdk",
"debug-symbols"
] | 7 | 6 | 4,696 | 2 | 0 | 2011-06-01T15:02:14.827000 | 2011-06-01T15:24:39.223000 |
6,203,337 | 6,203,414 | Crontab / Running cronjob on first sunday in month | Possible Duplicate: cron: how to schedule to run first Sunday of every month I want to execute a php script on every first sunday in month at 7 am. I entered the following line in the servers crontab. 0 7 1-7 * 0 user /path/to/script.php Today I saw that the script did run on wednesday morning. How could that happen? I... | From the man page: Commands are executed by cron(8) when the minute, hour, and month of year fields match the current time, and when at least one of the two day fields (day of month, or day of week) matches the current time (see ``Note'' below). and later: Note: The day of a command's execution can be specified by two ... | Crontab / Running cronjob on first sunday in month Possible Duplicate: cron: how to schedule to run first Sunday of every month I want to execute a php script on every first sunday in month at 7 am. I entered the following line in the servers crontab. 0 7 1-7 * 0 user /path/to/script.php Today I saw that the script did... | TITLE:
Crontab / Running cronjob on first sunday in month
QUESTION:
Possible Duplicate: cron: how to schedule to run first Sunday of every month I want to execute a php script on every first sunday in month at 7 am. I entered the following line in the servers crontab. 0 7 1-7 * 0 user /path/to/script.php Today I saw t... | [
"php",
"cron"
] | 4 | 9 | 4,139 | 3 | 0 | 2011-06-01T15:03:46.590000 | 2011-06-01T15:10:28.577000 |
6,203,351 | 6,203,625 | Silverlight WCF Service Reference "The given key was not present in the dictionary" | Question: I Have a WCF test Service with a reference (.net 3.5) on Silverlight application and when i make an instance ServiceReference1.Service1Client client = new Service1Client(); i have the following error: "The given key was not present in the dictionary." The service is correct and in web.config i have something ... | In web.config, which is where the service is supposed to be defined, you have a client > config section - this won't help you define the client from the Silverlight project. You need a client definition on the SL file ServiceReferences.ClientConfig. One more thing, SL doesn't support WSHttpBinding, so that client defin... | Silverlight WCF Service Reference "The given key was not present in the dictionary" Question: I Have a WCF test Service with a reference (.net 3.5) on Silverlight application and when i make an instance ServiceReference1.Service1Client client = new Service1Client(); i have the following error: "The given key was not pr... | TITLE:
Silverlight WCF Service Reference "The given key was not present in the dictionary"
QUESTION:
Question: I Have a WCF test Service with a reference (.net 3.5) on Silverlight application and when i make an instance ServiceReference1.Service1Client client = new Service1Client(); i have the following error: "The gi... | [
"silverlight",
"wcf",
"service"
] | 2 | 1 | 5,716 | 2 | 0 | 2011-06-01T15:05:17.217000 | 2011-06-01T15:22:45.600000 |
6,203,358 | 6,203,438 | Comparing MySQL and Java Time | I have a datetime field in MySQL which I access through calling result.getString('date'), now I would like to check weather the current date and time in Java has exceeded the MySQL time or is before the MySQL time to check weather a result is activated or not. Datetime from MySQL has the form: 2011-12-30 17:10:00, how ... | Prior to JDK 8 You can use ResultSet.getDate('date') to retreive a Date object. Then use the method Date.before() or Date.after() to check. JDK 8 or later Refer to Basil Bourque's answer below. | Comparing MySQL and Java Time I have a datetime field in MySQL which I access through calling result.getString('date'), now I would like to check weather the current date and time in Java has exceeded the MySQL time or is before the MySQL time to check weather a result is activated or not. Datetime from MySQL has the f... | TITLE:
Comparing MySQL and Java Time
QUESTION:
I have a datetime field in MySQL which I access through calling result.getString('date'), now I would like to check weather the current date and time in Java has exceeded the MySQL time or is before the MySQL time to check weather a result is activated or not. Datetime fr... | [
"java",
"mysql",
"datetime",
"time"
] | 5 | 3 | 7,778 | 6 | 0 | 2011-06-01T15:05:44.470000 | 2011-06-01T15:11:54.047000 |
6,203,364 | 6,203,382 | remove saved old password from browser after password change | I'm implementing a password change feature in my web application. The old password is already saved by the browser for auto login. How can I replace it with the new password when the user login next time? I use jsp and dojo in the view part. With servlets and spring framework. | This is handled by the actual browser, you don't have access to that sort of thing with Javascript. Most browsers that store your password will also ask you to update your password if you ever successfully login with a password other than what they have stored. | remove saved old password from browser after password change I'm implementing a password change feature in my web application. The old password is already saved by the browser for auto login. How can I replace it with the new password when the user login next time? I use jsp and dojo in the view part. With servlets and... | TITLE:
remove saved old password from browser after password change
QUESTION:
I'm implementing a password change feature in my web application. The old password is already saved by the browser for auto login. How can I replace it with the new password when the user login next time? I use jsp and dojo in the view part.... | [
"browser",
"passwords",
"change-password"
] | 1 | 4 | 919 | 2 | 0 | 2011-06-01T15:06:29.093000 | 2011-06-01T15:07:57.243000 |
6,203,379 | 6,205,091 | Capture Video and send this video in MFMailComposer in iphone | In my app, I have write this code for capture video -(IBAction)takeVideo:(id)sender {
[self startCameraControllerFromViewController: self
usingDelegate: self]; }
- (BOOL) startCameraControllerFromViewController: (UIViewController*) controller usingDelegate: (id ) delegate {
if (([UIImagePickerController isSourceTyp... | In iOS 4 or later you can use an instance of UIImagePickerController to capture video. This is a fairly high-level convenience class, so the degree to which you can control the capture and then manipulate the captured video is limited. You might have to resort to lower level APIs available in AV Foundation. Once you ha... | Capture Video and send this video in MFMailComposer in iphone In my app, I have write this code for capture video -(IBAction)takeVideo:(id)sender {
[self startCameraControllerFromViewController: self
usingDelegate: self]; }
- (BOOL) startCameraControllerFromViewController: (UIViewController*) controller usingDelegat... | TITLE:
Capture Video and send this video in MFMailComposer in iphone
QUESTION:
In my app, I have write this code for capture video -(IBAction)takeVideo:(id)sender {
[self startCameraControllerFromViewController: self
usingDelegate: self]; }
- (BOOL) startCameraControllerFromViewController: (UIViewController*) contr... | [
"objective-c",
"ios4"
] | 0 | 1 | 708 | 1 | 0 | 2011-06-01T15:07:44.890000 | 2011-06-01T17:12:05.603000 |
6,203,404 | 6,203,612 | How do I read this URLs XML with ASP.NET VB | how do I read this URL http://lara-beach.de/PosXMLReqHotelInfo.php?htc=AYTLIND with ASP.NET and VB? Thank you for your feedback. | Maybe I don't understand the question, but you can read XML in VB.NET in a variety of ways. You can use Linq to XML or you can use the XML namespace directly. | How do I read this URLs XML with ASP.NET VB how do I read this URL http://lara-beach.de/PosXMLReqHotelInfo.php?htc=AYTLIND with ASP.NET and VB? Thank you for your feedback. | TITLE:
How do I read this URLs XML with ASP.NET VB
QUESTION:
how do I read this URL http://lara-beach.de/PosXMLReqHotelInfo.php?htc=AYTLIND with ASP.NET and VB? Thank you for your feedback.
ANSWER:
Maybe I don't understand the question, but you can read XML in VB.NET in a variety of ways. You can use Linq to XML or y... | [
"asp.net",
"xml",
"parsing"
] | 0 | 0 | 147 | 1 | 0 | 2011-06-01T15:09:54.333000 | 2011-06-01T15:22:04.243000 |
6,203,411 | 6,203,543 | Comparing strings by their alphabetical order | String s1 = "Project"; String s2 = "Sunject"; I want to compare the two above string by their alphabetic order (which in this case "Project" then "Sunject" as "P" comes before "S"). Does anyone know how to do that in Java? | String.compareTo might or might not be what you need. Take a look at this link if you need localized ordering of strings. | Comparing strings by their alphabetical order String s1 = "Project"; String s2 = "Sunject"; I want to compare the two above string by their alphabetic order (which in this case "Project" then "Sunject" as "P" comes before "S"). Does anyone know how to do that in Java? | TITLE:
Comparing strings by their alphabetical order
QUESTION:
String s1 = "Project"; String s2 = "Sunject"; I want to compare the two above string by their alphabetic order (which in this case "Project" then "Sunject" as "P" comes before "S"). Does anyone know how to do that in Java?
ANSWER:
String.compareTo might o... | [
"java"
] | 156 | 168 | 503,540 | 10 | 0 | 2011-06-01T15:10:14.810000 | 2011-06-01T15:18:22.733000 |
6,203,424 | 6,203,473 | Can I move my Mercurial working directory to another location? | I am new to Mercurial and version control in general, so I'm sure this is a pretty basic question but I have, as yet, been unable to find the answer. I am working on a small project which is under Mercurial version control. The project and the.hg repository are currently on my local drive (C:\MyProject.hg), however I w... | You can do a normal copy of the folder, but if you plan to continue using your local version, you should make the copy with the hg clone, so you can do a hg pull or hg push to sync the versions. You can still push and pull if you don't use hg clone but it makes it a little easier. | Can I move my Mercurial working directory to another location? I am new to Mercurial and version control in general, so I'm sure this is a pretty basic question but I have, as yet, been unable to find the answer. I am working on a small project which is under Mercurial version control. The project and the.hg repository... | TITLE:
Can I move my Mercurial working directory to another location?
QUESTION:
I am new to Mercurial and version control in general, so I'm sure this is a pretty basic question but I have, as yet, been unable to find the answer. I am working on a small project which is under Mercurial version control. The project and... | [
"version-control",
"mercurial"
] | 9 | 10 | 5,690 | 3 | 0 | 2011-06-01T15:11:13.920000 | 2011-06-01T15:14:24.293000 |
6,203,429 | 6,204,764 | Access Violation calling imported function | I've got a function imported from a DLL. I control the source of both the host executable and the dynamic library. Now, in DLLMain then I used MessageBox to pop up the address of the function I'm exporting, and compared it using a breakpoint to the function pointer returned by GetProcAddress, and they're identical. How... | I completely failed this one. Wrote a class that manages a resource without respecting my move and copy semantics properly. Turns out that I was calling FreeLibrary() on the library in question mistakenly before I needed to use it. | Access Violation calling imported function I've got a function imported from a DLL. I control the source of both the host executable and the dynamic library. Now, in DLLMain then I used MessageBox to pop up the address of the function I'm exporting, and compared it using a breakpoint to the function pointer returned by... | TITLE:
Access Violation calling imported function
QUESTION:
I've got a function imported from a DLL. I control the source of both the host executable and the dynamic library. Now, in DLLMain then I used MessageBox to pop up the address of the function I'm exporting, and compared it using a breakpoint to the function p... | [
"c++",
"visual-studio-2010"
] | 1 | 0 | 401 | 2 | 0 | 2011-06-01T15:11:20.307000 | 2011-06-01T16:45:59.707000 |
6,203,432 | 6,204,111 | Google Checkout button not appearing on cart page | Hope you guys don't mind me asking this question, but I find myself at a loss to why this is happening and need some suggestions on how I might resolve the issue. If I shouldn't ask these kinds of questions, please let me know. Currently I am working on a Magento 1.9 site that was upgraded from 1.8 and when I enabled G... | First, turn the default template on for testing, just to be sure. Clear all your caches and try again. Make sure that there aren't any "hidden" elements on the page displaying it. It may be helpful to turn on template hints to see if the block exists as anticipated but does not render any content, or if the block actua... | Google Checkout button not appearing on cart page Hope you guys don't mind me asking this question, but I find myself at a loss to why this is happening and need some suggestions on how I might resolve the issue. If I shouldn't ask these kinds of questions, please let me know. Currently I am working on a Magento 1.9 si... | TITLE:
Google Checkout button not appearing on cart page
QUESTION:
Hope you guys don't mind me asking this question, but I find myself at a loss to why this is happening and need some suggestions on how I might resolve the issue. If I shouldn't ask these kinds of questions, please let me know. Currently I am working o... | [
"magento"
] | 2 | 2 | 1,139 | 1 | 0 | 2011-06-01T15:11:27.460000 | 2011-06-01T15:58:00.437000 |
6,203,433 | 6,203,639 | UIAlert for deleting a row in tableView | I have this code: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
[array removeObjectAtIndex:indexPath.row];
if (editingStyle == UITableViewCellEditingStyleDelete) { [tableView deleteRowsAtIndexPaths:[NSArray arrayWit... | Save the cell's indexPath to an ivar and use that information within the method called by the alert view. @interface MyClass: … { NSIndexPath *deleteIndexPath; } @end In your implementation: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSInde... | UIAlert for deleting a row in tableView I have this code: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
[array removeObjectAtIndex:indexPath.row];
if (editingStyle == UITableViewCellEditingStyleDelete) { [tableView ... | TITLE:
UIAlert for deleting a row in tableView
QUESTION:
I have this code: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
[array removeObjectAtIndex:indexPath.row];
if (editingStyle == UITableViewCellEditingStyleDel... | [
"ios",
"objective-c",
"cocoa-touch",
"uitableview",
"uialertview"
] | 2 | 5 | 3,120 | 1 | 0 | 2011-06-01T15:11:29.677000 | 2011-06-01T15:23:58.683000 |
6,203,442 | 6,204,172 | Code Igniter php - return (ajax?) data based on dropdown selection with JQuery | I want to generate some data for editing, filtered by the choice a user makes in a dropdown menu, but I don't want to complicate things. I already have my project querying the database for a list of "trees", and populating a dropbox with the tree name, assigning the tree_id as its value. All I want to do is, when the u... | If you make a 'show' controller method that returns a bare template with the data (ie: not with the full layout), you can do something like this: $('#f_treeindex').change(function(){ var tree_id = $('#f_treeindex').val(); if (tree_id!= ""){ $.get('/controller_name/show', {id:tree_id}, function(data){ $(this).parents('d... | Code Igniter php - return (ajax?) data based on dropdown selection with JQuery I want to generate some data for editing, filtered by the choice a user makes in a dropdown menu, but I don't want to complicate things. I already have my project querying the database for a list of "trees", and populating a dropbox with the... | TITLE:
Code Igniter php - return (ajax?) data based on dropdown selection with JQuery
QUESTION:
I want to generate some data for editing, filtered by the choice a user makes in a dropdown menu, but I don't want to complicate things. I already have my project querying the database for a list of "trees", and populating ... | [
"php",
"jquery",
"ajax",
"codeigniter"
] | 3 | 4 | 3,474 | 1 | 0 | 2011-06-01T15:12:16.023000 | 2011-06-01T16:01:44.333000 |
6,203,443 | 6,205,207 | how to setup a hadoop node to be a tasktracker but not a datanode | For a special reason, I want to setup a hadoop node to be a tasktracker but not a datanode. It seems like there is a way to do it but I have not been able too. Could someone give me a hand? Thanks. | You have to setup a host-exclude file for your namenode. This edit in the core-site.xml: dfs.hosts.exclude YOUR_PATH_TO_THE_EXCLUDE_FILE This file is basically like a slave or master file. You have to just insert the hostname like: host1 host2 When restarting the namenode will ignore these given hosts but the jobtracke... | how to setup a hadoop node to be a tasktracker but not a datanode For a special reason, I want to setup a hadoop node to be a tasktracker but not a datanode. It seems like there is a way to do it but I have not been able too. Could someone give me a hand? Thanks. | TITLE:
how to setup a hadoop node to be a tasktracker but not a datanode
QUESTION:
For a special reason, I want to setup a hadoop node to be a tasktracker but not a datanode. It seems like there is a way to do it but I have not been able too. Could someone give me a hand? Thanks.
ANSWER:
You have to setup a host-excl... | [
"hadoop"
] | 1 | 0 | 951 | 1 | 0 | 2011-06-01T15:12:16.540000 | 2011-06-01T17:22:47.080000 |
6,203,453 | 6,204,303 | Workaround for Reflection Bug in Dotfuscator? | Greetings all, I am calling Type.GetProperties(), but after running Dotfuscator, it is returning zero items, when it returned more than zero before. public class Test { public int Number { get; set; }
public void ShowInfo() { Type type = this.GetType();
PropertyInfo[] props = type.GetProperties(); Console.WriteLine("... | Dotfuscator automatically strips properties (which are just metadata anyway - the real work is done by the get/set pair of methods that are automatically created) during renaming. It also renames the underlying get/set methods as well. Depending on what you are trying to do, you'll need to exclude either the property m... | Workaround for Reflection Bug in Dotfuscator? Greetings all, I am calling Type.GetProperties(), but after running Dotfuscator, it is returning zero items, when it returned more than zero before. public class Test { public int Number { get; set; }
public void ShowInfo() { Type type = this.GetType();
PropertyInfo[] pro... | TITLE:
Workaround for Reflection Bug in Dotfuscator?
QUESTION:
Greetings all, I am calling Type.GetProperties(), but after running Dotfuscator, it is returning zero items, when it returned more than zero before. public class Test { public int Number { get; set; }
public void ShowInfo() { Type type = this.GetType();
... | [
"c#",
".net",
"reflection",
"obfuscation"
] | 4 | 5 | 1,755 | 2 | 0 | 2011-06-01T15:13:05.980000 | 2011-06-01T16:11:34.120000 |
6,203,454 | 6,203,578 | It is possible to make just some tabs focusable (JTabbedPane)? | It is possible to make just some tabs focusable, for instance the first 3 of 5 tabs? So that when changing tabs with the left - right keys, the non-focusable ones to be skipped (to be displayed only by mouse clicks). Thanks! | All Swing components use Actions to handle key events. So you can replace the existing action with a custom Action of your own. Check out Key Bindings to see the Actions that are defined for a tabbed pane. You may also find Wrapping Actions and Table Tabbing helpful as they show how you can reuse existing Actions when ... | It is possible to make just some tabs focusable (JTabbedPane)? It is possible to make just some tabs focusable, for instance the first 3 of 5 tabs? So that when changing tabs with the left - right keys, the non-focusable ones to be skipped (to be displayed only by mouse clicks). Thanks! | TITLE:
It is possible to make just some tabs focusable (JTabbedPane)?
QUESTION:
It is possible to make just some tabs focusable, for instance the first 3 of 5 tabs? So that when changing tabs with the left - right keys, the non-focusable ones to be skipped (to be displayed only by mouse clicks). Thanks!
ANSWER:
All S... | [
"java",
"swing",
"jtabbedpane",
"focusable"
] | 1 | 2 | 169 | 1 | 0 | 2011-06-01T15:13:08.823000 | 2011-06-01T15:19:55.997000 |
6,203,461 | 6,206,870 | How to translate ListView texts? | My android application includes ListView binded with SimpleCursorAdapter to the database. This database contains column, which contains data like somenameofrow anothername thirdname However instead of directly displaying these texts in the ListView, I would like to read according texts (actually - translations) from th... | If you read the android guide ListView tutorial, you will find: Note that using a hard-coded string array is not the best design practice. One is used in this tutorial for simplicity, in order to demonstrate the ListView widget. The better practice is to reference a string array defined by an external resource, such as... | How to translate ListView texts? My android application includes ListView binded with SimpleCursorAdapter to the database. This database contains column, which contains data like somenameofrow anothername thirdname However instead of directly displaying these texts in the ListView, I would like to read according texts ... | TITLE:
How to translate ListView texts?
QUESTION:
My android application includes ListView binded with SimpleCursorAdapter to the database. This database contains column, which contains data like somenameofrow anothername thirdname However instead of directly displaying these texts in the ListView, I would like to rea... | [
"java",
"android",
"android-listview"
] | 0 | 0 | 541 | 2 | 0 | 2011-06-01T15:13:30.193000 | 2011-06-01T19:54:03.420000 |
6,203,467 | 6,203,592 | Default base class for objective c classes | The answer to this question may be obvious but I need to ask it to be certain: Do all objective c classes share a common default base class when a base class is not explicity defined in the class definition? | No, if you do not explicitly define a super class in the class definition you are creating a root class. From Cocoa Core Competencies: A root class inherits from no other class and defines an interface and behavior common to all objects in the hierarchy below it. All objects in that hierarchy ultimately inherit from th... | Default base class for objective c classes The answer to this question may be obvious but I need to ask it to be certain: Do all objective c classes share a common default base class when a base class is not explicity defined in the class definition? | TITLE:
Default base class for objective c classes
QUESTION:
The answer to this question may be obvious but I need to ask it to be certain: Do all objective c classes share a common default base class when a base class is not explicity defined in the class definition?
ANSWER:
No, if you do not explicitly define a supe... | [
"iphone",
"objective-c",
"ios",
"oop"
] | 4 | 14 | 7,024 | 1 | 0 | 2011-06-01T15:13:50.083000 | 2011-06-01T15:21:03.177000 |
6,203,470 | 6,203,558 | jQuery: keyup(): Update div with content from text area... line breaks? | I have posted a working version here: http://jsfiddle.net/JV2qW/2/ I have a textarea that updates (on keyup() ) a div with the text that is being entered. Everything is working as it should, except the line breaks are not being recognized. the html: enter text and the jquery: $('#text').keyup(function(){ var keyed = $(... | You can replace any newlines with $('#text').keyup(function() { var keyed = $(this).val().replace(/\n/g, ' '); $("#target").html(keyed); }); You can look into the MDC article about RegEx if you want to replace other things. https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions | jQuery: keyup(): Update div with content from text area... line breaks? I have posted a working version here: http://jsfiddle.net/JV2qW/2/ I have a textarea that updates (on keyup() ) a div with the text that is being entered. Everything is working as it should, except the line breaks are not being recognized. the html... | TITLE:
jQuery: keyup(): Update div with content from text area... line breaks?
QUESTION:
I have posted a working version here: http://jsfiddle.net/JV2qW/2/ I have a textarea that updates (on keyup() ) a div with the text that is being entered. Everything is working as it should, except the line breaks are not being re... | [
"jquery",
"line-breaks",
"key-events"
] | 6 | 12 | 30,482 | 3 | 0 | 2011-06-01T15:13:59.193000 | 2011-06-01T15:19:06.287000 |
6,203,472 | 6,203,744 | Designing iOS SearchBar | I want to have a simple SearchBar in ObjectiveC. Using UISearchBar or UISearchBarDelegate is confusing me. I could have used a UITextField but it does not have the look & feel of a search bar. As in the image attached, I want just the searchbar no UITableView associated with it. The image has a TableView attached but y... | Just make your view controller implement the UISearchBarDelegate. In your xib file, all you need to do is to add a UISearchBar to your view and configure it as necessary, create an outlet for it (optional really but helps to be explicit), and assign the delegate outlet to your view controller. Then, to respond to the s... | Designing iOS SearchBar I want to have a simple SearchBar in ObjectiveC. Using UISearchBar or UISearchBarDelegate is confusing me. I could have used a UITextField but it does not have the look & feel of a search bar. As in the image attached, I want just the searchbar no UITableView associated with it. The image has a ... | TITLE:
Designing iOS SearchBar
QUESTION:
I want to have a simple SearchBar in ObjectiveC. Using UISearchBar or UISearchBarDelegate is confusing me. I could have used a UITextField but it does not have the look & feel of a search bar. As in the image attached, I want just the searchbar no UITableView associated with it... | [
"iphone",
"objective-c",
"ios",
"uiview",
"uisearchbar"
] | 11 | 33 | 25,321 | 1 | 0 | 2011-06-01T15:14:20.610000 | 2011-06-01T15:30:23.603000 |
6,203,477 | 6,203,550 | Removing css from link image | Our designer created this css for links A { text-decoration: underline; color: #E77C15; }
A:link { text-decoration: underline; color: #E77C15; }
A:visited { text-decoration: underline; color: #E77C15; }
A:hover { text-decoration: underline; color: #039; }
A:active { text-decoration: underline; color: #E77C15; } I n... | You should add the CSS to, not to. Better use a general CSS rule: img { border:none } | Removing css from link image Our designer created this css for links A { text-decoration: underline; color: #E77C15; }
A:link { text-decoration: underline; color: #E77C15; }
A:visited { text-decoration: underline; color: #E77C15; }
A:hover { text-decoration: underline; color: #039; }
A:active { text-decoration: und... | TITLE:
Removing css from link image
QUESTION:
Our designer created this css for links A { text-decoration: underline; color: #E77C15; }
A:link { text-decoration: underline; color: #E77C15; }
A:visited { text-decoration: underline; color: #E77C15; }
A:hover { text-decoration: underline; color: #039; }
A:active { te... | [
"css"
] | 0 | 4 | 175 | 7 | 0 | 2011-06-01T15:14:33.797000 | 2011-06-01T15:18:45.900000 |
6,203,485 | 6,203,704 | hardlinks in Linux | What is the size of the hardlink in Linux? Will it be the size of the inode? If I have two of them? Thanks in advnace for any explanation, I tried to google it, but didn't find anything | A hard link reuses the inode, but requires a separate directory entry, which takes up 8 bytes plus the length of the file name in ext2. There may be other costs associated, such as when directory indexing is used, also, directories grow by entire blocks. | hardlinks in Linux What is the size of the hardlink in Linux? Will it be the size of the inode? If I have two of them? Thanks in advnace for any explanation, I tried to google it, but didn't find anything | TITLE:
hardlinks in Linux
QUESTION:
What is the size of the hardlink in Linux? Will it be the size of the inode? If I have two of them? Thanks in advnace for any explanation, I tried to google it, but didn't find anything
ANSWER:
A hard link reuses the inode, but requires a separate directory entry, which takes up 8 ... | [
"linux",
"hardlink"
] | 1 | 2 | 338 | 2 | 0 | 2011-06-01T15:15:13.247000 | 2011-06-01T15:28:06.547000 |
6,203,487 | 6,203,975 | Why does GSON use fields and not getters/setters? | Why does GSON use ONLY fields(private,public,protected)? Is there a way to tell GSON to use only getters and setters? | Generally speaking when you serialize/deserialize an object, you are doing so to end up with an exact copy of the state of the object; As such, you generally want to circumvent the encapsulation normally desired in an OO design. If you do not circumvent the encapsulation, it may not be possible to end up with an object... | Why does GSON use fields and not getters/setters? Why does GSON use ONLY fields(private,public,protected)? Is there a way to tell GSON to use only getters and setters? | TITLE:
Why does GSON use fields and not getters/setters?
QUESTION:
Why does GSON use ONLY fields(private,public,protected)? Is there a way to tell GSON to use only getters and setters?
ANSWER:
Generally speaking when you serialize/deserialize an object, you are doing so to end up with an exact copy of the state of th... | [
"java",
"gson"
] | 83 | 101 | 55,883 | 4 | 0 | 2011-06-01T15:15:18.103000 | 2011-06-01T15:48:40.783000 |
6,203,488 | 6,203,914 | Batch programming: finding a given string in another program's - maybe delayed - output | I would like to start the Apache service on my Windows 7 with the help of a batch program. That's a really simple task, all I have to do is type this: net start Apache2.2 then press Enter; BUT I must have admin rights to do so, otherwise I get some error messages like this: System error 5 has occurred.
Access is denie... | Use net start Apache2.2 2>&1 | find /i "%search_string%" > nul in order to tie STDERR to the standard output. | Batch programming: finding a given string in another program's - maybe delayed - output I would like to start the Apache service on my Windows 7 with the help of a batch program. That's a really simple task, all I have to do is type this: net start Apache2.2 then press Enter; BUT I must have admin rights to do so, othe... | TITLE:
Batch programming: finding a given string in another program's - maybe delayed - output
QUESTION:
I would like to start the Apache service on my Windows 7 with the help of a batch program. That's a really simple task, all I have to do is type this: net start Apache2.2 then press Enter; BUT I must have admin rig... | [
"windows",
"batch-file"
] | 1 | 3 | 2,067 | 1 | 0 | 2011-06-01T15:15:18.940000 | 2011-06-01T15:43:44.453000 |
6,203,496 | 6,203,701 | UIImage not being displayed when retrived from NSMutableArray | Help please:) I have set up a mutable array as follows - (void)viewDidLoad { [super viewDidLoad];
NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"TopImage" inManagedObjectContext:managedObjectContext]; [request setEntity:entity];
NSSortDescri... | It is unlikely that you are storing the image as a UIImage object. You must be converting it into a NSData object before storing it. You must convert it back to a UIImage object using initWithData: prior to setting it to the UIImageView instance. | UIImage not being displayed when retrived from NSMutableArray Help please:) I have set up a mutable array as follows - (void)viewDidLoad { [super viewDidLoad];
NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"TopImage" inManagedObjectContext:ma... | TITLE:
UIImage not being displayed when retrived from NSMutableArray
QUESTION:
Help please:) I have set up a mutable array as follows - (void)viewDidLoad { [super viewDidLoad];
NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"TopImage" inManag... | [
"iphone",
"core-data",
"uiimageview",
"nsmutablearray"
] | 0 | 1 | 419 | 1 | 0 | 2011-06-01T15:15:33.217000 | 2011-06-01T15:27:57.880000 |
6,203,500 | 6,203,633 | WHOIS for given TLD? | How do I programatically determine the WHOIS server for a given TLD? For name servers, I just query a.root-servers.net Is there an equivalent procedure for WHOIS? I know "host -t ns xxx." yields the DNS for a TLD: can the WHOIS server be derived from that result? | It's in the SRV-record _nicname._tcp.tld - For example; # dig +short SRV _nicname._tcp.no 0 0 43 whois.norid.no. More information can be found in the Wikipedia-article of whois. That works for some tld's at least - but not.com. tld.whois-servers.net is a commonly used alias that should point to a valid whois-server. Fo... | WHOIS for given TLD? How do I programatically determine the WHOIS server for a given TLD? For name servers, I just query a.root-servers.net Is there an equivalent procedure for WHOIS? I know "host -t ns xxx." yields the DNS for a TLD: can the WHOIS server be derived from that result? | TITLE:
WHOIS for given TLD?
QUESTION:
How do I programatically determine the WHOIS server for a given TLD? For name servers, I just query a.root-servers.net Is there an equivalent procedure for WHOIS? I know "host -t ns xxx." yields the DNS for a TLD: can the WHOIS server be derived from that result?
ANSWER:
It's in ... | [
"whois"
] | 0 | 2 | 1,527 | 1 | 0 | 2011-06-01T15:15:48.677000 | 2011-06-01T15:23:18.643000 |
6,203,501 | 6,203,628 | Reasons setAttributes:ofItemAtPath:error: could fail when applying NSFileProtectionComplete? | I'm starting to apply the iOS 4 Data Protection to the files my app uses. I'm concerned about the possibility of setAttributes:ofItemAtPath:error: failing to apply the changes: is there a discrete set of known reasons why this method fails? I don't have a good fallback behavior in case the attribute cannot be set since... | I've never heard of a situation in which it does fail, and most of the ones I can think of would be catastrophic for the device in general (they involve the encryption hardware being offline, at which point the root filesystem can no longer be used). If the act of converting a file requires additional disk space or mem... | Reasons setAttributes:ofItemAtPath:error: could fail when applying NSFileProtectionComplete? I'm starting to apply the iOS 4 Data Protection to the files my app uses. I'm concerned about the possibility of setAttributes:ofItemAtPath:error: failing to apply the changes: is there a discrete set of known reasons why this ... | TITLE:
Reasons setAttributes:ofItemAtPath:error: could fail when applying NSFileProtectionComplete?
QUESTION:
I'm starting to apply the iOS 4 Data Protection to the files my app uses. I'm concerned about the possibility of setAttributes:ofItemAtPath:error: failing to apply the changes: is there a discrete set of known... | [
"objective-c",
"cocoa-touch",
"security",
"nsfilemanager",
"data-protection"
] | 2 | 2 | 814 | 1 | 0 | 2011-06-01T15:15:50.173000 | 2011-06-01T15:22:53.453000 |
6,203,502 | 6,203,796 | jQuery load to variable | I need insert result from jQuery load to variable. Content of elemtent with id test on page ajax.html. $('#result').load('ajax.html #test'); | $(document).ready(function(){ $('#result').load('/ p#name', function(result) { var obj = $(this).find('p#name'), html = obj.html(); obj.css({'font-size':40}); $(this).append($(' ').text(html)); }); }); Example on JSFiddle http://jsfiddle.net/kuroir/stD94/ | jQuery load to variable I need insert result from jQuery load to variable. Content of elemtent with id test on page ajax.html. $('#result').load('ajax.html #test'); | TITLE:
jQuery load to variable
QUESTION:
I need insert result from jQuery load to variable. Content of elemtent with id test on page ajax.html. $('#result').load('ajax.html #test');
ANSWER:
$(document).ready(function(){ $('#result').load('/ p#name', function(result) { var obj = $(this).find('p#name'), html = obj.html... | [
"jquery",
"ajax",
"get"
] | 21 | 7 | 70,602 | 9 | 0 | 2011-06-01T15:15:51.360000 | 2011-06-01T15:34:09.347000 |
6,203,510 | 6,204,191 | Regular Expressions for validating chess-based input? | I'm working on a Chess-based hobby project with HTML/CSS/PHP. I wasn't familiar with chess beforehand, so I decided to make a tool that would show which moves were allowed based on the type and square of a given piece. I have an HTML form with two text fields: one is for the type of the piece and the other one is for c... | Regular Expressions on the inputs: Piece: ^[p|r|b|n|q|k|P|R|B|N|Q|K]$ Position: ^[A-H|a-h][1-8]$ You could evaluate onblur, onchange, and onsubmit for the form. I do agree that validating the move on the Client-Side and Server-Side would make a lot of sense as well. | Regular Expressions for validating chess-based input? I'm working on a Chess-based hobby project with HTML/CSS/PHP. I wasn't familiar with chess beforehand, so I decided to make a tool that would show which moves were allowed based on the type and square of a given piece. I have an HTML form with two text fields: one i... | TITLE:
Regular Expressions for validating chess-based input?
QUESTION:
I'm working on a Chess-based hobby project with HTML/CSS/PHP. I wasn't familiar with chess beforehand, so I decided to make a tool that would show which moves were allowed based on the type and square of a given piece. I have an HTML form with two ... | [
"php",
"regex",
"chess"
] | 6 | 5 | 1,241 | 3 | 0 | 2011-06-01T15:16:42.213000 | 2011-06-01T16:03:09.553000 |
6,203,534 | 6,204,056 | How to sort var length ids (composite string + numeric)? | I have a MySQL database whose keys are of this type: A_10 A_10A A_10B A_101 QAb801 QAc5 QAc25 QAd2993 I would like them to sort first by the alpha portion, then by the numeric portion, just like above. I would like this to be the default sorting of this column. 1) how can I sort as specified above, i.e. write a MySQL f... | The best way to achieve what you want is to store each part in its own column, and I would strongly recommend to change table structure. If it's impossible, you can try the following: Create 3 UDFs which returns prefix, numeric part, and postfix of your string. For a better performance they should be native (Mysql, as ... | How to sort var length ids (composite string + numeric)? I have a MySQL database whose keys are of this type: A_10 A_10A A_10B A_101 QAb801 QAc5 QAc25 QAd2993 I would like them to sort first by the alpha portion, then by the numeric portion, just like above. I would like this to be the default sorting of this column. 1... | TITLE:
How to sort var length ids (composite string + numeric)?
QUESTION:
I have a MySQL database whose keys are of this type: A_10 A_10A A_10B A_101 QAb801 QAc5 QAc25 QAd2993 I would like them to sort first by the alpha portion, then by the numeric portion, just like above. I would like this to be the default sorting... | [
"mysql",
"sorting",
"primary-key"
] | 2 | 2 | 176 | 2 | 0 | 2011-06-01T15:17:58.177000 | 2011-06-01T15:55:00.980000 |
6,203,537 | 6,203,758 | Are there any good reasons to not have your application deal with any transactions? | Are there any good reasons why one would not have transaction management in their code? The question came up when talking with a dba who gets very nervous when I bring up spring/hibernate. I mention that Spring can handle transactions, in use with Hibernate mapping tables to objects etc, and the issue comes up that the... | I think there is some misunderstanding here. The point is that database doesn't manage transactions in the same sense as Spring/Hibernate. Database "manages transactions" by providing transactional behaviour, and your application "manages transactions" by using that behaviour and defining transaction boundaries (in par... | Are there any good reasons to not have your application deal with any transactions? Are there any good reasons why one would not have transaction management in their code? The question came up when talking with a dba who gets very nervous when I bring up spring/hibernate. I mention that Spring can handle transactions, ... | TITLE:
Are there any good reasons to not have your application deal with any transactions?
QUESTION:
Are there any good reasons why one would not have transaction management in their code? The question came up when talking with a dba who gets very nervous when I bring up spring/hibernate. I mention that Spring can han... | [
"oracle",
"hibernate",
"spring",
"transactions"
] | 2 | 5 | 137 | 3 | 0 | 2011-06-01T15:18:01.743000 | 2011-06-01T15:31:07.997000 |
6,203,538 | 6,216,585 | Exclude a user role from LoginView/RoleGroup | Is there a way to exclude a Role using the LoginView RoleGroup control combination. My problem is that a user is in both customer and trialUser roles. I want to display a menu option only for customer roles, not for trial user. If I say the following, it will display the option for both trial and customer role users si... | ok, it turned out to be simple. It seems like the role group will match the first role it finds and then skip the rest. So, this did the trick. Link | Exclude a user role from LoginView/RoleGroup Is there a way to exclude a Role using the LoginView RoleGroup control combination. My problem is that a user is in both customer and trialUser roles. I want to display a menu option only for customer roles, not for trial user. If I say the following, it will display the opt... | TITLE:
Exclude a user role from LoginView/RoleGroup
QUESTION:
Is there a way to exclude a Role using the LoginView RoleGroup control combination. My problem is that a user is in both customer and trialUser roles. I want to display a menu option only for customer roles, not for trial user. If I say the following, it wi... | [
"asp.net",
"asp.net-membership"
] | 0 | 2 | 1,187 | 1 | 0 | 2011-06-01T15:18:04.200000 | 2011-06-02T15:21:08.217000 |
6,203,541 | 6,203,688 | Linq-to-objects: creating a two-level hierarchy from a flat source | Let's say I have this simple structure class FooDefinition { public FooDefinition Parent { get; set; } }
class Foo { public FooDefinition Definition { get; set; } }
class Bar { public ICollection Foos { get; set; } } A Bar has a list of Foos which can be simple (no parent/child relationships) or nested just one level... | bar.Foos.Where(x => x.Definition.Parent == null).Select(x => Tuple.Create(x, bar.Foos.Where(c => c.Definition.Parent == x.Definition ))); This will return an IEnumerable >>, where Item2 of the Tuple contains the children for the parent in Item1. For your example, this returns two Tuples: Item1 = simpleDefinition and It... | Linq-to-objects: creating a two-level hierarchy from a flat source Let's say I have this simple structure class FooDefinition { public FooDefinition Parent { get; set; } }
class Foo { public FooDefinition Definition { get; set; } }
class Bar { public ICollection Foos { get; set; } } A Bar has a list of Foos which can... | TITLE:
Linq-to-objects: creating a two-level hierarchy from a flat source
QUESTION:
Let's say I have this simple structure class FooDefinition { public FooDefinition Parent { get; set; } }
class Foo { public FooDefinition Definition { get; set; } }
class Bar { public ICollection Foos { get; set; } } A Bar has a list... | [
"c#",
"linq-to-objects"
] | 4 | 3 | 1,453 | 2 | 0 | 2011-06-01T15:18:09.900000 | 2011-06-01T15:27:06.863000 |
6,203,546 | 6,203,687 | RegEx to replace pattern in text file containing carriage returns (using Notepad2 and C#) | I have a text file containing the following string: --jonesj (release 00) some sql goes here
--jonesj (release 01) some sql goes here
--smithb (release 01) some sql goes here What I want to do is replace all commented-out SQL with an empty string. The resulting string would look like this: some sql goes here
some sq... | You can get this to work by explicitly matching the end of line chars \r\n in Multiline mode. This has the benefit of replacing the newlines too (i.e no empty line where the comment was) var input=@"--jonesj (release 00) some sql goes here
--jonesj (release 01) some sql goes here
--smithb (release 01) some sql goes h... | RegEx to replace pattern in text file containing carriage returns (using Notepad2 and C#) I have a text file containing the following string: --jonesj (release 00) some sql goes here
--jonesj (release 01) some sql goes here
--smithb (release 01) some sql goes here What I want to do is replace all commented-out SQL wi... | TITLE:
RegEx to replace pattern in text file containing carriage returns (using Notepad2 and C#)
QUESTION:
I have a text file containing the following string: --jonesj (release 00) some sql goes here
--jonesj (release 01) some sql goes here
--smithb (release 01) some sql goes here What I want to do is replace all co... | [
"c#",
"regex",
"replace"
] | 1 | 2 | 1,117 | 3 | 0 | 2011-06-01T15:18:37.457000 | 2011-06-01T15:27:02.243000 |
6,203,549 | 6,205,458 | same session ID being generated across different IE windows | I have observed on IE 8 windows 7 machine, whenever I open my application on separate IE windows, the same session ID gets generated for each of them. I was expecting different session ID's for different windows. Does anyone knows why this is happening. Code used to generate session ID HttpSession session = request.get... | Things changed between IE7 and IE8 with regard to how new sessions are created. In IE8, choose File > New Session to create a new browser session. You should read my article on this topic: http://blogs.msdn.com/b/ieinternals/archive/2010/04/05/understanding-browser-session-lifetime.aspx | same session ID being generated across different IE windows I have observed on IE 8 windows 7 machine, whenever I open my application on separate IE windows, the same session ID gets generated for each of them. I was expecting different session ID's for different windows. Does anyone knows why this is happening. Code u... | TITLE:
same session ID being generated across different IE windows
QUESTION:
I have observed on IE 8 windows 7 machine, whenever I open my application on separate IE windows, the same session ID gets generated for each of them. I was expecting different session ID's for different windows. Does anyone knows why this is... | [
"session",
"internet-explorer-8"
] | 2 | 3 | 6,611 | 2 | 0 | 2011-06-01T15:18:42.463000 | 2011-06-01T17:45:03.960000 |
6,203,552 | 6,272,980 | Question regarding browser behavior when a response is sent from a server | Scenario: The browser submits a HTTP request to a server. The user simultaneously clicks on a bookmark or on another link on the page resulting in a new request to the server. The server now sends back two HTTP responses (or the browser gets responses from two servers). How does the browser decide which of the response... | The short answer to your specific question is that receiving a server's response (within a browser) is different from receiving a browser's request (within a server). When the browser opens a new connection to the server, what it's doing is creating a socket and then calling connect and send on that socket. When the se... | Question regarding browser behavior when a response is sent from a server Scenario: The browser submits a HTTP request to a server. The user simultaneously clicks on a bookmark or on another link on the page resulting in a new request to the server. The server now sends back two HTTP responses (or the browser gets resp... | TITLE:
Question regarding browser behavior when a response is sent from a server
QUESTION:
Scenario: The browser submits a HTTP request to a server. The user simultaneously clicks on a bookmark or on another link on the page resulting in a new request to the server. The server now sends back two HTTP responses (or the... | [
"browser",
"httprequest",
"httpresponse"
] | 8 | 16 | 1,680 | 1 | 0 | 2011-06-01T15:18:51.657000 | 2011-06-08T00:14:20.670000 |
6,203,554 | 6,204,200 | WPF Data Binding ComboBox in DataGridTemplateColumn | I have a DataGrid and I want to populate a column that contains a ComboBox with a dynamic ItemsSource of elements, based on the row. I have the combo box display correctly, and the correct list of elements are populated in the list, as pulled in from the AvailableLogFileProcessTypes property, which is a ReadOnlyCollect... | See Damascus response for thought process. Need to Specify UpdateSourceTrigger on CellTemplate / CelLEditTemplate. This triggers the property change. | WPF Data Binding ComboBox in DataGridTemplateColumn I have a DataGrid and I want to populate a column that contains a ComboBox with a dynamic ItemsSource of elements, based on the row. I have the combo box display correctly, and the correct list of elements are populated in the list, as pulled in from the AvailableLogF... | TITLE:
WPF Data Binding ComboBox in DataGridTemplateColumn
QUESTION:
I have a DataGrid and I want to populate a column that contains a ComboBox with a dynamic ItemsSource of elements, based on the row. I have the combo box display correctly, and the correct list of elements are populated in the list, as pulled in from... | [
"wpf",
"data-binding",
"binding"
] | 2 | 6 | 10,819 | 2 | 0 | 2011-06-01T15:18:52.857000 | 2011-06-01T16:03:44.240000 |
6,203,564 | 6,203,879 | How do I load test with Visual Studio 2008? | Does anyone have any information on this? I'm currently running Visual Studio Team System 2008 v9.0.21022.8 RTM and have been told that I am able to do load testing on my project. Sadly, when I right-click the project node there is no 'Load Test' under 'Add'... I'm thinking the load testing functionality might be an ex... | You can't add tests to just any project, you have to specifically create a new test project in your solution. Right-click the solution node > Add > New Project... > Visual C# > Test > Test Project You'll be able to add unit, web and load tests to this new project. In order to actually do load testing, you have to devel... | How do I load test with Visual Studio 2008? Does anyone have any information on this? I'm currently running Visual Studio Team System 2008 v9.0.21022.8 RTM and have been told that I am able to do load testing on my project. Sadly, when I right-click the project node there is no 'Load Test' under 'Add'... I'm thinking t... | TITLE:
How do I load test with Visual Studio 2008?
QUESTION:
Does anyone have any information on this? I'm currently running Visual Studio Team System 2008 v9.0.21022.8 RTM and have been told that I am able to do load testing on my project. Sadly, when I right-click the project node there is no 'Load Test' under 'Add'... | [
"visual-studio-2008",
"testing",
"load"
] | 1 | 1 | 371 | 2 | 0 | 2011-06-01T15:19:24.637000 | 2011-06-01T15:41:27.563000 |
6,203,576 | 6,203,637 | HKLM registry doubt | My application updates some registry fields related to licensing under HKLM. This is for accessing the information for all users in the system. This makes us to make our application run as administrator. Is there any other location in registry where I can keep information which can be accessed by all users? | No there is not. If you have to make a modification that will affect/be visible to all users, you have to deal with UAC or elevate your application on startup. This is part of the design of UAC. If, however, you were to write to a file you could grant all users access to that file without UAC interference. If, however,... | HKLM registry doubt My application updates some registry fields related to licensing under HKLM. This is for accessing the information for all users in the system. This makes us to make our application run as administrator. Is there any other location in registry where I can keep information which can be accessed by al... | TITLE:
HKLM registry doubt
QUESTION:
My application updates some registry fields related to licensing under HKLM. This is for accessing the information for all users in the system. This makes us to make our application run as administrator. Is there any other location in registry where I can keep information which can... | [
"windows",
"windows-7",
"windows-vista",
"registry"
] | 4 | 2 | 239 | 4 | 0 | 2011-06-01T15:19:51.923000 | 2011-06-01T15:23:46.190000 |
6,203,581 | 6,203,905 | Android app not launching on emulator | I just set up eclipse to start android development according to this http://developer.android.com/sdk/installing.html. My problem seems similar to this one: Android app not launching on emulator, but the solution will not work. I am trying to run a simple hello app. I do not get any errors but here is the console: [201... | Try adding Eclipse by default launches the DEFAULT activity. If that does not work, right click on the project, and check the run configurations. You have an option to set which activity to launch. Also, you should be able to see the icon for your app in the applications drawer on the emulator launcher. Click on that i... | Android app not launching on emulator I just set up eclipse to start android development according to this http://developer.android.com/sdk/installing.html. My problem seems similar to this one: Android app not launching on emulator, but the solution will not work. I am trying to run a simple hello app. I do not get an... | TITLE:
Android app not launching on emulator
QUESTION:
I just set up eclipse to start android development according to this http://developer.android.com/sdk/installing.html. My problem seems similar to this one: Android app not launching on emulator, but the solution will not work. I am trying to run a simple hello ap... | [
"android",
"eclipse",
"emulation"
] | 1 | 6 | 14,218 | 2 | 0 | 2011-06-01T15:20:19.157000 | 2011-06-01T15:43:09.207000 |
6,203,583 | 6,208,527 | Removing attributes from elements | I will start off with the code... private static void File() { wixFile = XDocument.Load(filePath);
var fileElements = from file in wixFile.Descendants(GetWixNamespace() + "File") select file; foreach (var file in fileElements) { if(file.Attributes("Name").Any()) file.Attribute("Name").Remove(); } wixFile.Save(filePath... | I'm going to read between the lines here and guess you are converting from an old version of WiX ( say 2.0 ) that required a File@Name attribute to a version ( say 3.0-3.6 ) that can infer this attribute and doesn't require it. Here's some code that I just whipped up that I know works assuming the source xml is WiX 3.x... | Removing attributes from elements I will start off with the code... private static void File() { wixFile = XDocument.Load(filePath);
var fileElements = from file in wixFile.Descendants(GetWixNamespace() + "File") select file; foreach (var file in fileElements) { if(file.Attributes("Name").Any()) file.Attribute("Name")... | TITLE:
Removing attributes from elements
QUESTION:
I will start off with the code... private static void File() { wixFile = XDocument.Load(filePath);
var fileElements = from file in wixFile.Descendants(GetWixNamespace() + "File") select file; foreach (var file in fileElements) { if(file.Attributes("Name").Any()) file... | [
"c#",
"wix",
"linq-to-xml",
"wix3.5"
] | 0 | 2 | 163 | 1 | 0 | 2011-06-01T15:20:30.390000 | 2011-06-01T22:34:44.803000 |
6,203,585 | 6,203,723 | Link_to(image_tag ...) works locally but breaks on Heroku deployment | pretty simple bit of ruby code is working fine when run on localhost but breaks when pushed up to heroku. Here it is: <% @regulars.each do |r| %> <%=h link_to (image_tag small_avatar_url(r.user),:class => "u_profile_img_small",:title => r.user.name), r.user %> <% end %> And here is the error in Heroku Logs referring to... | When you have multiple encapsulated method calls, Ruby needs the proper parentheses so it knows which arguments go with which method. You can have the first method call without parentheses ( h in this case), but the rest are needed. <%=h link_to(image_tag(small_avatar_url(r.user),:class => "u_profile_img_small",:title ... | Link_to(image_tag ...) works locally but breaks on Heroku deployment pretty simple bit of ruby code is working fine when run on localhost but breaks when pushed up to heroku. Here it is: <% @regulars.each do |r| %> <%=h link_to (image_tag small_avatar_url(r.user),:class => "u_profile_img_small",:title => r.user.name), ... | TITLE:
Link_to(image_tag ...) works locally but breaks on Heroku deployment
QUESTION:
pretty simple bit of ruby code is working fine when run on localhost but breaks when pushed up to heroku. Here it is: <% @regulars.each do |r| %> <%=h link_to (image_tag small_avatar_url(r.user),:class => "u_profile_img_small",:title... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3",
"heroku"
] | 1 | 1 | 1,036 | 2 | 0 | 2011-06-01T15:20:32.330000 | 2011-06-01T15:29:15.907000 |
6,203,586 | 6,204,125 | printing and graphics[] | I would like to draw a rectangle (or more) which printed on paper shows the rectangle in units of cm. So Graphics[{Rectangle[{0, 0}, {19, 28}], Orange, Rectangle[{0, 0}, {1, 1}]}] will print out as two rectangles which can be measured as exactly 1cm x 1cm (orange one) and the black one as 19x28 cm. It seems that some v... | g = Graphics[{Rectangle[{0, 0}, {19, 28}], Orange, Rectangle[{0, 0}, {1, 1}]}] Okay, first thing you need to do is set the x and y directions to use the same units, which means Show[g, AspectRatio -> Automatic] But this is already the default. Second thing you need to do is choose a size and range for your plot area. L... | printing and graphics[] I would like to draw a rectangle (or more) which printed on paper shows the rectangle in units of cm. So Graphics[{Rectangle[{0, 0}, {19, 28}], Orange, Rectangle[{0, 0}, {1, 1}]}] will print out as two rectangles which can be measured as exactly 1cm x 1cm (orange one) and the black one as 19x28 ... | TITLE:
printing and graphics[]
QUESTION:
I would like to draw a rectangle (or more) which printed on paper shows the rectangle in units of cm. So Graphics[{Rectangle[{0, 0}, {19, 28}], Orange, Rectangle[{0, 0}, {1, 1}]}] will print out as two rectangles which can be measured as exactly 1cm x 1cm (orange one) and the b... | [
"graphics",
"printing",
"wolfram-mathematica"
] | 7 | 9 | 1,411 | 2 | 0 | 2011-06-01T15:20:37.270000 | 2011-06-01T15:58:36.630000 |
6,203,597 | 6,203,812 | Trying to using Nhibernate with Mono & SQLite - can't find System.Data.SQLite | I wrote a simple app in mono (C#) that uses NHibernate with MYSQL - and I now want to port it to SQLite. My hope is (was) that I could simply change hibernate.cfg.xml and point it to a different database. Here is my modified hibernate.cfg.xml: NHibernate.Driver.SQLite20Driver Data Source=nhibernate_test.db;Version=3 NH... | You need to make nHibernate aware of the Mono.Data.SQLite assembly. Add this to the configuration: And you also need a simple MonoSQLiteDriver class: public class MonoSqliteDriver: NHibernate.Driver.ReflectionBasedDriver { public MonoSqliteDriver(): base("Mono.Data.Sqlite", "Mono.Data.Sqlite.SqliteConnection", "Mono.Da... | Trying to using Nhibernate with Mono & SQLite - can't find System.Data.SQLite I wrote a simple app in mono (C#) that uses NHibernate with MYSQL - and I now want to port it to SQLite. My hope is (was) that I could simply change hibernate.cfg.xml and point it to a different database. Here is my modified hibernate.cfg.xml... | TITLE:
Trying to using Nhibernate with Mono & SQLite - can't find System.Data.SQLite
QUESTION:
I wrote a simple app in mono (C#) that uses NHibernate with MYSQL - and I now want to port it to SQLite. My hope is (was) that I could simply change hibernate.cfg.xml and point it to a different database. Here is my modified... | [
"c#",
"nhibernate",
"sqlite",
"mono"
] | 7 | 10 | 3,823 | 2 | 0 | 2011-06-01T15:21:22.803000 | 2011-06-01T15:34:58.323000 |
6,203,598 | 6,203,900 | C++ std::out_of_range error when I try to run the program | Okay so first off, Im pretty new to programming, Ive only read a bit of stuff and have been working on some project Euler problems to kind of wrap my head around concepts and such. However, I got an error message today that I couldn't make any sense of so I thought I would ask here for some help! Any links or advice is... | As other answers have already pointed out, in substr If the position passed is past the end of the string, an out_of_range exception is thrown. In your code: for (int j = i; j<(i+4); j++) When i is 1 less than s_testnum.length() j goes past s_testnum.length() and when you do, s_testnum.substr(j, 1); causes an out_of_ra... | C++ std::out_of_range error when I try to run the program Okay so first off, Im pretty new to programming, Ive only read a bit of stuff and have been working on some project Euler problems to kind of wrap my head around concepts and such. However, I got an error message today that I couldn't make any sense of so I thou... | TITLE:
C++ std::out_of_range error when I try to run the program
QUESTION:
Okay so first off, Im pretty new to programming, Ive only read a bit of stuff and have been working on some project Euler problems to kind of wrap my head around concepts and such. However, I got an error message today that I couldn't make any ... | [
"c++",
"string"
] | 3 | 4 | 33,083 | 6 | 0 | 2011-06-01T15:21:23.597000 | 2011-06-01T15:42:54.227000 |
6,203,609 | 6,203,698 | Android Percentage Layout Height | I know that it is impossible to set percentages and that you can set a weight of certain images to scale their heights. What I am trying to do though is specify the height of a layout relative to the layout it is within. Basicly I have something like this Of course this is a very simplified version, just so you can und... | You could add another empty layout below that one and set them both to have the same layout weight. They should get 50% of the space each. | Android Percentage Layout Height I know that it is impossible to set percentages and that you can set a weight of certain images to scale their heights. What I am trying to do though is specify the height of a layout relative to the layout it is within. Basicly I have something like this Of course this is a very simpli... | TITLE:
Android Percentage Layout Height
QUESTION:
I know that it is impossible to set percentages and that you can set a weight of certain images to scale their heights. What I am trying to do though is specify the height of a layout relative to the layout it is within. Basicly I have something like this Of course thi... | [
"android",
"xml",
"layout"
] | 55 | 18 | 143,054 | 6 | 0 | 2011-06-01T15:21:57.117000 | 2011-06-01T15:27:40.447000 |
6,203,627 | 6,203,717 | Coldfusion security issue...how to hide directory of files? | So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory. What kind of script/ counter measure should I use to block these files from being viewed? I already have a script that checks... | This isn't a ColdFusion issue so much as a web server configuration issue. You should either: configure your web server not to show a directory of files when using a URL without a filename ( e.g., http://www.example.com/files/ ) drop a blank default web document (index.html, index.htm, default.htm, index.cfm, whatever)... | Coldfusion security issue...how to hide directory of files? So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory. What kind of script/ counter measure should I use to block these ... | TITLE:
Coldfusion security issue...how to hide directory of files?
QUESTION:
So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory. What kind of script/ counter measure should I u... | [
"security",
"coldfusion",
"coldfusion-8"
] | 2 | 6 | 1,028 | 2 | 0 | 2011-06-01T15:22:52.070000 | 2011-06-01T15:28:56.223000 |
6,203,636 | 6,203,756 | Better way to detect when a variable != undefined when async request is sent | Given the following: var doThings = (function ($, window, document) { var someScopedVariable = undefined, methods, _status;
methods = { init: function () { _status.getStatus.call(this);
// Do something with the 'someScopedVariable' } };
// Local method _status = { getStatus: function () { // Runs a webservice call t... | I would suggest to wait for the complete / success event of an ajax call. methods = { init: function () { _status.getStatus.call(this); }, continueInit: function( data ) { // populate 'someScopedVariable' from data and continue init } };
_status = { getStatus: function () { $.post('webservice.url', continueInit ); } }... | Better way to detect when a variable != undefined when async request is sent Given the following: var doThings = (function ($, window, document) { var someScopedVariable = undefined, methods, _status;
methods = { init: function () { _status.getStatus.call(this);
// Do something with the 'someScopedVariable' } };
// ... | TITLE:
Better way to detect when a variable != undefined when async request is sent
QUESTION:
Given the following: var doThings = (function ($, window, document) { var someScopedVariable = undefined, methods, _status;
methods = { init: function () { _status.getStatus.call(this);
// Do something with the 'someScopedV... | [
"javascript",
"jquery",
"asynchronous",
"jquery-deferred"
] | 1 | 4 | 1,045 | 3 | 0 | 2011-06-01T15:23:37.483000 | 2011-06-01T15:31:00.737000 |
6,203,640 | 6,203,716 | IE8 Developer Tools Javascript Minimized | When I open the IE8 Developer Tools (using F12), click on Scripts, and choose the project's.js file, the Javascript that is displayed is minified. This makes debugging almost impossible. In researching, I found a reference to a "configuration button" that appears would pretty-print the Javascript source. Unfortunately ... | unfortunately that is only available in IE9's developer tools, in the configuration menu: MSDN article on Dev Tools in IE9 Edit: One last option could be using FirebugLite, if infact IE8 is minifying the javascript for you, Firebug should not, you can get FirebugLite in IE by using it in a bookmarklet: http://getfirebu... | IE8 Developer Tools Javascript Minimized When I open the IE8 Developer Tools (using F12), click on Scripts, and choose the project's.js file, the Javascript that is displayed is minified. This makes debugging almost impossible. In researching, I found a reference to a "configuration button" that appears would pretty-pr... | TITLE:
IE8 Developer Tools Javascript Minimized
QUESTION:
When I open the IE8 Developer Tools (using F12), click on Scripts, and choose the project's.js file, the Javascript that is displayed is minified. This makes debugging almost impossible. In researching, I found a reference to a "configuration button" that appea... | [
"javascript",
"ie-developer-tools"
] | 1 | 0 | 2,100 | 1 | 0 | 2011-06-01T15:24:00.023000 | 2011-06-01T15:28:55.667000 |
6,203,651 | 6,207,421 | Directshow recording/preview problem | I have a project where I need to record a video using DirectShow from a webcam, but I need to be able to stop recording while the preview continues to run. I am using WPFMediaKit http://wpfmediakit.codeplex.com/ The problem is that when I record a video the pause function also pauses the preview pane in the application... | I don't know about the WPFMediaKit, but basically when you want to start/stop recording while keeping the preview, you will need two graphs, and something to connect between those graphs. Take a look at the pdf document at the GMFBridge page. | Directshow recording/preview problem I have a project where I need to record a video using DirectShow from a webcam, but I need to be able to stop recording while the preview continues to run. I am using WPFMediaKit http://wpfmediakit.codeplex.com/ The problem is that when I record a video the pause function also pause... | TITLE:
Directshow recording/preview problem
QUESTION:
I have a project where I need to record a video using DirectShow from a webcam, but I need to be able to stop recording while the preview continues to run. I am using WPFMediaKit http://wpfmediakit.codeplex.com/ The problem is that when I record a video the pause f... | [
"c#",
"wpf",
"video",
"directshow",
"capture"
] | 3 | 3 | 2,097 | 3 | 0 | 2011-06-01T15:24:55.473000 | 2011-06-01T20:44:04.600000 |
6,203,653 | 6,203,877 | How do you execute multiple commands in a single session in Paramiko? (Python) | def exec_command(self, command, bufsize=-1): #print "Executing Command: "+command chan = self._transport.open_session() chan.exec_command(command) stdin = chan.makefile('wb', bufsize) stdout = chan.makefile('rb', bufsize) stderr = chan.makefile_stderr('rb', bufsize) return stdin, stdout, stderr When executing a command... | Non-Interactive use cases This is a non-interactive example... it sends cd tmp, ls and then exit. import sys sys.stderr = open('/dev/null') # Silence silly warnings from paramiko import paramiko as pm sys.stderr = sys.__stderr__ import os
class AllowAllKeys(pm.MissingHostKeyPolicy): def missing_host_key(self, client, ... | How do you execute multiple commands in a single session in Paramiko? (Python) def exec_command(self, command, bufsize=-1): #print "Executing Command: "+command chan = self._transport.open_session() chan.exec_command(command) stdin = chan.makefile('wb', bufsize) stdout = chan.makefile('rb', bufsize) stderr = chan.makef... | TITLE:
How do you execute multiple commands in a single session in Paramiko? (Python)
QUESTION:
def exec_command(self, command, bufsize=-1): #print "Executing Command: "+command chan = self._transport.open_session() chan.exec_command(command) stdin = chan.makefile('wb', bufsize) stdout = chan.makefile('rb', bufsize) s... | [
"python",
"paramiko"
] | 55 | 50 | 127,548 | 8 | 0 | 2011-06-01T15:25:03.363000 | 2011-06-01T15:41:20.480000 |
6,203,661 | 6,217,281 | OpenLdap redirect on write | I am currently trying to setup a redirect on write for an installation of OpenLdap 2.2. I have two instances running. One is configured to be read-only (only read access, database specified as read-only) and has redirect configured to point to the second instance. The second instance is configured to allow for the desi... | So, it turns out the best way to do this is to go ahead and set up replication using slurpd and point all requests at the slave instance. Unfortunately you can't set up the master and slave on the same host (for obvious reasons, but still), so I had to spin up a second VM to get this going. Honestly, if I was not tryin... | OpenLdap redirect on write I am currently trying to setup a redirect on write for an installation of OpenLdap 2.2. I have two instances running. One is configured to be read-only (only read access, database specified as read-only) and has redirect configured to point to the second instance. The second instance is confi... | TITLE:
OpenLdap redirect on write
QUESTION:
I am currently trying to setup a redirect on write for an installation of OpenLdap 2.2. I have two instances running. One is configured to be read-only (only read access, database specified as read-only) and has redirect configured to point to the second instance. The second... | [
"redirect",
"ldap",
"openldap"
] | 0 | 0 | 672 | 2 | 0 | 2011-06-01T15:25:21.133000 | 2011-06-02T16:22:31.543000 |
6,203,666 | 6,203,771 | XPath: select a node based on another node? | Consider the following XML: Test Test MyCode MyValue AnotherItem Another value I would like to select the Value node of the Item that has the Code node in with the value MyCode. How would I go about using XPath? I've tried using Items/Item[Code=MyCode]/Value but it doesn't seem to work. | Your XML data is wrong. The Value tag doesn't have correct matching closing tags, and your Item tags don't have matching closing tags ( ). As for your XPath, try enclosing the data you want to match in quotes: const string xmlString = @" Test Test MyCode MyValue AnotherItem Another value ";
var doc = new XmlDocument()... | XPath: select a node based on another node? Consider the following XML: Test Test MyCode MyValue AnotherItem Another value I would like to select the Value node of the Item that has the Code node in with the value MyCode. How would I go about using XPath? I've tried using Items/Item[Code=MyCode]/Value but it doesn't se... | TITLE:
XPath: select a node based on another node?
QUESTION:
Consider the following XML: Test Test MyCode MyValue AnotherItem Another value I would like to select the Value node of the Item that has the Code node in with the value MyCode. How would I go about using XPath? I've tried using Items/Item[Code=MyCode]/Value... | [
"c#",
"xml",
"xpath"
] | 3 | 7 | 3,381 | 2 | 0 | 2011-06-01T15:25:26.953000 | 2011-06-01T15:32:11.817000 |
6,203,677 | 6,203,735 | How to prevent non modal windows on a new STA thread from closing | I want to open some non model windows (WPF) but at the point that this has to happen I am on a non STA thread. So I start a new thread and open them on there. But as soon as the are opened they close again. (By the way. the behaviour of these windows should be independent from the mainwindow. So no owner property is se... | If you want your windows to live, you have to start the message loop after you created them (otherwise your thread just exits, and the windows have no chance to render themselves): private void OpenSomeWindows() { for (int i = 0; i < 3; i++) { TestWindow T = new TestWindow(); T.Show(); } Dispatcher.Run(); // <---------... | How to prevent non modal windows on a new STA thread from closing I want to open some non model windows (WPF) but at the point that this has to happen I am on a non STA thread. So I start a new thread and open them on there. But as soon as the are opened they close again. (By the way. the behaviour of these windows sho... | TITLE:
How to prevent non modal windows on a new STA thread from closing
QUESTION:
I want to open some non model windows (WPF) but at the point that this has to happen I am on a non STA thread. So I start a new thread and open them on there. But as soon as the are opened they close again. (By the way. the behaviour of... | [
"wpf",
"multithreading",
"modeless"
] | 1 | 3 | 544 | 2 | 0 | 2011-06-01T15:26:23.230000 | 2011-06-01T15:30:00.730000 |
6,203,686 | 6,204,070 | Magento database: Invoice items database table? | Does anyone know where the Invoice data is stored in Magento database? For example, I've found that the order data is stored in sales_order, sales_flat_order, sales_flat_order_item. I've also found out that the main invoice data is stored in sales_order_entity, sales_order_entity_decimal and sales_order_entity_int. Thr... | I will tell you what I know for 1.4.0.1 which is the version i currently develop for, it may or may not be the same for whatever version you are using. Also, why are you in the database anyways? Magento has made models for you to use so that you don't have to work in the database. Regardless I will describe how I find ... | Magento database: Invoice items database table? Does anyone know where the Invoice data is stored in Magento database? For example, I've found that the order data is stored in sales_order, sales_flat_order, sales_flat_order_item. I've also found out that the main invoice data is stored in sales_order_entity, sales_orde... | TITLE:
Magento database: Invoice items database table?
QUESTION:
Does anyone know where the Invoice data is stored in Magento database? For example, I've found that the order data is stored in sales_order, sales_flat_order, sales_flat_order_item. I've also found out that the main invoice data is stored in sales_order_... | [
"database",
"magento"
] | 2 | 7 | 11,040 | 1 | 0 | 2011-06-01T15:26:57.610000 | 2011-06-01T15:55:40.720000 |
6,203,689 | 6,203,809 | Visual Studio C++ How to get the Form not freezing while calling a time-consuming function? | I am making a C++/CLI Forms application. In the main window of my app I have a button. When I click that button I call the Load function. Below there is the C++/CLI code: private: System::Void Button1_Click(System::Object^ sender, System::EventArgs^ e) { Load(); } The function Load() is a time-consuming function. It us... | Move your task to another thread, or call Application.DoEvents();, just after you updating your scrollbar value. | Visual Studio C++ How to get the Form not freezing while calling a time-consuming function? I am making a C++/CLI Forms application. In the main window of my app I have a button. When I click that button I call the Load function. Below there is the C++/CLI code: private: System::Void Button1_Click(System::Object^ sende... | TITLE:
Visual Studio C++ How to get the Form not freezing while calling a time-consuming function?
QUESTION:
I am making a C++/CLI Forms application. In the main window of my app I have a button. When I click that button I call the Load function. Below there is the C++/CLI code: private: System::Void Button1_Click(Sys... | [
"visual-studio-2010",
"visual-c++",
"function",
"c++-cli",
"freeze"
] | 1 | 1 | 1,799 | 4 | 0 | 2011-06-01T15:27:07.917000 | 2011-06-01T15:34:55.217000 |
6,203,690 | 6,205,428 | How to do apache redirect from 'any' incoming domain to the main domain | Some 3rd party web site domain www.example.com was pointed to an IP address of our web site - www.oursite.com. So basically, accessing example.com opens up oursite.com (but with example.com visible in the browser) I was playing around with Apache redirection but I can't manage to make it work. First I tried redirection... | RewriteCond %{HTTP_HOST}!^www\.example\.com$ [NC] RewriteRule ^/*(.*)$ http://www.example.com/$1 [R=301,NC] Will redirect all requests that are not for "www.example.com", to "www.example.com". | How to do apache redirect from 'any' incoming domain to the main domain Some 3rd party web site domain www.example.com was pointed to an IP address of our web site - www.oursite.com. So basically, accessing example.com opens up oursite.com (but with example.com visible in the browser) I was playing around with Apache r... | TITLE:
How to do apache redirect from 'any' incoming domain to the main domain
QUESTION:
Some 3rd party web site domain www.example.com was pointed to an IP address of our web site - www.oursite.com. So basically, accessing example.com opens up oursite.com (but with example.com visible in the browser) I was playing ar... | [
"apache",
"redirect"
] | 0 | 1 | 275 | 1 | 0 | 2011-06-01T15:27:08.190000 | 2011-06-01T17:41:26.710000 |
6,203,694 | 6,203,924 | ASP.NET MVC - Pass current GET params with RedirectToAction | I'm looking for a way to use RedirectToAction while passing along the current request's GET parameters. So upon going to: http://mydomain.com/MyController/MyRedirectAction?somevalue=1234 I would then want to redirect and persist somevalue with the a redirect without having to explicitly build a route dictionary and exp... | A custom action result could do the job: public class MyRedirectResult: ActionResult { private readonly string _actionName; private readonly string _controllerName; private readonly RouteValueDictionary _routeValues;
public MyRedirectResult(string actionName, string controllerName, RouteValueDictionary routeValues) { ... | ASP.NET MVC - Pass current GET params with RedirectToAction I'm looking for a way to use RedirectToAction while passing along the current request's GET parameters. So upon going to: http://mydomain.com/MyController/MyRedirectAction?somevalue=1234 I would then want to redirect and persist somevalue with the a redirect w... | TITLE:
ASP.NET MVC - Pass current GET params with RedirectToAction
QUESTION:
I'm looking for a way to use RedirectToAction while passing along the current request's GET parameters. So upon going to: http://mydomain.com/MyController/MyRedirectAction?somevalue=1234 I would then want to redirect and persist somevalue wit... | [
"asp.net-mvc",
"redirect",
"redirecttoaction"
] | 1 | 2 | 2,473 | 2 | 0 | 2011-06-01T15:27:22.630000 | 2011-06-01T15:44:15.140000 |
6,203,696 | 6,203,755 | Java String.substring returning empty string | I'm trying to run the following code int[] sbox = new int[256]; String inputString = "Thisisanexample"; String sTemp; char cTmp; int intLength = inputString.length();
for (a = 0; a <= 255; a++) { sTemp = inputString.substring(a % intLength, 1); ctmp = sTemp.toCharArray()[0]; sbox[a] = (int)ctmp; } Every time i run the... | String.substring() expects a start and a end index, not the length. So you need to add the length to the start index: for (a = 0; a <= 255; a++) { int index = a % intLength; sTemp = inputString.substring( index, index + 1 ); ctmp = sTemp.toCharArray()[0]; sbox[a] = (int)ctmp; } You can also avoid the creation of sub st... | Java String.substring returning empty string I'm trying to run the following code int[] sbox = new int[256]; String inputString = "Thisisanexample"; String sTemp; char cTmp; int intLength = inputString.length();
for (a = 0; a <= 255; a++) { sTemp = inputString.substring(a % intLength, 1); ctmp = sTemp.toCharArray()[0]... | TITLE:
Java String.substring returning empty string
QUESTION:
I'm trying to run the following code int[] sbox = new int[256]; String inputString = "Thisisanexample"; String sTemp; char cTmp; int intLength = inputString.length();
for (a = 0; a <= 255; a++) { sTemp = inputString.substring(a % intLength, 1); ctmp = sTem... | [
"java"
] | 3 | 5 | 12,442 | 4 | 0 | 2011-06-01T15:27:30.433000 | 2011-06-01T15:30:58.973000 |
6,203,712 | 6,203,785 | MySQL schema source control | At my company we have several developers all working on projects internally, each with their own virtualbox setup. We use SVN to handle the source, but occasionally run into issues where a database (MySQL) schema change is necessary, and this has to be propagated to all of the other developers. At the moment we have a ... | One option is a data dictionary in YAML/JSON. There is a nice article here | MySQL schema source control At my company we have several developers all working on projects internally, each with their own virtualbox setup. We use SVN to handle the source, but occasionally run into issues where a database (MySQL) schema change is necessary, and this has to be propagated to all of the other develope... | TITLE:
MySQL schema source control
QUESTION:
At my company we have several developers all working on projects internally, each with their own virtualbox setup. We use SVN to handle the source, but occasionally run into issues where a database (MySQL) schema change is necessary, and this has to be propagated to all of ... | [
"mysql",
"svn",
"version-control",
"database-schema"
] | 4 | 2 | 1,384 | 4 | 0 | 2011-06-01T15:28:38.657000 | 2011-06-01T15:33:20.353000 |
6,203,713 | 6,203,772 | Delete Comment popup | I'm wanting to popup a confirm/cancel div in which I can style when my users click the delete button in my feed. But what I have isn't working. And I'm wondering if its because I don't have anything in delete.php to tell it to direct it into a popup. It just goes to the delete.php page atm. Could someone give me some d... | You need to return the value returned by confirmDelete. The attribute is onclick, not onClick. The attribute is missing a closing quote. JavaScript function confirmDelete(){ return confirm("Are you sure you want to delete this file?"); } PHP echo ' That said, it looks like you're using jQuery (albeit a super old versio... | Delete Comment popup I'm wanting to popup a confirm/cancel div in which I can style when my users click the delete button in my feed. But what I have isn't working. And I'm wondering if its because I don't have anything in delete.php to tell it to direct it into a popup. It just goes to the delete.php page atm. Could s... | TITLE:
Delete Comment popup
QUESTION:
I'm wanting to popup a confirm/cancel div in which I can style when my users click the delete button in my feed. But what I have isn't working. And I'm wondering if its because I don't have anything in delete.php to tell it to direct it into a popup. It just goes to the delete.php... | [
"javascript",
"php",
"popup"
] | 1 | 3 | 1,215 | 2 | 0 | 2011-06-01T15:28:42.960000 | 2011-06-01T15:32:18.107000 |
6,203,719 | 6,203,981 | LEFT JOIN ONLY FOR SPECIFIC ROWS IN SQL? | I have another rather curious problem. I have the following structure: CREATE TABLE [dbo].[Event] ( Id int IDENTITY(1,1) NOT NULL, ApplicationId nvarchar(32) NOT NULL, Name nvarchar(128) NOT NULL, Description nvarchar(256) NULL, Date nvarchar(16) NOT NULL, Time nvarchar(16) NOT NULL, EventType nvarchar(16) NOT NULL, So... | select e.*, s.Name, ISNULL(s.Name,'Predefined Value') from [Event] as e left join [Source] as s on (s.Id = e.SourceId) and (e.EventType in ('APP_CLOSE','APP_START')) | LEFT JOIN ONLY FOR SPECIFIC ROWS IN SQL? I have another rather curious problem. I have the following structure: CREATE TABLE [dbo].[Event] ( Id int IDENTITY(1,1) NOT NULL, ApplicationId nvarchar(32) NOT NULL, Name nvarchar(128) NOT NULL, Description nvarchar(256) NULL, Date nvarchar(16) NOT NULL, Time nvarchar(16) NOT ... | TITLE:
LEFT JOIN ONLY FOR SPECIFIC ROWS IN SQL?
QUESTION:
I have another rather curious problem. I have the following structure: CREATE TABLE [dbo].[Event] ( Id int IDENTITY(1,1) NOT NULL, ApplicationId nvarchar(32) NOT NULL, Name nvarchar(128) NOT NULL, Description nvarchar(256) NULL, Date nvarchar(16) NOT NULL, Time... | [
"sql-server-2005",
"sql-server-2008",
"left-join"
] | 2 | 3 | 5,361 | 3 | 0 | 2011-06-01T15:29:02.317000 | 2011-06-01T15:49:17.447000 |
6,203,720 | 6,203,816 | Can you fire an event when Android Dialog is dismissed? | Say I have a created a dialog in my Android app like so: private static ProgressDialog dialog; dialog = ProgressDialog.show(MainActivity.this, "", "Downloading Files. Please wait...", true); Now, is it possible to fire an event when the following is called? dialog.dismiss(); The reason I want to do this and not just ca... | Use an OnDismissListener. There is a setOnDismissListener(...) method in the class Dialog | Can you fire an event when Android Dialog is dismissed? Say I have a created a dialog in my Android app like so: private static ProgressDialog dialog; dialog = ProgressDialog.show(MainActivity.this, "", "Downloading Files. Please wait...", true); Now, is it possible to fire an event when the following is called? dialog... | TITLE:
Can you fire an event when Android Dialog is dismissed?
QUESTION:
Say I have a created a dialog in my Android app like so: private static ProgressDialog dialog; dialog = ProgressDialog.show(MainActivity.this, "", "Downloading Files. Please wait...", true); Now, is it possible to fire an event when the following... | [
"android",
"class",
"static",
"dialog",
"progressdialog"
] | 45 | 69 | 48,800 | 6 | 0 | 2011-06-01T15:29:04.917000 | 2011-06-01T15:35:15.110000 |
6,203,738 | 6,203,954 | iPhone skew a CALayer | I'm a beginner and I am doing some exercises to familiarize myself with CALayer... I just want to know how to "incline" (or skew) a CALayer 45° angle? Thank you. | You could do this but you would have to mess with the layer 's transform property, which is a struct CATransform3D. You're going to have to do some vector math to do this, as you. See the compute_transform_matrix(...) function from this answer for more details. You'll want to do something like this: CGRect r = layer.bo... | iPhone skew a CALayer I'm a beginner and I am doing some exercises to familiarize myself with CALayer... I just want to know how to "incline" (or skew) a CALayer 45° angle? Thank you. | TITLE:
iPhone skew a CALayer
QUESTION:
I'm a beginner and I am doing some exercises to familiarize myself with CALayer... I just want to know how to "incline" (or skew) a CALayer 45° angle? Thank you.
ANSWER:
You could do this but you would have to mess with the layer 's transform property, which is a struct CATransf... | [
"iphone",
"calayer"
] | 4 | 7 | 3,254 | 4 | 0 | 2011-06-01T15:30:11.057000 | 2011-06-01T15:46:37.243000 |
6,203,740 | 6,205,027 | Spring Web MVC - validate individual request params | I'm running a webapp in Spring Web MVC 3.0 and I have a number of controller methods whose signatures are roughly as follows: @RequestMapping(value = "/{level1}/{level2}/foo", method = RequestMethod.POST) public ModelAndView createFoo(@PathVariable long level1, @PathVariable long level2, @RequestParam("foo_name") Strin... | There's nothing built in to do that, not yet anyway. With the current release versions you will still need to use the WebDataBinder to bind your parameters onto an object if you want automagic validation. It's worth learning to do if you're using SpringMVC, even if it's not your first choice for this task. It looks som... | Spring Web MVC - validate individual request params I'm running a webapp in Spring Web MVC 3.0 and I have a number of controller methods whose signatures are roughly as follows: @RequestMapping(value = "/{level1}/{level2}/foo", method = RequestMethod.POST) public ModelAndView createFoo(@PathVariable long level1, @PathV... | TITLE:
Spring Web MVC - validate individual request params
QUESTION:
I'm running a webapp in Spring Web MVC 3.0 and I have a number of controller methods whose signatures are roughly as follows: @RequestMapping(value = "/{level1}/{level2}/foo", method = RequestMethod.POST) public ModelAndView createFoo(@PathVariable l... | [
"java",
"spring",
"validation",
"spring-mvc"
] | 53 | 30 | 84,270 | 3 | 0 | 2011-06-01T15:30:14.813000 | 2011-06-01T17:06:58.830000 |
6,203,743 | 6,231,644 | Android SDK update fails, saying-> XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml | Am new to Java and Android. I am trying to install Android SDK on Debian Squeeze. I have just downloaded and setup the SDK. When I try to update the packages list I get following error. XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml. Error: java.lang.NullPointerException I have c... | I've found that this seems to be an issue with the java-gcj. Once I installed the oracle java and stopped using java-gcj the error went away. You can grab the oracle java here: http://www.oracle.com/technetwork/java/javase/downloads/index.html Also, after installing oracle java and when using Fedora I had to issue the ... | Android SDK update fails, saying-> XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml Am new to Java and Android. I am trying to install Android SDK on Debian Squeeze. I have just downloaded and setup the SDK. When I try to update the packages list I get following error. XML verifica... | TITLE:
Android SDK update fails, saying-> XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml
QUESTION:
Am new to Java and Android. I am trying to install Android SDK on Debian Squeeze. I have just downloaded and setup the SDK. When I try to update the packages list I get following e... | [
"java",
"android",
"android-emulator",
"debian"
] | 1 | 2 | 2,145 | 2 | 0 | 2011-06-01T15:30:19.310000 | 2011-06-03T19:19:58.460000 |
6,203,745 | 6,208,897 | Where is the output parameter of a mapreduce used? | This is a code example from this tutorial: http://kylebanker.com/blog/2009/12/mongodb-map-reduce-basics/ He notes that "as of MongoDB v1.8, you must specify an output collection name." But I don't see where this is referred to or why it is needed. # Running map-reduce from Ruby (irb) assuming # that @comments reference... | The new Map / Reduce output options are documented here. The basic premise is that Map / Reduce would originally just output to a temp collection. There were issues around the temp collection, (why do all of that work just to have it be temporary?) and there were some features added around merging and re-reducing. In p... | Where is the output parameter of a mapreduce used? This is a code example from this tutorial: http://kylebanker.com/blog/2009/12/mongodb-map-reduce-basics/ He notes that "as of MongoDB v1.8, you must specify an output collection name." But I don't see where this is referred to or why it is needed. # Running map-reduce ... | TITLE:
Where is the output parameter of a mapreduce used?
QUESTION:
This is a code example from this tutorial: http://kylebanker.com/blog/2009/12/mongodb-map-reduce-basics/ He notes that "as of MongoDB v1.8, you must specify an output collection name." But I don't see where this is referred to or why it is needed. # R... | [
"ruby",
"mongodb",
"mapreduce"
] | 0 | 1 | 216 | 1 | 0 | 2011-06-01T15:30:25.887000 | 2011-06-01T23:30:30.513000 |
6,203,748 | 6,203,791 | findstr regex expression | I am really struggling trying to get a regex expression to work with findstr. I have the following in a text file called filelist.txt as an example.... test1 test12 test13 test14 uyt* test16 test19 test47 nam; help367 file1 named665 I also have a set of acceptable characters which are A-Z, a-z, 0-9, space./-_ I want to... | Try: findstr /b /e /r /v /C:"[a-zA-Z0-9_./-]*" filelist.txt or findstr /r /x /C:".*[^a-zA-Z0-9_./-].*" filelist.txt | findstr regex expression I am really struggling trying to get a regex expression to work with findstr. I have the following in a text file called filelist.txt as an example.... test1 test12 test13 test14 uyt* test16 test19 test47 nam; help367 file1 named665 I also have a set of acceptable characters which are A-Z, a-z,... | TITLE:
findstr regex expression
QUESTION:
I am really struggling trying to get a regex expression to work with findstr. I have the following in a text file called filelist.txt as an example.... test1 test12 test13 test14 uyt* test16 test19 test47 nam; help367 file1 named665 I also have a set of acceptable characters w... | [
"regex"
] | 1 | 2 | 767 | 1 | 0 | 2011-06-01T15:30:28.507000 | 2011-06-01T15:33:39.960000 |
6,203,761 | 6,203,951 | How can I use git from within Xcode? | How can I use git from within Xcode? I've found SVN easy to use from Xcode; can I use git as easily? | In XCode 4 you get git support natively. There's a buch of documentations on the internet: https://github.com/blog/810-xcode-4-released-with-git-integration http://oleb.net/blog/2011/05/on-git-support-in-xcode-4/ Official doc here. Also, Google has LOADS of results on this matter... | How can I use git from within Xcode? How can I use git from within Xcode? I've found SVN easy to use from Xcode; can I use git as easily? | TITLE:
How can I use git from within Xcode?
QUESTION:
How can I use git from within Xcode? I've found SVN easy to use from Xcode; can I use git as easily?
ANSWER:
In XCode 4 you get git support natively. There's a buch of documentations on the internet: https://github.com/blog/810-xcode-4-released-with-git-integratio... | [
"xcode",
"git",
"xcode4"
] | 2 | 2 | 1,850 | 2 | 0 | 2011-06-01T15:31:14.597000 | 2011-06-01T15:46:32.657000 |
6,203,766 | 6,203,933 | Persisting event.clientX value in setTimeout callback function | I have this routine which is called onmouseover of a certain element. I want there to be a slight delay - i.e. give the user time to mouseout before the effect takes place. The effect uses the event.clientX value. However it appears that by the time the callback is called - after 500ms - the event object no longer exis... | If you're relying on this only working in Internet Explorer, you can just save the value before setting up the timeout: function showTip(sDivID) { var x = event.clientX; SHOW_TIP_TIMEOUT_ID = setTimeout(function() { var div = $('#' + sDivId).show()[0]; div.style.left = x; }, 500); } If you want this to work for other b... | Persisting event.clientX value in setTimeout callback function I have this routine which is called onmouseover of a certain element. I want there to be a slight delay - i.e. give the user time to mouseout before the effect takes place. The effect uses the event.clientX value. However it appears that by the time the cal... | TITLE:
Persisting event.clientX value in setTimeout callback function
QUESTION:
I have this routine which is called onmouseover of a certain element. I want there to be a slight delay - i.e. give the user time to mouseout before the effect takes place. The effect uses the event.clientX value. However it appears that b... | [
"javascript",
"events",
"closures",
"dom-events"
] | 1 | 2 | 275 | 2 | 0 | 2011-06-01T15:31:33.187000 | 2011-06-01T15:44:44.153000 |
6,203,777 | 6,203,854 | How do I get ajax to work like the Google Map API? | I'm trying to get access to a Javascript API, I created, on other sites. The javascript is at https://ksc105.kscserver.com/query.js and it pulls ajax calls to https://ksc105.kscserver.com/suggestions.php (?action=getall). Of course using this on https://ksc105.kscserver.com/index.php works. However I'm trying to use im... | Try using AJAX callbacks. jQuery does this well but as a raw example, if you load some JSON with a callback function (From a This is also known as JSONP | How do I get ajax to work like the Google Map API? I'm trying to get access to a Javascript API, I created, on other sites. The javascript is at https://ksc105.kscserver.com/query.js and it pulls ajax calls to https://ksc105.kscserver.com/suggestions.php (?action=getall). Of course using this on https://ksc105.kscserve... | TITLE:
How do I get ajax to work like the Google Map API?
QUESTION:
I'm trying to get access to a Javascript API, I created, on other sites. The javascript is at https://ksc105.kscserver.com/query.js and it pulls ajax calls to https://ksc105.kscserver.com/suggestions.php (?action=getall). Of course using this on https... | [
"php",
"ajax",
"api"
] | 0 | 2 | 294 | 2 | 0 | 2011-06-01T15:32:41.553000 | 2011-06-01T15:39:18.367000 |
6,203,780 | 6,215,705 | How can I use custom expressions in DevArt LINQ to Entities and also use query comprehension syntax? | I've got a situation where I need to use a custom expression in a LINQ to Entities query (because I want to have custom logic that L2E wouldn't otherwise understand: var query = db.MyTable.Where(MyPredicateExpression) But I'd rather use query comprehension syntax: var query = from x in db.MyTable where [x matches the p... | Entity Framework and LINQ to SQL do not support this scenario, because the translation of MyPredicateExpression should be added to expression tree translator. I recommend you to create a stored function performing the predicate check and add this function to DataContext. You will be able to use a query like the followi... | How can I use custom expressions in DevArt LINQ to Entities and also use query comprehension syntax? I've got a situation where I need to use a custom expression in a LINQ to Entities query (because I want to have custom logic that L2E wouldn't otherwise understand: var query = db.MyTable.Where(MyPredicateExpression) B... | TITLE:
How can I use custom expressions in DevArt LINQ to Entities and also use query comprehension syntax?
QUESTION:
I've got a situation where I need to use a custom expression in a LINQ to Entities query (because I want to have custom logic that L2E wouldn't otherwise understand: var query = db.MyTable.Where(MyPred... | [
"linq",
"linq-to-sql",
"linq-to-entities",
"devart"
] | 1 | 1 | 633 | 2 | 0 | 2011-06-01T15:32:54.097000 | 2011-06-02T14:12:43.347000 |
6,203,787 | 6,203,834 | How do I remove all selected nodes from an XPath? | I run an XPath in Java with the following xml and code: 0001 0002 0003 0003 0002 0001 0001 0003 0004 Code: try { XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression pathExpr = xpath.compile("/list/member/friendlist/friend[.='0003']"); } catch (XPathExpressionException e) { Of course there are more code... | for each node in the returned NodeList: n.getParentNode().removeChild(n); | How do I remove all selected nodes from an XPath? I run an XPath in Java with the following xml and code: 0001 0002 0003 0003 0002 0001 0001 0003 0004 Code: try { XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression pathExpr = xpath.compile("/list/member/friendlist/friend[.='0003']"); } catch (XPathExpr... | TITLE:
How do I remove all selected nodes from an XPath?
QUESTION:
I run an XPath in Java with the following xml and code: 0001 0002 0003 0003 0002 0001 0001 0003 0004 Code: try { XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression pathExpr = xpath.compile("/list/member/friendlist/friend[.='0003']"); ... | [
"java",
"xml",
"xpath"
] | 7 | 10 | 13,958 | 3 | 0 | 2011-06-01T15:33:27.527000 | 2011-06-01T15:37:13.320000 |
6,203,790 | 6,205,040 | Boost binary serialization with a map and doubles crashes on serialize in | This is a sample that represents my problem. The map will serialize perfectly fine unless finalTime is greater than 25. With boost unit testing I was given a std::exception input stream error. Also, this code works fine using polymorphic_text_archives. The error occurs while reading in the map. #include #include #defin... | You need to serialize to a binary file stream. Add the ios_base::binary to the stream constructors. | Boost binary serialization with a map and doubles crashes on serialize in This is a sample that represents my problem. The map will serialize perfectly fine unless finalTime is greater than 25. With boost unit testing I was given a std::exception input stream error. Also, this code works fine using polymorphic_text_arc... | TITLE:
Boost binary serialization with a map and doubles crashes on serialize in
QUESTION:
This is a sample that represents my problem. The map will serialize perfectly fine unless finalTime is greater than 25. With boost unit testing I was given a std::exception input stream error. Also, this code works fine using po... | [
"c++",
"serialization",
"boost",
"dictionary",
"boost-serialization"
] | 1 | 4 | 1,392 | 1 | 0 | 2011-06-01T15:33:40.020000 | 2011-06-01T17:08:08.340000 |
6,203,799 | 6,204,427 | dismissModalViewController AND pass data back | I have two view controllers, firstViewController and secondViewController. I am using this code to switch to my secondViewController (I am also passing a string to it): secondViewController *second = [[secondViewController alloc] initWithNibName:nil bundle:nil];
second.myString = @"This text is passed from firstViewCo... | You need to use delegate protocols... Here's how to do it: Declare a protocol in your secondViewController's header file. It should look like this: #import @protocol SecondDelegate -(void)secondViewControllerDismissed:(NSString *)stringForFirst @end
@interface SecondViewController: UIViewController { id myDelegate; }
... | dismissModalViewController AND pass data back I have two view controllers, firstViewController and secondViewController. I am using this code to switch to my secondViewController (I am also passing a string to it): secondViewController *second = [[secondViewController alloc] initWithNibName:nil bundle:nil];
second.myS... | TITLE:
dismissModalViewController AND pass data back
QUESTION:
I have two view controllers, firstViewController and secondViewController. I am using this code to switch to my secondViewController (I am also passing a string to it): secondViewController *second = [[secondViewController alloc] initWithNibName:nil bundle... | [
"iphone",
"ios",
"uiviewcontroller",
"modalviewcontroller"
] | 83 | 141 | 34,481 | 4 | 0 | 2011-06-01T15:34:19.400000 | 2011-06-01T16:19:01.107000 |
6,203,818 | 6,213,884 | Different states for UIButton not working | I have written this code to see different image states... UIButton *btnComment = [UIButton buttonWithType:UIButtonTypeCustom]; btnComment.tag=indexPath.row; [btnComment addTarget:self action:@selector(goToComment:)forControlEvents:UIControlEventTouchDown];
UIImage *img1 = [UIImage imageNamed:@"commentbtndown.png"]; UI... | The problem is that you are creating the UIImage objects with an autorelease method imageNamed, and you are releasing these objects afterwards, which cause your button to have invalid objects and because of that the images will not be displayed Try removing this lines of code and your button will work [img1 release]; [... | Different states for UIButton not working I have written this code to see different image states... UIButton *btnComment = [UIButton buttonWithType:UIButtonTypeCustom]; btnComment.tag=indexPath.row; [btnComment addTarget:self action:@selector(goToComment:)forControlEvents:UIControlEventTouchDown];
UIImage *img1 = [UII... | TITLE:
Different states for UIButton not working
QUESTION:
I have written this code to see different image states... UIButton *btnComment = [UIButton buttonWithType:UIButtonTypeCustom]; btnComment.tag=indexPath.row; [btnComment addTarget:self action:@selector(goToComment:)forControlEvents:UIControlEventTouchDown];
UI... | [
"iphone",
"objective-c",
"ios",
"uitableview",
"uibutton"
] | 1 | 2 | 1,573 | 3 | 0 | 2011-06-01T15:35:18.697000 | 2011-06-02T11:25:13.677000 |
6,203,821 | 6,204,309 | CAML query with nested ANDs and ORs for multiple fields | I am working on proof-of-concept code to dynamically generate CAML based on keywords provided to a highly-specific search web service that I am writing. I am not using the SharePoint-provided search web service for this proof. I have done so already for what I am trying to achieve. From all of my research, I cannot fin... | Since you are not allowed to put more than two conditions in one condition group (And | Or) you have to create an extra nested group ( MSDN ). The expression A AND B AND C looks like this: A B C Your SQL like sample translated to CAML (hopefully with matching XML tags;) ): John John John Doe Doe Doe 123 123 123 | CAML query with nested ANDs and ORs for multiple fields I am working on proof-of-concept code to dynamically generate CAML based on keywords provided to a highly-specific search web service that I am writing. I am not using the SharePoint-provided search web service for this proof. I have done so already for what I am ... | TITLE:
CAML query with nested ANDs and ORs for multiple fields
QUESTION:
I am working on proof-of-concept code to dynamically generate CAML based on keywords provided to a highly-specific search web service that I am writing. I am not using the SharePoint-provided search web service for this proof. I have done so alre... | [
"sharepoint",
"caml",
"subquery"
] | 30 | 57 | 112,890 | 3 | 0 | 2011-06-01T15:35:26.433000 | 2011-06-01T16:12:17.947000 |
6,203,823 | 6,203,866 | Notes Document as an objects in array | Chaingin my question. I have my C# application open a nodes data base. So right now I can open my notes data base and grab the properity value that I want. Now there is only 4 values I need for each note. What is the best way of storeing these items value together so I can reference them when i want? ArrayList? | I am not familiar with Lotus Notes document format but if you cannot store the documents themselves in an array and just access the properties that way, you could create a class that stores the properties for a document and then create a List that holds the list of class instances you created. | Notes Document as an objects in array Chaingin my question. I have my C# application open a nodes data base. So right now I can open my notes data base and grab the properity value that I want. Now there is only 4 values I need for each note. What is the best way of storeing these items value together so I can referenc... | TITLE:
Notes Document as an objects in array
QUESTION:
Chaingin my question. I have my C# application open a nodes data base. So right now I can open my notes data base and grab the properity value that I want. Now there is only 4 values I need for each note. What is the best way of storeing these items value together... | [
"c#",
"lotus-domino"
] | 0 | 1 | 203 | 1 | 0 | 2011-06-01T15:35:38.480000 | 2011-06-01T15:40:11.317000 |
6,203,827 | 6,203,881 | How can I rearrange the columns of this matrix? | Given a binary matrix in which every row and column contains exactly only one 1, I need to rearrange the matrix columnwise so that it will become an identity matrix. For example, given a binary matrix: Binary = [ 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 ] To get the identity matrix we rearrange the column as 2... | A very simple way to do this is to use the function FIND like so: [index,~] = find(Binary.'); %'# Transpose the matrix and find the row indices %# of the non-zero entries And you can test that it work as follows: >> Binary(:,index)
ans =
1 0 0 0 0 %# Yup, that's an identity matrix alright! 0 1 0 0 0 0 0 1 0 0 0 0 0 1... | How can I rearrange the columns of this matrix? Given a binary matrix in which every row and column contains exactly only one 1, I need to rearrange the matrix columnwise so that it will become an identity matrix. For example, given a binary matrix: Binary = [ 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 ] To get ... | TITLE:
How can I rearrange the columns of this matrix?
QUESTION:
Given a binary matrix in which every row and column contains exactly only one 1, I need to rearrange the matrix columnwise so that it will become an identity matrix. For example, given a binary matrix: Binary = [ 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0... | [
"matlab",
"sorting",
"matrix"
] | 2 | 4 | 1,342 | 2 | 0 | 2011-06-01T15:35:44.050000 | 2011-06-01T15:41:42.800000 |
6,203,836 | 6,203,972 | Most efficient way to process a queue with threads | I have a queue onto which pending fourier transform requests (comparatively time consuming operations) are placed - we could get thousands of transform requests per second in some cases, so its gotta be quick. I'm upgrading the old code to use.net 4, as well as porting to TPL. I'm wondering what the most efficient (fas... | That looks reasonable. I've found BlockingCollection to be quite fast. I use it to process tens of thousands of requests per second. If your application is processor bound, then you probably don't want to create more workers than you have cores. Certainly you don't want to create a lot more workers than cores. On a qua... | Most efficient way to process a queue with threads I have a queue onto which pending fourier transform requests (comparatively time consuming operations) are placed - we could get thousands of transform requests per second in some cases, so its gotta be quick. I'm upgrading the old code to use.net 4, as well as porting... | TITLE:
Most efficient way to process a queue with threads
QUESTION:
I have a queue onto which pending fourier transform requests (comparatively time consuming operations) are placed - we could get thousands of transform requests per second in some cases, so its gotta be quick. I'm upgrading the old code to use.net 4, ... | [
"c#",
"multithreading",
"c#-4.0",
"task-parallel-library"
] | 16 | 10 | 6,645 | 5 | 0 | 2011-06-01T15:37:28.557000 | 2011-06-01T15:48:38.193000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.