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,264,449 | 6,265,006 | FormatMessage Fails with error code 317 | When I executed the following code piece it fails with error code 317. How can solve the issue? We are using Unicode Character Set for the project char* pszMessgeBuffer = NULL; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwErrorId, 0, // Default langu... | Using the error code lookup tool from Visual Studio, 317 is described as The system cannot find message text for message number 0x%1 in the message file for %2. This means that a message description does not exist in the system for the previous error code. The MSDN documentation for FormatMessage with flag FORMAT_MESSA... | FormatMessage Fails with error code 317 When I executed the following code piece it fails with error code 317. How can solve the issue? We are using Unicode Character Set for the project char* pszMessgeBuffer = NULL; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSER... | TITLE:
FormatMessage Fails with error code 317
QUESTION:
When I executed the following code piece it fails with error code 317. How can solve the issue? We are using Unicode Character Set for the project char* pszMessgeBuffer = NULL; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_ME... | [
"c++",
"visual-c++",
"windows-ce"
] | 1 | 6 | 5,766 | 2 | 0 | 2011-06-07T11:22:50.533000 | 2011-06-07T12:17:16.513000 |
6,264,453 | 6,264,529 | How to construct WMI query | I'd like to find results that Name starts with param1, and ends with param2 but my code doesn't work string wmiQuery = string.Format("SELECT CommandLine FROM Win32_Process WHERE Name LIKE '{0}%' AND Name LIKE '%{1}'", param1, param2); ManagementObjectSearcher searcher = new ManagementObjectSearcher(wmiQuery); Managemen... | Try this: string wmiQuery = string.Format("SELECT CommandLine FROM Win32_Process WHERE Name LIKE '{0}%{1}'", param1, param2); Adding some test info: string wmiQuery = string.Format ( "SELECT Name, ProcessID FROM Win32_Process WHERE Name LIKE '{0}%{1}'", "wpf", ".exe" );
Console.WriteLine ( "Query: {0}", wmiQuery );
M... | How to construct WMI query I'd like to find results that Name starts with param1, and ends with param2 but my code doesn't work string wmiQuery = string.Format("SELECT CommandLine FROM Win32_Process WHERE Name LIKE '{0}%' AND Name LIKE '%{1}'", param1, param2); ManagementObjectSearcher searcher = new ManagementObjectSe... | TITLE:
How to construct WMI query
QUESTION:
I'd like to find results that Name starts with param1, and ends with param2 but my code doesn't work string wmiQuery = string.Format("SELECT CommandLine FROM Win32_Process WHERE Name LIKE '{0}%' AND Name LIKE '%{1}'", param1, param2); ManagementObjectSearcher searcher = new ... | [
"c#",
".net-4.0",
"wmi",
"wmi-query",
"string.format"
] | 12 | 17 | 35,830 | 2 | 0 | 2011-06-07T11:23:21.877000 | 2011-06-07T11:30:59.557000 |
6,264,457 | 6,264,546 | Dropdown CSS menu contracting | I have implemented a dropdown menu into a website, here: http://www.gardensandhomesdirect.co.uk/ However, The dropdowns themselves seem to contract prematurely. Its sometimes difficult to keep the dropdown open when moving from the initial button onto an option in the dropdown. Is this a problem with the code or someth... | Your dropdown divs.dropdown_Xcolumns have a top margin of 4px, When the mouse is on these 4px it's breaking the hover (unless it's done really fast!).. remove the top margin and all should be well. If you want the effect of a gap between the and the dropdown div - try a top white border on that div or alternatively, le... | Dropdown CSS menu contracting I have implemented a dropdown menu into a website, here: http://www.gardensandhomesdirect.co.uk/ However, The dropdowns themselves seem to contract prematurely. Its sometimes difficult to keep the dropdown open when moving from the initial button onto an option in the dropdown. Is this a p... | TITLE:
Dropdown CSS menu contracting
QUESTION:
I have implemented a dropdown menu into a website, here: http://www.gardensandhomesdirect.co.uk/ However, The dropdowns themselves seem to contract prematurely. Its sometimes difficult to keep the dropdown open when moving from the initial button onto an option in the dro... | [
"css",
"navigation",
"drop-down-menu"
] | 2 | 3 | 203 | 3 | 0 | 2011-06-07T11:23:42 | 2011-06-07T11:32:07.953000 |
6,264,458 | 6,265,140 | Can jQuery work with partial elements? (ranges) | Is it possible for jQuery to work with partial elements (aka ranges)? Probably not, but does anyone know any plugins? - or would anyone like to collaborate with me on making such a plugin? Essentially, this is the functionality I'm after: var $el = $(' a b c d ');
$el.range(2,3).wrap(' '); console.log($el.html()); // ... | Here there is an attempt of doing the plugin. The only problem is that after the first call to.range some HTML is added, so for the next call chars from 4 to 5 won't be the same. Still looking for some way to resolve that issue. Update I've changed the plugin A LOT. Now it is not very pretty but it works. Watch it work... | Can jQuery work with partial elements? (ranges) Is it possible for jQuery to work with partial elements (aka ranges)? Probably not, but does anyone know any plugins? - or would anyone like to collaborate with me on making such a plugin? Essentially, this is the functionality I'm after: var $el = $(' a b c d ');
$el.ra... | TITLE:
Can jQuery work with partial elements? (ranges)
QUESTION:
Is it possible for jQuery to work with partial elements (aka ranges)? Probably not, but does anyone know any plugins? - or would anyone like to collaborate with me on making such a plugin? Essentially, this is the functionality I'm after: var $el = $(' a... | [
"jquery",
"dom",
"textrange"
] | 2 | 3 | 368 | 1 | 0 | 2011-06-07T11:23:47.173000 | 2011-06-07T12:27:55.100000 |
6,264,459 | 6,264,663 | Send email asynchronously from an WCF 4 REST service | I have a WCF 4 REST service which does some processing and then returns back immediately. Now there is a need to send an email asynchronously every time this service is called. Is there some way I can achieve this without needing to queue the email in a DB and then use a Windows service to send out the email? | I never used it, but SmtpClient.SendAsync seems to be the right tool for the job. From MSDN, emphasis mine: Sends the specified e-mail message to an SMTP server for delivery. This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes.... | Send email asynchronously from an WCF 4 REST service I have a WCF 4 REST service which does some processing and then returns back immediately. Now there is a need to send an email asynchronously every time this service is called. Is there some way I can achieve this without needing to queue the email in a DB and then u... | TITLE:
Send email asynchronously from an WCF 4 REST service
QUESTION:
I have a WCF 4 REST service which does some processing and then returns back immediately. Now there is a need to send an email asynchronously every time this service is called. Is there some way I can achieve this without needing to queue the email ... | [
"c#",
".net",
"email"
] | 1 | 2 | 1,390 | 1 | 0 | 2011-06-07T11:23:47.163000 | 2011-06-07T11:42:52.827000 |
6,264,460 | 6,275,539 | Redraw TdCalendarView | In my alarm based application on iPhone,I am using TdCalenderView code by tinyfool.On that calendar I am calling setDayFlag:day in drawDateWords method for the day on which alarm is set.Tapping the date opens the list of alarms for the corresponding date. Now,I am also using Tab bar in the same application.On clicking ... | Ok.This may sound like a hack but it eventually worked. I called [TdCalenderView moveNextMonth] before showing calendar view and [TdCalenderView movePrevMonth] after showing the calendar view with a flag to manage cancelling the animation when the method is invoked by Tab bar.It refreshed my calendar and issue is resol... | Redraw TdCalendarView In my alarm based application on iPhone,I am using TdCalenderView code by tinyfool.On that calendar I am calling setDayFlag:day in drawDateWords method for the day on which alarm is set.Tapping the date opens the list of alarms for the corresponding date. Now,I am also using Tab bar in the same ap... | TITLE:
Redraw TdCalendarView
QUESTION:
In my alarm based application on iPhone,I am using TdCalenderView code by tinyfool.On that calendar I am calling setDayFlag:day in drawDateWords method for the day on which alarm is set.Tapping the date opens the list of alarms for the corresponding date. Now,I am also using Tab ... | [
"iphone",
"ios4",
"calendar",
"uitabbar",
"tabbar"
] | 0 | 0 | 218 | 1 | 0 | 2011-06-07T11:23:49.263000 | 2011-06-08T07:32:06.347000 |
6,264,461 | 6,298,628 | Populating Team Build summary with errors / warning from an ant build | I am using TFS 2008 and team build to compile some Java code using ant and the Microsoft Team Foundation Server 2010 Build Extensions. My experience is with the Microsoft stack and ant is a bit of an unknown for me, we have a contractor who knows all about the Java / ant world but he's never used TFS before. I've creat... | The Build Extensions power tool should be parsing out errors and warnings and putting them into your build log already I think. Can you drop me a line (martinwo@microsoft.com) with your ant log output and I'll try and take a look? I'll edit this answer again once we've figured it out. | Populating Team Build summary with errors / warning from an ant build I am using TFS 2008 and team build to compile some Java code using ant and the Microsoft Team Foundation Server 2010 Build Extensions. My experience is with the Microsoft stack and ant is a bit of an unknown for me, we have a contractor who knows all... | TITLE:
Populating Team Build summary with errors / warning from an ant build
QUESTION:
I am using TFS 2008 and team build to compile some Java code using ant and the Microsoft Team Foundation Server 2010 Build Extensions. My experience is with the Microsoft stack and ant is a bit of an unknown for me, we have a contra... | [
"java",
"ant",
"tfs",
"tfsbuild"
] | 0 | 0 | 289 | 1 | 0 | 2011-06-07T11:23:55.283000 | 2011-06-09T20:08:44.103000 |
6,264,465 | 6,264,923 | fop in glassfish fail to render external resources | I am generating a PDF file via fop 1.0 out of a java library. The unit tests are running fine and the PDF is rendered as expected, including an external graphic: If I render this within a Java EE application in glassfish 3.1, I always get the following error: Image not found. URI: images/image.png. (No context info ava... | You consider a different class loader then ClassLoader.getSystemResourceAsStream(href); Try InputStream inputStream = getClass().getResourceAsStream(href); or something else, maybe. Does it work, then? | fop in glassfish fail to render external resources I am generating a PDF file via fop 1.0 out of a java library. The unit tests are running fine and the PDF is rendered as expected, including an external graphic: If I render this within a Java EE application in glassfish 3.1, I always get the following error: Image not... | TITLE:
fop in glassfish fail to render external resources
QUESTION:
I am generating a PDF file via fop 1.0 out of a java library. The unit tests are running fine and the PDF is rendered as expected, including an external graphic: If I render this within a Java EE application in glassfish 3.1, I always get the followin... | [
"glassfish",
"apache-fop"
] | 2 | 3 | 635 | 1 | 0 | 2011-06-07T11:24:02.223000 | 2011-06-07T12:09:10.800000 |
6,264,473 | 6,264,693 | text file question | I have text file that with the following structure: test\n 1\n 2\n @/@/@/\n test2 \n 223\n 44\n @/@/@/\n I can read it in array successfuly, but the line @/@/@/ is separator. I want to divide the NSArray to sub arrays at the separator. Any suggestion how to solve that? I also need to modify certain section. Best regard... | If you read it in as a NSString then NSArray *chunks = [string componentsSeparatedByString: @"@/@/@/"]; | text file question I have text file that with the following structure: test\n 1\n 2\n @/@/@/\n test2 \n 223\n 44\n @/@/@/\n I can read it in array successfuly, but the line @/@/@/ is separator. I want to divide the NSArray to sub arrays at the separator. Any suggestion how to solve that? I also need to modify certain s... | TITLE:
text file question
QUESTION:
I have text file that with the following structure: test\n 1\n 2\n @/@/@/\n test2 \n 223\n 44\n @/@/@/\n I can read it in array successfuly, but the line @/@/@/ is separator. I want to divide the NSArray to sub arrays at the separator. Any suggestion how to solve that? I also need t... | [
"iphone",
"objective-c",
"ipad"
] | 3 | 3 | 67 | 2 | 0 | 2011-06-07T11:24:36.203000 | 2011-06-07T11:46:06.897000 |
6,264,477 | 6,289,223 | projection of type average(datediff) always returns 0.0 | This is very puzzling; the generated SQL is perfectly good, and I get correct results when running it manually. However, somewhere in the transformation process the 'AverageTime' field is set to 0.0 instead of the correct result. my query: var query = Session.CreateCriteria ().Add(Expression.In("Department", department... | OK I'm totaly stupid. Forgot to add an Alias() to the Avg projection... duhh | projection of type average(datediff) always returns 0.0 This is very puzzling; the generated SQL is perfectly good, and I get correct results when running it manually. However, somewhere in the transformation process the 'AverageTime' field is set to 0.0 instead of the correct result. my query: var query = Session.Crea... | TITLE:
projection of type average(datediff) always returns 0.0
QUESTION:
This is very puzzling; the generated SQL is perfectly good, and I get correct results when running it manually. However, somewhere in the transformation process the 'AverageTime' field is set to 0.0 instead of the correct result. my query: var qu... | [
"nhibernate",
"nhibernate-projections"
] | 0 | 1 | 1,211 | 1 | 0 | 2011-06-07T11:25:09.060000 | 2011-06-09T07:04:03.753000 |
6,264,495 | 6,264,628 | Dynamic parameter passing through hyperlink in a DataGrid in asp.net(C#) | conn.Open(); SqlDataReader rdr = comm.ExecuteReader(); if (NAME.Equals("admin")) { GridView1.DataSource = rdr; GridView1.DataBind(); } else { GridView2.DataSource = rdr; GridView2.DataBind(); } rdr.Close(); I want to use the hyperlink in the Gridview to pass the values dynamically according to to the row it is clicked.... | add onRowCommand Event in your grid OnRowCommand="OnRowCommand_GridView1" Then define link Button with the CommandName and CommandArgument and than on code behind protected void GridView1_OnRowCommand(object sender, GridViewCommandEventArgs e) {
if (e.CommandName == "Select") { int MyFileID = e.CommandArgument; //Now ... | Dynamic parameter passing through hyperlink in a DataGrid in asp.net(C#) conn.Open(); SqlDataReader rdr = comm.ExecuteReader(); if (NAME.Equals("admin")) { GridView1.DataSource = rdr; GridView1.DataBind(); } else { GridView2.DataSource = rdr; GridView2.DataBind(); } rdr.Close(); I want to use the hyperlink in the Gridv... | TITLE:
Dynamic parameter passing through hyperlink in a DataGrid in asp.net(C#)
QUESTION:
conn.Open(); SqlDataReader rdr = comm.ExecuteReader(); if (NAME.Equals("admin")) { GridView1.DataSource = rdr; GridView1.DataBind(); } else { GridView2.DataSource = rdr; GridView2.DataBind(); } rdr.Close(); I want to use the hype... | [
"c#",
"asp.net",
"gridview",
"hyperlink",
"parameter-passing"
] | 3 | 1 | 5,107 | 3 | 0 | 2011-06-07T11:27:14.487000 | 2011-06-07T11:40:15.853000 |
6,264,512 | 6,264,890 | I want to convert rows 2 rows as 2 columns in sql 2000 without using pivot | I want to convert rows 2 rows as 2 columns in sql 2000 without using pivot eg: A B C ---- ---- ------- 78 68 3 I want the output as Projects Count --------- ------- A 78 B 68 C 3 | If I understand you correctly, you indeed want a pivot query: select 'A' as Projects, A as my_count from mytab union all select 'B' as Projects, B as my_count from mytab union all select 'C' as Projects, C as my_count from mytab (I've replaced count with my_count, since COUNT is a reserved word in SQL). | I want to convert rows 2 rows as 2 columns in sql 2000 without using pivot I want to convert rows 2 rows as 2 columns in sql 2000 without using pivot eg: A B C ---- ---- ------- 78 68 3 I want the output as Projects Count --------- ------- A 78 B 68 C 3 | TITLE:
I want to convert rows 2 rows as 2 columns in sql 2000 without using pivot
QUESTION:
I want to convert rows 2 rows as 2 columns in sql 2000 without using pivot eg: A B C ---- ---- ------- 78 68 3 I want the output as Projects Count --------- ------- A 78 B 68 C 3
ANSWER:
If I understand you correctly, you inde... | [
"sql",
"sql-server-2000"
] | 2 | 0 | 230 | 2 | 0 | 2011-06-07T11:28:58.353000 | 2011-06-07T12:05:29.657000 |
6,264,513 | 6,264,740 | Centering content vertically (and horizontally) in a div | First the example: http://jsfiddle.net/5S3mk/3/ I have a table whose columns need to be sortable so in the table header there should be links for sorting. The columns themselves are dynamic and their width is not known in advance. In order to center the header content horizontally I used the recipe from here. Now I'm h... | Here you have one way of doing it. It uses a little jQuery script, but it is really simple. | Centering content vertically (and horizontally) in a div First the example: http://jsfiddle.net/5S3mk/3/ I have a table whose columns need to be sortable so in the table header there should be links for sorting. The columns themselves are dynamic and their width is not known in advance. In order to center the header co... | TITLE:
Centering content vertically (and horizontally) in a div
QUESTION:
First the example: http://jsfiddle.net/5S3mk/3/ I have a table whose columns need to be sortable so in the table header there should be links for sorting. The columns themselves are dynamic and their width is not known in advance. In order to ce... | [
"css",
"vertical-alignment"
] | 0 | 0 | 149 | 1 | 0 | 2011-06-07T11:28:59.010000 | 2011-06-07T11:49:47.630000 |
6,264,522 | 6,264,568 | C# Generics: there is no way to constrain a type to have a static method? | Could somebody kindly explain this to me, in simple words: there is no way to constrain a type to have a static method. You cannot, for example, specify static methods on an interface. many thanks in advance to you lovely people:) | With generics, you can add a constraint that means the generic-type supplied must meet a few conditions, for example: where T: new() - T must have a public parameterless constructor (or be a struct ) where T: class - T must be a reference-type ( class / interface / delegate ) where T: struct - T must be a value-type (o... | C# Generics: there is no way to constrain a type to have a static method? Could somebody kindly explain this to me, in simple words: there is no way to constrain a type to have a static method. You cannot, for example, specify static methods on an interface. many thanks in advance to you lovely people:) | TITLE:
C# Generics: there is no way to constrain a type to have a static method?
QUESTION:
Could somebody kindly explain this to me, in simple words: there is no way to constrain a type to have a static method. You cannot, for example, specify static methods on an interface. many thanks in advance to you lovely people... | [
"c#",
"generics"
] | 5 | 8 | 174 | 4 | 0 | 2011-06-07T11:30:00.277000 | 2011-06-07T11:34:19.587000 |
6,264,530 | 6,265,188 | Practical limitations of expression indexes in PostgreSQL | I have a need to store data using the HSTORE type and index by key. CREATE INDEX ix_product_size ON product(((data->'Size')::INT)) CREATE INDEX ix_product_color ON product(((data->'Color'))) etc. What are the practical limitations of using expression indexes? In my case, there could be several hundred different types o... | I've never played with hstore, but I do something similar when I need an EAV column, e.g.: create index on product_eav (eav_value) where (eav_type = 'int'); The limitation in doing so is that you need to be explicit in your query to make use of it, i.e. this query would not make use of the above index: select product_i... | Practical limitations of expression indexes in PostgreSQL I have a need to store data using the HSTORE type and index by key. CREATE INDEX ix_product_size ON product(((data->'Size')::INT)) CREATE INDEX ix_product_color ON product(((data->'Color'))) etc. What are the practical limitations of using expression indexes? In... | TITLE:
Practical limitations of expression indexes in PostgreSQL
QUESTION:
I have a need to store data using the HSTORE type and index by key. CREATE INDEX ix_product_size ON product(((data->'Size')::INT)) CREATE INDEX ix_product_color ON product(((data->'Color'))) etc. What are the practical limitations of using expr... | [
"sql",
"database-design",
"postgresql",
"expression",
"indexing"
] | 5 | 4 | 2,112 | 1 | 0 | 2011-06-07T11:31:02.240000 | 2011-06-07T12:32:53.727000 |
6,264,538 | 6,265,456 | How to update avatar/photo of a model directly? | This is rails 3.0.x. I was just wondering how to update an attribute of a model's photo/avatar directly without prompting the user to upload from his/her system? I am using Paperclip to attach a photo to a model; It has the extension so that a user can use a URL to upload a photo. This works. Now, I was looking at Canv... | From your link to Canvas2Image above it looks to me like you are trying to handle Base64-encoded images (like data:image/octet-stream;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wB ). Paperclip expects a Tempfile object, which is created behind the scenes for you when you upload an image. It is possible to fake a Tempfile by u... | How to update avatar/photo of a model directly? This is rails 3.0.x. I was just wondering how to update an attribute of a model's photo/avatar directly without prompting the user to upload from his/her system? I am using Paperclip to attach a photo to a model; It has the extension so that a user can use a URL to upload... | TITLE:
How to update avatar/photo of a model directly?
QUESTION:
This is rails 3.0.x. I was just wondering how to update an attribute of a model's photo/avatar directly without prompting the user to upload from his/her system? I am using Paperclip to attach a photo to a model; It has the extension so that a user can u... | [
"ruby-on-rails",
"ruby-on-rails-3",
"paperclip",
"ruby-on-rails-plugins"
] | 1 | 1 | 1,420 | 3 | 0 | 2011-06-07T11:31:26.980000 | 2011-06-07T12:53:38.847000 |
6,264,544 | 6,265,699 | How to create an horiztonal list in sencha touch | I have a several images that I want to put in an horizontal list. Do you know, how I can do that? Which component must I use? Thanks for answers | Use a 'container' with a layout of type 'column'. If you could make the question a little more specific maybe I could make my answer a bit more specific. | How to create an horiztonal list in sencha touch I have a several images that I want to put in an horizontal list. Do you know, how I can do that? Which component must I use? Thanks for answers | TITLE:
How to create an horiztonal list in sencha touch
QUESTION:
I have a several images that I want to put in an horizontal list. Do you know, how I can do that? Which component must I use? Thanks for answers
ANSWER:
Use a 'container' with a layout of type 'column'. If you could make the question a little more spec... | [
"sencha-touch",
"extjs"
] | 3 | 0 | 1,981 | 2 | 0 | 2011-06-07T11:31:59.103000 | 2011-06-07T13:11:51.500000 |
6,264,545 | 6,264,859 | Setting up Selenium for recording as well as running in different browsers and platforms | I'd like to setup a Selenium server so that clients can record tests locally, recorded tests can be replayed and tested on an Ubuntu server with Firefox + Chrome. Unfortunately the Selenium site is so confusing and mentions so many different projects (Selenium 1, Selenium 2, Selenium RC, Selenium Grid) that I'm not sur... | Unfortunately the Selenium site is so confusing and mentions so many different projects (Selenium 1, Selenium 2, Selenium RC, Selenium Grid) that I'm not sure where to start. Selenium has multiple versions IDE - mainly to record the test and play it back. It is mainly a Firefox Addon. This can be used for very basic te... | Setting up Selenium for recording as well as running in different browsers and platforms I'd like to setup a Selenium server so that clients can record tests locally, recorded tests can be replayed and tested on an Ubuntu server with Firefox + Chrome. Unfortunately the Selenium site is so confusing and mentions so many... | TITLE:
Setting up Selenium for recording as well as running in different browsers and platforms
QUESTION:
I'd like to setup a Selenium server so that clients can record tests locally, recorded tests can be replayed and tested on an Ubuntu server with Firefox + Chrome. Unfortunately the Selenium site is so confusing an... | [
"testing",
"ubuntu",
"selenium-rc",
"selenium-ide",
"recording"
] | 18 | 23 | 23,291 | 3 | 0 | 2011-06-07T11:32:00.960000 | 2011-06-07T12:02:33.723000 |
6,264,554 | 6,264,579 | How to check empty DataTable | I have a DataSet where I need to find out how many rows has been changed using the following code: dataTable1 = dataSet1.Tables["FooTable"].GetChanges();
foreach (DataRow dr in dataTable1) { //... } DataSet has DataSet.HasRow but DataTable doesn't have such method. If there is no changed rows. changedDT1 will be a nul... | If dataTable1 is null, it is not an empty datatable. Simply wrap your foreach in an if-statement that checks if dataTable1 is null. Make sure that your foreach counts over DataTable1.Rows or you will get a compilation error. if (dataTable1!= null) { foreach (DataRow dr in dataTable1.Rows) { //... } } | How to check empty DataTable I have a DataSet where I need to find out how many rows has been changed using the following code: dataTable1 = dataSet1.Tables["FooTable"].GetChanges();
foreach (DataRow dr in dataTable1) { //... } DataSet has DataSet.HasRow but DataTable doesn't have such method. If there is no changed r... | TITLE:
How to check empty DataTable
QUESTION:
I have a DataSet where I need to find out how many rows has been changed using the following code: dataTable1 = dataSet1.Tables["FooTable"].GetChanges();
foreach (DataRow dr in dataTable1) { //... } DataSet has DataSet.HasRow but DataTable doesn't have such method. If the... | [
"c#",
"ado.net"
] | 53 | 50 | 277,236 | 9 | 0 | 2011-06-07T11:32:41.063000 | 2011-06-07T11:35:37.777000 |
6,264,563 | 6,265,321 | Providing a Read Only List of Classes in C# | I have a set of custom data types that can be used to manipulate basic blocks of data. For example: MyTypeA Foo = new MyTypeA(); Foo.ParseString(InputString); if (Foo.Value > 4) return; Some of these types define read-only properties that describe aspects of the types (for example a name, bit size, etc.). In my custom ... | To get around the problems you've mentioned, you could create a wrapper around your instances, and have the wrapper provide the functionality you require. For example: public class TypeDescriptor { private MyDataType _dataType;
public TypeDescriptor(MyDataType dataType) { _dataType = dataType; }
public override strin... | Providing a Read Only List of Classes in C# I have a set of custom data types that can be used to manipulate basic blocks of data. For example: MyTypeA Foo = new MyTypeA(); Foo.ParseString(InputString); if (Foo.Value > 4) return; Some of these types define read-only properties that describe aspects of the types (for ex... | TITLE:
Providing a Read Only List of Classes in C#
QUESTION:
I have a set of custom data types that can be used to manipulate basic blocks of data. For example: MyTypeA Foo = new MyTypeA(); Foo.ParseString(InputString); if (Foo.Value > 4) return; Some of these types define read-only properties that describe aspects of... | [
"c#",
"design-patterns"
] | 2 | 2 | 400 | 6 | 0 | 2011-06-07T11:33:44.640000 | 2011-06-07T12:43:33.093000 |
6,264,567 | 6,264,758 | Saving simple user preferences on Windows Forms with C# | I'm writing my first Windows Forms application using VS 2010 and C#. It does not use a database but I would like to save user settings like directory path and what check boxes are checked. What is the easiest way to save these preferences? | I suggest you to use the builtin application Settings to do it. Here is an article talking about it. Sample usage: MyProject.Properties.Settings.Default.MyProperty = "Something"; | Saving simple user preferences on Windows Forms with C# I'm writing my first Windows Forms application using VS 2010 and C#. It does not use a database but I would like to save user settings like directory path and what check boxes are checked. What is the easiest way to save these preferences? | TITLE:
Saving simple user preferences on Windows Forms with C#
QUESTION:
I'm writing my first Windows Forms application using VS 2010 and C#. It does not use a database but I would like to save user settings like directory path and what check boxes are checked. What is the easiest way to save these preferences?
ANSWE... | [
"c#",
"winforms",
"settings"
] | 7 | 9 | 10,944 | 5 | 0 | 2011-06-07T11:34:18.773000 | 2011-06-07T11:52:03.437000 |
6,264,571 | 6,264,644 | Calculate Distance in Km and Miles | I have two points whose latitude and longitude i know. How can i calculate the distance(in Km and Miles) between them. What is the formulae? | You can use the haversine formula to calculate such distances. | Calculate Distance in Km and Miles I have two points whose latitude and longitude i know. How can i calculate the distance(in Km and Miles) between them. What is the formulae? | TITLE:
Calculate Distance in Km and Miles
QUESTION:
I have two points whose latitude and longitude i know. How can i calculate the distance(in Km and Miles) between them. What is the formulae?
ANSWER:
You can use the haversine formula to calculate such distances. | [
"distance",
"latitude-longitude"
] | 4 | 3 | 6,583 | 4 | 0 | 2011-06-07T11:34:43.783000 | 2011-06-07T11:41:26.090000 |
6,264,576 | 6,264,613 | Number of decimal digits in a double | How do I determine number of integer digits and the number of digits after decimal in a number like 234.12413 in Java. | A double is not always an exact representation. You can only say how many decimal places you would have if you converted it to a String. double d= 234.12413; String text = Double.toString(Math.abs(d)); int integerPlaces = text.indexOf('.'); int decimalPlaces = text.length() - integerPlaces - 1; This will only work for ... | Number of decimal digits in a double How do I determine number of integer digits and the number of digits after decimal in a number like 234.12413 in Java. | TITLE:
Number of decimal digits in a double
QUESTION:
How do I determine number of integer digits and the number of digits after decimal in a number like 234.12413 in Java.
ANSWER:
A double is not always an exact representation. You can only say how many decimal places you would have if you converted it to a String. ... | [
"java",
"double"
] | 42 | 57 | 124,534 | 4 | 0 | 2011-06-07T11:35:23.747000 | 2011-06-07T11:39:19.507000 |
6,264,596 | 6,264,618 | Simulating ENTER keypress in bash script | I've created a really simple bash script that runs a few commands. one of these commands needs user input during runtime. i.e it asks the user "do you want to blah blah blah?", I want to simply send an enter keypress to this so that the script will be completely automated. I won't have to wait for the input or anything... | echo -ne '\n' | or taking advantage of the implicit newline that echo generates (thanks Marcin) echo | | Simulating ENTER keypress in bash script I've created a really simple bash script that runs a few commands. one of these commands needs user input during runtime. i.e it asks the user "do you want to blah blah blah?", I want to simply send an enter keypress to this so that the script will be completely automated. I won... | TITLE:
Simulating ENTER keypress in bash script
QUESTION:
I've created a really simple bash script that runs a few commands. one of these commands needs user input during runtime. i.e it asks the user "do you want to blah blah blah?", I want to simply send an enter keypress to this so that the script will be completel... | [
"bash",
"shell",
"ubuntu"
] | 149 | 180 | 331,436 | 7 | 0 | 2011-06-07T11:37:22.550000 | 2011-06-07T11:39:37.093000 |
6,264,598 | 6,264,651 | PHP decoding json | could anyone here help me with php an decoding json? Im trying to decode a json api url Here is what I have at the moment: $string = ' { "username": "someusername", "unconfirmed_reward": "0.08681793", "send_threshold": "0.01000000", "confirmed_reward": "0.02511418", "workers": { "bitcoinjol.jason-laptop": {"last_share"... | You can use the curly brackets syntax suggested by Gumbo: $json_o->workers->{"someusername.jason-laptop"} However, the best way (imo, for consistency) is to use the resulting object as an associative array: $object = json_decode($string, true);
$object['workers']['bitcoinjol.jason-laptop']['last_share']; // 1307389634 | PHP decoding json could anyone here help me with php an decoding json? Im trying to decode a json api url Here is what I have at the moment: $string = ' { "username": "someusername", "unconfirmed_reward": "0.08681793", "send_threshold": "0.01000000", "confirmed_reward": "0.02511418", "workers": { "bitcoinjol.jason-lapt... | TITLE:
PHP decoding json
QUESTION:
could anyone here help me with php an decoding json? Im trying to decode a json api url Here is what I have at the moment: $string = ' { "username": "someusername", "unconfirmed_reward": "0.08681793", "send_threshold": "0.01000000", "confirmed_reward": "0.02511418", "workers": { "bit... | [
"php",
"json",
"api",
"decode"
] | 1 | 5 | 2,887 | 5 | 0 | 2011-06-07T11:37:40.867000 | 2011-06-07T11:41:41.327000 |
6,264,606 | 6,264,624 | Where is the JavaScript regular expression object test method documented? | I've just come across this in javascript which seems to be testing for regular expressions: /hello/.test("hello") //Returns true However I cannot find the documentation for this, no matter what I search. Can anyone help me out? | .test Regular expressions objects also have a method called.exec. For future reference a search like "RegExp test mdc" will find you the documentation. Alternatively if you are brave you can search through the ES5 spec but that's a dry read. | Where is the JavaScript regular expression object test method documented? I've just come across this in javascript which seems to be testing for regular expressions: /hello/.test("hello") //Returns true However I cannot find the documentation for this, no matter what I search. Can anyone help me out? | TITLE:
Where is the JavaScript regular expression object test method documented?
QUESTION:
I've just come across this in javascript which seems to be testing for regular expressions: /hello/.test("hello") //Returns true However I cannot find the documentation for this, no matter what I search. Can anyone help me out?
... | [
"javascript",
"regex"
] | 1 | 7 | 101 | 1 | 0 | 2011-06-07T11:38:28.853000 | 2011-06-07T11:39:53.147000 |
6,264,607 | 6,264,936 | Warning in g++ 4.5.2 uint16_t with Wconversion | If I compile the following program with g++ and enable warnings for conversions (-Wconversion) #include int main() { uint16_t foo = 1; foo += 1; return 0; } I get a warning, warning: conversion to uint16_t from int may alter its value. Fine, if the 1 in foo+=1 is interpreted as int, but what about: foo+=static_cast (1)... | I got an explanation, it comes from C but this should be equally valid in C++: Specify a number literal as 8 bit? For arithmetic, all operands are promoted to int if they are smaller. This explains the problem, and why it doesn't trigger on initialization, or when casting explicitely, because the cast will be undone to... | Warning in g++ 4.5.2 uint16_t with Wconversion If I compile the following program with g++ and enable warnings for conversions (-Wconversion) #include int main() { uint16_t foo = 1; foo += 1; return 0; } I get a warning, warning: conversion to uint16_t from int may alter its value. Fine, if the 1 in foo+=1 is interpret... | TITLE:
Warning in g++ 4.5.2 uint16_t with Wconversion
QUESTION:
If I compile the following program with g++ and enable warnings for conversions (-Wconversion) #include int main() { uint16_t foo = 1; foo += 1; return 0; } I get a warning, warning: conversion to uint16_t from int may alter its value. Fine, if the 1 in f... | [
"g++"
] | 2 | 2 | 678 | 1 | 0 | 2011-06-07T11:38:32.173000 | 2011-06-07T12:10:10.567000 |
6,264,629 | 6,265,447 | Is there any other way to access a class, except by Id? | How else could i access this class, i need my dynamic ID for something else... Normally if this was // var something = Ext.create(... i would do something.getForm().load...)??? Ext.define('app.winKontakt',{ extend:'Ext.form.Panel', closable:true, id:"myId", <------------------------------------------ID waitMsgTarget: t... | I just started with ExtJS, so there may be a better practices. You can assign an itemId to the component and use ComponentQuery to get it. Ext.define('app.view.contact.Form', { extend: 'Ext.form.Panel', itemId: 'myId',
buttons: [{ text: 'Load', handler: function(){ Ext.ComponentQuery.query('#myId').getForm().load({...... | Is there any other way to access a class, except by Id? How else could i access this class, i need my dynamic ID for something else... Normally if this was // var something = Ext.create(... i would do something.getForm().load...)??? Ext.define('app.winKontakt',{ extend:'Ext.form.Panel', closable:true, id:"myId", <-----... | TITLE:
Is there any other way to access a class, except by Id?
QUESTION:
How else could i access this class, i need my dynamic ID for something else... Normally if this was // var something = Ext.create(... i would do something.getForm().load...)??? Ext.define('app.winKontakt',{ extend:'Ext.form.Panel', closable:true,... | [
"class",
"forms",
"extjs",
"load",
"extjs4"
] | 1 | 1 | 198 | 1 | 0 | 2011-06-07T11:40:18.570000 | 2011-06-07T12:52:58.287000 |
6,264,657 | 6,264,687 | Why make private inner class member public in Java? | What is the reason of declaring a member of a private inner class public in Java if it still can't be accessed outside of containing class? Or can it? public class DataStructure { //...
private class InnerEvenIterator { //...
public boolean hasNext() { // Why public? //... } } } | If the InnerEvenIterator class does not extend any class or implement any interface, I think it is nonsense because no other class can access any instance of it. However, if it extends or implements any other non private class or interface, it makes sense. An example: interface EvenIterator { public boolean hasNext(); ... | Why make private inner class member public in Java? What is the reason of declaring a member of a private inner class public in Java if it still can't be accessed outside of containing class? Or can it? public class DataStructure { //...
private class InnerEvenIterator { //...
public boolean hasNext() { // Why public... | TITLE:
Why make private inner class member public in Java?
QUESTION:
What is the reason of declaring a member of a private inner class public in Java if it still can't be accessed outside of containing class? Or can it? public class DataStructure { //...
private class InnerEvenIterator { //...
public boolean hasNext... | [
"java",
"private-members",
"access-specifier",
"public-members"
] | 37 | 37 | 34,684 | 7 | 0 | 2011-06-07T11:42:18.807000 | 2011-06-07T11:45:26.537000 |
6,264,661 | 6,264,967 | Data propagation time (single link) | this is not Home work! I preparing my self to test in Networking: i had this questen in the midterm test and i got half the points i cant figure it out in this question i got reciver-sender connection. link data rate is R(b/s) Packet size is S(b) Window Size is W(pkts) Link distance is D(m) medium propagation speed is ... | It depends on how propagation time is supposed to be measured 1, but the general formula is: Propagation time = (Frame Serialization Time) + (Link Media Delay) Link Media Delay = D/p Frame Serialization Time = S/R I don't see the relevance of TCP's sliding window in this question yet; sometimes professors include extra... | Data propagation time (single link) this is not Home work! I preparing my self to test in Networking: i had this questen in the midterm test and i got half the points i cant figure it out in this question i got reciver-sender connection. link data rate is R(b/s) Packet size is S(b) Window Size is W(pkts) Link distance ... | TITLE:
Data propagation time (single link)
QUESTION:
this is not Home work! I preparing my self to test in Networking: i had this questen in the midterm test and i got half the points i cant figure it out in this question i got reciver-sender connection. link data rate is R(b/s) Packet size is S(b) Window Size is W(pk... | [
"networking",
"tcp"
] | 1 | 1 | 1,301 | 1 | 0 | 2011-06-07T11:42:37.640000 | 2011-06-07T12:13:42.907000 |
6,264,688 | 6,264,833 | set anchor tag in a provided string | I want to set a anchor tag in a provided string. It search in javascript after http:// and make it to an anchor tag. function createLink(text, node){//text is the provided string var start = text.indexOf('http://'); var end = text.indexOf(' ', start) + 1 || text.length - 1; //provides me with the wrong index var link =... | I think you were off by 1: function createLink(text, node){ //text is the provided string var start = text.indexOf('http://'); var end = (text.indexOf(' ', start) + 1 || text.length - 1) - 1; var link = text.substring(start, end);
var $a = $(" ", { href: link, "class": "link", target: "_blank", html: link.substr(0, 20... | set anchor tag in a provided string I want to set a anchor tag in a provided string. It search in javascript after http:// and make it to an anchor tag. function createLink(text, node){//text is the provided string var start = text.indexOf('http://'); var end = text.indexOf(' ', start) + 1 || text.length - 1; //provide... | TITLE:
set anchor tag in a provided string
QUESTION:
I want to set a anchor tag in a provided string. It search in javascript after http:// and make it to an anchor tag. function createLink(text, node){//text is the provided string var start = text.indexOf('http://'); var end = text.indexOf(' ', start) + 1 || text.len... | [
"javascript",
"jquery",
"anchor"
] | 1 | 0 | 814 | 1 | 0 | 2011-06-07T11:45:31.287000 | 2011-06-07T11:58:43.417000 |
6,264,689 | 6,264,720 | Regular expression starting with http and ending with pdf? | I have loaded the entire HTML of a page and want to retrieve all the URL's which start with http and end with pdf. I wrote the following which didn't work: $html = file_get_contents( "http://www.example.com" ); preg_match( '/^http(pdf)$/', $html, $matches ); I'm pretty new to regex but from what I've learned ^ marks th... | You need to match the characters in the middle of the URL: /\bhttp[\w%+\/-]+?pdf\b/ \b matches a word boundary ^ and $ mark the beginning and end of the entire string. You don't want them here. [...] matches any character in the brackets \w matches any word character + matches one or more of the previous match? makes t... | Regular expression starting with http and ending with pdf? I have loaded the entire HTML of a page and want to retrieve all the URL's which start with http and end with pdf. I wrote the following which didn't work: $html = file_get_contents( "http://www.example.com" ); preg_match( '/^http(pdf)$/', $html, $matches ); I'... | TITLE:
Regular expression starting with http and ending with pdf?
QUESTION:
I have loaded the entire HTML of a page and want to retrieve all the URL's which start with http and end with pdf. I wrote the following which didn't work: $html = file_get_contents( "http://www.example.com" ); preg_match( '/^http(pdf)$/', $ht... | [
"php",
"regex",
"preg-match"
] | 8 | 8 | 11,497 | 5 | 0 | 2011-06-07T11:45:34.620000 | 2011-06-07T11:48:09.737000 |
6,264,690 | 6,264,792 | How to register a Service that will run all the time | I would like my android app service to run all the time. that is - 1. right after installation, 2. on boot 3. if its closed - it will be relaunched - how do i achieve all of the above code-wise? thanks! | I am not putting the code here however you can easily find it. Right after installation use the default activity to launch the service, in case you do not have any UI then create an activity without any UI (no setContentView) and in its onCreate start the service. You need to create a broadcastReceived that listens to ... | How to register a Service that will run all the time I would like my android app service to run all the time. that is - 1. right after installation, 2. on boot 3. if its closed - it will be relaunched - how do i achieve all of the above code-wise? thanks! | TITLE:
How to register a Service that will run all the time
QUESTION:
I would like my android app service to run all the time. that is - 1. right after installation, 2. on boot 3. if its closed - it will be relaunched - how do i achieve all of the above code-wise? thanks!
ANSWER:
I am not putting the code here howeve... | [
"android"
] | 3 | 5 | 5,876 | 2 | 0 | 2011-06-07T11:45:51.770000 | 2011-06-07T11:54:54.110000 |
6,264,694 | 6,264,763 | How to add message box with 'OK' button? | I want to display a message box with an OK button. I used the following code but it results in a compile error with argument: AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this); dlgAlert.setMessage("This is an alert with no consequence"); dlgAlert.setTitle("App Title"); dlgAlert.setPositiveButton("OK", null);... | I think there may be problem that you haven't added click listener for ok positive button. dlgAlert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { //dismiss the dialog } }); | How to add message box with 'OK' button? I want to display a message box with an OK button. I used the following code but it results in a compile error with argument: AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this); dlgAlert.setMessage("This is an alert with no consequence"); dlgAlert.setTitle("App Title")... | TITLE:
How to add message box with 'OK' button?
QUESTION:
I want to display a message box with an OK button. I used the following code but it results in a compile error with argument: AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this); dlgAlert.setMessage("This is an alert with no consequence"); dlgAlert.set... | [
"android",
"messagebox"
] | 84 | 74 | 226,189 | 4 | 0 | 2011-06-07T11:46:14.993000 | 2011-06-07T11:52:33.070000 |
6,264,700 | 6,264,986 | sql server global data version | I wonder what is the best way to implement global data version for database. I want for any modification that is done to the database to incerease the version in "global version table" by one. I need this so that when I talk to application users I know what version of data we are talking about. Should I store this info... | This version number can be stored in a configuration table or in a dedicated table (with one field). This parameter should not be automatically updated because you are the owner of the schema and you are responsible for knowing when you need to update it. Basically, you need to update this number every time you deploy ... | sql server global data version I wonder what is the best way to implement global data version for database. I want for any modification that is done to the database to incerease the version in "global version table" by one. I need this so that when I talk to application users I know what version of data we are talking ... | TITLE:
sql server global data version
QUESTION:
I wonder what is the best way to implement global data version for database. I want for any modification that is done to the database to incerease the version in "global version table" by one. I need this so that when I talk to application users I know what version of da... | [
"sql",
"database",
"database-design"
] | 0 | 2 | 227 | 4 | 0 | 2011-06-07T11:46:37.743000 | 2011-06-07T12:15:22.937000 |
6,264,708 | 6,264,788 | The type or namespace name 'Linq' does not exist in the namespace | Im trying to publish my site on an server and have been receiving this message: The type or namespace name 'Linq' does not exist in the namespace. Been trying to fix it now`for a while, no matter what i do, nohing is working. Ive been trying to add the following to my webconfig file: Any suggestions? | I assume the application works locally? Seems a bit obvious but are you sure that the server you are publishing to has.net 3.5 installed? | The type or namespace name 'Linq' does not exist in the namespace Im trying to publish my site on an server and have been receiving this message: The type or namespace name 'Linq' does not exist in the namespace. Been trying to fix it now`for a while, no matter what i do, nohing is working. Ive been trying to add the f... | TITLE:
The type or namespace name 'Linq' does not exist in the namespace
QUESTION:
Im trying to publish my site on an server and have been receiving this message: The type or namespace name 'Linq' does not exist in the namespace. Been trying to fix it now`for a while, no matter what i do, nohing is working. Ive been t... | [
"c#",
"namespaces",
"hyperlink"
] | 3 | 5 | 3,096 | 4 | 0 | 2011-06-07T11:47:09.783000 | 2011-06-07T11:54:13.243000 |
6,264,728 | 6,265,975 | Has anyone a great library for the missing MVC 3 html form field helpers? | I'm building an application using ASP.net MVC 3 and I'm wondering if anyone knows a great library to fill the gaps of the build-in html form field helpers? E.g. creating a Textbox is easy: @Html.EditorFor(model => model.TextboxTest) But for creating a Dropdown list I have to write: @Html.DropDownListFor(model => model.... | Take those solutions from the various locations if you want to use them and put them into your own library. And if you want to use NuGet to manage your libraries, you can create your own NuGet repository to hold that library. You can have your NuGet package dependent on the MVC libraries, so all you ever need to pull d... | Has anyone a great library for the missing MVC 3 html form field helpers? I'm building an application using ASP.net MVC 3 and I'm wondering if anyone knows a great library to fill the gaps of the build-in html form field helpers? E.g. creating a Textbox is easy: @Html.EditorFor(model => model.TextboxTest) But for creat... | TITLE:
Has anyone a great library for the missing MVC 3 html form field helpers?
QUESTION:
I'm building an application using ASP.net MVC 3 and I'm wondering if anyone knows a great library to fill the gaps of the build-in html form field helpers? E.g. creating a Textbox is easy: @Html.EditorFor(model => model.TextboxT... | [
"c#",
"asp.net-mvc-3",
"html-helper"
] | 6 | 2 | 421 | 2 | 0 | 2011-06-07T11:48:41.403000 | 2011-06-07T13:33:40.263000 |
6,264,741 | 6,264,798 | Best way to implement audio playback on iPad | Should I used AVPlayer or MovieController? I have tried using AVPlayer but I cannot reference it even though I added AVFoundation as a framework to my target. EDIT: I have added the AVFoundation.framework to my 'frameworks' folder. Then at the top of my header file I am trying to reference the correct framework so that... | AVPlayer is what you need. Did you import AVFoundation in your file? #import | Best way to implement audio playback on iPad Should I used AVPlayer or MovieController? I have tried using AVPlayer but I cannot reference it even though I added AVFoundation as a framework to my target. EDIT: I have added the AVFoundation.framework to my 'frameworks' folder. Then at the top of my header file I am tryi... | TITLE:
Best way to implement audio playback on iPad
QUESTION:
Should I used AVPlayer or MovieController? I have tried using AVPlayer but I cannot reference it even though I added AVFoundation as a framework to my target. EDIT: I have added the AVFoundation.framework to my 'frameworks' folder. Then at the top of my hea... | [
"iphone"
] | 0 | 0 | 59 | 1 | 0 | 2011-06-07T11:49:49.570000 | 2011-06-07T11:55:33.477000 |
6,264,759 | 6,264,894 | android tabwidget need help | i need to create tab in my application i've used the following working good... but i need it to display as tabs look into the iphone how it can possible it using android 1.6? thanks in advance.. i've tried this but my application crashes | I had customized android tab to look like iPhone UITabBar, found here: Android - iphone style tabhost: my answer Android - iphone style tabhost: another good effort OR you can implement your own tabs using RadioGroup but requires hell of work, to implement RadioGroup you can refer to this project. It uses Iphone like S... | android tabwidget need help i need to create tab in my application i've used the following working good... but i need it to display as tabs look into the iphone how it can possible it using android 1.6? thanks in advance.. i've tried this but my application crashes | TITLE:
android tabwidget need help
QUESTION:
i need to create tab in my application i've used the following working good... but i need it to display as tabs look into the iphone how it can possible it using android 1.6? thanks in advance.. i've tried this but my application crashes
ANSWER:
I had customized android ta... | [
"iphone",
"android",
"tabwidget"
] | 0 | 1 | 242 | 1 | 0 | 2011-06-07T11:52:08.223000 | 2011-06-07T12:05:47.700000 |
6,264,765 | 6,265,522 | Glimpse in Medium Trust | Is there any way to get Glimpse to work in Medium Trust? If I set in my web.config, I get a Security Exception: [SecurityException: Request failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessSecurityEngine.Check(PermissionSet... | Unfortunately currently Glimpse requires Full Trust, you could file an enhancement request with them, most features should be available in Medium Trust as well. | Glimpse in Medium Trust Is there any way to get Glimpse to work in Medium Trust? If I set in my web.config, I get a Security Exception: [SecurityException: Request failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessSecurityEn... | TITLE:
Glimpse in Medium Trust
QUESTION:
Is there any way to get Glimpse to work in Medium Trust? If I set in my web.config, I get a Security Exception: [SecurityException: Request failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.Co... | [
"asp.net",
"glimpse"
] | 3 | 4 | 376 | 1 | 0 | 2011-06-07T11:52:36.900000 | 2011-06-07T12:58:54.793000 |
6,264,775 | 6,264,861 | .jad file -> know the compiler version | I have got one.jad file that is a blackberry application and I need to know the compiler version was used. Have you got an ideas? | I have got one.jad file and i need to know the compiler version was used. Which compiler was used to compile the class files is usually not available in the jad file. Here's a typical example of the content of such file: MIDlet-1: HelloSuite, HelloSuite.png, HelloMIDlet MIDlet-Jar-Size: 1144 MIDlet-Jar-URL: HelloSuite.... | .jad file -> know the compiler version I have got one.jad file that is a blackberry application and I need to know the compiler version was used. Have you got an ideas? | TITLE:
.jad file -> know the compiler version
QUESTION:
I have got one.jad file that is a blackberry application and I need to know the compiler version was used. Have you got an ideas?
ANSWER:
I have got one.jad file and i need to know the compiler version was used. Which compiler was used to compile the class files... | [
"java",
"blackberry"
] | 0 | 1 | 353 | 2 | 0 | 2011-06-07T11:53:06.753000 | 2011-06-07T12:02:48.020000 |
6,264,787 | 6,264,914 | Linking my free app to the paid version | I have seen many posts asking how to link from a free android app to other paid version, and what I am doing is the following on the click method: Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setData(Uri.parse(Constantes.uriAplicacionFinal)); startActivity(i); However, when it executes I get the followin... | Seems that you are testing the application on an emulator as a result your market application is missing. Try to test the application on real handset, everything will be fine. | Linking my free app to the paid version I have seen many posts asking how to link from a free android app to other paid version, and what I am doing is the following on the click method: Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setData(Uri.parse(Constantes.uriAplicacionFinal)); startActivity(i); Howe... | TITLE:
Linking my free app to the paid version
QUESTION:
I have seen many posts asking how to link from a free android app to other paid version, and what I am doing is the following on the click method: Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setData(Uri.parse(Constantes.uriAplicacionFinal)); star... | [
"android",
"android-intent"
] | 0 | 1 | 340 | 1 | 0 | 2011-06-07T11:54:10.983000 | 2011-06-07T12:07:38.313000 |
6,264,789 | 6,264,841 | Bounded generic method not compiling - why? | The code below makes complete sense to me - its about adding an element of some type which is supertype of type T and type S is definitely such a super type, so why the compiler refuses to add 'element' into the collection? class GenericType { void add1(Collection col,S element ){ col.add(element); // error // The meth... | Collection does not mean "a collection that can contain T and any superclass of it" - it's actually not possible to formulate that restriction. What it means is "a collection that can only contain instances of some specific class which is a superclass of T " - basically it ensures that you can add a T to the collection... | Bounded generic method not compiling - why? The code below makes complete sense to me - its about adding an element of some type which is supertype of type T and type S is definitely such a super type, so why the compiler refuses to add 'element' into the collection? class GenericType { void add1(Collection col,S eleme... | TITLE:
Bounded generic method not compiling - why?
QUESTION:
The code below makes complete sense to me - its about adding an element of some type which is supertype of type T and type S is definitely such a super type, so why the compiler refuses to add 'element' into the collection? class GenericType { void add1(Coll... | [
"java",
"generics"
] | 3 | 2 | 168 | 4 | 0 | 2011-06-07T11:54:14.753000 | 2011-06-07T11:59:21.113000 |
6,264,794 | 6,264,998 | Create Dictionary item on the fly with operator[] | Normally when you create a Dictionary you have to first go and add k/v pairs by calling add on the dictionary itself. I have a Dictionary where mycontainer is a container of other objects. I need to be able to add things to the mycontainer quickly so I thought maybe I can overload the subscript operator[] to create a m... | You should make your own class that wraps a Dictionary >. The indexer would look like this: public List this[TKey key] { get { List retVal; if (!dict.TryGetValue(key, out retVal)) dict.Add(key, (retVal = new List (itemComparer))); return retVal; } } | Create Dictionary item on the fly with operator[] Normally when you create a Dictionary you have to first go and add k/v pairs by calling add on the dictionary itself. I have a Dictionary where mycontainer is a container of other objects. I need to be able to add things to the mycontainer quickly so I thought maybe I c... | TITLE:
Create Dictionary item on the fly with operator[]
QUESTION:
Normally when you create a Dictionary you have to first go and add k/v pairs by calling add on the dictionary itself. I have a Dictionary where mycontainer is a container of other objects. I need to be able to add things to the mycontainer quickly so I... | [
"c#",
"dictionary",
"operators"
] | 6 | 5 | 4,184 | 3 | 0 | 2011-06-07T11:54:57.060000 | 2011-06-07T12:16:14.387000 |
6,264,802 | 6,265,092 | MVVM C# Question | I am currently learning MVVM abd the tutorial I have been using, simply uses a single View Model with a single Model. The View Model is injected with the Model interface as such: public ViewModel(IQuoteSource quoteSource) {
} This is handled via DI using Unity. My question is what if the VM is dependent on multiple Mo... | That is a lot of models for your VM to depend on. You can inject all those on the constructor, this makes the dependence more explicit and visible. Or you can have the VM resolve the various models from the Unity container: public ViewModel(IUnityContainer container) { IQuoteSource model1 = container.Resolve ();... etc... | MVVM C# Question I am currently learning MVVM abd the tutorial I have been using, simply uses a single View Model with a single Model. The View Model is injected with the Model interface as such: public ViewModel(IQuoteSource quoteSource) {
} This is handled via DI using Unity. My question is what if the VM is depende... | TITLE:
MVVM C# Question
QUESTION:
I am currently learning MVVM abd the tutorial I have been using, simply uses a single View Model with a single Model. The View Model is injected with the Model interface as such: public ViewModel(IQuoteSource quoteSource) {
} This is handled via DI using Unity. My question is what if... | [
"c#",
"mvvm"
] | 4 | 2 | 135 | 1 | 0 | 2011-06-07T11:56:01.040000 | 2011-06-07T12:24:05.900000 |
6,264,806 | 6,265,056 | how to set some rows un editable in jqgrid? | is there way to set some rows un editable in jqgrid after first edit is done i tried to add class not-editable-row but no luck this is how i make all rows editable onSelectRow: function(id){ if(id && id!==lastsel){ grid.jqGrid('restoreRow',lastsel); grid.editRow(id,true); lastsel=id; } } any help would be great Thanks | You don't posted the code which you use to add the 'not-editable-row' class to the row ( element). I suppose that what you need is just do this inside of aftersavefunc event handler of the editRow. So you should replace the grid.editRow(id,true) to the following: grid.jqGrid('editRow',id,true,null,null,null,{}, functio... | how to set some rows un editable in jqgrid? is there way to set some rows un editable in jqgrid after first edit is done i tried to add class not-editable-row but no luck this is how i make all rows editable onSelectRow: function(id){ if(id && id!==lastsel){ grid.jqGrid('restoreRow',lastsel); grid.editRow(id,true); las... | TITLE:
how to set some rows un editable in jqgrid?
QUESTION:
is there way to set some rows un editable in jqgrid after first edit is done i tried to add class not-editable-row but no luck this is how i make all rows editable onSelectRow: function(id){ if(id && id!==lastsel){ grid.jqGrid('restoreRow',lastsel); grid.edi... | [
"javascript",
"css",
"jqgrid"
] | 1 | 0 | 2,377 | 1 | 0 | 2011-06-07T11:56:14.530000 | 2011-06-07T12:21:38.160000 |
6,264,809 | 6,265,265 | How to build a Simple Android Widget | So I have a bit of experience building android applications. But now i would like to build a widget for android that would sit on the home screen and display a button, and when the button is pressed it plays a sound. I've been looking at tutorials online on how to set up an android widget but i cant seem to figure it o... | first Create a new layout file inside res/layout, under the project structure, that will define the widget layout (widgetlayout.xml) according to the following structure. Create the res/xml folder under the project structure Create a xml file (widgetproviderinfo.xml) with the following parameters: Now you should create... | How to build a Simple Android Widget So I have a bit of experience building android applications. But now i would like to build a widget for android that would sit on the home screen and display a button, and when the button is pressed it plays a sound. I've been looking at tutorials online on how to set up an android ... | TITLE:
How to build a Simple Android Widget
QUESTION:
So I have a bit of experience building android applications. But now i would like to build a widget for android that would sit on the home screen and display a button, and when the button is pressed it plays a sound. I've been looking at tutorials online on how to ... | [
"android",
"widget"
] | 29 | 45 | 34,335 | 1 | 0 | 2011-06-07T11:56:31.093000 | 2011-06-07T12:39:52.310000 |
6,264,810 | 6,264,988 | Call GATHER_TABLE_STATS from .Net | I have some code that attempts to gather table statistics for a given Oracle schema and table. The code should replicate the SQL statement that looks like this: EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=>'SchemaName', tabname=>'TableName', estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt=>'FOR ALL COLUMNS SIZ... | If you are using >10G, FOR ALL COLUMNS SIZE AUTO is already the default setting. You should be able to omit the parameter completely. | Call GATHER_TABLE_STATS from .Net I have some code that attempts to gather table statistics for a given Oracle schema and table. The code should replicate the SQL statement that looks like this: EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=>'SchemaName', tabname=>'TableName', estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE... | TITLE:
Call GATHER_TABLE_STATS from .Net
QUESTION:
I have some code that attempts to gather table statistics for a given Oracle schema and table. The code should replicate the SQL statement that looks like this: EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=>'SchemaName', tabname=>'TableName', estimate_percent=>DBMS_STAT... | [
"c#",
"oracle",
"stored-procedures",
"statistics"
] | 1 | 1 | 1,196 | 2 | 0 | 2011-06-07T11:56:32.727000 | 2011-06-07T12:15:26.977000 |
6,264,811 | 6,265,087 | Strange symbol in Xcode4 navigator | I would know what this symbol should mean? | If you have set up your project with a source code manager (Git repository) you can have different symbols in the navigator depending on the state of the file. Source code manager status is shown as a badge in the project navigator, as follows: M = Locally modified U = Updated in repository A = Locally added D = Locall... | Strange symbol in Xcode4 navigator I would know what this symbol should mean? | TITLE:
Strange symbol in Xcode4 navigator
QUESTION:
I would know what this symbol should mean?
ANSWER:
If you have set up your project with a source code manager (Git repository) you can have different symbols in the navigator depending on the state of the file. Source code manager status is shown as a badge in the p... | [
"iphone",
"xcode",
"ios",
"svn",
"ide"
] | 1 | 2 | 213 | 1 | 0 | 2011-06-07T11:56:34.690000 | 2011-06-07T12:23:38.290000 |
6,264,812 | 6,276,690 | Autoloading in zend framework | how to autoload a class in custom directory on module path. My application's structure is like below application |_ modules |_admin |_api | |_Core.php |_elements |_Dialog.php i have two custom directory, 'api' and 'elements', when i instantiated an object of that two class i have received error message: 'Fatal error cl... | You can configure autoloading inside your Module_Bootstrap (almost same approach as in Benjamin Cremer's answer but module based). To do it - create file Bootstrap.php in /modules/admin folder with the following content: class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {
protected function _initAutoload... | Autoloading in zend framework how to autoload a class in custom directory on module path. My application's structure is like below application |_ modules |_admin |_api | |_Core.php |_elements |_Dialog.php i have two custom directory, 'api' and 'elements', when i instantiated an object of that two class i have received ... | TITLE:
Autoloading in zend framework
QUESTION:
how to autoload a class in custom directory on module path. My application's structure is like below application |_ modules |_admin |_api | |_Core.php |_elements |_Dialog.php i have two custom directory, 'api' and 'elements', when i instantiated an object of that two clas... | [
"php",
"zend-framework",
"autoload",
"zend-autoloader"
] | 0 | 1 | 585 | 2 | 0 | 2011-06-07T11:56:36.650000 | 2011-06-08T09:28:18.210000 |
6,264,815 | 6,264,862 | How dangerous is it to provide a means for the public to run SELECT queries on a database? | Suppose I do the following: I create a MySQL database, and populate it with some data. I create a MySQL user who has access only to that database, and who only has SELECT privileges. I create a web page through which a user (any user, no password required) can enter arbitrary SQL, and on submitting the form, a script a... | Hmmm. Clever users may attack via syntax like: select some_function_that_updates() from some_table; And there's a denial of service attack that could blow memory, like: select * from some_massive_table cross join some_other_massive_table; And frankly, it's hard enough for experienced programmers to write queries that b... | How dangerous is it to provide a means for the public to run SELECT queries on a database? Suppose I do the following: I create a MySQL database, and populate it with some data. I create a MySQL user who has access only to that database, and who only has SELECT privileges. I create a web page through which a user (any ... | TITLE:
How dangerous is it to provide a means for the public to run SELECT queries on a database?
QUESTION:
Suppose I do the following: I create a MySQL database, and populate it with some data. I create a MySQL user who has access only to that database, and who only has SELECT privileges. I create a web page through ... | [
"mysql",
"sql",
"database",
"security"
] | 5 | 6 | 528 | 3 | 0 | 2011-06-07T11:56:48.093000 | 2011-06-07T12:02:48.917000 |
6,264,820 | 6,264,860 | Create simple dynamically centered frame css | I have a simple question for everyone. I am trying to work out how to generate a three column style css skeleton template. I want the middle frame to be centered, but not by statically saying left: 100px, etc. It would look a little like this. http://img847.imageshack.us/img847/566/centerframedynamic.jpg How do I achie... | There are a whole bunch of three-column layouts with code to get you started here: http://www.maxdesign.com.au/articles/css-layouts/ | Create simple dynamically centered frame css I have a simple question for everyone. I am trying to work out how to generate a three column style css skeleton template. I want the middle frame to be centered, but not by statically saying left: 100px, etc. It would look a little like this. http://img847.imageshack.us/img... | TITLE:
Create simple dynamically centered frame css
QUESTION:
I have a simple question for everyone. I am trying to work out how to generate a three column style css skeleton template. I want the middle frame to be centered, but not by statically saying left: 100px, etc. It would look a little like this. http://img847... | [
"css"
] | 0 | 0 | 288 | 2 | 0 | 2011-06-07T11:57:35.137000 | 2011-06-07T12:02:46.280000 |
6,264,822 | 6,265,737 | WP7 app claims a request to my GAE service produces a 500, GAE claims a 200, where to start? | I am writing a Windows Phone 7 app that interfaces with my GAE backend. For a certain request, the WP7 client claims a 500 error is returned. I see that request in my GAE logs plain as day, correct contents, time, user agent, everything matches and no errors of any kind, the resulting http code is 200, according to the... | Problem solved, apologies to WP7, it was not at fault. What was happening was that I was returning a blobstore blob from GAE that did not exist. The GAE logs show this as a 200, but with a 0kb reply size, which is what eventually tipped me off. Would be nice if the logs showed this as the 500 that is in reality being r... | WP7 app claims a request to my GAE service produces a 500, GAE claims a 200, where to start? I am writing a Windows Phone 7 app that interfaces with my GAE backend. For a certain request, the WP7 client claims a 500 error is returned. I see that request in my GAE logs plain as day, correct contents, time, user agent, e... | TITLE:
WP7 app claims a request to my GAE service produces a 500, GAE claims a 200, where to start?
QUESTION:
I am writing a Windows Phone 7 app that interfaces with my GAE backend. For a certain request, the WP7 client claims a 500 error is returned. I see that request in my GAE logs plain as day, correct contents, t... | [
"google-app-engine",
"http",
"windows-phone-7",
"httpwebrequest"
] | 0 | 1 | 123 | 1 | 0 | 2011-06-07T11:57:43.530000 | 2011-06-07T13:14:42.043000 |
6,264,827 | 6,308,375 | Is there any standard tool to estimate disk space requirement for SQL Server? | Is there a tool/application to calculate space requirement for a database in SQL Server? I know sp_spaceused can be used, but it calculates the actual space being taken up at that moment. What I was looking for is a tool that connects to the database and the user can interactively provide input like average number of r... | Below reads provide good clarity on space estimation Estimating the Size of an SQL Server Database - http://sqlserverdiaries.com/blog/index.php/2011/05/estimating-the-size-of-an-sql-server-database/ Cindy gross checklist was very good - http://blogs.msdn.com/b/cindygross/archive/2009/03/12/previous-blogs-on-sqlcommunit... | Is there any standard tool to estimate disk space requirement for SQL Server? Is there a tool/application to calculate space requirement for a database in SQL Server? I know sp_spaceused can be used, but it calculates the actual space being taken up at that moment. What I was looking for is a tool that connects to the ... | TITLE:
Is there any standard tool to estimate disk space requirement for SQL Server?
QUESTION:
Is there a tool/application to calculate space requirement for a database in SQL Server? I know sp_spaceused can be used, but it calculates the actual space being taken up at that moment. What I was looking for is a tool tha... | [
"sql-server"
] | 15 | 6 | 17,388 | 2 | 0 | 2011-06-07T11:58:26.723000 | 2011-06-10T15:15:27.987000 |
6,264,844 | 6,264,996 | maximum number of primitives on FBO | Is there a limit on maximum number of primitives to be rendered on FBO per frame? If so, is there any glGet or any other API to find out the maximum number of primitives allowed per frame? I draw a set of triangles into a texture using FBO. When the number of triangles exceed a certain limit, the rendering of that fram... | Are you using VBOs? I would guess it's more likely that you're exceeding the memory limit on the gpu. You can query the memory size and do some quick math to see if that's the case. | maximum number of primitives on FBO Is there a limit on maximum number of primitives to be rendered on FBO per frame? If so, is there any glGet or any other API to find out the maximum number of primitives allowed per frame? I draw a set of triangles into a texture using FBO. When the number of triangles exceed a certa... | TITLE:
maximum number of primitives on FBO
QUESTION:
Is there a limit on maximum number of primitives to be rendered on FBO per frame? If so, is there any glGet or any other API to find out the maximum number of primitives allowed per frame? I draw a set of triangles into a texture using FBO. When the number of triang... | [
"android",
"opengl-es",
"milestone",
"galaxy-tab",
"powervr-sgx"
] | 0 | 1 | 352 | 1 | 0 | 2011-06-07T11:59:35.290000 | 2011-06-07T12:16:04.307000 |
6,264,848 | 6,271,477 | wxHaskell installation on windows | I stuck at installing wxHaskell on windows xp sp3 I installed MinGW, MSYS and wx-config MinGW and MSYS with installer wx-config with adding the directory to environment variable WXWIN and wxWigets with installer when I type cabal install wx it says generating: src/haskell/Graphics/UI/WXCore/WxcClassTypes.hs reading cla... | Do you have the wx-config.exe somewhere in your PATH environmnet variable, so that cabal can find it? Additionally you might try to define the environment variable WXCFG=gcc_dll\mswu. And as a last try: Did you compile wxWidgets with the correct settings (like so: mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1... | wxHaskell installation on windows I stuck at installing wxHaskell on windows xp sp3 I installed MinGW, MSYS and wx-config MinGW and MSYS with installer wx-config with adding the directory to environment variable WXWIN and wxWigets with installer when I type cabal install wx it says generating: src/haskell/Graphics/UI/W... | TITLE:
wxHaskell installation on windows
QUESTION:
I stuck at installing wxHaskell on windows xp sp3 I installed MinGW, MSYS and wx-config MinGW and MSYS with installer wx-config with adding the directory to environment variable WXWIN and wxWigets with installer when I type cabal install wx it says generating: src/has... | [
"windows",
"haskell",
"installation",
"wxwidgets"
] | 3 | 1 | 1,349 | 3 | 0 | 2011-06-07T12:00:10.390000 | 2011-06-07T20:50:48.290000 |
6,264,857 | 6,264,925 | Can AVPlayer play MP3 files on iPad | Can AVPlayer place MP3 files? It does not list MP3 in the apple documentation. | Yes it can play MP3. Try reading the apple documentation here and specifically the section entitled "iOS Hardware and Software Audio Codecs" | Can AVPlayer play MP3 files on iPad Can AVPlayer place MP3 files? It does not list MP3 in the apple documentation. | TITLE:
Can AVPlayer play MP3 files on iPad
QUESTION:
Can AVPlayer place MP3 files? It does not list MP3 in the apple documentation.
ANSWER:
Yes it can play MP3. Try reading the apple documentation here and specifically the section entitled "iOS Hardware and Software Audio Codecs" | [
"iphone"
] | 2 | 2 | 1,513 | 3 | 0 | 2011-06-07T12:01:57.073000 | 2011-06-07T12:09:18.147000 |
6,264,864 | 6,264,920 | need a better way add leading digits to int and return array of digits | I need to create a modulus check which adds leading digits, lets say 0, to a seed int. I then need to return an array of digits in the array as I need to do a calculation on each digit to return a new whole number. my code is as follows, var seed = 1234; var seedString = seed.ToString(); var test = new List ();
for(in... | If you want to convert your number to a 10-digit string, you can format the number using a Custom Numeric Format String as follows: string result = seed.ToString("0000000000"); // result == "0000001234" See: The "0" Custom Specifier If you need a 10-element array consisting of the individual digits, try this: int[] res... | need a better way add leading digits to int and return array of digits I need to create a modulus check which adds leading digits, lets say 0, to a seed int. I then need to return an array of digits in the array as I need to do a calculation on each digit to return a new whole number. my code is as follows, var seed = ... | TITLE:
need a better way add leading digits to int and return array of digits
QUESTION:
I need to create a modulus check which adds leading digits, lets say 0, to a seed int. I then need to return an array of digits in the array as I need to do a calculation on each digit to return a new whole number. my code is as fo... | [
"c#",
".net"
] | 2 | 5 | 534 | 3 | 0 | 2011-06-07T12:03:04.587000 | 2011-06-07T12:08:54.017000 |
6,264,869 | 6,306,864 | Unable to select page contents through class in jQueryMobile | I'm unable to select page contents through class in jQueryMobile. $('div[data-role="content"]'); works fine $('div.ui-content'); only selects a few | jQuery Mobile adds the class when it enhances the page. You might be calling the selector before the enhancement is done (I won't guess no more, it's your app;) ) the correct way to get all the content nodes is: $("div:jqmData(role='content')") | Unable to select page contents through class in jQueryMobile I'm unable to select page contents through class in jQueryMobile. $('div[data-role="content"]'); works fine $('div.ui-content'); only selects a few | TITLE:
Unable to select page contents through class in jQueryMobile
QUESTION:
I'm unable to select page contents through class in jQueryMobile. $('div[data-role="content"]'); works fine $('div.ui-content'); only selects a few
ANSWER:
jQuery Mobile adds the class when it enhances the page. You might be calling the sel... | [
"jquery-selectors",
"jquery-mobile"
] | 0 | 2 | 488 | 2 | 0 | 2011-06-07T12:03:36.567000 | 2011-06-10T13:15:14.747000 |
6,264,874 | 6,264,932 | CUDA memory allocation - is it efficient | This is my code. I have lot of threads so that those threads calling this function many times. Inside this function I am creating an array. It is an efficient implementation?? If it is not please suggest me the efficient implementation. __device__ float calculate minimum(float *arr) { float vals[9]; //for each call to ... | There is no "array creation" in that code. There is a statically declared array. Further, the standard CUDA compilation model will inline expand __device__ functions, meaning that the vals will be compiled to be in local memory, or if possible even in registers. All of this happens at compile time, not run time. | CUDA memory allocation - is it efficient This is my code. I have lot of threads so that those threads calling this function many times. Inside this function I am creating an array. It is an efficient implementation?? If it is not please suggest me the efficient implementation. __device__ float calculate minimum(float *... | TITLE:
CUDA memory allocation - is it efficient
QUESTION:
This is my code. I have lot of threads so that those threads calling this function many times. Inside this function I am creating an array. It is an efficient implementation?? If it is not please suggest me the efficient implementation. __device__ float calcula... | [
"cuda"
] | 0 | 4 | 1,631 | 3 | 0 | 2011-06-07T12:04:06.400000 | 2011-06-07T12:09:50.547000 |
6,264,878 | 6,264,912 | No Basic Authentication choice available in IIS7 | I do not have the option for Basic Authentication in IIS Manager under IIS=>Authentication. I do have the following options: Anonymous Authentication ASP.NET Impersonation Forms Authentication I am using Windows 7 professional N, and according to this, Basic Authentication should be available to me. Does anyone have an... | Go to Control Panel\Programs -> Turn Windows features on or off, and enable Basic Authentication under IIS: | No Basic Authentication choice available in IIS7 I do not have the option for Basic Authentication in IIS Manager under IIS=>Authentication. I do have the following options: Anonymous Authentication ASP.NET Impersonation Forms Authentication I am using Windows 7 professional N, and according to this, Basic Authenticati... | TITLE:
No Basic Authentication choice available in IIS7
QUESTION:
I do not have the option for Basic Authentication in IIS Manager under IIS=>Authentication. I do have the following options: Anonymous Authentication ASP.NET Impersonation Forms Authentication I am using Windows 7 professional N, and according to this, ... | [
"iis-7",
"basic-authentication"
] | 63 | 95 | 47,935 | 3 | 0 | 2011-06-07T12:04:48.353000 | 2011-06-07T12:07:30.367000 |
6,264,892 | 6,265,033 | Inserting subView - iPhone | - (void)viewDidLoad {
BlueViewController *blueController = [[BlueViewController alloc] initWithNibName@"BlueView" bundle:nil]; self.blueViewController = blueController; //blueViewController set to var above
[self.view insertSubview:blueController.view atIndex:0]; [blueController release]; [super viewDidLoad]; } not u... | not understanding this code very well. How come i am inserting the subview blueController and not self.blueViewController since you have executed the assignment: self.blueViewController = blueController; those two variables are the same, so [self.view insertSubview:self.blueController.view atIndex:0]; would be just the... | Inserting subView - iPhone - (void)viewDidLoad {
BlueViewController *blueController = [[BlueViewController alloc] initWithNibName@"BlueView" bundle:nil]; self.blueViewController = blueController; //blueViewController set to var above
[self.view insertSubview:blueController.view atIndex:0]; [blueController release]; [... | TITLE:
Inserting subView - iPhone
QUESTION:
- (void)viewDidLoad {
BlueViewController *blueController = [[BlueViewController alloc] initWithNibName@"BlueView" bundle:nil]; self.blueViewController = blueController; //blueViewController set to var above
[self.view insertSubview:blueController.view atIndex:0]; [blueCont... | [
"iphone",
"ios4"
] | 0 | 0 | 125 | 4 | 0 | 2011-06-07T12:05:32.067000 | 2011-06-07T12:20:04.103000 |
6,264,896 | 6,264,911 | Unit Testing & System.Web.Routing | I have a test project and am trying to reference System.Web.Routing. I've added the reference to the project but I am getting the error: The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web, Version=4.0.0.0, Culture=neutral... | Needed a reference to System.Web. Thought I had that already referenced...oops! | Unit Testing & System.Web.Routing I have a test project and am trying to reference System.Web.Routing. I've added the reference to the project but I am getting the error: The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web... | TITLE:
Unit Testing & System.Web.Routing
QUESTION:
I have a test project and am trying to reference System.Web.Routing. I've added the reference to the project but I am getting the error: The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced. You must add a reference to as... | [
"visual-studio",
"unit-testing",
"asp.net-routing"
] | 1 | 2 | 1,150 | 2 | 0 | 2011-06-07T12:05:53.760000 | 2011-06-07T12:07:20.407000 |
6,264,906 | 6,265,066 | How to generate a time-stamp for HTTP-Header If-Modified-Since from QDateTime? | I want to set an If-Modified-Since-header on a request and take the time from the timestamp on the file. So I extracted the timestamp into a QDateTime. I could generate something looking similar to the date-format HTTP uses, but my server and my client use different time-zones. Is there a way to get the timezone-string... | I think this will do: QString modificationDate = fileinfo.lastModified().toUTC().toString("ddd, dd MMM yyyy hh:mm:ss") + " GMT"; | How to generate a time-stamp for HTTP-Header If-Modified-Since from QDateTime? I want to set an If-Modified-Since-header on a request and take the time from the timestamp on the file. So I extracted the timestamp into a QDateTime. I could generate something looking similar to the date-format HTTP uses, but my server an... | TITLE:
How to generate a time-stamp for HTTP-Header If-Modified-Since from QDateTime?
QUESTION:
I want to set an If-Modified-Since-header on a request and take the time from the timestamp on the file. So I extracted the timestamp into a QDateTime. I could generate something looking similar to the date-format HTTP uses... | [
"c++",
"qt",
"http-headers",
"timezone"
] | 2 | 3 | 1,674 | 2 | 0 | 2011-06-07T12:07:00.367000 | 2011-06-07T12:22:03.793000 |
6,264,907 | 6,264,941 | Check if a popup window is closed | I am opening a popup window with var popup = window.open('...', '...'); This javascript is defined in a control. This control is then used from a web page. I want to reload the page which opens this popup when the popup is closed. Basically user is required to input some denominations in the popup window and submit. Th... | Here's what I suggest (updated to newer code) in the popup you should have: const reloadOpener = () => { if (top.opener &&!top.opener.closed) { try { opener.location.reload(1); } catch(e) { } window.close(); } } window.addEventListener("unload", () => { reloadOpener(); }) then assuming the same origin, the server proce... | Check if a popup window is closed I am opening a popup window with var popup = window.open('...', '...'); This javascript is defined in a control. This control is then used from a web page. I want to reload the page which opens this popup when the popup is closed. Basically user is required to input some denominations ... | TITLE:
Check if a popup window is closed
QUESTION:
I am opening a popup window with var popup = window.open('...', '...'); This javascript is defined in a control. This control is then used from a web page. I want to reload the page which opens this popup when the popup is closed. Basically user is required to input s... | [
"javascript",
"asp.net",
"internet-explorer-9"
] | 16 | 9 | 59,914 | 5 | 0 | 2011-06-07T12:07:00.910000 | 2011-06-07T12:10:34.727000 |
6,264,909 | 6,264,960 | How to override default(int?) to obtain NULL instead 0 | I found here the method: public static T GetValue (object value) { if (value == null || value == DBNull.Value) return default(T); else return (T)value; } How to rewrite it to obtain null if "value" is NULL? | You don't need to rewrite it. You just need to call it as: GetValue (value); | How to override default(int?) to obtain NULL instead 0 I found here the method: public static T GetValue (object value) { if (value == null || value == DBNull.Value) return default(T); else return (T)value; } How to rewrite it to obtain null if "value" is NULL? | TITLE:
How to override default(int?) to obtain NULL instead 0
QUESTION:
I found here the method: public static T GetValue (object value) { if (value == null || value == DBNull.Value) return default(T); else return (T)value; } How to rewrite it to obtain null if "value" is NULL?
ANSWER:
You don't need to rewrite it. Y... | [
"c#",
"null"
] | 5 | 11 | 7,470 | 5 | 0 | 2011-06-07T12:07:04.200000 | 2011-06-07T12:12:28.007000 |
6,264,913 | 6,264,959 | Send xmlHttpRequest every 10 second in JavaScript | I run a JavaScript function that send a xmlHttpRequest to an.ashx (let's name it send_req() that run on page load for first time). For onreadystatechange, I have a function that receive XML data and show it on the page (let's name this one getanswer() ). I want to automatically update XML data on the page every 20 seco... | This: resource_timer = setTimeout(send_req(), 20000); Should be: resource_timer = setTimeout(send_req, 20000); The first executes the result of send_req() after 20 seconds, the second executes send_req itself. | Send xmlHttpRequest every 10 second in JavaScript I run a JavaScript function that send a xmlHttpRequest to an.ashx (let's name it send_req() that run on page load for first time). For onreadystatechange, I have a function that receive XML data and show it on the page (let's name this one getanswer() ). I want to autom... | TITLE:
Send xmlHttpRequest every 10 second in JavaScript
QUESTION:
I run a JavaScript function that send a xmlHttpRequest to an.ashx (let's name it send_req() that run on page load for first time). For onreadystatechange, I have a function that receive XML data and show it on the page (let's name this one getanswer() ... | [
"javascript",
"xmlhttprequest"
] | 1 | 6 | 3,115 | 1 | 0 | 2011-06-07T12:07:31.610000 | 2011-06-07T12:12:24.587000 |
6,264,918 | 6,265,010 | problem with listener for listview | I have an app in android in which I'm setting up a list view...and now try to display a message when I press on one of the items....but it's not working...I'm sure is something simple but I just can figure out what it is...and my listener won't work! public class Server3 extends ListActivity {
static final String[] it... | in the onListItemClick you have written `if(items[position]=="car1") ` It's Car1. System.out in your car2 (wrong, it's Car2) will not work. | problem with listener for listview I have an app in android in which I'm setting up a list view...and now try to display a message when I press on one of the items....but it's not working...I'm sure is something simple but I just can figure out what it is...and my listener won't work! public class Server3 extends ListA... | TITLE:
problem with listener for listview
QUESTION:
I have an app in android in which I'm setting up a list view...and now try to display a message when I press on one of the items....but it's not working...I'm sure is something simple but I just can figure out what it is...and my listener won't work! public class Ser... | [
"android",
"listview"
] | 0 | 1 | 246 | 5 | 0 | 2011-06-07T12:08:45.090000 | 2011-06-07T12:17:54.620000 |
6,264,942 | 6,265,032 | Check whether string is set, even if it's 0 | What's the best way of writing: if(!$this->uri->segment('4') && $this->uri->segment('4')!= 0) This is far too long winded. Just need to check if a string is set, even if it's 0. | This is far too long winded. Just need to check if a string is set, even if it's 0. How about checking for the length of the string? if (strlen($this->uri->segment('4')) > 0) EDIT For explicitness, I've added > 0, so it may be a little more descriptive what it is exactly you expect. This isn't necessary, however. | Check whether string is set, even if it's 0 What's the best way of writing: if(!$this->uri->segment('4') && $this->uri->segment('4')!= 0) This is far too long winded. Just need to check if a string is set, even if it's 0. | TITLE:
Check whether string is set, even if it's 0
QUESTION:
What's the best way of writing: if(!$this->uri->segment('4') && $this->uri->segment('4')!= 0) This is far too long winded. Just need to check if a string is set, even if it's 0.
ANSWER:
This is far too long winded. Just need to check if a string is set, eve... | [
"php"
] | 0 | 2 | 162 | 4 | 0 | 2011-06-07T12:10:49.380000 | 2011-06-07T12:19:57.720000 |
6,264,954 | 6,265,007 | Cannot use DialogResult | I tried to use DialogResult to check an Messagebox 's YesNoCancel. I'm using the following code which I don't see any problem with: DialogResult dlgResult = MessageBox.Show( "Save changes before closing?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Question); But Visual Studio throws me error saying 'Syst... | There is a confliction here between the DialogResult Enumeration and the Window.DialogResult Property. To solve this problem, you can use the fully qualified name of the enumuration. As the following: System.Windows.Forms.DialogResult dlgResult =... However, since you are using WPF, use MessageBoxResult Enumeration to ... | Cannot use DialogResult I tried to use DialogResult to check an Messagebox 's YesNoCancel. I'm using the following code which I don't see any problem with: DialogResult dlgResult = MessageBox.Show( "Save changes before closing?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Question); But Visual Studio thro... | TITLE:
Cannot use DialogResult
QUESTION:
I tried to use DialogResult to check an Messagebox 's YesNoCancel. I'm using the following code which I don't see any problem with: DialogResult dlgResult = MessageBox.Show( "Save changes before closing?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Question); But ... | [
"c#",
"wpf",
"dialogresult"
] | 9 | 10 | 13,268 | 6 | 0 | 2011-06-07T12:11:55.350000 | 2011-06-07T12:17:43.123000 |
6,264,957 | 6,265,020 | How to detemine if sequence has items and if so return the value in LINQ | I currently do a lot of checks like so If (From p In table Where p.USER_ID = LoggedInUser.USER_ID And p.DATE >= start And p.DATE < [end] And p.PROJECT_ID = ProjectId Select p.Field).Any Then Me.lblOverallTotal.Text = (From p In table Where p.USER_ID = LoggedInUser.USER_ID And p.DATE >= start And p.DATE < [end] And p.PR... | I would do something like (switching to C# as my VB is weak): var sum = (from p in table where p.USER_ID == LoggedInUser.USER_ID && p.DATE >= start && p.DATE < end && p.PROJECT_ID == ProjectId select (float?)p.Field).Sum(); // use the correct data type here LINQ-to-SQL (courtesy of SQL-server) has a foible where that g... | How to detemine if sequence has items and if so return the value in LINQ I currently do a lot of checks like so If (From p In table Where p.USER_ID = LoggedInUser.USER_ID And p.DATE >= start And p.DATE < [end] And p.PROJECT_ID = ProjectId Select p.Field).Any Then Me.lblOverallTotal.Text = (From p In table Where p.USER_... | TITLE:
How to detemine if sequence has items and if so return the value in LINQ
QUESTION:
I currently do a lot of checks like so If (From p In table Where p.USER_ID = LoggedInUser.USER_ID And p.DATE >= start And p.DATE < [end] And p.PROJECT_ID = ProjectId Select p.Field).Any Then Me.lblOverallTotal.Text = (From p In t... | [
".net",
"vb.net",
"linq",
".net-4.0"
] | 1 | 2 | 89 | 1 | 0 | 2011-06-07T12:12:04.763000 | 2011-06-07T12:18:34.340000 |
6,264,958 | 6,265,121 | How can I add NSSpeechSynthesizer Class Reference? | How can i add NSSpeechSynthesizer Class Reference. I think it is in /System/Library/Frameworks/AppKit.framework. However there is no such framework name in framework window when I am clicking add existing frame work. Can any one help me to do it. | AppKit framework is MacOS framework, not iOS, and so NSSpeechSynthesizer class is also available on Mac only. Check this question on SO for the list of some 3rd-party text-to-speach engines available on iPhone | How can I add NSSpeechSynthesizer Class Reference? How can i add NSSpeechSynthesizer Class Reference. I think it is in /System/Library/Frameworks/AppKit.framework. However there is no such framework name in framework window when I am clicking add existing frame work. Can any one help me to do it. | TITLE:
How can I add NSSpeechSynthesizer Class Reference?
QUESTION:
How can i add NSSpeechSynthesizer Class Reference. I think it is in /System/Library/Frameworks/AppKit.framework. However there is no such framework name in framework window when I am clicking add existing frame work. Can any one help me to do it.
ANS... | [
"iphone",
"objective-c",
"xcode",
"frameworks",
"ios-frameworks"
] | 2 | 1 | 3,009 | 3 | 0 | 2011-06-07T12:12:08.473000 | 2011-06-07T12:25:59.607000 |
6,264,963 | 6,265,044 | Decrypting AES encrypted file in C# with java | I have the following problem. I use this code to encrypt a sample text in C#, and want to decrypt it in java. I use the following java code. byte[] IV = { 65, 1, 2, 23, 4, 5, 6, 7, 32, 21, 10, 11, 12, 13, 84, 45 }; byte[] KEY = { 0, 42, 2, 54, 4, 45, 6, 7, 65, 9, 54, 11, 12, 13, 60, 15 }; byte baData[] = new byte[1024]... | There are a few problems here: What encoding are you using to convert the text data into binary before encrypting it? Your current use of the string constructor will use the platform default encoding - almost never a good idea You're assuming that a single call to read() will read everything - you're not actually using... | Decrypting AES encrypted file in C# with java I have the following problem. I use this code to encrypt a sample text in C#, and want to decrypt it in java. I use the following java code. byte[] IV = { 65, 1, 2, 23, 4, 5, 6, 7, 32, 21, 10, 11, 12, 13, 84, 45 }; byte[] KEY = { 0, 42, 2, 54, 4, 45, 6, 7, 65, 9, 54, 11, 12... | TITLE:
Decrypting AES encrypted file in C# with java
QUESTION:
I have the following problem. I use this code to encrypt a sample text in C#, and want to decrypt it in java. I use the following java code. byte[] IV = { 65, 1, 2, 23, 4, 5, 6, 7, 32, 21, 10, 11, 12, 13, 84, 45 }; byte[] KEY = { 0, 42, 2, 54, 4, 45, 6, 7,... | [
"c#",
"java",
"android",
"encryption",
"aes"
] | 3 | 6 | 1,393 | 1 | 0 | 2011-06-07T12:13:08.913000 | 2011-06-07T12:20:42.020000 |
6,264,976 | 6,276,352 | how to send a already constructed SOAP message in WCF | I have a SOAP message in a string at my client side string requestMessageString = " john jhgfsdjgfj 00460590 " and i am sending the message like this Message requestMsg = Message.CreateMessage(MessageVersion.Soap11, "http://tempuri.org/IService1/IbankClientOperation", requestMessageString );
Message responseMsg = null... | I got the answer from this question wcf soap message deserialization error | how to send a already constructed SOAP message in WCF I have a SOAP message in a string at my client side string requestMessageString = " john jhgfsdjgfj 00460590 " and i am sending the message like this Message requestMsg = Message.CreateMessage(MessageVersion.Soap11, "http://tempuri.org/IService1/IbankClientOperation... | TITLE:
how to send a already constructed SOAP message in WCF
QUESTION:
I have a SOAP message in a string at my client side string requestMessageString = " john jhgfsdjgfj 00460590 " and i am sending the message like this Message requestMsg = Message.CreateMessage(MessageVersion.Soap11, "http://tempuri.org/IService1/Ib... | [
"wcf",
"serialization",
"soap",
"deserialization"
] | 0 | 0 | 2,689 | 3 | 0 | 2011-06-07T12:14:35.947000 | 2011-06-08T08:53:44.413000 |
6,264,983 | 6,265,294 | Which of these BDD tools are more appropriate and has more advantages for C# applications? | I would like to know your recommendation for which tool has more advantages when it comes to BDD development process: SpecFlow Cuke4Nuke (Cucumber port for.NET) Nbehave StoreEvil Bddify NSpec Nspecify StoryQ I personally use Cucumber (on Ruby for Windows), also it seems SpecFlow is very similar. But I would like your r... | You could add MSpec to your list. MSpec is my personal favourite simply because I've used it more often/regularly. Which one you chose is, as with Unit Testing frameworks, mainly an primarily a matter of taste. Take a couple of them out for a test run and decide based on: Which one you feel the most comfortable with Wh... | Which of these BDD tools are more appropriate and has more advantages for C# applications? I would like to know your recommendation for which tool has more advantages when it comes to BDD development process: SpecFlow Cuke4Nuke (Cucumber port for.NET) Nbehave StoreEvil Bddify NSpec Nspecify StoryQ I personally use Cucu... | TITLE:
Which of these BDD tools are more appropriate and has more advantages for C# applications?
QUESTION:
I would like to know your recommendation for which tool has more advantages when it comes to BDD development process: SpecFlow Cuke4Nuke (Cucumber port for.NET) Nbehave StoreEvil Bddify NSpec Nspecify StoryQ I p... | [
"c#-4.0",
"bdd"
] | 0 | 1 | 520 | 2 | 0 | 2011-06-07T12:15:03.217000 | 2011-06-07T12:42:07.627000 |
6,264,990 | 6,265,057 | Edit is working fine when all entites are in TextBox else giving Error | i am using MVC 3.0 with EF I have Table which contain Identity column with Auto Increment 1. Now i created a View for Edit with only FirstName,LastName and ID will be ReadOnly mode. Now i changed value First Name and Last Name and press submit button then it will gives me an error: The parameters dictionary contains a ... | That is quite obvious. When you post edits back to server it doesn't post Id because Id is not in any HTML control - it is just a text. Because of that you cannot create valid entity for saving. You must always post Id back (for example in hidden field) and have some validation that the Id was not changed or that user ... | Edit is working fine when all entites are in TextBox else giving Error i am using MVC 3.0 with EF I have Table which contain Identity column with Auto Increment 1. Now i created a View for Edit with only FirstName,LastName and ID will be ReadOnly mode. Now i changed value First Name and Last Name and press submit butto... | TITLE:
Edit is working fine when all entites are in TextBox else giving Error
QUESTION:
i am using MVC 3.0 with EF I have Table which contain Identity column with Auto Increment 1. Now i created a View for Edit with only FirstName,LastName and ID will be ReadOnly mode. Now i changed value First Name and Last Name and ... | [
"asp.net-mvc",
"entity-framework"
] | 0 | 3 | 62 | 1 | 0 | 2011-06-07T12:15:49.083000 | 2011-06-07T12:21:38.313000 |
6,264,995 | 6,265,104 | Why wouldn't a search from glGetString(GL_EXTENSIONS) work correctly? | I read this page: http://www.opengl.org/wiki/GlGetString For example, if the extension GL_EXT_pixel_transform_color_table is listed, doing a simple search for GL_EXT_pixel_transform will return a positive whether or not it is defined. How is that possible since its space separated? Why dont you just put a space after t... | What if the extension you are looking for is listed last? Then it will not be followed by a blank. | Why wouldn't a search from glGetString(GL_EXTENSIONS) work correctly? I read this page: http://www.opengl.org/wiki/GlGetString For example, if the extension GL_EXT_pixel_transform_color_table is listed, doing a simple search for GL_EXT_pixel_transform will return a positive whether or not it is defined. How is that pos... | TITLE:
Why wouldn't a search from glGetString(GL_EXTENSIONS) work correctly?
QUESTION:
I read this page: http://www.opengl.org/wiki/GlGetString For example, if the extension GL_EXT_pixel_transform_color_table is listed, doing a simple search for GL_EXT_pixel_transform will return a positive whether or not it is define... | [
"c++",
"opengl"
] | 3 | 3 | 1,930 | 3 | 0 | 2011-06-07T12:16:03.060000 | 2011-06-07T12:24:45.257000 |
6,264,997 | 6,265,017 | how to execute jquery code one by one? | how to execute jquery code one by one? I want first do "function 1", when finish the job. then do "function 2"... Thanks. | You don't need so many document ready calls. One will suffice If you mean you want to call each method after one has received the response from the AJAX calls you are making, put the code in the callback; $(document).ready(function(){ one(); //call the initial method });
function one(){ $.get('url', {}, function(data)... | how to execute jquery code one by one? how to execute jquery code one by one? I want first do "function 1", when finish the job. then do "function 2"... Thanks. | TITLE:
how to execute jquery code one by one?
QUESTION:
how to execute jquery code one by one? I want first do "function 1", when finish the job. then do "function 2"... Thanks.
ANSWER:
You don't need so many document ready calls. One will suffice If you mean you want to call each method after one has received the re... | [
"javascript",
"jquery"
] | 2 | 9 | 3,203 | 5 | 0 | 2011-06-07T12:16:10.107000 | 2011-06-07T12:18:30.013000 |
6,265,008 | 6,265,068 | how to reduce large image size to thumbnail size in android | in my app, i have large images, i display it in an image view by hard code the size as 60 X 60 dp. how to reduce the image size as image thumb nail size in android. is there programmatic way. because suppose i run my app in various resolution size design layout may get differ. my need is if i run my app in any resoluti... | Most simple way is int h = 48; // height in pixels int w = 48; // width in pixels Bitmap scaled = Bitmap.createScaledBitmap(largeBitmap, h, w, true); and detailed This is called the image scaling This will help you http://zerocredibility.wordpress.com/2011/01/27/android-bitmap-scaling/ | how to reduce large image size to thumbnail size in android in my app, i have large images, i display it in an image view by hard code the size as 60 X 60 dp. how to reduce the image size as image thumb nail size in android. is there programmatic way. because suppose i run my app in various resolution size design layou... | TITLE:
how to reduce large image size to thumbnail size in android
QUESTION:
in my app, i have large images, i display it in an image view by hard code the size as 60 X 60 dp. how to reduce the image size as image thumb nail size in android. is there programmatic way. because suppose i run my app in various resolution... | [
"android",
"android-image"
] | 6 | 15 | 25,290 | 2 | 0 | 2011-06-07T12:17:44.070000 | 2011-06-07T12:22:24.080000 |
6,265,011 | 6,265,041 | Finding substring using regular exp | I have a string abc.xyz.qweweer.cccc This is actually going to be a Java package name. I am trying to find out the last string using reg exp, in the above example cccc is the last String. Basically I am trying to find out the class name from the package string. How to find out through Java | Given a string pkg = "abc.xyz.qweweer.cccc" you can solve it like this: Using indexOf: int index = pkg.lastIndexOf('.'); String lastPart = index == -1? pkg: pkg.substring(index + 1); Using regular expressions with Matcher: Matcher m = Pattern.compile("[^.]*$").matcher(pkg); String lastPart = m.find()? m.group(): null; ... | Finding substring using regular exp I have a string abc.xyz.qweweer.cccc This is actually going to be a Java package name. I am trying to find out the last string using reg exp, in the above example cccc is the last String. Basically I am trying to find out the class name from the package string. How to find out throug... | TITLE:
Finding substring using regular exp
QUESTION:
I have a string abc.xyz.qweweer.cccc This is actually going to be a Java package name. I am trying to find out the last string using reg exp, in the above example cccc is the last String. Basically I am trying to find out the class name from the package string. How ... | [
"java",
"regex"
] | 2 | 1 | 437 | 5 | 0 | 2011-06-07T12:18:01.377000 | 2011-06-07T12:20:31.217000 |
6,265,022 | 6,278,212 | Quartz.Net trigger event | I have my own ITrigger. Basically, it looks like the below: public interface ITrigger: IDisposable { /// /// Occurs when an input has been trigger. /// event InputTriggedEventHandler InputTrigged; /// /// Starts the trigger. /// /// The data about the trigger to start. void Init(Trigger trigger); } One implementation o... | What I ended up doing was keeping a static reference to the ScheduleTriggers with guid as key. The guid is then passed to the jobdetail which uses it to find the ScheduleTrigger and raises the event. Not pretty, but does the job: public class ScheduleTrigger: BaseTrigger { Guid name = Guid.NewGuid(); static Dictionary ... | Quartz.Net trigger event I have my own ITrigger. Basically, it looks like the below: public interface ITrigger: IDisposable { /// /// Occurs when an input has been trigger. /// event InputTriggedEventHandler InputTrigged; /// /// Starts the trigger. /// /// The data about the trigger to start. void Init(Trigger trigger... | TITLE:
Quartz.Net trigger event
QUESTION:
I have my own ITrigger. Basically, it looks like the below: public interface ITrigger: IDisposable { /// /// Occurs when an input has been trigger. /// event InputTriggedEventHandler InputTrigged; /// /// Starts the trigger. /// /// The data about the trigger to start. void In... | [
"c#",
"events",
"quartz-scheduler"
] | 1 | 0 | 2,444 | 1 | 0 | 2011-06-07T12:18:57.913000 | 2011-06-08T11:45:18.217000 |
6,265,024 | 6,265,063 | Function Returning Boolean? | I have simple function in VBA and I would need to check whether or not it has been successfully performed. I do not know VBA much, so I have no idea whether or not its possible. I want to do something like this: bool X=MyFunction(). I am using VBA in the QTP descriptive programming. This does not work: Function A as Bo... | function MyFunction() as Boolean.......... MyFunction = True 'worked end function
dim a as boolean = MyFunction() | Function Returning Boolean? I have simple function in VBA and I would need to check whether or not it has been successfully performed. I do not know VBA much, so I have no idea whether or not its possible. I want to do something like this: bool X=MyFunction(). I am using VBA in the QTP descriptive programming. This doe... | TITLE:
Function Returning Boolean?
QUESTION:
I have simple function in VBA and I would need to check whether or not it has been successfully performed. I do not know VBA much, so I have no idea whether or not its possible. I want to do something like this: bool X=MyFunction(). I am using VBA in the QTP descriptive pro... | [
"function",
"vba"
] | 16 | 31 | 115,481 | 5 | 0 | 2011-06-07T12:19:02.907000 | 2011-06-07T12:21:56.170000 |
6,265,028 | 6,265,090 | How do I prevent a locally stored XSLT rendered in IE8 defaulting to quirks mode? | I have some very simple xml and xslt documents, which render in IE8 in quirks mode. However, I can't seem to turn it off. Adding seems to have no effect. Is it possible to make it display in IE8 Standards mode? | Try adding a proper doctype: (I don't have an IE8 at hand so I cannot try - let me know if it works please;) ) | How do I prevent a locally stored XSLT rendered in IE8 defaulting to quirks mode? I have some very simple xml and xslt documents, which render in IE8 in quirks mode. However, I can't seem to turn it off. Adding seems to have no effect. Is it possible to make it display in IE8 Standards mode? | TITLE:
How do I prevent a locally stored XSLT rendered in IE8 defaulting to quirks mode?
QUESTION:
I have some very simple xml and xslt documents, which render in IE8 in quirks mode. However, I can't seem to turn it off. Adding seems to have no effect. Is it possible to make it display in IE8 Standards mode?
ANSWER:
... | [
"xslt",
"quirks-mode"
] | 1 | 4 | 965 | 1 | 0 | 2011-06-07T12:19:21.280000 | 2011-06-07T12:23:48.250000 |
6,265,084 | 6,265,387 | Making Property of my Usercontrol Bindable | i have created a custom user control which im using on my main xaml control: I wanted to make the private variables of my custom usercontrol being ErrorCount,SuccessCount and total count(which are of type int32) Bindable so i can bind values to them. Right now when i try to bind it to my item source it gives the follow... | You need to implement the Properties using DependencyProperty don't use private variables to hold these values. Here is an example:- #region public int SuccessCount
public int SuccessCount { get { return (int)GetValue(SuccessCountProperty); } set { SetValue(SuccessCountProperty, value); } }
public static readonly Dep... | Making Property of my Usercontrol Bindable i have created a custom user control which im using on my main xaml control: I wanted to make the private variables of my custom usercontrol being ErrorCount,SuccessCount and total count(which are of type int32) Bindable so i can bind values to them. Right now when i try to bi... | TITLE:
Making Property of my Usercontrol Bindable
QUESTION:
i have created a custom user control which im using on my main xaml control: I wanted to make the private variables of my custom usercontrol being ErrorCount,SuccessCount and total count(which are of type int32) Bindable so i can bind values to them. Right no... | [
"silverlight"
] | 5 | 6 | 1,814 | 2 | 0 | 2011-06-07T12:23:18 | 2011-06-07T12:48:28.160000 |
6,265,097 | 6,265,192 | Using LINQ Join Extension-Method on List & DataRowCollection | I'd like to Join a List and a DataRowCollection, my Code so far looks like this: attrList.Join ( dt.Rows, attr => attr.Name, dataRow => dataRow[0].ToString(), (a, b) => new Attribute(a.Name, a.Value, b[1].ToString())); attrList is a List of type MyProject.Attribute, which contains a string-Property "Name", the DataRowC... | DataTable.Rows is not generic i.e. it does not implement IEnumerable so you can't use it in Linq, try below: attrList.Join ( dt.AsEnumerable(), attr => attr.Name, dataRow => dataRow[0].ToString(), (a, b) => new Attribute(a.Name, a.Value, b[1].ToString())); | Using LINQ Join Extension-Method on List & DataRowCollection I'd like to Join a List and a DataRowCollection, my Code so far looks like this: attrList.Join ( dt.Rows, attr => attr.Name, dataRow => dataRow[0].ToString(), (a, b) => new Attribute(a.Name, a.Value, b[1].ToString())); attrList is a List of type MyProject.Att... | TITLE:
Using LINQ Join Extension-Method on List & DataRowCollection
QUESTION:
I'd like to Join a List and a DataRowCollection, my Code so far looks like this: attrList.Join ( dt.Rows, attr => attr.Name, dataRow => dataRow[0].ToString(), (a, b) => new Attribute(a.Name, a.Value, b[1].ToString())); attrList is a List of ... | [
"c#",
"linq",
"list",
"join",
"datatable"
] | 0 | 2 | 2,209 | 1 | 0 | 2011-06-07T12:24:25.007000 | 2011-06-07T12:33:33.223000 |
6,265,107 | 6,265,238 | Silverlight MVVM, stop SelectionChanged triggering in response to ItemsSource reset | I have two ComboBoxes, A & B, each bound to an Observable Collection. Each has a SelectionChanged trigger is attached which is intended to catch when the user changes a selection. The trigger passes the selection to a Command. The collections implement INotifyPropertyChanged in that, in the Setter of each, an NotifyPro... | Why does ComboB need a SelectionChanged event? You can just bind the selected item directly into a property on the VM. The way i have tackled this previously was to bind ComboA's selected item into the VM. In the setter for that property, i recalculate the available items for ComboB and assign them to another property ... | Silverlight MVVM, stop SelectionChanged triggering in response to ItemsSource reset I have two ComboBoxes, A & B, each bound to an Observable Collection. Each has a SelectionChanged trigger is attached which is intended to catch when the user changes a selection. The trigger passes the selection to a Command. The colle... | TITLE:
Silverlight MVVM, stop SelectionChanged triggering in response to ItemsSource reset
QUESTION:
I have two ComboBoxes, A & B, each bound to an Observable Collection. Each has a SelectionChanged trigger is attached which is intended to catch when the user changes a selection. The trigger passes the selection to a ... | [
"silverlight-4.0",
"mvvm",
"combobox",
"inotifypropertychanged",
"selectionchanged"
] | 1 | 2 | 1,758 | 1 | 0 | 2011-06-07T12:24:55.317000 | 2011-06-07T12:37:07.990000 |
6,265,134 | 6,265,862 | Are using modules in VB.NET considered bad practice? | During the design of a new application I was wondering if using a module with properties is considered to be a bad practice. Some example code: Module modSettings
public property Setting1 as string
public property DatabaseObject as IDatabaseObject
End Module The code above is just an example to emphasize my question... | Centro is right that a Module (or a NotInheritable Class with Shared members) is the closest equivalent to a C# static class. So technically, nothing is wrong with it as it's just one of VB's ways of creating this type of class. For example, you cannot say Public Shared Class Settings in VB as you cannot put the Shared... | Are using modules in VB.NET considered bad practice? During the design of a new application I was wondering if using a module with properties is considered to be a bad practice. Some example code: Module modSettings
public property Setting1 as string
public property DatabaseObject as IDatabaseObject
End Module The c... | TITLE:
Are using modules in VB.NET considered bad practice?
QUESTION:
During the design of a new application I was wondering if using a module with properties is considered to be a bad practice. Some example code: Module modSettings
public property Setting1 as string
public property DatabaseObject as IDatabaseObject... | [
".net",
"vb.net",
"module"
] | 4 | 9 | 2,326 | 4 | 0 | 2011-06-07T12:27:12.197000 | 2011-06-07T13:24:43.910000 |
6,265,136 | 6,265,212 | All rows where at least one child has all of its own children pass a condition | I'm having a little trouble with a SQL query, and thought I'd solicit the wisdom of the crowd to see what I'm missing. I'm pretty sure the below works, but it seems really poor and I'm wondering if there's a smarter way (ideally using joins instead of sub-selects) to do this. The Problem Let's say I have some tables: P... | The question change a bit, so I have redone the answer... SELECT PrizeId FROM ( SELECT PrizeRule_Map.PrizeId, PrizeRule_Map.RuleId FROM PrizeRule_Map INNER JOIN Rule ON Rule.RuleId = PrizeRule_Map.RuleId INNER JOIN Conditional ON Conditional.RuleId = Rule.RuleID LEFT JOIN Input ON Input.InputId = Conditional.InputID GR... | All rows where at least one child has all of its own children pass a condition I'm having a little trouble with a SQL query, and thought I'd solicit the wisdom of the crowd to see what I'm missing. I'm pretty sure the below works, but it seems really poor and I'm wondering if there's a smarter way (ideally using joins ... | TITLE:
All rows where at least one child has all of its own children pass a condition
QUESTION:
I'm having a little trouble with a SQL query, and thought I'd solicit the wisdom of the crowd to see what I'm missing. I'm pretty sure the below works, but it seems really poor and I'm wondering if there's a smarter way (id... | [
"sql",
"sql-server"
] | 4 | 4 | 1,080 | 3 | 0 | 2011-06-07T12:27:25.583000 | 2011-06-07T12:35:10.427000 |
6,265,139 | 6,265,399 | How to change background-color on click with jQuery? | I have a demo here. I want to accomplish something similar to this. I'm not able to figure out where am I going wrong. | Based on your demos, you is just changing background-color of spans, regardless of their id, so those ifs are very unnecessary. Just it is working well: $(".AccordionPanelContent span").click(function() { $(".AccordionPanelContent span").css("background-color", "white"); $(this).css("background-color", "red"); }); | How to change background-color on click with jQuery? I have a demo here. I want to accomplish something similar to this. I'm not able to figure out where am I going wrong. | TITLE:
How to change background-color on click with jQuery?
QUESTION:
I have a demo here. I want to accomplish something similar to this. I'm not able to figure out where am I going wrong.
ANSWER:
Based on your demos, you is just changing background-color of spans, regardless of their id, so those ifs are very unnece... | [
"jquery",
"click",
"background-color"
] | 2 | 4 | 25,248 | 2 | 0 | 2011-06-07T12:27:47.533000 | 2011-06-07T12:49:33.403000 |
6,265,153 | 6,265,344 | PHP to output a local timezone adjusted DateTime | I was under the impression that the format() function of the PHP DateTime class exported the timestamp it was initially passed with the correct offset applied to it. I've come to realise that it doesn't make sense for it to do that. I therefore want to store the timestamp from the database (UTC) in the object along wit... | You can create the DateTime instance, specifying that it is UTC. Then change its timezone to that of the user with setTimeZone(). $datetime = new DateTime("2011-06-07 12:34:56", new DateTimeZone("UTC")); $datetime->setTimeZone(new DateTimeZone("Europe/Berlin")); echo $datetime->format(DateTime::RSS); | PHP to output a local timezone adjusted DateTime I was under the impression that the format() function of the PHP DateTime class exported the timestamp it was initially passed with the correct offset applied to it. I've come to realise that it doesn't make sense for it to do that. I therefore want to store the timestam... | TITLE:
PHP to output a local timezone adjusted DateTime
QUESTION:
I was under the impression that the format() function of the PHP DateTime class exported the timestamp it was initially passed with the correct offset applied to it. I've come to realise that it doesn't make sense for it to do that. I therefore want to ... | [
"php",
"timezone"
] | 4 | 7 | 746 | 1 | 0 | 2011-06-07T12:29:01.953000 | 2011-06-07T12:45:02.500000 |
6,265,156 | 6,265,326 | Using ajax to insert into database | I have an anchor tag which i want to use to go to a certain page but at the same time i want to use the onclick function to insert into a databse. here's what i got so far: html: click here and here's the php file: mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("db_name") or d... | the first error I found is: you want $_GET['link']) in your php code, but only send a click parameter in JS. So you should change your JS code: xmlhttp.open("GET","submit.php?link="+str,true); try to run the php script without ajax to eventually find more errors. | Using ajax to insert into database I have an anchor tag which i want to use to go to a certain page but at the same time i want to use the onclick function to insert into a databse. here's what i got so far: html: click here and here's the php file: mysql_connect("localhost", "username", "password") or die(mysql_error(... | TITLE:
Using ajax to insert into database
QUESTION:
I have an anchor tag which i want to use to go to a certain page but at the same time i want to use the onclick function to insert into a databse. here's what i got so far: html: click here and here's the php file: mysql_connect("localhost", "username", "password") o... | [
"php",
"html",
"ajax"
] | 1 | 0 | 1,062 | 5 | 0 | 2011-06-07T12:29:36.033000 | 2011-06-07T12:43:55.723000 |
6,265,160 | 6,268,606 | TO_CHAR of an Oracle PL/SQL TABLE type | For debugging purposes, I'd like to be able to " TO_CHAR " an Oracle PL/SQL in-memory table. Here's a simplified example, of what I'd like to do: DECLARE TYPE T IS TABLE OF MY_TABLE%ROWTYPE INDEX BY PLS_INTEGER; V T;
BEGIN --..
-- Here, I'd like to dbms_output V's contents, which of course doesn't compile FOR i IN V.... | ok, sorry this isn't complete, but to followup with @Lukas, here's what I have so far: First, instead of trying to create anydata/anytype types, I tried using XML extracted from a cursor...weird, but its generic: CREATE OR REPLACE procedure printCur(in_cursor IN sys_refcursor) IS begin
FOR c IN (SELECT ROWNUM rn, t2.C... | TO_CHAR of an Oracle PL/SQL TABLE type For debugging purposes, I'd like to be able to " TO_CHAR " an Oracle PL/SQL in-memory table. Here's a simplified example, of what I'd like to do: DECLARE TYPE T IS TABLE OF MY_TABLE%ROWTYPE INDEX BY PLS_INTEGER; V T;
BEGIN --..
-- Here, I'd like to dbms_output V's contents, whic... | TITLE:
TO_CHAR of an Oracle PL/SQL TABLE type
QUESTION:
For debugging purposes, I'd like to be able to " TO_CHAR " an Oracle PL/SQL in-memory table. Here's a simplified example, of what I'd like to do: DECLARE TYPE T IS TABLE OF MY_TABLE%ROWTYPE INDEX BY PLS_INTEGER; V T;
BEGIN --..
-- Here, I'd like to dbms_output ... | [
"oracle",
"plsql",
"tostring",
"temp-tables"
] | 4 | 6 | 2,992 | 1 | 0 | 2011-06-07T12:29:57.377000 | 2011-06-07T16:38:46.340000 |
6,265,162 | 6,265,347 | dateFromString returns nil | This is my NSString, myDate: 2011-06-07 11:23:47 0000 And this is the code, NSTimeZone *currentDateTimeZone = [NSTimeZone defaultTimeZone]; NSDateFormatter *currentDateFormat = [[NSDateFormatter alloc]init]; [currentDateFormat setTimeZone:currentDateTimeZone]; [currentDateFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"];... | How did you get the date string? It needs to be 2011-06-07 11:23:47 +0000 for this to work. | dateFromString returns nil This is my NSString, myDate: 2011-06-07 11:23:47 0000 And this is the code, NSTimeZone *currentDateTimeZone = [NSTimeZone defaultTimeZone]; NSDateFormatter *currentDateFormat = [[NSDateFormatter alloc]init]; [currentDateFormat setTimeZone:currentDateTimeZone]; [currentDateFormat setDateFormat... | TITLE:
dateFromString returns nil
QUESTION:
This is my NSString, myDate: 2011-06-07 11:23:47 0000 And this is the code, NSTimeZone *currentDateTimeZone = [NSTimeZone defaultTimeZone]; NSDateFormatter *currentDateFormat = [[NSDateFormatter alloc]init]; [currentDateFormat setTimeZone:currentDateTimeZone]; [currentDateFo... | [
"iphone",
"xcode",
"nsdate",
"nsdateformatter"
] | 5 | 3 | 5,506 | 4 | 0 | 2011-06-07T12:30:01.183000 | 2011-06-07T12:45:15.247000 |
6,265,169 | 6,265,223 | Sleeping in a SwingWorker? | I need to feed test data to a Swing interval over a time period. The data set is long to parse, so I'm using a SwingWorker to parse it in the background. When it comes to feeding the data to the GUI (say, one item per second), I could start a Timer from the SwingWorker, but this seems overkill. Any reasons not to sleep... | Since SwingWorker doesn't run on the EDT, sleeping within is perfectly fine. SwingWorker is designed for situations where you need to have a long running task run in a background thread and provide updates to the UI either when done, or while processing. In my opinion, a Timer in addition to a SwingWorker would be over... | Sleeping in a SwingWorker? I need to feed test data to a Swing interval over a time period. The data set is long to parse, so I'm using a SwingWorker to parse it in the background. When it comes to feeding the data to the GUI (say, one item per second), I could start a Timer from the SwingWorker, but this seems overkil... | TITLE:
Sleeping in a SwingWorker?
QUESTION:
I need to feed test data to a Swing interval over a time period. The data set is long to parse, so I'm using a SwingWorker to parse it in the background. When it comes to feeding the data to the GUI (say, one item per second), I could start a Timer from the SwingWorker, but ... | [
"java",
"swing",
"sleep",
"swingworker"
] | 5 | 4 | 1,618 | 2 | 0 | 2011-06-07T12:31:15.097000 | 2011-06-07T12:35:55.867000 |
6,265,170 | 6,265,204 | How to click links with the same name in Javascript | I am trying to figure out how to click all three of these (not at once, separately) using either Javascript or jQuery. I'm using a Python module that executes Javascript code and trying to make a complicated macro, more or less. Any help is appreciated! | Jquery's trigger will come in handy for you $('#edit-submit,#edit-preview,#edit-submit-again').trigger('click'); | How to click links with the same name in Javascript I am trying to figure out how to click all three of these (not at once, separately) using either Javascript or jQuery. I'm using a Python module that executes Javascript code and trying to make a complicated macro, more or less. Any help is appreciated! | TITLE:
How to click links with the same name in Javascript
QUESTION:
I am trying to figure out how to click all three of these (not at once, separately) using either Javascript or jQuery. I'm using a Python module that executes Javascript code and trying to make a complicated macro, more or less. Any help is appreciat... | [
"javascript",
"jquery"
] | 0 | 3 | 188 | 5 | 0 | 2011-06-07T12:31:23.747000 | 2011-06-07T12:34:54.080000 |
6,265,195 | 6,265,425 | String.format doesn't give month and weeknames in German locale | I'm using following code in my app: Calendar tmpCalendar = Calendar.getInstance(Locale.getDefault()); String itemTime = String.format( Locale.getDefault(), "%1$tA, %1$te. %1$tB %1$tY", tmpCalendar); German is the default language on my device, so I'd expect to get something like: Dienstag, 7. Juni 2011 Instead I'm gett... | It seems to be a bug of some vendors and is issue #9453 in the Android issue tracker. | String.format doesn't give month and weeknames in German locale I'm using following code in my app: Calendar tmpCalendar = Calendar.getInstance(Locale.getDefault()); String itemTime = String.format( Locale.getDefault(), "%1$tA, %1$te. %1$tB %1$tY", tmpCalendar); German is the default language on my device, so I'd expec... | TITLE:
String.format doesn't give month and weeknames in German locale
QUESTION:
I'm using following code in my app: Calendar tmpCalendar = Calendar.getInstance(Locale.getDefault()); String itemTime = String.format( Locale.getDefault(), "%1$tA, %1$te. %1$tB %1$tY", tmpCalendar); German is the default language on my de... | [
"android",
"date",
"localization",
"format"
] | 2 | 1 | 1,705 | 3 | 0 | 2011-06-07T12:33:56.367000 | 2011-06-07T12:51:49.703000 |
6,265,209 | 6,265,636 | django-taggit - how do I display the tags related to each record | I'm using django-taggit on one of my projects and I'm able to save and tie the tags with specific records. Now the question is how do I display the tags related to each record? For example on my page I want to display a record which contains a title and content and then under it I want to show the tags tied to that rec... | models.py from django.db import models from taggit.managers import TaggableManager
class MyObject(models.Model): title = models.CharField(max_length=100) content = models.TextField()
tags = TaggableManager() views.py from django.views.generic import simple
def show_object(request): """ View all objects """ return si... | django-taggit - how do I display the tags related to each record I'm using django-taggit on one of my projects and I'm able to save and tie the tags with specific records. Now the question is how do I display the tags related to each record? For example on my page I want to display a record which contains a title and c... | TITLE:
django-taggit - how do I display the tags related to each record
QUESTION:
I'm using django-taggit on one of my projects and I'm able to save and tie the tags with specific records. Now the question is how do I display the tags related to each record? For example on my page I want to display a record which cont... | [
"django",
"django-templates",
"django-views",
"django-taggit"
] | 21 | 37 | 11,135 | 2 | 0 | 2011-06-07T12:35:03.793000 | 2011-06-07T13:07:30.997000 |
6,265,215 | 6,271,072 | How to create a nested msxml6.msi package | How to add msxml6.msi as nested package into my vs 2005 setup (Based.msi) using Orca? I already used this instructions http://support.microsoft.com/kb/306439, but msxml6.msi installation never started. | Nested installations are deprecated. You should either use a prerequisite, or a custom action. Here is a small prerequisite tutorial for Visual Studio 2005: http://www.codeproject.com/KB/dotnet/Prerequisites_in_Setup.aspx You can try using the bootstrapper manifest generator to configure your prerequisite. If you want ... | How to create a nested msxml6.msi package How to add msxml6.msi as nested package into my vs 2005 setup (Based.msi) using Orca? I already used this instructions http://support.microsoft.com/kb/306439, but msxml6.msi installation never started. | TITLE:
How to create a nested msxml6.msi package
QUESTION:
How to add msxml6.msi as nested package into my vs 2005 setup (Based.msi) using Orca? I already used this instructions http://support.microsoft.com/kb/306439, but msxml6.msi installation never started.
ANSWER:
Nested installations are deprecated. You should e... | [
"visual-studio-2005",
"setup-project",
"orca"
] | 2 | 1 | 580 | 1 | 0 | 2011-06-07T12:35:27.917000 | 2011-06-07T20:15:30.503000 |
6,265,224 | 6,265,462 | How can I find out if a core-data object can be deleted when relationships could prevent it? | Let's say I have an employee database, where an employee can be manager of a department. The manager relationship of a department (to an employee in the role of a manager) is not optional. So, I cannot delete an employee when he is manager of a deparment. In my UITableViewDelegate I would like to have: -(UITableViewCel... | If you set up the manager attribute as a BOOL or something similar, you can check your tableView against that. After getting a reference to the employee through the tableView, something simple such as return [[[fetchController objectAtIndexPath:indexPath] manager] boolValue]? UITableViewCellEditingStyleNone: UITableVie... | How can I find out if a core-data object can be deleted when relationships could prevent it? Let's say I have an employee database, where an employee can be manager of a department. The manager relationship of a department (to an employee in the role of a manager) is not optional. So, I cannot delete an employee when h... | TITLE:
How can I find out if a core-data object can be deleted when relationships could prevent it?
QUESTION:
Let's say I have an employee database, where an employee can be manager of a department. The manager relationship of a department (to an employee in the role of a manager) is not optional. So, I cannot delete ... | [
"iphone",
"ios",
"core-data"
] | 0 | 0 | 153 | 1 | 0 | 2011-06-07T12:36:03.953000 | 2011-06-07T12:54:07.513000 |
6,265,225 | 6,265,398 | Java: How can a thread wait on multiple objects? | A thread can use Object.wait() to block until another thread calls notify() or notifyAll() on that object. But what if a thread wants to wait until one of multiple objects is signaled? For example, my thread must wait until either a) bytes become available to read from an InputStream or b) an item is added to an ArrayL... | A thread cannot wait on more than one object at a time. The wait() and notify() methods are object-specific. The wait() method suspends the current thread of execution, and tells the object to keep track of the suspended thread. The notify() method tells the object to wake up the suspended threads that it is currently ... | Java: How can a thread wait on multiple objects? A thread can use Object.wait() to block until another thread calls notify() or notifyAll() on that object. But what if a thread wants to wait until one of multiple objects is signaled? For example, my thread must wait until either a) bytes become available to read from a... | TITLE:
Java: How can a thread wait on multiple objects?
QUESTION:
A thread can use Object.wait() to block until another thread calls notify() or notifyAll() on that object. But what if a thread wants to wait until one of multiple objects is signaled? For example, my thread must wait until either a) bytes become availa... | [
"java",
"multithreading",
"wait",
"notify"
] | 23 | 5 | 18,378 | 8 | 0 | 2011-06-07T12:36:16.593000 | 2011-06-07T12:49:30.623000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.