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,210,621 | 6,210,662 | SQL for finding a value having rows of closest to half of all unique occurrences of another value? | Table rows I'm using: `factid` int(11) NOT NULL, `segid` int(11) NOT NULL, PRIMARY KEY (`factid`,`segid`) Here's the steps of what I'm trying to accomplish: I need the total number of unique segid values in the table. I need a single factid value. This factid value needs to have rows with many unique segid values. 'Man... | SELECT TOP 1 facts.factid, facts.segids, segs.total_segids FROM ( SELECT factid, count(distinct segid) as segids FROM my_table GROUP BY factid ) facts, ( SELECT count(distinct segid) as total_segids FROM my_table ) segs ORDER BY abs(facts.segids - (segs.total_segids / 2)) | SQL for finding a value having rows of closest to half of all unique occurrences of another value? Table rows I'm using: `factid` int(11) NOT NULL, `segid` int(11) NOT NULL, PRIMARY KEY (`factid`,`segid`) Here's the steps of what I'm trying to accomplish: I need the total number of unique segid values in the table. I n... | TITLE:
SQL for finding a value having rows of closest to half of all unique occurrences of another value?
QUESTION:
Table rows I'm using: `factid` int(11) NOT NULL, `segid` int(11) NOT NULL, PRIMARY KEY (`factid`,`segid`) Here's the steps of what I'm trying to accomplish: I need the total number of unique segid values... | [
"mysql",
"sql"
] | 0 | 1 | 122 | 1 | 0 | 2011-06-02T05:02:45.970000 | 2011-06-02T05:09:41.260000 |
6,210,626 | 6,210,640 | Protecting Java data (saving items to a secure file)? | I am making a simple text game in Java and I wanted a safe way to save statistics (money, etc). I could do a text file but then it could just be modified. I was wondering if there was a simple way to make it a little more difficult for someone to mess around with the saved statistics. | Serializing might be a simple solution. Store the data that needs to be saved into a Serializable class (Look up the java Serializable interface) and write it to a file. It won't be uber-encrypted, but it'll stop people from just opening it up in notepad and changing it. Here's a simple example of how to serialize an o... | Protecting Java data (saving items to a secure file)? I am making a simple text game in Java and I wanted a safe way to save statistics (money, etc). I could do a text file but then it could just be modified. I was wondering if there was a simple way to make it a little more difficult for someone to mess around with th... | TITLE:
Protecting Java data (saving items to a secure file)?
QUESTION:
I am making a simple text game in Java and I wanted a safe way to save statistics (money, etc). I could do a text file but then it could just be modified. I was wondering if there was a simple way to make it a little more difficult for someone to m... | [
"java"
] | 1 | 1 | 2,445 | 2 | 0 | 2011-06-02T05:03:52.677000 | 2011-06-02T05:05:56.020000 |
6,210,633 | 6,210,683 | close icon doesn't appear | I was trying to add a text popup box on my page, and this code helped me but I need to add a close icon (which is an image in my code).. but it doesn't work:/ here is my code: function show_hide_box(an, width, height, borderStyle) {
if (navigator.userAgent.indexOf("MSIE")!= -1) { var browserIsIE = true; } else { brows... | That should mean that the path of src is wrong. ie,../../Images/closebox.png Add this to your code and see whether this works inImage2.setAttribute('alt', 'Close'); Even if this doesn't work, it shows you that something else is wrong with the code. Its a very good practice to add alt attribute to img tag always. Update... | close icon doesn't appear I was trying to add a text popup box on my page, and this code helped me but I need to add a close icon (which is an image in my code).. but it doesn't work:/ here is my code: function show_hide_box(an, width, height, borderStyle) {
if (navigator.userAgent.indexOf("MSIE")!= -1) { var browserI... | TITLE:
close icon doesn't appear
QUESTION:
I was trying to add a text popup box on my page, and this code helped me but I need to add a close icon (which is an image in my code).. but it doesn't work:/ here is my code: function show_hide_box(an, width, height, borderStyle) {
if (navigator.userAgent.indexOf("MSIE")!= ... | [
"javascript",
"popup"
] | 0 | 1 | 178 | 1 | 0 | 2011-06-02T05:05:17.190000 | 2011-06-02T05:12:54.727000 |
6,210,639 | 6,214,412 | Challenging MySQL query | I'm working on a blogging app that requires a unique query. Problem: I need to display one parent post, all it's children posts ( up to a certain number before requiring pagination ), and up to 5 comments associated with each child post, and the parent. I wrote this query, but it doesn't work because it will return onl... | I take as granted that every child has exactly one parent. Then, I think this will work: SELECT p.* <-- post details, u.* <-- user details, cc.* <-- comment details FROM ( ( SELECT parentid AS id FROM posts WHERE posts.id = @mypostid <-- the id of the post we want ) UNION ALL ( SELECT child.id FROM posts AS parent JOIN... | Challenging MySQL query I'm working on a blogging app that requires a unique query. Problem: I need to display one parent post, all it's children posts ( up to a certain number before requiring pagination ), and up to 5 comments associated with each child post, and the parent. I wrote this query, but it doesn't work be... | TITLE:
Challenging MySQL query
QUESTION:
I'm working on a blogging app that requires a unique query. Problem: I need to display one parent post, all it's children posts ( up to a certain number before requiring pagination ), and up to 5 comments associated with each child post, and the parent. I wrote this query, but ... | [
"mysql"
] | 3 | 1 | 622 | 4 | 0 | 2011-06-02T05:05:52.070000 | 2011-06-02T12:19:25.513000 |
6,210,642 | 6,210,892 | getting some values in the table view rows in an iphone app | hii every one i am new to iphone, i have done a sample data entry project in that i am saving data into the sqlite then displaying the saved data in the table view, & then on click of each row of the table it will go to other page (grouped table view where i am displying detailed data) now i have the table view like th... | When you add new row in the table upon back button press, you can either add a new row in the table using insertRowsAtIndexPaths:withRowAnimation: or update your array (adding this extra row) with the help of which you show the rows and then reload the table view. Because when you reload your table view, its datasource... | getting some values in the table view rows in an iphone app hii every one i am new to iphone, i have done a sample data entry project in that i am saving data into the sqlite then displaying the saved data in the table view, & then on click of each row of the table it will go to other page (grouped table view where i a... | TITLE:
getting some values in the table view rows in an iphone app
QUESTION:
hii every one i am new to iphone, i have done a sample data entry project in that i am saving data into the sqlite then displaying the saved data in the table view, & then on click of each row of the table it will go to other page (grouped ta... | [
"iphone",
"objective-c",
"uitableview"
] | 0 | 1 | 214 | 2 | 0 | 2011-06-02T05:05:58.777000 | 2011-06-02T05:44:05.873000 |
6,210,645 | 6,210,657 | Usage of DataKeyNames in an ASP.NET GridView? | In which cases should I use a GridView's property DataKeyNames? Why are multiple columns/fields allowed here? | Gets or sets an array that contains the names of the primary key fields for the items displayed in a GridView control. GridView.DataKeyNames Property GridView.DataKeys Property | Usage of DataKeyNames in an ASP.NET GridView? In which cases should I use a GridView's property DataKeyNames? Why are multiple columns/fields allowed here? | TITLE:
Usage of DataKeyNames in an ASP.NET GridView?
QUESTION:
In which cases should I use a GridView's property DataKeyNames? Why are multiple columns/fields allowed here?
ANSWER:
Gets or sets an array that contains the names of the primary key fields for the items displayed in a GridView control. GridView.DataKeyNa... | [
"asp.net",
"gridview"
] | 11 | 8 | 7,806 | 2 | 0 | 2011-06-02T05:06:27.217000 | 2011-06-02T05:08:22.020000 |
6,210,649 | 6,210,736 | resize images in php with imagemagick on 1&1 hosting | I am running out of memory when allowing users to resize images of modern day 12MP or higher cameras. Even some pictures that are only 900kb in size take up a lot more room in memory because it's based on pixel size (i think) so... I have SSH access to a 1&1 shared server and I followed their instructions to upload ima... | exec('/path/to/your/home/imagemagick/installation/bin/convert '.$src.' -resize '.$newWidth.'x'.$newHeight.' '.$saveDest); But make sure you have all variables coming from user site escaped. And $saveDest is writable by your webserver. Changes are high that you run in to the same memory limit problems, couse apache/php ... | resize images in php with imagemagick on 1&1 hosting I am running out of memory when allowing users to resize images of modern day 12MP or higher cameras. Even some pictures that are only 900kb in size take up a lot more room in memory because it's based on pixel size (i think) so... I have SSH access to a 1&1 shared s... | TITLE:
resize images in php with imagemagick on 1&1 hosting
QUESTION:
I am running out of memory when allowing users to resize images of modern day 12MP or higher cameras. Even some pictures that are only 900kb in size take up a lot more room in memory because it's based on pixel size (i think) so... I have SSH access... | [
"php",
"image-processing",
"resize",
"imagemagick",
"gd"
] | 1 | 0 | 3,623 | 2 | 0 | 2011-06-02T05:06:57.060000 | 2011-06-02T05:19:20.353000 |
6,210,658 | 6,210,673 | Custom Rails Validation throwing undefined method error | I need to validate that a field is a positive value, and wrote a little methid in lib/validations.rb which does exactly that and added it to my model. However, now one of my rspec tests is failing complaining... NoMethodError: undefined method '<' for nil:NilClass"...when the value is undefined. I've also added validat... | Rails already has this: http://apidock.com/rails/ActiveModel/Validations/HelperMethods/validates_numericality_of Use:greater_than => 0 | Custom Rails Validation throwing undefined method error I need to validate that a field is a positive value, and wrote a little methid in lib/validations.rb which does exactly that and added it to my model. However, now one of my rspec tests is failing complaining... NoMethodError: undefined method '<' for nil:NilClass... | TITLE:
Custom Rails Validation throwing undefined method error
QUESTION:
I need to validate that a field is a positive value, and wrote a little methid in lib/validations.rb which does exactly that and added it to my model. However, now one of my rspec tests is failing complaining... NoMethodError: undefined method '<... | [
"ruby-on-rails",
"ruby",
"validation"
] | 2 | 2 | 1,361 | 2 | 0 | 2011-06-02T05:08:32.240000 | 2011-06-02T05:11:26.950000 |
6,210,660 | 6,210,706 | Crystal Report direct saving as PDF, instead of viewing | I want to make a report from ASP.Net, in Crystal Report. I want, when user click on print, it should simply show a browser dialog of Save,Open,Save as, and PDF should be saved, or Crystal Report print preview should appear, I don't want to display report first in Viewer then click on button to get print or PDF, I want ... | Here is the solution you are looking for: http://www.c-sharpcorner.com/UploadFile/mahesh/ExportCRtoPDF10062006161918PM/ExportCRtoPDF.aspx Here is the quote from the site: The following steps will guide you to achieve the same: Add crystal report (.cr) file to your ASP.NET application. Add a report instance on the page ... | Crystal Report direct saving as PDF, instead of viewing I want to make a report from ASP.Net, in Crystal Report. I want, when user click on print, it should simply show a browser dialog of Save,Open,Save as, and PDF should be saved, or Crystal Report print preview should appear, I don't want to display report first in ... | TITLE:
Crystal Report direct saving as PDF, instead of viewing
QUESTION:
I want to make a report from ASP.Net, in Crystal Report. I want, when user click on print, it should simply show a browser dialog of Save,Open,Save as, and PDF should be saved, or Crystal Report print preview should appear, I don't want to displa... | [
"asp.net",
"visual-studio",
"crystal-reports",
"crystal-reports-2008"
] | 9 | 3 | 38,888 | 2 | 0 | 2011-06-02T05:09:34.300000 | 2011-06-02T05:15:58.977000 |
6,210,663 | 6,210,747 | What does "static this()" outside of a class mean? | I'm very well aware of static constructors, but what does it mean to have a static this() outside of a class? import std.stdio;
static this(){
int x = 0;
}
int main(){
writeln(x); // error
return 0; } And how do I access the variables define in static this()? | This is the module constructor. You can read about them here: http://www.digitalmars.com/d/2.0/module.html Obviously, you can't access x in your sample, because it's a module constructor's local variable, just as well as you couldn't have done it with a class constructor's one. But you can access module-scope globals t... | What does "static this()" outside of a class mean? I'm very well aware of static constructors, but what does it mean to have a static this() outside of a class? import std.stdio;
static this(){
int x = 0;
}
int main(){
writeln(x); // error
return 0; } And how do I access the variables define in static this()? | TITLE:
What does "static this()" outside of a class mean?
QUESTION:
I'm very well aware of static constructors, but what does it mean to have a static this() outside of a class? import std.stdio;
static this(){
int x = 0;
}
int main(){
writeln(x); // error
return 0; } And how do I access the variables define in ... | [
"d"
] | 11 | 14 | 1,595 | 2 | 0 | 2011-06-02T05:09:43.893000 | 2011-06-02T05:22:09.183000 |
6,210,685 | 6,211,427 | Explanation for this assembly code | void* curbrk;
__asm__ __volatile__( "mov.curbrk, %%rax;" "mov %%rax, %0": "=r" (curbrk):: "%rax" ); Can anyone explain what this simple assembly code does? Thanks. | It copies the value of a symbol.curbrk, probably defined somewhere on assembly or a linker script into the C variable curbrk, clobbering the RAX register in the process..curbrk probably points to the current end of the data segment. Glibc appears to define a similar symbol __curbrk, you are probably using some other li... | Explanation for this assembly code void* curbrk;
__asm__ __volatile__( "mov.curbrk, %%rax;" "mov %%rax, %0": "=r" (curbrk):: "%rax" ); Can anyone explain what this simple assembly code does? Thanks. | TITLE:
Explanation for this assembly code
QUESTION:
void* curbrk;
__asm__ __volatile__( "mov.curbrk, %%rax;" "mov %%rax, %0": "=r" (curbrk):: "%rax" ); Can anyone explain what this simple assembly code does? Thanks.
ANSWER:
It copies the value of a symbol.curbrk, probably defined somewhere on assembly or a linker sc... | [
"c",
"assembly"
] | 3 | 5 | 486 | 2 | 0 | 2011-06-02T05:13:13.880000 | 2011-06-02T06:58:22.200000 |
6,210,690 | 6,222,667 | Jquery Modalbox closing: is it possible to keep default value of inputs in a modalbox when close it without reload parent page? | at first sorry about my poor English. Now Im having a problem in closing and passing params to a modalbox, hope you guys can help me. Im working with Zend Framework. I have an index page (action) and a hyperlink within it to call a modal box (using ajax). Open Popup I have a div tag for display result from openPopup fu... | Yup, finally I found the way to solve my problem. Hope this will be useful for someone need. Just so simple: function openPopup(id, url){
$.ajax({ type: "POST", url: url, data: "id="+id, success: function(result) { $("#editBoxDiv").html(result);
$( "#dialog-modal-edit" ).dialog({ bgiframe: true, autoOpen: true, width... | Jquery Modalbox closing: is it possible to keep default value of inputs in a modalbox when close it without reload parent page? at first sorry about my poor English. Now Im having a problem in closing and passing params to a modalbox, hope you guys can help me. Im working with Zend Framework. I have an index page (acti... | TITLE:
Jquery Modalbox closing: is it possible to keep default value of inputs in a modalbox when close it without reload parent page?
QUESTION:
at first sorry about my poor English. Now Im having a problem in closing and passing params to a modalbox, hope you guys can help me. Im working with Zend Framework. I have a... | [
"jquery",
"input",
"modal-dialog"
] | 1 | 1 | 1,071 | 1 | 0 | 2011-06-02T05:14:00.213000 | 2011-06-03T03:26:10.840000 |
6,210,693 | 6,210,707 | jquery: using OR with .click()? | I need help trying to figure out how to use.click() function for two different attributes. $('#prev').click(function() {} and $('#image').click(function() {} So how would I do an OR statement if user clicks on #prev and #image without writing two identical scripts? Thanks! | $('#prev, #image').click(function() {...}); or function handleClick() {} $('#prev').click(handleClick); $('#image').click(handleClick); | jquery: using OR with .click()? I need help trying to figure out how to use.click() function for two different attributes. $('#prev').click(function() {} and $('#image').click(function() {} So how would I do an OR statement if user clicks on #prev and #image without writing two identical scripts? Thanks! | TITLE:
jquery: using OR with .click()?
QUESTION:
I need help trying to figure out how to use.click() function for two different attributes. $('#prev').click(function() {} and $('#image').click(function() {} So how would I do an OR statement if user clicks on #prev and #image without writing two identical scripts? Than... | [
"jquery",
"function",
"attributes",
"click"
] | 1 | 5 | 93 | 3 | 0 | 2011-06-02T05:14:15.283000 | 2011-06-02T05:16:10.233000 |
6,210,695 | 6,210,784 | Is it possible, using PHPUnit mock objects, to expect a call to a magic __call() method? | I've got a mock object in a test. The real object, PageRepository, implements a magic method using __call(), so if you call $pageRepository->findOneByXXXX($value_of_field_XXXX), it will search the database for records matching that parameter. Is there a way to mock that method? The real method call would look something... | PHPUnit's getMock() takes a second argument, an array with the names of methods to be mocked. If you include a method name in this array, the mock object will contain a method with that name, which expects() and friends will work on. This applies even for methods that are not defined in the "real" class, so something l... | Is it possible, using PHPUnit mock objects, to expect a call to a magic __call() method? I've got a mock object in a test. The real object, PageRepository, implements a magic method using __call(), so if you call $pageRepository->findOneByXXXX($value_of_field_XXXX), it will search the database for records matching that... | TITLE:
Is it possible, using PHPUnit mock objects, to expect a call to a magic __call() method?
QUESTION:
I've got a mock object in a test. The real object, PageRepository, implements a magic method using __call(), so if you call $pageRepository->findOneByXXXX($value_of_field_XXXX), it will search the database for rec... | [
"php",
"symfony",
"phpunit",
"magic-methods"
] | 35 | 47 | 13,363 | 2 | 0 | 2011-06-02T05:14:31.883000 | 2011-06-02T05:27:56.667000 |
6,210,701 | 6,215,055 | Is it possible using cocos2d via javascript fully? | I am new to cocos2d. Is it possible using cocos2d via javascript fully? I prefer to use script language to control game elements. Welcome any comment | The only languages available to program with cocos2d on the iPhone are C++ and Objective-c as far as i'm aware. (I've been programming for the iPhone SDK for nearly 2 years with cocos2d and have never seen javascript mentioned.) http://www.cocos2d-iphone.org | Is it possible using cocos2d via javascript fully? I am new to cocos2d. Is it possible using cocos2d via javascript fully? I prefer to use script language to control game elements. Welcome any comment | TITLE:
Is it possible using cocos2d via javascript fully?
QUESTION:
I am new to cocos2d. Is it possible using cocos2d via javascript fully? I prefer to use script language to control game elements. Welcome any comment
ANSWER:
The only languages available to program with cocos2d on the iPhone are C++ and Objective-c a... | [
"iphone",
"cocos2d-iphone"
] | 0 | 0 | 119 | 2 | 0 | 2011-06-02T05:15:23.693000 | 2011-06-02T13:19:30.237000 |
6,210,716 | 6,210,822 | How are macros finally determined in configure? | #if (NGX_SOLARIS)
ngx_int_t i; size_t size;
#endif I know that NGX_SOLARIS is finally determined when we run./configure,but how are these macros actually defined,can you provide a detailed example that demonstrates how most./configure works? | ./configure runs through all the checks for what your system's platform is, what capabilities your compiler has, etc. and then it uses automake to generate Makefiles with stuff like CPPFLAGS which define the macros it needs to pass to the preprocessor during compilation. This is all part of the GNU build system: http:/... | How are macros finally determined in configure? #if (NGX_SOLARIS)
ngx_int_t i; size_t size;
#endif I know that NGX_SOLARIS is finally determined when we run./configure,but how are these macros actually defined,can you provide a detailed example that demonstrates how most./configure works? | TITLE:
How are macros finally determined in configure?
QUESTION:
#if (NGX_SOLARIS)
ngx_int_t i; size_t size;
#endif I know that NGX_SOLARIS is finally determined when we run./configure,but how are these macros actually defined,can you provide a detailed example that demonstrates how most./configure works?
ANSWER:
.... | [
"c",
"configure"
] | 1 | 0 | 46 | 1 | 0 | 2011-06-02T05:17:17.887000 | 2011-06-02T05:32:53.107000 |
6,210,723 | 6,210,907 | Problem with creating animations | I'm working with cocos2d 0.99.5. I need to create animations. I have 01.png in my resources and in my project. It's ok. I don't understand why I can't create a frame. I've got error SIGABRT. CCSprite *frame = [CCSprite spriteWithSpriteFrameName:@"01.png"]; I've tried to use this CCSpriteFrame *frame = [[CCSpriteFrameCa... | That's because you must have your sprite in the spriteSheet. Here is the tutorial about creating animations: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:animation | Problem with creating animations I'm working with cocos2d 0.99.5. I need to create animations. I have 01.png in my resources and in my project. It's ok. I don't understand why I can't create a frame. I've got error SIGABRT. CCSprite *frame = [CCSprite spriteWithSpriteFrameName:@"01.png"]; I've tried to use this CCSprit... | TITLE:
Problem with creating animations
QUESTION:
I'm working with cocos2d 0.99.5. I need to create animations. I have 01.png in my resources and in my project. It's ok. I don't understand why I can't create a frame. I've got error SIGABRT. CCSprite *frame = [CCSprite spriteWithSpriteFrameName:@"01.png"]; I've tried t... | [
"animation",
"cocos2d-iphone",
"frames",
"sigabrt"
] | 0 | 0 | 136 | 1 | 0 | 2011-06-02T05:17:57.077000 | 2011-06-02T05:46:37.683000 |
6,210,729 | 6,210,817 | Resizing UIImageview with a UITextview using UIGuesture | I'm new in Iphone. I have an UITextView inside a UIImageView. Now I need to dynamically resize the UIImageView so that its textview also change its size dynamically. Moreover I can move this UIImageView with UITextView around the screen. If any one knows this using UIGuesture please help me. Any help would be appreciat... | If you are looking at resizing the UIImageView object, look at the UIPinchGestureRecognizer. It will have a property called scale that you can use to change its size. As for the UITextView object that is the subview, you can look at autoresizingMask property inherited from UIView. Set it appropriately so that the text ... | Resizing UIImageview with a UITextview using UIGuesture I'm new in Iphone. I have an UITextView inside a UIImageView. Now I need to dynamically resize the UIImageView so that its textview also change its size dynamically. Moreover I can move this UIImageView with UITextView around the screen. If any one knows this usin... | TITLE:
Resizing UIImageview with a UITextview using UIGuesture
QUESTION:
I'm new in Iphone. I have an UITextView inside a UIImageView. Now I need to dynamically resize the UIImageView so that its textview also change its size dynamically. Moreover I can move this UIImageView with UITextView around the screen. If any o... | [
"iphone",
"ios",
"ios4",
"uiimageview",
"uitextview"
] | 1 | 3 | 361 | 1 | 0 | 2011-06-02T05:18:50.117000 | 2011-06-02T05:32:01.270000 |
6,210,730 | 6,210,831 | File Picker for Android | Is there any picker available to pick file from the SDCard or Device memory,like FilePicker available in Blackberry? If not,then any alternative for doing this? Please help me. Thanks in advance. | Here is the help for implementing File picker. You can also see the out put here | File Picker for Android Is there any picker available to pick file from the SDCard or Device memory,like FilePicker available in Blackberry? If not,then any alternative for doing this? Please help me. Thanks in advance. | TITLE:
File Picker for Android
QUESTION:
Is there any picker available to pick file from the SDCard or Device memory,like FilePicker available in Blackberry? If not,then any alternative for doing this? Please help me. Thanks in advance.
ANSWER:
Here is the help for implementing File picker. You can also see the out p... | [
"android",
"file-io",
"filepicker"
] | 6 | 10 | 7,791 | 3 | 0 | 2011-06-02T05:18:54.190000 | 2011-06-02T05:33:49.227000 |
6,210,744 | 6,213,833 | How to replace double quotes in derived column transformation? | I have flat file. I am loading data from flat file to source table using ssis.And one of the column has following values: I want following column output: I have tried to replace in derived column. REPLACE( COLA, "\"","\") but this doesnt work. | I think you have almost got the expression correct except for the additional slash in the replacement string. Here are the expressions that might work for you. Expression #1: Removes all double quotes within a given string. REPLACE(COLA, "\"", "") Expression #2: Replaces all double occurrences of double quotes with sin... | How to replace double quotes in derived column transformation? I have flat file. I am loading data from flat file to source table using ssis.And one of the column has following values: I want following column output: I have tried to replace in derived column. REPLACE( COLA, "\"","\") but this doesnt work. | TITLE:
How to replace double quotes in derived column transformation?
QUESTION:
I have flat file. I am loading data from flat file to source table using ssis.And one of the column has following values: I want following column output: I have tried to replace in derived column. REPLACE( COLA, "\"","\") but this doesnt w... | [
"ssis"
] | 13 | 28 | 69,132 | 3 | 0 | 2011-06-02T05:21:12.790000 | 2011-06-02T11:19:56.470000 |
6,210,749 | 6,210,764 | how to use sql.trans in two methods? | i have cut and paste buttons while cutting i have one sql operation and while pasting one sql operation. how to use transation statement for this. protected void btnCut_Click(object sender, EventArgs e) { hidCutnode.Value = TreeView2.SelectedNode.Value; string sqlQuery = "update CUSTOMIZEDTREE set parentid='" + 0 + "' ... | Pass transaction object as function parameter to the second method and dont commit in method1. Use BeginTransaction in first method only. | how to use sql.trans in two methods? i have cut and paste buttons while cutting i have one sql operation and while pasting one sql operation. how to use transation statement for this. protected void btnCut_Click(object sender, EventArgs e) { hidCutnode.Value = TreeView2.SelectedNode.Value; string sqlQuery = "update CUS... | TITLE:
how to use sql.trans in two methods?
QUESTION:
i have cut and paste buttons while cutting i have one sql operation and while pasting one sql operation. how to use transation statement for this. protected void btnCut_Click(object sender, EventArgs e) { hidCutnode.Value = TreeView2.SelectedNode.Value; string sqlQ... | [
"c#",
".net",
"sql",
"oracle"
] | 0 | 1 | 219 | 2 | 0 | 2011-06-02T05:22:23.353000 | 2011-06-02T05:24:54.170000 |
6,210,759 | 6,210,797 | Please explain this code | Trying to make sense of the code below, as I want to customise it a bit. As per the comments, the callback function is passed the last image to load as an argument. Can someone please explain how the callback is passed only to the last image (I understand why, I just don't know how )? From the way I'm reading the code ... | The callback function is only called if len (decremented) is less than or equal to zero. Since it starts off with the value of the length of the elements (or how many there are), and is decremented when each image is loaded, only the last image will make the expression true. You can sort of read this part of the code: ... | Please explain this code Trying to make sense of the code below, as I want to customise it a bit. As per the comments, the callback function is passed the last image to load as an argument. Can someone please explain how the callback is passed only to the last image (I understand why, I just don't know how )? From the ... | TITLE:
Please explain this code
QUESTION:
Trying to make sense of the code below, as I want to customise it a bit. As per the comments, the callback function is passed the last image to load as an argument. Can someone please explain how the callback is passed only to the last image (I understand why, I just don't kno... | [
"javascript",
"jquery",
"image-loading"
] | 2 | 3 | 1,173 | 3 | 0 | 2011-06-02T05:24:04.187000 | 2011-06-02T05:29:28.843000 |
6,210,765 | 6,210,894 | select Value in one listbox should affect all other list boxes | i have three list boxes name as state,District, and college. All list boxes contains a value as "All". if i select all in state list box the other list boxes district and college should change as "All". How to make it? i have done changes for two list boxes. i couldn't make for the third one. ex: 1. State - a) xxxxxxx ... | In jQuery you could do something like this: state1 state2 All district1 district9 All collage1 collage2 All See http://jsfiddle.net/CDMWK/3/ | select Value in one listbox should affect all other list boxes i have three list boxes name as state,District, and college. All list boxes contains a value as "All". if i select all in state list box the other list boxes district and college should change as "All". How to make it? i have done changes for two list boxes... | TITLE:
select Value in one listbox should affect all other list boxes
QUESTION:
i have three list boxes name as state,District, and college. All list boxes contains a value as "All". if i select all in state list box the other list boxes district and college should change as "All". How to make it? i have done changes ... | [
"javascript",
"listbox",
"onchange"
] | 0 | 1 | 1,867 | 2 | 0 | 2011-06-02T05:24:59.167000 | 2011-06-02T05:44:10.787000 |
6,210,781 | 6,210,984 | search in datagridview C# winfom | I want to put a search option in DataGridView, i.e., User types the string or int in TextBox and similar records the DataGridView should be highlighted. I tried it using KeyPress event but didn't work. if (Char.IsLetter(e.KeyChar)) { for (int i = 0; i < (dgemployee.Rows.Count); i++) { if (dgemployee.Rows[i].Cells["Empl... | If your DataGridView is bound to a DataTable or a DataView, you can do this: Create a BindingSource and make BindingSource.DataSource the Datatable or DataView that your DGV is currently using. Then set your DataGridView.DataSource to the BindingSource. Then you can use the BindingSource.Filter property to query your d... | search in datagridview C# winfom I want to put a search option in DataGridView, i.e., User types the string or int in TextBox and similar records the DataGridView should be highlighted. I tried it using KeyPress event but didn't work. if (Char.IsLetter(e.KeyChar)) { for (int i = 0; i < (dgemployee.Rows.Count); i++) { i... | TITLE:
search in datagridview C# winfom
QUESTION:
I want to put a search option in DataGridView, i.e., User types the string or int in TextBox and similar records the DataGridView should be highlighted. I tried it using KeyPress event but didn't work. if (Char.IsLetter(e.KeyChar)) { for (int i = 0; i < (dgemployee.Row... | [
"c#",
"winforms",
"search",
"datagridview"
] | 3 | 5 | 8,914 | 3 | 0 | 2011-06-02T05:27:28.540000 | 2011-06-02T05:56:58.587000 |
6,210,786 | 6,210,859 | Replacing symbol strange situation | foreach($ret as $object) { $res = $object->...; $img_src = $res[0]->src; echo $img_src. ' '; echo str_replace("&size=2", "", $img_src). ' '; } $img_src ~ 'http://site.com/img.jpg&size=2' And I have to receive same link but without &size=2. Why doesn't work my last line in code. It shows the same url. | Are you absolutely certain there are any goofy unprintable characters in your source string? Try debugging with this: printf("%s\n", join(':', str_split($img_src))); And make sure you really have &size=2 in your string. If you see two consecutive colons, you've got something like a \0 or some other character mucking up... | Replacing symbol strange situation foreach($ret as $object) { $res = $object->...; $img_src = $res[0]->src; echo $img_src. ' '; echo str_replace("&size=2", "", $img_src). ' '; } $img_src ~ 'http://site.com/img.jpg&size=2' And I have to receive same link but without &size=2. Why doesn't work my last line in code. It sho... | TITLE:
Replacing symbol strange situation
QUESTION:
foreach($ret as $object) { $res = $object->...; $img_src = $res[0]->src; echo $img_src. ' '; echo str_replace("&size=2", "", $img_src). ' '; } $img_src ~ 'http://site.com/img.jpg&size=2' And I have to receive same link but without &size=2. Why doesn't work my last li... | [
"php",
"string",
"replace",
"str-replace"
] | 0 | 2 | 48 | 3 | 0 | 2011-06-02T05:28:15.707000 | 2011-06-02T05:38:14.673000 |
6,210,788 | 6,210,818 | How to avoid iOS automatic font size adjustment? | I am NOT talking about zooming the page, but rather the way MobileSafari on iOS automatically bumps up some font sizes sometimes. When, exactly, is this done? Can it be prevented or discouraged? | Had a lot of trouble tracking it down, but: it’s the -webkit-text-size-adjust property in CSS. Values: Percentage (of default size), e.g. 120%, or 100% auto (the default) none – if auto isn’t working for your page. However this often causes problems with zooming. Use 100% instead. For example, open Safari on your deskt... | How to avoid iOS automatic font size adjustment? I am NOT talking about zooming the page, but rather the way MobileSafari on iOS automatically bumps up some font sizes sometimes. When, exactly, is this done? Can it be prevented or discouraged? | TITLE:
How to avoid iOS automatic font size adjustment?
QUESTION:
I am NOT talking about zooming the page, but rather the way MobileSafari on iOS automatically bumps up some font sizes sometimes. When, exactly, is this done? Can it be prevented or discouraged?
ANSWER:
Had a lot of trouble tracking it down, but: it’s ... | [
"css",
"ios",
"mobile-safari"
] | 55 | 33 | 59,651 | 3 | 0 | 2011-06-02T05:28:25.250000 | 2011-06-02T05:32:18.463000 |
6,210,800 | 6,210,835 | JavaScript - Force select element to dropdown? | How can I force the select element to dropdown using Javascript? Is it possible? Bosh Wade LeBron Thanks in advance! | var select = document.getElementById(id); select.size = select.options.length; where id is the id of the your select box... | JavaScript - Force select element to dropdown? How can I force the select element to dropdown using Javascript? Is it possible? Bosh Wade LeBron Thanks in advance! | TITLE:
JavaScript - Force select element to dropdown?
QUESTION:
How can I force the select element to dropdown using Javascript? Is it possible? Bosh Wade LeBron Thanks in advance!
ANSWER:
var select = document.getElementById(id); select.size = select.options.length; where id is the id of the your select box... | [
"javascript",
"select",
"drop-down-menu"
] | 9 | 0 | 12,753 | 3 | 0 | 2011-06-02T05:30:10.113000 | 2011-06-02T05:34:01.843000 |
6,210,840 | 6,211,710 | Tag Position in Org Mode | When I create a tag next to a heading it aligns and moves to the right but not as far as I'd like. How can I make sure the tags are aligned further away from the heading? Thanks. | In Emacs 23.3.1 (Org-mode version 6.33x), tags for a heading are right-aligned in accordance with the org-tags-column variable. You can use M-x customize-variable RET org-tags-column RET to change this to suit your requirements. | Tag Position in Org Mode When I create a tag next to a heading it aligns and moves to the right but not as far as I'd like. How can I make sure the tags are aligned further away from the heading? Thanks. | TITLE:
Tag Position in Org Mode
QUESTION:
When I create a tag next to a heading it aligns and moves to the right but not as far as I'd like. How can I make sure the tags are aligned further away from the heading? Thanks.
ANSWER:
In Emacs 23.3.1 (Org-mode version 6.33x), tags for a heading are right-aligned in accorda... | [
"emacs",
"org-mode"
] | 10 | 17 | 5,956 | 2 | 0 | 2011-06-02T05:35:22.613000 | 2011-06-02T07:30:42.817000 |
6,210,841 | 6,210,882 | How to get a specific date type in java | I am using the below method to get this string to_date('2011/06/02','yyyy/mm/dd') private static String getOperationDate() { Date today= new Date(); String output; SimpleDateFormat formatter; String pattern="yyyy/MM/dd";
formatter = new SimpleDateFormat(pattern, Locale.US); output = formatter.format(today); String tem... | Look at the docs, and figure out what your format string should be. Probably something like String pattern = "yyyy-MM-dd HH:mm:ss.SSS"; But the proper way is to use the JDBC driver as OMG Ponies has pointed out. | How to get a specific date type in java I am using the below method to get this string to_date('2011/06/02','yyyy/mm/dd') private static String getOperationDate() { Date today= new Date(); String output; SimpleDateFormat formatter; String pattern="yyyy/MM/dd";
formatter = new SimpleDateFormat(pattern, Locale.US); outp... | TITLE:
How to get a specific date type in java
QUESTION:
I am using the below method to get this string to_date('2011/06/02','yyyy/mm/dd') private static String getOperationDate() { Date today= new Date(); String output; SimpleDateFormat formatter; String pattern="yyyy/MM/dd";
formatter = new SimpleDateFormat(pattern... | [
"java",
"oracle",
"jdbc"
] | 0 | 1 | 655 | 3 | 0 | 2011-06-02T05:35:23.283000 | 2011-06-02T05:42:07.233000 |
6,210,850 | 6,210,872 | How do I disable a UIButton? | I am working on a project in which I have to show all photos of Photo Library in a plist and show them horizontally on UIButton s. My app will also have an edit button: when the user clicks this button, a delete mark (such as usually appears in other iPhone/iPad apps) should show on each button. But here's the crucial ... | Please set this... editButton.userInteractionEnabled = NO; or You can use editButton.enabled = NO; | How do I disable a UIButton? I am working on a project in which I have to show all photos of Photo Library in a plist and show them horizontally on UIButton s. My app will also have an edit button: when the user clicks this button, a delete mark (such as usually appears in other iPhone/iPad apps) should show on each bu... | TITLE:
How do I disable a UIButton?
QUESTION:
I am working on a project in which I have to show all photos of Photo Library in a plist and show them horizontally on UIButton s. My app will also have an edit button: when the user clicks this button, a delete mark (such as usually appears in other iPhone/iPad apps) shou... | [
"ios",
"objective-c",
"cocoa-touch",
"uibutton"
] | 53 | 112 | 61,342 | 6 | 0 | 2011-06-02T05:36:44.267000 | 2011-06-02T05:41:15.920000 |
6,210,860 | 6,211,057 | iPad - General Network->What is the UI control? | In the below image, what is the UI control used to create the "Other Network" dialog? We need to create a similar non-full-screen popup. | I think what you're looking for is a UIModalPresentationFormSheet. From Apple's UIViewController documentation reference UIModalPresentationFormSheet The width and height of the presented view are smaller than those of the screen and the view is centered on the screen. If the device is in a landscape orientation and th... | iPad - General Network->What is the UI control? In the below image, what is the UI control used to create the "Other Network" dialog? We need to create a similar non-full-screen popup. | TITLE:
iPad - General Network->What is the UI control?
QUESTION:
In the below image, what is the UI control used to create the "Other Network" dialog? We need to create a similar non-full-screen popup.
ANSWER:
I think what you're looking for is a UIModalPresentationFormSheet. From Apple's UIViewController documentati... | [
"ipad"
] | 1 | 1 | 113 | 2 | 0 | 2011-06-02T05:38:19.230000 | 2011-06-02T06:07:16.147000 |
6,210,869 | 6,211,451 | QuickFix C# or Python | We are about to implement a small automated securities trader. The trader will be build on top of the excellent quickfix FIX engine. After due though, we narrowed our options down to implementing it in C# or in Python. Please specify the pros and cons of each language for this task, in term of: Performance (The fact th... | I like both languages and a think both would be a good choice. The GIL might really be the most important difference. But I'm not sure if it's a problem in your case. The GIL only affects code running in pure Python. I assume that your tool depends more on I/O than on raw number crunching. If your I/O libraries handle ... | QuickFix C# or Python We are about to implement a small automated securities trader. The trader will be build on top of the excellent quickfix FIX engine. After due though, we narrowed our options down to implementing it in C# or in Python. Please specify the pros and cons of each language for this task, in term of: Pe... | TITLE:
QuickFix C# or Python
QUESTION:
We are about to implement a small automated securities trader. The trader will be build on top of the excellent quickfix FIX engine. After due though, we narrowed our options down to implementing it in C# or in Python. Please specify the pros and cons of each language for this ta... | [
"c#",
"python",
"quickfix"
] | 2 | 2 | 1,691 | 2 | 0 | 2011-06-02T05:40:00.963000 | 2011-06-02T06:59:59.023000 |
6,210,871 | 6,210,937 | get id attribute of selected items in drop down box | I have many drop down boxes with the name emp.so in the below code i am trying to print the id of the boxes but some how it is printing empty what am i doing wrong here var selected_emp = $('select[name="emp"]'); selected_emp.children('option:selected').each(function() { if($(this).val()!= '' && $(this).val()!= null) {... | Do your option elements have an id attribute? Typically, option elements just have a value and the included text. You could do something like this to print the id of the box and the selected value in the box: var selected_emp = $('select[name="emp"]'); selected_emp.children('option:selected').each(function() { if($(thi... | get id attribute of selected items in drop down box I have many drop down boxes with the name emp.so in the below code i am trying to print the id of the boxes but some how it is printing empty what am i doing wrong here var selected_emp = $('select[name="emp"]'); selected_emp.children('option:selected').each(function(... | TITLE:
get id attribute of selected items in drop down box
QUESTION:
I have many drop down boxes with the name emp.so in the below code i am trying to print the id of the boxes but some how it is printing empty what am i doing wrong here var selected_emp = $('select[name="emp"]'); selected_emp.children('option:selecte... | [
"javascript",
"jquery",
"jquery-selectors",
"jquery-validate"
] | 0 | 2 | 2,218 | 2 | 0 | 2011-06-02T05:40:46.403000 | 2011-06-02T05:50:30.490000 |
6,210,875 | 6,241,203 | Confusion with Moonshado Heroku Add-on | According to this documention, it seems as if Moonshado will automatically route any mobile-originated SMS message to your application if it contains the first word as your keyword. I do not understand how this is possible. Any SMS message in the US that contains the first word as your keyword will be routed to your ap... | For SMS messages originating in the US, any messages sent to 69940 containing your keyword as the first word, will be routed to your application. So if you want your users to be able to send SMS messages to you application, you need to tell them to SMS your keyword to '69940'. It mentions it very briefly at the bottom ... | Confusion with Moonshado Heroku Add-on According to this documention, it seems as if Moonshado will automatically route any mobile-originated SMS message to your application if it contains the first word as your keyword. I do not understand how this is possible. Any SMS message in the US that contains the first word as... | TITLE:
Confusion with Moonshado Heroku Add-on
QUESTION:
According to this documention, it seems as if Moonshado will automatically route any mobile-originated SMS message to your application if it contains the first word as your keyword. I do not understand how this is possible. Any SMS message in the US that contains... | [
"ruby-on-rails",
"ruby-on-rails-3",
"sms",
"heroku"
] | 0 | 3 | 294 | 1 | 0 | 2011-06-02T05:41:33.490000 | 2011-06-05T05:34:28.153000 |
6,210,877 | 6,211,531 | How to register the following datatype to allow serialization? | I am using QJson to serialize a QObject -derived class. I am able to serialize the class itself without any problems, but when it comes to one of its members, I am having a bit of trouble. The class is named CProject and it contains a property files which is defined as: QList files; When serializing an instance of CPro... | I don't know how QJson works but perhaps it requires stream operators. Try as below after declaration of CProjectFile class class CProjectFile {... };
Q_DECLARE_METATYPE(CProjectFile)
qRegisterMetaType ("CProjectFile");//Do this if you need signal/slots
qRegisterMetaTypeStreamOperators >("CProjectFileList"); See als... | How to register the following datatype to allow serialization? I am using QJson to serialize a QObject -derived class. I am able to serialize the class itself without any problems, but when it comes to one of its members, I am having a bit of trouble. The class is named CProject and it contains a property files which i... | TITLE:
How to register the following datatype to allow serialization?
QUESTION:
I am using QJson to serialize a QObject -derived class. I am able to serialize the class itself without any problems, but when it comes to one of its members, I am having a bit of trouble. The class is named CProject and it contains a prop... | [
"qt",
"qjson",
"custom-data-type"
] | 4 | 5 | 3,232 | 1 | 0 | 2011-06-02T05:41:46.953000 | 2011-06-02T07:09:06.097000 |
6,210,880 | 6,210,953 | Does returned struct of localtime() need to be freed? | struct tm *localtime(const time_t *timep); I checked man localtime but there's no words on whether it's my duty to clean it after using. And in fact I have many similar doubts on functions returning a pointer, how do you determine it should be freed or not? | This information should be in the man page - my localtime man page says: The return value points to a statically allocated struct... Statically allocated objects should not be passed to free(), so this is your answer - no, you should not free the return value of localtime(). The only way to tell in the general case is ... | Does returned struct of localtime() need to be freed? struct tm *localtime(const time_t *timep); I checked man localtime but there's no words on whether it's my duty to clean it after using. And in fact I have many similar doubts on functions returning a pointer, how do you determine it should be freed or not? | TITLE:
Does returned struct of localtime() need to be freed?
QUESTION:
struct tm *localtime(const time_t *timep); I checked man localtime but there's no words on whether it's my duty to clean it after using. And in fact I have many similar doubts on functions returning a pointer, how do you determine it should be free... | [
"c",
"memory-management",
"function-prototypes"
] | 6 | 8 | 1,692 | 2 | 0 | 2011-06-02T05:41:56.637000 | 2011-06-02T05:52:15.170000 |
6,210,885 | 6,219,396 | Google AdMob Ads SDK vs Prev SDK | I am using Admob from the past one year in different projects. And all of them are working fine with the previous libAdmob.a libraries. As I can see Google has launched new libraries like GADBanner classes, libGoogleAdmobAds.a and all. My concern is, if I will continue using with previous libraries, will it create any ... | I have delayed updating my applications for a while too, and it didn't cause any problem. Google wouldn't want to kill its own revenue by not serving ads to older applications. I would recommend updating sooner or later, though, since the new libraries are required for new formats (iPad, etc.). Other than that, I haven... | Google AdMob Ads SDK vs Prev SDK I am using Admob from the past one year in different projects. And all of them are working fine with the previous libAdmob.a libraries. As I can see Google has launched new libraries like GADBanner classes, libGoogleAdmobAds.a and all. My concern is, if I will continue using with previo... | TITLE:
Google AdMob Ads SDK vs Prev SDK
QUESTION:
I am using Admob from the past one year in different projects. And all of them are working fine with the previous libAdmob.a libraries. As I can see Google has launched new libraries like GADBanner classes, libGoogleAdmobAds.a and all. My concern is, if I will continue... | [
"iphone",
"admob",
"ads",
"ios-frameworks"
] | 2 | 1 | 714 | 1 | 0 | 2011-06-02T05:42:51.550000 | 2011-06-02T19:29:51.573000 |
6,210,890 | 6,213,152 | Rendering joinTables as a list in Grails | I've got two domain classes: Car and Driver. I'd like to make a gsp view that displays the Car and Driver info in a list that looks more or less a default scaffolded list. For example: Make Model Driver Age ------------------------ Chevy Nova Joe 20 Chevy Nova Mike 30 Chevy Nova Sally 40 Here's the domain classes: clas... | If a Driver can have only one Car, you need a Driver to reference Car and just to render scaffolding list for a Driver. To tweak list columns, you'll have to grails generate-views. If a Driver can have many Cars, and you don't want to pull Car_Driver table into visible domain model (it has no own domain meaning), make ... | Rendering joinTables as a list in Grails I've got two domain classes: Car and Driver. I'd like to make a gsp view that displays the Car and Driver info in a list that looks more or less a default scaffolded list. For example: Make Model Driver Age ------------------------ Chevy Nova Joe 20 Chevy Nova Mike 30 Chevy Nova... | TITLE:
Rendering joinTables as a list in Grails
QUESTION:
I've got two domain classes: Car and Driver. I'd like to make a gsp view that displays the Car and Driver info in a list that looks more or less a default scaffolded list. For example: Make Model Driver Age ------------------------ Chevy Nova Joe 20 Chevy Nova ... | [
"grails",
"view",
"controller",
"gsp",
"join"
] | 0 | 1 | 598 | 1 | 0 | 2011-06-02T05:43:38.557000 | 2011-06-02T10:13:32.467000 |
6,210,895 | 6,211,286 | ListView inside ScrollView is not scrolling on Android | I am having trouble with a scrolling ListView inside a ScrollView. I have an Activity which has some EditTexts in the top part and then a tab host with two tabs which have one ListView each. When the EditText views are focused, the soft keyboard comes up and as I have a ScrollView, the content is scrollable. But the pr... | You shouldn't put a ListView inside a ScrollView because the ListView class implements its own scrolling and it just doesn't receive gestures because they all are handled by the parent ScrollView. I strongly recommend you to simplify your layout somehow. For example you can add views you want to be scrolled to the List... | ListView inside ScrollView is not scrolling on Android I am having trouble with a scrolling ListView inside a ScrollView. I have an Activity which has some EditTexts in the top part and then a tab host with two tabs which have one ListView each. When the EditText views are focused, the soft keyboard comes up and as I h... | TITLE:
ListView inside ScrollView is not scrolling on Android
QUESTION:
I am having trouble with a scrolling ListView inside a ScrollView. I have an Activity which has some EditTexts in the top part and then a tab host with two tabs which have one ListView each. When the EditText views are focused, the soft keyboard c... | [
"android",
"listview",
"android-layout",
"scrollview"
] | 164 | 188 | 232,332 | 27 | 0 | 2011-06-02T05:44:14.750000 | 2011-06-02T06:40:00.107000 |
6,210,900 | 6,210,960 | How can I pass POST parameters in a URL? | Basically, I think that I can't, but I would be very happy to be proven wrong. I am generating an HTML menu dynamically in PHP, adding one item for each current user, so that I get something like Rob is on to something with "You could use a button instead of an anchor and just style the button to look like a link. That... | You could use a form styled as a link. No JavaScript is required: Go to user 123 CSS: button { border: 0; padding: 0; display: inline; background: none; text-decoration: underline; color: blue; } button:hover { cursor: pointer; } See: http://jsfiddle.net/SkQRN/ | How can I pass POST parameters in a URL? Basically, I think that I can't, but I would be very happy to be proven wrong. I am generating an HTML menu dynamically in PHP, adding one item for each current user, so that I get something like Rob is on to something with "You could use a button instead of an anchor and just s... | TITLE:
How can I pass POST parameters in a URL?
QUESTION:
Basically, I think that I can't, but I would be very happy to be proven wrong. I am generating an HTML menu dynamically in PHP, adding one item for each current user, so that I get something like Rob is on to something with "You could use a button instead of an... | [
"php",
"http",
"http-post",
"http-get"
] | 44 | 49 | 275,215 | 7 | 0 | 2011-06-02T05:45:28.497000 | 2011-06-02T05:53:23.920000 |
6,210,901 | 6,210,938 | Convert integer to character int j2me | I want to convert the integer into char. Example:- char c; for(int i=0;i<10;i++){ system.out.println(" char==="+c); } I want to print the c as 0,1,2,3,4..... I had tried:- c=(char)i; --gives error c=97-i; -----gives a,b,c | Use wrapper classes. c = new Integer(i).toString().charAt(0); by the way, you can also use this: c = (char)(i + 48); | Convert integer to character int j2me I want to convert the integer into char. Example:- char c; for(int i=0;i<10;i++){ system.out.println(" char==="+c); } I want to print the c as 0,1,2,3,4..... I had tried:- c=(char)i; --gives error c=97-i; -----gives a,b,c | TITLE:
Convert integer to character int j2me
QUESTION:
I want to convert the integer into char. Example:- char c; for(int i=0;i<10;i++){ system.out.println(" char==="+c); } I want to print the c as 0,1,2,3,4..... I had tried:- c=(char)i; --gives error c=97-i; -----gives a,b,c
ANSWER:
Use wrapper classes. c = new Inte... | [
"java-me"
] | 1 | 2 | 5,350 | 2 | 0 | 2011-06-02T05:45:31.363000 | 2011-06-02T05:50:33.487000 |
6,210,903 | 6,210,923 | add start from constraint to a column in mysql | hey i am creating an application for invoicing(computer generated bill). i have a table sales_log where ref no. column is set to auto_increment.i didnt assign the start value. i mean if the ref no. of 1st bill is 101 then i should automatically get 102..103...etc for the rest...i just dont know how to alter the table c... | See http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html To start with an AUTO_INCREMENT value other than 1, you can set that value with CREATE TABLE or ALTER TABLE, like this: ALTER TABLE sales_log AUTO_INCREMENT = 101; | add start from constraint to a column in mysql hey i am creating an application for invoicing(computer generated bill). i have a table sales_log where ref no. column is set to auto_increment.i didnt assign the start value. i mean if the ref no. of 1st bill is 101 then i should automatically get 102..103...etc for the r... | TITLE:
add start from constraint to a column in mysql
QUESTION:
hey i am creating an application for invoicing(computer generated bill). i have a table sales_log where ref no. column is set to auto_increment.i didnt assign the start value. i mean if the ref no. of 1st bill is 101 then i should automatically get 102..1... | [
"mysql"
] | 2 | 3 | 88 | 4 | 0 | 2011-06-02T05:45:48.570000 | 2011-06-02T05:48:35.423000 |
6,210,908 | 6,210,990 | How do I undo "replace"? | I didn't realize that "replace" meant the log messages from the previous file will be gone, now the log messages start with when I replaced the file and so on. I need a way to revert it back to the previous file (before I replaced it). Is there a way to do that? | In essence, you've deleted the old file, so the advice on Resurrecting Deleted Items will link the log trail back to where it was before your replace. You could then apply the differences between the old and new files in-place, instead of either deleting the old file and adding a new one or copying another file on top,... | How do I undo "replace"? I didn't realize that "replace" meant the log messages from the previous file will be gone, now the log messages start with when I replaced the file and so on. I need a way to revert it back to the previous file (before I replaced it). Is there a way to do that? | TITLE:
How do I undo "replace"?
QUESTION:
I didn't realize that "replace" meant the log messages from the previous file will be gone, now the log messages start with when I replaced the file and so on. I need a way to revert it back to the previous file (before I replaced it). Is there a way to do that?
ANSWER:
In es... | [
"svn",
"tortoisesvn"
] | 3 | 3 | 2,972 | 1 | 0 | 2011-06-02T05:46:41.567000 | 2011-06-02T05:57:46.027000 |
6,210,911 | 6,210,934 | dynamic subdomain does not draw $_GET variables | So trough the big hassle of this finding for the right script and yadayadayada I now have a CNAME redirecting myawesomeblog.mysite.com to mysite.com/?blog=myawesomeblog and a.htaccess code like the following RewriteEngine On
# Prevent people from going to to index.php directly and spoofing the # subdomain value, since... | You probably need an extra flag to your rules: RewriteRule ^.*$ http://%{HTTP_HOST}/ [R=301,L,QSA]
RewriteRule ^.*$ index.php?blog=%1 [L,QSA] R as in redirect. L as in last. QSA as in query string append. | dynamic subdomain does not draw $_GET variables So trough the big hassle of this finding for the right script and yadayadayada I now have a CNAME redirecting myawesomeblog.mysite.com to mysite.com/?blog=myawesomeblog and a.htaccess code like the following RewriteEngine On
# Prevent people from going to to index.php di... | TITLE:
dynamic subdomain does not draw $_GET variables
QUESTION:
So trough the big hassle of this finding for the right script and yadayadayada I now have a CNAME redirecting myawesomeblog.mysite.com to mysite.com/?blog=myawesomeblog and a.htaccess code like the following RewriteEngine On
# Prevent people from going ... | [
"php",
".htaccess",
"subdomain"
] | 0 | 3 | 103 | 1 | 0 | 2011-06-02T05:47:07.467000 | 2011-06-02T05:50:05.950000 |
6,210,912 | 6,210,941 | Assign constant char to character array inside structure in VC++ | I want a linked list structure in my VC++ application My structure is:- struct xml_data { int id; char file_name[50]; char url_source[50]; struct xml_Data *next; }xml_data1; If I declare a variable like struct xml_data *var; const char* abc; I want to assign a value from a const char* variable to the structure members.... | After you've used new to allocate memory for the struct. var = new xml_data; Use strcpy to copy one to the other. strcpy(var->file_name,abc); include and make sure there's enough room in the destination. | Assign constant char to character array inside structure in VC++ I want a linked list structure in my VC++ application My structure is:- struct xml_data { int id; char file_name[50]; char url_source[50]; struct xml_Data *next; }xml_data1; If I declare a variable like struct xml_data *var; const char* abc; I want to ass... | TITLE:
Assign constant char to character array inside structure in VC++
QUESTION:
I want a linked list structure in my VC++ application My structure is:- struct xml_data { int id; char file_name[50]; char url_source[50]; struct xml_Data *next; }xml_data1; If I declare a variable like struct xml_data *var; const char* ... | [
"c++",
"visual-c++",
"constants"
] | 1 | 4 | 476 | 2 | 0 | 2011-06-02T05:47:10.553000 | 2011-06-02T05:51:01.567000 |
6,210,920 | 6,212,004 | Hiding Combo Items In CComboBox | Is it possible to hide particular Items in the MFC Combo Box? I have a list which contains 5 items ALPHA-0, BETA-1, GAMA-2, DELTA-3, OMEGA-4 stored in the vector vector mListItems; CComboBox m_List1; CComboBox m_List2; I am using this vector to populate the two combo boxes. In m_List1 it should populate all the 5 items... | Combo boxes show whatever items you add in them. If an item was added, it will be displayed. So if you want to hide some items, you need to remove them from the combo. This can be done through DeleteString from CComboBox. | Hiding Combo Items In CComboBox Is it possible to hide particular Items in the MFC Combo Box? I have a list which contains 5 items ALPHA-0, BETA-1, GAMA-2, DELTA-3, OMEGA-4 stored in the vector vector mListItems; CComboBox m_List1; CComboBox m_List2; I am using this vector to populate the two combo boxes. In m_List1 it... | TITLE:
Hiding Combo Items In CComboBox
QUESTION:
Is it possible to hide particular Items in the MFC Combo Box? I have a list which contains 5 items ALPHA-0, BETA-1, GAMA-2, DELTA-3, OMEGA-4 stored in the vector vector mListItems; CComboBox m_List1; CComboBox m_List2; I am using this vector to populate the two combo bo... | [
"c++",
"mfc"
] | 0 | 0 | 1,743 | 1 | 0 | 2011-06-02T05:48:06.423000 | 2011-06-02T08:08:41.040000 |
6,210,921 | 6,210,992 | operator new inside namespace | namespace X { void* operator new (size_t); } gives error message as: error: ‘void* X::operator new(size_t)’ may not be declared within a namespace Is it a gcc compiler bug? In older gcc version it seems to be working. Any idea, why it's not allowed? Use case: I wanted to allow only custom operator new/delete for the cl... | @Sharptooth's Answer makes more sense if we consider this section from the standard: 3.7.3.1 Allocation functions [basic.stc.dynamic.allocation] [..] An allocation function shall be a class member function or a global function; a program is ill-formed if an allocation function is declared in a namespace scope other tha... | operator new inside namespace namespace X { void* operator new (size_t); } gives error message as: error: ‘void* X::operator new(size_t)’ may not be declared within a namespace Is it a gcc compiler bug? In older gcc version it seems to be working. Any idea, why it's not allowed? Use case: I wanted to allow only custom ... | TITLE:
operator new inside namespace
QUESTION:
namespace X { void* operator new (size_t); } gives error message as: error: ‘void* X::operator new(size_t)’ may not be declared within a namespace Is it a gcc compiler bug? In older gcc version it seems to be working. Any idea, why it's not allowed? Use case: I wanted to ... | [
"c++",
"namespaces",
"new-operator",
"compiler-bug"
] | 11 | 8 | 7,124 | 2 | 0 | 2011-06-02T05:48:10.240000 | 2011-06-02T05:57:58.043000 |
6,210,935 | 6,212,451 | sugarcrm displaying users list in a multiselect | I am using SugarCRM Professional as well as Community version latest ones. in Create Projects screen, there is Assign To field which popups all the userslist. But I want those users list in a multiselect dropdown as I want to select multiple without popup window as per the client requirement. I dont want to add users n... | First of I would ask why you want to assign multiple users to a project? Usually projects are assigned to the project manager and individual project tasks are then assigned onto the team members who will complete them. Is it for reporting purposes? So the project teams is aware of what is happening? Another reason? Sug... | sugarcrm displaying users list in a multiselect I am using SugarCRM Professional as well as Community version latest ones. in Create Projects screen, there is Assign To field which popups all the userslist. But I want those users list in a multiselect dropdown as I want to select multiple without popup window as per th... | TITLE:
sugarcrm displaying users list in a multiselect
QUESTION:
I am using SugarCRM Professional as well as Community version latest ones. in Create Projects screen, there is Assign To field which popups all the userslist. But I want those users list in a multiselect dropdown as I want to select multiple without popu... | [
"php",
"sugarcrm"
] | 0 | 1 | 1,539 | 1 | 0 | 2011-06-02T05:50:19.370000 | 2011-06-02T09:03:54.137000 |
6,210,936 | 6,211,610 | Using constants defined in header file | I'm trying to translate a X11/OpenGL demo into Java and I'm not sure how to use the constants OpenGL defines. The only method I can think of is digging into the OpenGL headers and copying the constants to my program but is that the proper way to do it? I imagine that there is no guarantee that those constants will be t... | I can't use this method to do what I want because I'm actually trying to get a preprocessor definition but it does answer my question. You use the NativeLibrary class like so. NativeLibrary library = NativeLibrary.getInstance("LIBRARY_NAME"); library.getGlobalVariableAddress("VARIABLE_NAME"); Edit: I feel like I should... | Using constants defined in header file I'm trying to translate a X11/OpenGL demo into Java and I'm not sure how to use the constants OpenGL defines. The only method I can think of is digging into the OpenGL headers and copying the constants to my program but is that the proper way to do it? I imagine that there is no g... | TITLE:
Using constants defined in header file
QUESTION:
I'm trying to translate a X11/OpenGL demo into Java and I'm not sure how to use the constants OpenGL defines. The only method I can think of is digging into the OpenGL headers and copying the constants to my program but is that the proper way to do it? I imagine ... | [
"java",
"opengl",
"jna"
] | 1 | 0 | 841 | 2 | 0 | 2011-06-02T05:50:21.087000 | 2011-06-02T07:18:27.940000 |
6,210,943 | 6,210,974 | Cannot get output from cmd.exe execution | The code is as follows: ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/c" + command); startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; startInfo.WindowStyle = ProcessWindowStyle.Normal; startInfo.Arguments = arguments; startInfo.RedirectStandardError = true; startInfo.RedirectStandardOutp... | The message you're expecting to see will be on StandardError, not StandardOutput. | Cannot get output from cmd.exe execution The code is as follows: ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/c" + command); startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; startInfo.WindowStyle = ProcessWindowStyle.Normal; startInfo.Arguments = arguments; startInfo.RedirectStandardErr... | TITLE:
Cannot get output from cmd.exe execution
QUESTION:
The code is as follows: ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/c" + command); startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; startInfo.WindowStyle = ProcessWindowStyle.Normal; startInfo.Arguments = arguments; startInfo.R... | [
"c#",
"process",
"cmd"
] | 3 | 5 | 1,624 | 1 | 0 | 2011-06-02T05:51:18.273000 | 2011-06-02T05:55:15.717000 |
6,210,946 | 6,211,489 | How to prevent saving files with certain names in Vim? | I type really fast and sometimes accidentally save a file with the name consisting of a single; or:. (A typo is sometimes introduced as I type the:wq command.) Is there any way to write a macro that rejects files matching certain names from being saved? | A simple yet effective solution would be to define an auto-command matching potentially mistyped file names, that issues a warning and terminates saving::autocmd BufWritePre [:;]* throw 'Forbidden file name: '..expand(' ') Note that the:throw command is necessary to make Vim stop writing the contents of a buffer. In or... | How to prevent saving files with certain names in Vim? I type really fast and sometimes accidentally save a file with the name consisting of a single; or:. (A typo is sometimes introduced as I type the:wq command.) Is there any way to write a macro that rejects files matching certain names from being saved? | TITLE:
How to prevent saving files with certain names in Vim?
QUESTION:
I type really fast and sometimes accidentally save a file with the name consisting of a single; or:. (A typo is sometimes introduced as I type the:wq command.) Is there any way to write a macro that rejects files matching certain names from being ... | [
"vim",
"autocmd"
] | 17 | 18 | 837 | 1 | 0 | 2011-06-02T05:51:48.757000 | 2011-06-02T07:03:44.023000 |
6,210,951 | 6,211,549 | asp.net mvc Globalization. How do you do it? | Learning asp.net mvc and whenever I worked we had to localize our application. Looked at few articles eg http://afana.me/post/aspnet-mvc-internationalization.aspx (Creates a view for each language) No for me http://www.codeproject.com/KB/aspnet/BilingualMvc3Part1.aspx (uses Broswer default language which will never wor... | You should use resource files to handle localisation. With that you have the ability to get a language the user has choosen before or he has choosen right now. Here is a good blog how to do that http://adamyan.blogspot.com/2010/02/aspnet-mvc-2-localization-complete.html IF the user has no active session, means no cooki... | asp.net mvc Globalization. How do you do it? Learning asp.net mvc and whenever I worked we had to localize our application. Looked at few articles eg http://afana.me/post/aspnet-mvc-internationalization.aspx (Creates a view for each language) No for me http://www.codeproject.com/KB/aspnet/BilingualMvc3Part1.aspx (uses ... | TITLE:
asp.net mvc Globalization. How do you do it?
QUESTION:
Learning asp.net mvc and whenever I worked we had to localize our application. Looked at few articles eg http://afana.me/post/aspnet-mvc-internationalization.aspx (Creates a view for each language) No for me http://www.codeproject.com/KB/aspnet/BilingualMvc... | [
"asp.net",
"asp.net-mvc"
] | 4 | 2 | 4,199 | 2 | 0 | 2011-06-02T05:51:56.747000 | 2011-06-02T07:11:40.263000 |
6,210,952 | 6,214,536 | Windows Phone 7 - Handle Error in Application_UnhandledException with WebClient | I need to handle exception in Application_UnhandledException event of App.xaml.cs file. I am getting the Exception object using e.ExceptionObject. Now, I need to send the exception details to my server using WCF service with the help of WebClient. Whenever I send request to WCF service using WebClient, it send the requ... | Yes, this can't work by design. The event is raised while the CLR is shutting down the AppDomain, just before it gets unloaded. You cannot expect any thread or asynchronous operation to run to completion. All your code must be done by the time your event handler exits. Be sure to use synchronous methods and avoid using... | Windows Phone 7 - Handle Error in Application_UnhandledException with WebClient I need to handle exception in Application_UnhandledException event of App.xaml.cs file. I am getting the Exception object using e.ExceptionObject. Now, I need to send the exception details to my server using WCF service with the help of Web... | TITLE:
Windows Phone 7 - Handle Error in Application_UnhandledException with WebClient
QUESTION:
I need to handle exception in Application_UnhandledException event of App.xaml.cs file. I am getting the Exception object using e.ExceptionObject. Now, I need to send the exception details to my server using WCF service wi... | [
"c#",
"silverlight",
"windows-phone-7",
"exception",
"multithreading"
] | 2 | 1 | 2,340 | 2 | 0 | 2011-06-02T05:52:07.480000 | 2011-06-02T12:32:07.453000 |
6,210,958 | 6,210,989 | Android Sqlite After Adding Column Select entries base on conditions | So this happened when I tried to mark deleted entries to have a 'deleted' value of '1' instead of deleting it. I added a column to a database in my app using ALTER TABLE "+TABLE_NAME+" ADD COLUMN "+NEW_COLUMN_NAME+" "+type+";"); and made other appropriate changes in the database provider (when insert 0 is inserted), ho... | This one: SELECT * FROM TABLE_NAME WHERE NEW_COLUMN_NAME = null Will return an empty row set in pretty much any datebase because in SQL, the expression NULL = x is false for all x (even an x of NULL). Try this instead: SELECT * FROM TABLE_NAME WHERE NEW_COLUMN_NAME IS NULL Similar NULL issues will apply to this one: SE... | Android Sqlite After Adding Column Select entries base on conditions So this happened when I tried to mark deleted entries to have a 'deleted' value of '1' instead of deleting it. I added a column to a database in my app using ALTER TABLE "+TABLE_NAME+" ADD COLUMN "+NEW_COLUMN_NAME+" "+type+";"); and made other appropr... | TITLE:
Android Sqlite After Adding Column Select entries base on conditions
QUESTION:
So this happened when I tried to mark deleted entries to have a 'deleted' value of '1' instead of deleting it. I added a column to a database in my app using ALTER TABLE "+TABLE_NAME+" ADD COLUMN "+NEW_COLUMN_NAME+" "+type+";"); and ... | [
"android",
"sql",
"sqlite",
"null",
"alter-table"
] | 2 | 4 | 725 | 1 | 0 | 2011-06-02T05:52:44.333000 | 2011-06-02T05:57:37.493000 |
6,210,959 | 6,210,996 | Any ideas about how to use CSS to emulate a messy stamp? | I'm interested in ways to render a span that to look something like one of these: Here are the tricks I plan on using: @font-face -{moz/webkit/o}-transform:rotate It's for a personal project so assuming the most modern CSS support is fine. Maybe border-images could help? I'd like to avoid image splicing all over the pl... | There is no specific css solution for the grunge look. You'll have to rely on a typeface for that, or an image (such as some sort of 'grungy' splotch pattern that matches the background color on top of the type). The only other CSS that might be applicable is to use an RGBA color set to perhaps 80 or 90% opacity to all... | Any ideas about how to use CSS to emulate a messy stamp? I'm interested in ways to render a span that to look something like one of these: Here are the tricks I plan on using: @font-face -{moz/webkit/o}-transform:rotate It's for a personal project so assuming the most modern CSS support is fine. Maybe border-images cou... | TITLE:
Any ideas about how to use CSS to emulate a messy stamp?
QUESTION:
I'm interested in ways to render a span that to look something like one of these: Here are the tricks I plan on using: @font-face -{moz/webkit/o}-transform:rotate It's for a personal project so assuming the most modern CSS support is fine. Maybe... | [
"css",
"text-styling"
] | 6 | 1 | 5,610 | 5 | 0 | 2011-06-02T05:53:21.690000 | 2011-06-02T05:58:37.820000 |
6,210,966 | 6,214,085 | Show image in JTextPane | I know we can set html as JTextPane content type and then use img tag to display image but here I have image data in bytes and img do not accept bytes it just wants url. So how can I show that image in JTextPane? Any other solution for this situation? I have tried storing image temporary at Temp directory and then give... | The only way is to use JEditorPane instead of JTextPane. There you would have to set HTMLEditorKit. After that, following html should work (only with absolute paths). More information is at http://download.oracle.com/javase/tutorial/uiswing/components/editorpane.html | Show image in JTextPane I know we can set html as JTextPane content type and then use img tag to display image but here I have image data in bytes and img do not accept bytes it just wants url. So how can I show that image in JTextPane? Any other solution for this situation? I have tried storing image temporary at Temp... | TITLE:
Show image in JTextPane
QUESTION:
I know we can set html as JTextPane content type and then use img tag to display image but here I have image data in bytes and img do not accept bytes it just wants url. So how can I show that image in JTextPane? Any other solution for this situation? I have tried storing image... | [
"image",
"swing",
"jtextpane"
] | 0 | 0 | 1,883 | 1 | 0 | 2011-06-02T05:54:08.477000 | 2011-06-02T11:43:46.767000 |
6,210,968 | 6,216,294 | Weekly Time schedule range between days | I have a weekly schedule set from Friday evening 2011-05-27 18:00 to Monday morning 2011-05-30 06:00. This schedule executed on every week starts from 2011-05-27. How we can identify an event time (2011-06-06 19:00) falls between this weekly schedule? UPDATE ID StartTime EndTime Recurrence TimeDifferenceInSeconds 1 201... | A possible approach to this problem: Get the number of whole weeks between the given date/time and StartTime. Add the number of weeks to StartTime to obtain the latest start time. Calculate the difference between the latest start time and the given date/time. Check if that difference is less than TimeDifferenceInSecond... | Weekly Time schedule range between days I have a weekly schedule set from Friday evening 2011-05-27 18:00 to Monday morning 2011-05-30 06:00. This schedule executed on every week starts from 2011-05-27. How we can identify an event time (2011-06-06 19:00) falls between this weekly schedule? UPDATE ID StartTime EndTime ... | TITLE:
Weekly Time schedule range between days
QUESTION:
I have a weekly schedule set from Friday evening 2011-05-27 18:00 to Monday morning 2011-05-30 06:00. This schedule executed on every week starts from 2011-05-27. How we can identify an event time (2011-06-06 19:00) falls between this weekly schedule? UPDATE ID ... | [
"sql-server",
"time",
"range",
"schedule"
] | 1 | 0 | 507 | 2 | 0 | 2011-06-02T05:54:18.057000 | 2011-06-02T15:00:06.497000 |
6,210,969 | 6,211,269 | Having trouble with updatePixels() in a Java app using Processing libraries | I'm trying to write a simple game in Java that uses Processing to render graphics. However, I'm having trouble rendering any changes using updatePixels(). I can successfully set the background color and draw basic 2d shapes, but I get nothing from editing the pixels[] variable, or from using set(x, y, color). This is m... | This line: p = this.color(255, 0, 0); only changes the local variable p, which contained a copy if the pixel value. What you want is to modify the values inside the pixels array, as in: for (int i = 0; i < pixels.length; i++) { pixels[i] = color(255, 0, 0); } | Having trouble with updatePixels() in a Java app using Processing libraries I'm trying to write a simple game in Java that uses Processing to render graphics. However, I'm having trouble rendering any changes using updatePixels(). I can successfully set the background color and draw basic 2d shapes, but I get nothing f... | TITLE:
Having trouble with updatePixels() in a Java app using Processing libraries
QUESTION:
I'm trying to write a simple game in Java that uses Processing to render graphics. However, I'm having trouble rendering any changes using updatePixels(). I can successfully set the background color and draw basic 2d shapes, b... | [
"java",
"processing"
] | 1 | 1 | 355 | 1 | 0 | 2011-06-02T05:54:36.027000 | 2011-06-02T06:37:30.470000 |
6,210,980 | 6,211,013 | How to print more than one id values in Another grid? | hai.In.net iam doing one application.In that one grid contain the id values.When we click on one values that id information is placed in another grid.And when we select another id then print the both id numbers information on second grid.Both grids are in same page side by side.Please give me any suggestions. | In first Gridview you can use SelectedIndexChanged event to read content of selected row and at the same time you can insert that row into second grid. | How to print more than one id values in Another grid? hai.In.net iam doing one application.In that one grid contain the id values.When we click on one values that id information is placed in another grid.And when we select another id then print the both id numbers information on second grid.Both grids are in same page ... | TITLE:
How to print more than one id values in Another grid?
QUESTION:
hai.In.net iam doing one application.In that one grid contain the id values.When we click on one values that id information is placed in another grid.And when we select another id then print the both id numbers information on second grid.Both grids... | [
"asp.net"
] | 0 | 0 | 89 | 1 | 0 | 2011-06-02T05:56:08.663000 | 2011-06-02T06:01:24.450000 |
6,210,981 | 6,211,049 | iOS, how to get subarray from an array using subarraywithRange | I am having problem with using subArrayWithRange. Basically, what I want to do is make subarray of 50 elements or less from mainArray for example if mainArray has 70 elements I want a sortedArray to have an array of first 50 elements in first index and another array of 20 elements in the last index of sortedArray Hope ... | NSUInteger size = 50;
for (NSUInteger i = 0; i * size < [testArray count]; i++) { NSUInteger start = i * size; NSRange range = NSMakeRange(start, MIN([testArray count] - start, size)); [sortedArray addObject:[testArray subarrayWithRange:range]]; } | iOS, how to get subarray from an array using subarraywithRange I am having problem with using subArrayWithRange. Basically, what I want to do is make subarray of 50 elements or less from mainArray for example if mainArray has 70 elements I want a sortedArray to have an array of first 50 elements in first index and anot... | TITLE:
iOS, how to get subarray from an array using subarraywithRange
QUESTION:
I am having problem with using subArrayWithRange. Basically, what I want to do is make subarray of 50 elements or less from mainArray for example if mainArray has 70 elements I want a sortedArray to have an array of first 50 elements in fi... | [
"iphone",
"nsmutablearray",
"arrays"
] | 3 | 14 | 11,300 | 2 | 0 | 2011-06-02T05:56:20.633000 | 2011-06-02T06:06:01.657000 |
6,210,985 | 6,223,152 | How to share title, image and post in Facebook? | I am sharing title, image and description of post in Facebook using following code Share Once i share post or link to Facebook then it will take title and description. But when I share the same post or link to Facebook with other title and image, the title and image do not change. | You can pass your url by passing any auto generated value, Hope this will work for you. | How to share title, image and post in Facebook? I am sharing title, image and description of post in Facebook using following code Share Once i share post or link to Facebook then it will take title and description. But when I share the same post or link to Facebook with other title and image, the title and image do no... | TITLE:
How to share title, image and post in Facebook?
QUESTION:
I am sharing title, image and description of post in Facebook using following code Share Once i share post or link to Facebook then it will take title and description. But when I share the same post or link to Facebook with other title and image, the tit... | [
"php",
"facebook"
] | 0 | 2 | 1,033 | 1 | 0 | 2011-06-02T05:57:14.077000 | 2011-06-03T05:04:00.980000 |
6,210,993 | 6,211,016 | Assigning value to a setter method in PHP | I have this class which let's me change the private data property using the setData method: abstract class FooBase{
public function __set($name, $value){ $setter = 'set'.ucfirst($name); if(method_exists($this, $setter)) return $this->$setter($value); throw new Exception("Property {$setter} is not defined."); }
}
cla... | You could do this if data was public instead of private. Private means only the object can get that value internally. Public would allow you to do this. Either that or create a method to do what you want, as this could access the array internally, leaving data private. | Assigning value to a setter method in PHP I have this class which let's me change the private data property using the setData method: abstract class FooBase{
public function __set($name, $value){ $setter = 'set'.ucfirst($name); if(method_exists($this, $setter)) return $this->$setter($value); throw new Exception("Prope... | TITLE:
Assigning value to a setter method in PHP
QUESTION:
I have this class which let's me change the private data property using the setData method: abstract class FooBase{
public function __set($name, $value){ $setter = 'set'.ucfirst($name); if(method_exists($this, $setter)) return $this->$setter($value); throw ne... | [
"php",
"class",
"singleton",
"setter"
] | 0 | 2 | 174 | 1 | 0 | 2011-06-02T05:58:00.557000 | 2011-06-02T06:02:04.327000 |
6,210,994 | 6,211,024 | Accessing data that was saved with jquery .data() | I have a iframe and I used the jquery.data() function to save some element from the iframe. I attached them to the body like this $('body').data('clicksData', myClicksData); Now i need to access that information from out of the iframe, I tried just doing this var allData = $('body').data('clicksData')[0]; but it didnt ... | Use this: assign some id to your iframe like this: and use this jquery code to access that iframe $("#frameId").contents().find("body").data("clicksData"); | Accessing data that was saved with jquery .data() I have a iframe and I used the jquery.data() function to save some element from the iframe. I attached them to the body like this $('body').data('clicksData', myClicksData); Now i need to access that information from out of the iframe, I tried just doing this var allDat... | TITLE:
Accessing data that was saved with jquery .data()
QUESTION:
I have a iframe and I used the jquery.data() function to save some element from the iframe. I attached them to the body like this $('body').data('clicksData', myClicksData); Now i need to access that information from out of the iframe, I tried just doi... | [
"jquery",
"iframe"
] | 0 | 0 | 214 | 1 | 0 | 2011-06-02T05:58:03.187000 | 2011-06-02T06:02:55.317000 |
6,210,997 | 6,211,019 | iPhone: Store and Display Push Notification | In my iphone application, I want to store all the push notifications that a device receives and then display it in table. I also want to show the number of notifications received till now on application icon. Is this possible? Can anyone please help? Thanks. | You can not store push notification. Your app is closed and the notification are received by the os, if the user press ok button the os will open your application. What you can do is to keep all the notification on your server and when the app is open sync your local data with the server data. | iPhone: Store and Display Push Notification In my iphone application, I want to store all the push notifications that a device receives and then display it in table. I also want to show the number of notifications received till now on application icon. Is this possible? Can anyone please help? Thanks. | TITLE:
iPhone: Store and Display Push Notification
QUESTION:
In my iphone application, I want to store all the push notifications that a device receives and then display it in table. I also want to show the number of notifications received till now on application icon. Is this possible? Can anyone please help? Thanks.... | [
"iphone",
"apple-push-notifications"
] | 3 | 4 | 1,558 | 1 | 0 | 2011-06-02T05:58:38.647000 | 2011-06-02T06:02:24.857000 |
6,211,014 | 6,212,228 | Want to use redissql giving error node.js | while running this example https://github.com/JakSprats/node_Redisql/blob/master/examples/redisql_examples.js gives me this error, ~/rahul$ node redissql.js
node.js:178 throw e; // process.nextTick error, or 'error' event on first tick ^ ReferenceError: len is not defined at check_argc (/usr/local/lib/node/.npm/redisq... | I would say that you should rather use node_redis module for communicating with Redis DB, because it looks like it's more actively maintained, it has bigger user base and better documentation unlike Redisql. | Want to use redissql giving error node.js while running this example https://github.com/JakSprats/node_Redisql/blob/master/examples/redisql_examples.js gives me this error, ~/rahul$ node redissql.js
node.js:178 throw e; // process.nextTick error, or 'error' event on first tick ^ ReferenceError: len is not defined at c... | TITLE:
Want to use redissql giving error node.js
QUESTION:
while running this example https://github.com/JakSprats/node_Redisql/blob/master/examples/redisql_examples.js gives me this error, ~/rahul$ node redissql.js
node.js:178 throw e; // process.nextTick error, or 'error' event on first tick ^ ReferenceError: len i... | [
"node.js",
"redis",
"key-value-store"
] | 0 | 0 | 485 | 1 | 0 | 2011-06-02T06:01:41.700000 | 2011-06-02T08:36:12.113000 |
6,211,017 | 6,211,032 | How to validate GUID is a GUID | How to determine if a string contains a GUID vs just a string of numbers. will a GUID always contain at least 1 alpha character? | See if these helps:- Guid.Parse - Docs Guid guidResult = Guid.Parse(inputString) Guid.TryParse - Docs bool isValid = Guid.TryParse(inputString, out guidOutput) | How to validate GUID is a GUID How to determine if a string contains a GUID vs just a string of numbers. will a GUID always contain at least 1 alpha character? | TITLE:
How to validate GUID is a GUID
QUESTION:
How to determine if a string contains a GUID vs just a string of numbers. will a GUID always contain at least 1 alpha character?
ANSWER:
See if these helps:- Guid.Parse - Docs Guid guidResult = Guid.Parse(inputString) Guid.TryParse - Docs bool isValid = Guid.TryParse(in... | [
"c#",
"asp.net",
"string",
"guid"
] | 176 | 277 | 250,149 | 10 | 0 | 2011-06-02T06:02:11.490000 | 2011-06-02T06:03:46.207000 |
6,211,023 | 6,211,129 | Returning value from asynchronous JavaScript method? | I have run into a problem where I can't seem to get a value from an asynchronous JavaScript method I am running in Jquery. My Jquery looks like this: $(document).ready( function() { $('#splash_image_upload').change( function() { var file = this.files[0]; var blob_string = create_blob(file); alert(blob_string); }); I am... | Your best bet is to pass a callback to create_blob and let the callback do whatever needs to be done, something like this: create_blob(file, function(blob_string) { alert(blob_string) });
function create_blob(file, callback) { var reader = new FileReader(); reader.onload = function() { callback(reader.result) }; reade... | Returning value from asynchronous JavaScript method? I have run into a problem where I can't seem to get a value from an asynchronous JavaScript method I am running in Jquery. My Jquery looks like this: $(document).ready( function() { $('#splash_image_upload').change( function() { var file = this.files[0]; var blob_str... | TITLE:
Returning value from asynchronous JavaScript method?
QUESTION:
I have run into a problem where I can't seem to get a value from an asynchronous JavaScript method I am running in Jquery. My Jquery looks like this: $(document).ready( function() { $('#splash_image_upload').change( function() { var file = this.file... | [
"javascript",
"asynchronous",
"methods",
"return"
] | 9 | 23 | 14,349 | 2 | 0 | 2011-06-02T06:02:46.597000 | 2011-06-02T06:16:45.417000 |
6,211,025 | 6,211,201 | Is there way to programmatically enable GPS on Android 2.1 & above? | I have been seeing different posts that GPS cannot be enabled programmatically How do I find out if the GPS of an Android device is enabled But this app enables the GPS when it is disabled. Can anyone please help me out. Thanks, Prateek | If the documentation said that it can't be set programmatically, I suggest you not to do so. There are many impacts why the documentation said that. And if someone was able to do that (enabling the GPS programmatically), it means he/she doing something that was undocumented. Activating GPS requires user's permission. I... | Is there way to programmatically enable GPS on Android 2.1 & above? I have been seeing different posts that GPS cannot be enabled programmatically How do I find out if the GPS of an Android device is enabled But this app enables the GPS when it is disabled. Can anyone please help me out. Thanks, Prateek | TITLE:
Is there way to programmatically enable GPS on Android 2.1 & above?
QUESTION:
I have been seeing different posts that GPS cannot be enabled programmatically How do I find out if the GPS of an Android device is enabled But this app enables the GPS when it is disabled. Can anyone please help me out. Thanks, Prate... | [
"android",
"gps"
] | 0 | 0 | 2,790 | 3 | 0 | 2011-06-02T06:03:00.300000 | 2011-06-02T06:27:42.363000 |
6,211,026 | 6,211,046 | extend functionality of UIAlertView? | I am using a UIAlertView with a message Peer Disconnected.Back ground works/remaining codes are working without dismiss it.there is a button called Continue. I need to work the remaining codes only after the continue button click. and also I need to Quit my application in cancel button click.can any one tell me a good ... | You can call UIAlertView's delegate method explained below...... - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { //Your Code //For First Button } else if (buttonIndex == 1) { //Your Code //For Second Button } } Please follow this Link to quit the applicat... | extend functionality of UIAlertView? I am using a UIAlertView with a message Peer Disconnected.Back ground works/remaining codes are working without dismiss it.there is a button called Continue. I need to work the remaining codes only after the continue button click. and also I need to Quit my application in cancel but... | TITLE:
extend functionality of UIAlertView?
QUESTION:
I am using a UIAlertView with a message Peer Disconnected.Back ground works/remaining codes are working without dismiss it.there is a button called Continue. I need to work the remaining codes only after the continue button click. and also I need to Quit my applica... | [
"iphone",
"objective-c",
"xcode",
"uialertview"
] | 0 | 1 | 669 | 3 | 0 | 2011-06-02T06:03:02.283000 | 2011-06-02T06:05:41.067000 |
6,211,030 | 6,211,168 | How to append some MP3s in Qt? | How to append some MP3s in Qt by C++? Assume I have 1.mp3 and 2.mp3, now I want to join them by Qt. 3.mp3 = 1.mp3 + 2.mp3 | AFAIK you can not do this simply in Qt. But I suggest you use mp3wrap, a nifty little command line tool to concatenate your mp3s. So, you create a UI, where you select the files, and then pass the parameters to this command line application and let it do its magic. You can execute commands using: system("command1;comma... | How to append some MP3s in Qt? How to append some MP3s in Qt by C++? Assume I have 1.mp3 and 2.mp3, now I want to join them by Qt. 3.mp3 = 1.mp3 + 2.mp3 | TITLE:
How to append some MP3s in Qt?
QUESTION:
How to append some MP3s in Qt by C++? Assume I have 1.mp3 and 2.mp3, now I want to join them by Qt. 3.mp3 = 1.mp3 + 2.mp3
ANSWER:
AFAIK you can not do this simply in Qt. But I suggest you use mp3wrap, a nifty little command line tool to concatenate your mp3s. So, you cr... | [
"c++",
"qt",
"mp3"
] | 1 | 3 | 115 | 2 | 0 | 2011-06-02T06:03:28.647000 | 2011-06-02T06:22:10.600000 |
6,211,034 | 6,211,067 | smtp error while setting up phpmailer | i'm having difficulty setting up phpmailer on my local web server and would appreciate any help i am running xamppp 1.7.4 and php 5.3.5 - i keep receiving the following error message whenever trying to send mail SMTP Error: Could not connect to SMTP host. here is the code i am using right now require("resources/phpmail... | Try using $mailer->Port = 465; Port 587 is for TLS, the SSL port is 465. | smtp error while setting up phpmailer i'm having difficulty setting up phpmailer on my local web server and would appreciate any help i am running xamppp 1.7.4 and php 5.3.5 - i keep receiving the following error message whenever trying to send mail SMTP Error: Could not connect to SMTP host. here is the code i am usin... | TITLE:
smtp error while setting up phpmailer
QUESTION:
i'm having difficulty setting up phpmailer on my local web server and would appreciate any help i am running xamppp 1.7.4 and php 5.3.5 - i keep receiving the following error message whenever trying to send mail SMTP Error: Could not connect to SMTP host. here is ... | [
"phpmailer"
] | 0 | 1 | 608 | 1 | 0 | 2011-06-02T06:03:52.547000 | 2011-06-02T06:08:11.597000 |
6,211,037 | 6,212,356 | How to sanitize an object on create in Rails 2.3.x? | In my search I mainly found ways to sanitize data when outputting OR sanitizing single input boxes using: <%=h @name %> OR ['name =?', params[:name]] However, I'm creating an object like so: @user = User.new( params[:user] ) Now, I could sanitize each key in the params[:user] hash one by one, but I'm sure there is a mo... | If this is for optimization reasons, use the ' Sanitize ' gem. However, since you talk about doing it for every single field, something smells a little wrong here. ActiveRecord already escapes input to avoid SQL injection problems, but you shouldn't need to HTML-escape every single thing that goes into your database (a... | How to sanitize an object on create in Rails 2.3.x? In my search I mainly found ways to sanitize data when outputting OR sanitizing single input boxes using: <%=h @name %> OR ['name =?', params[:name]] However, I'm creating an object like so: @user = User.new( params[:user] ) Now, I could sanitize each key in the param... | TITLE:
How to sanitize an object on create in Rails 2.3.x?
QUESTION:
In my search I mainly found ways to sanitize data when outputting OR sanitizing single input boxes using: <%=h @name %> OR ['name =?', params[:name]] However, I'm creating an object like so: @user = User.new( params[:user] ) Now, I could sanitize eac... | [
"ruby-on-rails",
"object",
"sanitize",
"oncreate"
] | 0 | 0 | 471 | 1 | 0 | 2011-06-02T06:04:07.743000 | 2011-06-02T08:51:18.123000 |
6,211,038 | 6,211,139 | Indented trace in C++ | I want to develop indented trace for our large C++ code base that will be perticularly helpful for developers to find the issues. I want to have indented trace functionality. E.g Consider following code:- void FunctionA() { TR_ENTER("Function A"); TR_PRINT("Dignostic message Function A"); FunctionB(); // Call function ... | You need to keep track of the call depth: class trace_entry;
class trace_log { public: trace_log(): depth_(0) { }
private: // noncopyable so we don't accidentally copy it trace_log(trace_log&); void operator=(trace_log);
friend trace_entry;
int depth_; };
class trace_entry { public: trace_entry(trace_log& log, con... | Indented trace in C++ I want to develop indented trace for our large C++ code base that will be perticularly helpful for developers to find the issues. I want to have indented trace functionality. E.g Consider following code:- void FunctionA() { TR_ENTER("Function A"); TR_PRINT("Dignostic message Function A"); Function... | TITLE:
Indented trace in C++
QUESTION:
I want to develop indented trace for our large C++ code base that will be perticularly helpful for developers to find the issues. I want to have indented trace functionality. E.g Consider following code:- void FunctionA() { TR_ENTER("Function A"); TR_PRINT("Dignostic message Func... | [
"c++",
"windows",
"trace"
] | 1 | 7 | 1,234 | 2 | 0 | 2011-06-02T06:04:14.007000 | 2011-06-02T06:18:32.633000 |
6,211,044 | 6,211,222 | Linq to SQL and Entity Framework in Same project | I have a project that is using l2s. We are going to expand with new modules. Now we are thinking of using entity framework for new modules as it is not possible for us to change our existing modules to EF. Can some one share experiences of using both l2s and EF in same mvc project Regards | There wont be any problem in using both of them in same project. Both have their own way to access data and will not conflict with each other. But I would suggest you to slowly migrate your data access to either one of these technology as having two data access methods in same project may lead to maintenance issue | Linq to SQL and Entity Framework in Same project I have a project that is using l2s. We are going to expand with new modules. Now we are thinking of using entity framework for new modules as it is not possible for us to change our existing modules to EF. Can some one share experiences of using both l2s and EF in same m... | TITLE:
Linq to SQL and Entity Framework in Same project
QUESTION:
I have a project that is using l2s. We are going to expand with new modules. Now we are thinking of using entity framework for new modules as it is not possible for us to change our existing modules to EF. Can some one share experiences of using both l2... | [
"asp.net-mvc",
"linq",
"entity-framework",
"linq-to-sql",
"asp.net-mvc-3"
] | 2 | 5 | 626 | 2 | 0 | 2011-06-02T06:05:06.697000 | 2011-06-02T06:31:15.397000 |
6,211,063 | 6,211,094 | Why Method Overriding is runtime bound | Overriding is a principle that allows you to change the functionality of a method in a child class. For Ex. //Overriding public class test { public virtual getStuff(int id) { //Get stuff default location } }
public class test2: test { public override getStuff(int id) { //base.getStuff(id); //or - Get stuff new locatio... | It is run-time binding (if that is even the right phrasing - I'm not convinced) because even with a test2 variable you could actually have: test2 obj = new test3(); // imagine test3 inherits from test2 obj.getStuff(id); here the variable is a test2, but the object is a test3. You could argue that maybe if it was sealed... | Why Method Overriding is runtime bound Overriding is a principle that allows you to change the functionality of a method in a child class. For Ex. //Overriding public class test { public virtual getStuff(int id) { //Get stuff default location } }
public class test2: test { public override getStuff(int id) { //base.get... | TITLE:
Why Method Overriding is runtime bound
QUESTION:
Overriding is a principle that allows you to change the functionality of a method in a child class. For Ex. //Overriding public class test { public virtual getStuff(int id) { //Get stuff default location } }
public class test2: test { public override getStuff(in... | [
"c#",
"methods",
"time",
"overriding",
"bind"
] | 4 | 3 | 577 | 4 | 0 | 2011-06-02T06:07:41.627000 | 2011-06-02T06:12:08.723000 |
6,211,070 | 6,211,113 | Class inheriting from several Interfaces having same method signature | 1) How to solve this problem in Java? 2) What if only the return types are different in the interfaces? | 1) How to solve this problem in Java? Essentially, the different "versions" of the method in the respective interfaces all bind to the same implementation method. If that's what you want, fine. If you actually want a different version of the method for each interface then you are stuck. You can't do that in Java. 2) Wh... | Class inheriting from several Interfaces having same method signature 1) How to solve this problem in Java? 2) What if only the return types are different in the interfaces? | TITLE:
Class inheriting from several Interfaces having same method signature
QUESTION:
1) How to solve this problem in Java? 2) What if only the return types are different in the interfaces?
ANSWER:
1) How to solve this problem in Java? Essentially, the different "versions" of the method in the respective interfaces ... | [
"java",
"oop",
"interface"
] | 4 | 8 | 563 | 2 | 0 | 2011-06-02T06:08:23.130000 | 2011-06-02T06:14:03.403000 |
6,211,080 | 6,217,588 | Having Trouble with SMP (Strobe Media Playback) | I'm having some difficulties getting paths within SMP to work right. In the demo files, it includes an HTML file that works great when I just double click it. But when I move it elsewhere, say one directory up, it fails even when I update the paths. I kept all the rest of the files in a folder called 'strobe'. Even whe... | I didn't exactly figure out what I was doing wrong, but if anyone else runs into this problem, I found that there's a setup.html in the source code that will get one up and running for your own needs. | Having Trouble with SMP (Strobe Media Playback) I'm having some difficulties getting paths within SMP to work right. In the demo files, it includes an HTML file that works great when I just double click it. But when I move it elsewhere, say one directory up, it fails even when I update the paths. I kept all the rest of... | TITLE:
Having Trouble with SMP (Strobe Media Playback)
QUESTION:
I'm having some difficulties getting paths within SMP to work right. In the demo files, it includes an HTML file that works great when I just double click it. But when I move it elsewhere, say one directory up, it fails even when I update the paths. I ke... | [
"javascript"
] | 0 | 1 | 1,102 | 1 | 0 | 2011-06-02T06:09:17.790000 | 2011-06-02T16:52:50.977000 |
6,211,088 | 6,211,125 | Passing variables from a shell script to a GNU screen | I have a linux shell script that looks like this: tron="/home/duke/aa/bin/armagetronad-dedicated" var="/home/duke/aa/servers/$1/var/" log="${var}logs/all_console_logs.log" userconfigdir="${var}customize/config/" parser="${var}customize/parser-rpg.php" ladderlog="${var}ladderlog.txt" cmds="${var}cmd.txt"
screen -S $1 -... | Single quotes suppresses variable substitution. Will this work instead for the last line? screen -S $1 -X stuff "tail -n0 -f -s 0.01 $cmds | (while true; do $tron --userconfigdir $userconfigdir --vardir $var; done) | tee -a $log" | Passing variables from a shell script to a GNU screen I have a linux shell script that looks like this: tron="/home/duke/aa/bin/armagetronad-dedicated" var="/home/duke/aa/servers/$1/var/" log="${var}logs/all_console_logs.log" userconfigdir="${var}customize/config/" parser="${var}customize/parser-rpg.php" ladderlog="${v... | TITLE:
Passing variables from a shell script to a GNU screen
QUESTION:
I have a linux shell script that looks like this: tron="/home/duke/aa/bin/armagetronad-dedicated" var="/home/duke/aa/servers/$1/var/" log="${var}logs/all_console_logs.log" userconfigdir="${var}customize/config/" parser="${var}customize/parser-rpg.p... | [
"bash",
"shell",
"gnu-screen"
] | 3 | 3 | 3,448 | 1 | 0 | 2011-06-02T06:10:04.627000 | 2011-06-02T06:16:11.207000 |
6,211,089 | 6,211,443 | how to validate enter button? | i had a functionality that in text box after entering a value when i pressed enter the value was validated. Now i wanted to perform similar task by using enter button. I had created an event for button click but not able to understand how to perform enter action. i am sending code: Xaml.cs code: private void PlayerSwip... | Below might help you. KeyCode for enter key is "13", you can modify and perform your logic to the below code. | how to validate enter button? i had a functionality that in text box after entering a value when i pressed enter the value was validated. Now i wanted to perform similar task by using enter button. I had created an event for button click but not able to understand how to perform enter action. i am sending code: Xaml.cs... | TITLE:
how to validate enter button?
QUESTION:
i had a functionality that in text box after entering a value when i pressed enter the value was validated. Now i wanted to perform similar task by using enter button. I had created an event for button click but not able to understand how to perform enter action. i am sen... | [
"asp.net"
] | 0 | 0 | 205 | 2 | 0 | 2011-06-02T06:10:26.313000 | 2011-06-02T06:59:35.983000 |
6,211,092 | 6,211,151 | what do i need to do to develope an iphone\android app in vs2010? | we are a.net team that devleoped a full app in c# with web services and services that support it. we now want to develope a Mobile app (Android\Iphone) that will look similiar to the original to allow mobile use of it. we thought about MonoTouch instead of trying to learn Objective-c and to try to develope a cross plat... | Important caveat: both of these tools are in pain - since the vendor fired the dev team (read the "Fighting for Your Right to Party" paragraph). Hopefully soon to be replaced by Xamarin. MonoDroid does exactly that for android development. For iPhone, you need to be on a mac, and it runs inside MonoDevelop - but ultima... | what do i need to do to develope an iphone\android app in vs2010? we are a.net team that devleoped a full app in c# with web services and services that support it. we now want to develope a Mobile app (Android\Iphone) that will look similiar to the original to allow mobile use of it. we thought about MonoTouch instead ... | TITLE:
what do i need to do to develope an iphone\android app in vs2010?
QUESTION:
we are a.net team that devleoped a full app in c# with web services and services that support it. we now want to develope a Mobile app (Android\Iphone) that will look similiar to the original to allow mobile use of it. we thought about ... | [
"c#",
"iphone",
"android",
"xamarin.ios"
] | 1 | 1 | 304 | 3 | 0 | 2011-06-02T06:11:16.073000 | 2011-06-02T06:19:43.233000 |
6,211,098 | 6,211,189 | asp.net - gridview update refresh page and reload data | I have a page with a gridview. When I click on edit and update, the value in the update function reverts to the value before the update. I tried adding if(!IsPostback) to my page_load. Now the data is updated, but after the update, the data is not bound again. What should I do? Thank you! | Well... I found my error. My binding function is called BindData(), and I was calling DataBind() by mistake. Lesson of the day: It's not a good idea to call a function that binds data BindData() Thank you anyway:) | asp.net - gridview update refresh page and reload data I have a page with a gridview. When I click on edit and update, the value in the update function reverts to the value before the update. I tried adding if(!IsPostback) to my page_load. Now the data is updated, but after the update, the data is not bound again. What... | TITLE:
asp.net - gridview update refresh page and reload data
QUESTION:
I have a page with a gridview. When I click on edit and update, the value in the update function reverts to the value before the update. I tried adding if(!IsPostback) to my page_load. Now the data is updated, but after the update, the data is not... | [
"c#",
"asp.net",
"gridview"
] | 0 | 0 | 1,718 | 1 | 0 | 2011-06-02T06:12:14.063000 | 2011-06-02T06:26:10.303000 |
6,211,099 | 6,211,783 | Converting a json object to an associative array | I have this array which is retrieved by a json_encode().When I execute $.getJSON('beta.php', function(data){ console.log(data); }); I get the result as follows [ Object { StuId="1", fName="Saman", more...}, Object { StuId="2", fName="Marry", more...}, Object { StuId="3", fName="Navjoth", more...}, Object { StuId="4", f... | You are overwriting the tables html with different values each time. $(document).ready(function() { var html = ""; var data = [ { StuId:"1", fName:"Saman"}, { StuId:"2", fName:"Marry"}, { StuId:"3", fName:"Navjoth"}, { StuId:"4", fName:"Jassu"} ] $.each(data, function(key, value){ console.log(value + "--" + key); html ... | Converting a json object to an associative array I have this array which is retrieved by a json_encode().When I execute $.getJSON('beta.php', function(data){ console.log(data); }); I get the result as follows [ Object { StuId="1", fName="Saman", more...}, Object { StuId="2", fName="Marry", more...}, Object { StuId="3",... | TITLE:
Converting a json object to an associative array
QUESTION:
I have this array which is retrieved by a json_encode().When I execute $.getJSON('beta.php', function(data){ console.log(data); }); I get the result as follows [ Object { StuId="1", fName="Saman", more...}, Object { StuId="2", fName="Marry", more...}, O... | [
"javascript",
"json",
"associative",
"arrayobject"
] | 1 | 2 | 5,957 | 2 | 0 | 2011-06-02T06:12:20.493000 | 2011-06-02T07:39:38.700000 |
6,211,104 | 6,211,243 | MonoTouch random Background color | I'm a MonoTouch 4 newbie and just experimenting with random colors on the window and to my surprise the code shown below is not working: // The name AppDelegate is referenced in the MainWindow.xib file. public partial class AppDelegate: UIApplicationDelegate { Random rand = new Random(); // This method is invoked when ... | You do not see any effect because the range of RGB values for the UIColor class must be from 0.0 to 1.0. Anything smaller than 0.0 is considered as 0.0 and anything larger than 1.0 is considered as 1.0. So your code will basically always create white color. To create a color with RGB values of R:100, G:150 and B: 200, ... | MonoTouch random Background color I'm a MonoTouch 4 newbie and just experimenting with random colors on the window and to my surprise the code shown below is not working: // The name AppDelegate is referenced in the MainWindow.xib file. public partial class AppDelegate: UIApplicationDelegate { Random rand = new Random(... | TITLE:
MonoTouch random Background color
QUESTION:
I'm a MonoTouch 4 newbie and just experimenting with random colors on the window and to my surprise the code shown below is not working: // The name AppDelegate is referenced in the MainWindow.xib file. public partial class AppDelegate: UIApplicationDelegate { Random ... | [
"xamarin.ios"
] | 0 | 0 | 951 | 1 | 0 | 2011-06-02T06:12:51.407000 | 2011-06-02T06:33:45.243000 |
6,211,106 | 6,211,164 | How to protect a button in disabled mode? | I want to disable a button if user doesnt have rights to access it. I am disabling at Page_Load event Page_Load() { if(!userhasrights) { btn.Enabled=false; } } but after rendering asp.net just sets its disabled property to disabled which a hacker can easily set to 'true' & can access the button. How can i protect my bu... | You cannot protect the html state of the button, since users can always modify it. You should have server-side validation when the button is pressed, and return error/warning to users who are not authorized to click on it. You can still user the disable state for usability. The other solution is not to generate the but... | How to protect a button in disabled mode? I want to disable a button if user doesnt have rights to access it. I am disabling at Page_Load event Page_Load() { if(!userhasrights) { btn.Enabled=false; } } but after rendering asp.net just sets its disabled property to disabled which a hacker can easily set to 'true' & can ... | TITLE:
How to protect a button in disabled mode?
QUESTION:
I want to disable a button if user doesnt have rights to access it. I am disabling at Page_Load event Page_Load() { if(!userhasrights) { btn.Enabled=false; } } but after rendering asp.net just sets its disabled property to disabled which a hacker can easily se... | [
"javascript",
"asp.net"
] | 1 | 2 | 1,407 | 4 | 0 | 2011-06-02T06:13:02.267000 | 2011-06-02T06:21:22.813000 |
6,211,109 | 6,213,402 | j2me to get cellid,mcc,mnc,lcc for fetching lon lat | I want to get the cellid,mcc,mnc,lac data of mobile for any device like nokia,motorola,samsung i had google it and able to found it for sony..But cant able to find it for samsung,nokia,motorola. For sony erricson device i had used the below:- String cellid = System.getProperty("com.sonyericsson.net.cellid"); String mcc... | See this article, How to get CellId and other Imformation from mobile phones via J2ME. Also read this wiki article. | j2me to get cellid,mcc,mnc,lcc for fetching lon lat I want to get the cellid,mcc,mnc,lac data of mobile for any device like nokia,motorola,samsung i had google it and able to found it for sony..But cant able to find it for samsung,nokia,motorola. For sony erricson device i had used the below:- String cellid = System.ge... | TITLE:
j2me to get cellid,mcc,mnc,lcc for fetching lon lat
QUESTION:
I want to get the cellid,mcc,mnc,lac data of mobile for any device like nokia,motorola,samsung i had google it and able to found it for sony..But cant able to find it for samsung,nokia,motorola. For sony erricson device i had used the below:- String ... | [
"java-me"
] | 1 | 2 | 2,102 | 2 | 0 | 2011-06-02T06:13:15.417000 | 2011-06-02T10:36:52.477000 |
6,211,111 | 6,218,538 | Javascript parser generator | I've seen some javascript parser generators: Jison ( http://zaach.github.com/jison/ ) PEG.js ( http://pegjs.majda.cz/ ) ANTLR ( http://www.antlr.org/ ) JS/CC ( http://jscc.jmksf.com/ ) Does any one have any experience with them? What are the pros and cons? Are these libraries ready for production? And performance? EDIT... | I'm not sure if you want a parser generator that would spit a JavaScript written parser or a parser generator that would use a JavaScript grammar to build a JavaScript parser. Anyway, I've only used ANTLR and JavaCC. ANTLR allows you to generate your parser in different languages (C, C#, Java) and it's pretty cool chec... | Javascript parser generator I've seen some javascript parser generators: Jison ( http://zaach.github.com/jison/ ) PEG.js ( http://pegjs.majda.cz/ ) ANTLR ( http://www.antlr.org/ ) JS/CC ( http://jscc.jmksf.com/ ) Does any one have any experience with them? What are the pros and cons? Are these libraries ready for produ... | TITLE:
Javascript parser generator
QUESTION:
I've seen some javascript parser generators: Jison ( http://zaach.github.com/jison/ ) PEG.js ( http://pegjs.majda.cz/ ) ANTLR ( http://www.antlr.org/ ) JS/CC ( http://jscc.jmksf.com/ ) Does any one have any experience with them? What are the pros and cons? Are these librari... | [
"javascript",
"parsing",
"compiler-construction"
] | 38 | 2 | 8,328 | 2 | 0 | 2011-06-02T06:13:36.700000 | 2011-06-02T18:14:49.393000 |
6,211,116 | 6,213,639 | How to select rows which are evenly distributed on some column? | I have a table tbl with 3 columns imp_col, data1, data2 where imp_col's type is enum('imp1', 'imp2, 'imp3', 'imp4'). Now if I want to select 10 rows randomly I can do like this. select imp_col, data1, data2 from tbl where imp_col in ('imp1', 'imp2', 'imp3') limit 10 order by rand(); But in this case all the 10 resultin... | Are you able to use limit and rand() in an inline view in mySQL? select Y.c1, Y.c2, Y.c3 from ( select c1, c2, c3.... from X limit 500 order by rand() ) as Y where Y.c2 in ( 'imp1', 'imp2', 'imp3') limit 10 That would give you a better chance of getting a variety of 'imp' values, if it's legal. | How to select rows which are evenly distributed on some column? I have a table tbl with 3 columns imp_col, data1, data2 where imp_col's type is enum('imp1', 'imp2, 'imp3', 'imp4'). Now if I want to select 10 rows randomly I can do like this. select imp_col, data1, data2 from tbl where imp_col in ('imp1', 'imp2', 'imp3'... | TITLE:
How to select rows which are evenly distributed on some column?
QUESTION:
I have a table tbl with 3 columns imp_col, data1, data2 where imp_col's type is enum('imp1', 'imp2, 'imp3', 'imp4'). Now if I want to select 10 rows randomly I can do like this. select imp_col, data1, data2 from tbl where imp_col in ('imp... | [
"mysql",
"sql",
"select"
] | 0 | 0 | 680 | 2 | 0 | 2011-06-02T06:14:35.073000 | 2011-06-02T10:59:18.157000 |
6,211,117 | 6,211,149 | images won't display after retrieving file location from SQL table using php | Each row in the SQL table represents a user. There are 5 columns related to images: image1, image2, image3, image4, and image5. columns image[1-5] represent the image file directories. All the image columns are of the "text" type. The problem is that when I type in the directory it will display but using the row variab... | You've left out some quotation marks. It's interpreting the image1 in $row[image1] as a constant, probably generating an error message, which is causing your image to show up as not available. Try something like this: echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; | images won't display after retrieving file location from SQL table using php Each row in the SQL table represents a user. There are 5 columns related to images: image1, image2, image3, image4, and image5. columns image[1-5] represent the image file directories. All the image columns are of the "text" type. The problem ... | TITLE:
images won't display after retrieving file location from SQL table using php
QUESTION:
Each row in the SQL table represents a user. There are 5 columns related to images: image1, image2, image3, image4, and image5. columns image[1-5] represent the image file directories. All the image columns are of the "text" ... | [
"php",
"mysql",
"html",
"image",
"directory"
] | 0 | 1 | 1,570 | 1 | 0 | 2011-06-02T06:14:48.390000 | 2011-06-02T06:19:28.990000 |
6,211,121 | 6,213,916 | VBA End-user upgrading Microsoft Office 2007 to 2010 (VBA 6 to VBA7) problems and need for documentation, help, tips. (Enough with keywords) | As typical small-business user, when my laptop broke I HAD to upgrade to Office 2010 (2007 isn’t on market anymore). Now I have a bunch of quick-and-dirty VBA to go with my old worksheets. None of them were programming masterpieces, but those worked and got work done with excel, and office 2007. Now I tried to use my o... | For all of your TextBox instances change.Text to.Value The SmartTagRecognizer issue would appear to be a false positive so no action needed there On the error with the form, you could try creating the form this way to see if it helps: Private Sub myMacro2001_Click()
Dim meetingId As Integer Dim fmHours As formHours
m... | VBA End-user upgrading Microsoft Office 2007 to 2010 (VBA 6 to VBA7) problems and need for documentation, help, tips. (Enough with keywords) As typical small-business user, when my laptop broke I HAD to upgrade to Office 2010 (2007 isn’t on market anymore). Now I have a bunch of quick-and-dirty VBA to go with my old wo... | TITLE:
VBA End-user upgrading Microsoft Office 2007 to 2010 (VBA 6 to VBA7) problems and need for documentation, help, tips. (Enough with keywords)
QUESTION:
As typical small-business user, when my laptop broke I HAD to upgrade to Office 2010 (2007 isn’t on market anymore). Now I have a bunch of quick-and-dirty VBA to... | [
"excel",
"vba",
"ms-office",
"office-2010"
] | 4 | 1 | 8,470 | 3 | 0 | 2011-06-02T06:15:40.067000 | 2011-06-02T11:28:01.713000 |
6,211,127 | 6,211,146 | to calculate driving distance between two coordinates on earth in php | Well i am working in a location based app and i need to find driving distance between two location on earth at the server end. i am coding the web service in php. Till now i am able to calculate the aerial distance using the Haversine formula, but now i want to calculate the driving distance. There can be possible dupl... | This should get you started... $json = file_get_contents('http://maps.google.com/maps/nav?q=from:Buderim,Australia%20to:Brisbane,Australia');
$details = json_decode($json, TRUE);
var_dump($details['Directions']['Distance']['meters']); | to calculate driving distance between two coordinates on earth in php Well i am working in a location based app and i need to find driving distance between two location on earth at the server end. i am coding the web service in php. Till now i am able to calculate the aerial distance using the Haversine formula, but no... | TITLE:
to calculate driving distance between two coordinates on earth in php
QUESTION:
Well i am working in a location based app and i need to find driving distance between two location on earth at the server end. i am coding the web service in php. Till now i am able to calculate the aerial distance using the Haversi... | [
"php",
"coordinates",
"distance",
"latitude-longitude"
] | 3 | 3 | 13,653 | 2 | 0 | 2011-06-02T06:16:38.833000 | 2011-06-02T06:19:23.333000 |
6,211,145 | 6,212,497 | Upload file with Ajax XMLHttpRequest | I am trying to send file with XMLHttpRequest with this code. var url= "http://localhost:80/...."; $(document).ready(function(){ document.getElementById('upload').addEventListener('change', function(e) { var file = this.files[0]; var xhr = new XMLHttpRequest(); xhr.file = file; // not necessary if you create scopes like... | There is no such thing as xhr.file = file;; the file object is not supposed to be attached this way. xhr.send(file) doesn't send the file. You have to use the FormData object to wrap the file into a multipart/form-data post data object: var formData = new FormData(); formData.append("thefile", file); xhr.send(formData)... | Upload file with Ajax XMLHttpRequest I am trying to send file with XMLHttpRequest with this code. var url= "http://localhost:80/...."; $(document).ready(function(){ document.getElementById('upload').addEventListener('change', function(e) { var file = this.files[0]; var xhr = new XMLHttpRequest(); xhr.file = file; // no... | TITLE:
Upload file with Ajax XMLHttpRequest
QUESTION:
I am trying to send file with XMLHttpRequest with this code. var url= "http://localhost:80/...."; $(document).ready(function(){ document.getElementById('upload').addEventListener('change', function(e) { var file = this.files[0]; var xhr = new XMLHttpRequest(); xhr.... | [
"javascript",
"ajax",
"jquery",
"file-upload",
"xmlhttprequest"
] | 75 | 116 | 176,905 | 2 | 0 | 2011-06-02T06:19:22.703000 | 2011-06-02T09:09:04.547000 |
6,211,148 | 6,211,175 | How do I check if a users input is a valid IP address or not? | I want to check if an entered input is a valid IP address or not. I would like a specific function that will help me validate a users input. | filter_var($ip, FILTER_VALIDATE_IP) http://www.php.net/filter_var Example:- if(filter_var($ip, FILTER_VALIDATE_IP)){ echo 'Valid IP'; } else { echo 'Not Valid IP'; } | How do I check if a users input is a valid IP address or not? I want to check if an entered input is a valid IP address or not. I would like a specific function that will help me validate a users input. | TITLE:
How do I check if a users input is a valid IP address or not?
QUESTION:
I want to check if an entered input is a valid IP address or not. I would like a specific function that will help me validate a users input.
ANSWER:
filter_var($ip, FILTER_VALIDATE_IP) http://www.php.net/filter_var Example:- if(filter_var(... | [
"php",
"validation",
"ip"
] | 27 | 91 | 44,326 | 3 | 0 | 2011-06-02T06:19:28.553000 | 2011-06-02T06:23:15.777000 |
6,211,158 | 6,211,299 | Working with handlers and threads in service, Thread.sleep makes the program to hang? | i am working on a task scheduler applications as my college project, i have a service that checks the expire time of an task. i had implemented handlers to check the expire time. When the expire time of an application is matched with current time then it sends a status bar notification. At this point i am pausing the T... | When you're using Handler 's postDelayed function here is what happens: Handler puts your Runnable into the current thread's Looper queue. When time comes, your code in Runnable is run on the UI thread. Note that its not that Handler always puts Runnable to UI thread queue. It puts Runnable to current thread's queue, a... | Working with handlers and threads in service, Thread.sleep makes the program to hang? i am working on a task scheduler applications as my college project, i have a service that checks the expire time of an task. i had implemented handlers to check the expire time. When the expire time of an application is matched with ... | TITLE:
Working with handlers and threads in service, Thread.sleep makes the program to hang?
QUESTION:
i am working on a task scheduler applications as my college project, i have a service that checks the expire time of an task. i had implemented handlers to check the expire time. When the expire time of an applicatio... | [
"android"
] | 1 | 2 | 3,204 | 1 | 0 | 2011-06-02T06:20:34.043000 | 2011-06-02T06:41:58.567000 |
6,211,160 | 6,212,080 | Zend bootstrap, including javascript files for certain pages only | I'm loading javascript files in the bootstrap as usual, but there's a file that I want to have included only if it's a page that has a form ->appendFile('http://myurl.com/js/formscript.js'); Is there a way to detect the page being loaded, from the bootstrap so I can decide whether or not to include this file? I thought... | It is possible, but you do not need your bootstrap. You can just access the variable from your layout: //form $view = Zend_Layout::getMvcInstance()->getView(); $view->formscript = TRUE;
//layout if($this->formscript) { $this->headScript()->appendFile('http://myurl.com/js/formscript.js'); } echo $this->headScript(); Do... | Zend bootstrap, including javascript files for certain pages only I'm loading javascript files in the bootstrap as usual, but there's a file that I want to have included only if it's a page that has a form ->appendFile('http://myurl.com/js/formscript.js'); Is there a way to detect the page being loaded, from the bootst... | TITLE:
Zend bootstrap, including javascript files for certain pages only
QUESTION:
I'm loading javascript files in the bootstrap as usual, but there's a file that I want to have included only if it's a page that has a form ->appendFile('http://myurl.com/js/formscript.js'); Is there a way to detect the page being loade... | [
"php",
"zend-framework"
] | 3 | 3 | 1,456 | 4 | 0 | 2011-06-02T06:20:36.570000 | 2011-06-02T08:18:23.610000 |
6,211,166 | 6,215,599 | How to make my menu contribution appear after a plug-in menu contribution? | I have defined an Exit command to display on my File menu. However another plug-in is contributing a Open File item on the File menu and this is appearing AFTER my Exit command. I want my Exit command to appear last on the File menu. I've tried specifying locationURI menu:file?after=org.eclipse.ui.openLocalFile but the... | You need to put some of the proper group markers in your File menu when you create it. The order of operations is: ActionBarAdvisor creates MenuManagers programatically org.eclipse.ui.menus are applied legacy action extensions are applied (like actionSets) Open File says it has a menubarPath="file/new.ext". So however ... | How to make my menu contribution appear after a plug-in menu contribution? I have defined an Exit command to display on my File menu. However another plug-in is contributing a Open File item on the File menu and this is appearing AFTER my Exit command. I want my Exit command to appear last on the File menu. I've tried ... | TITLE:
How to make my menu contribution appear after a plug-in menu contribution?
QUESTION:
I have defined an Exit command to display on my File menu. However another plug-in is contributing a Open File item on the File menu and this is appearing AFTER my Exit command. I want my Exit command to appear last on the File... | [
"java",
"eclipse-rcp"
] | 1 | 2 | 1,552 | 2 | 0 | 2011-06-02T06:22:01.517000 | 2011-06-02T14:02:04.150000 |
6,211,167 | 6,211,230 | Problem in sorting using Comparator interface | I have created a ArrayList of HashMap like ArrayList > var = new ArrayList >(); My HashMaps contains a String value "name" with key "name".What I want is to sort ArrayList by name so can I do this using Comparator? Please Help Me. | ArrayList > var = new ArrayList >(); Collections.sort(var, new Comparator(){
public int compare(Object o1, Object o2) { Map map1 = (Map) o1; Map map2 = (Map)o2; String name1 = (String) map1.get("name"); String name2 = (String) map2.get("name"); if(name1!= null){ return name1.compareTo(name2); } else if(name2!= null){ ... | Problem in sorting using Comparator interface I have created a ArrayList of HashMap like ArrayList > var = new ArrayList >(); My HashMaps contains a String value "name" with key "name".What I want is to sort ArrayList by name so can I do this using Comparator? Please Help Me. | TITLE:
Problem in sorting using Comparator interface
QUESTION:
I have created a ArrayList of HashMap like ArrayList > var = new ArrayList >(); My HashMaps contains a String value "name" with key "name".What I want is to sort ArrayList by name so can I do this using Comparator? Please Help Me.
ANSWER:
ArrayList > var ... | [
"java",
"comparator"
] | 1 | 3 | 404 | 2 | 0 | 2011-06-02T06:22:08.557000 | 2011-06-02T06:31:34.463000 |
6,211,172 | 6,211,228 | GCC inline assembly error: asm-specifier for variable '%al' conflicts with asm clobber list | Sorry for so many questions, but I've encountered yet another cryptic error trying to compile the following inline assembly (with -fasm-blocks ) which works in MSVC, but apparently not in GCC and wasn't able to deal with it: unsigned char testData = 128;
__asm { //... mov al, testData mov ah, al // error: asm-specifie... | This has to be some bug in gcc (maybe __asm blocks have implicit clobbering). Anyway there are many workarounds: __asm { //... mov ah, testData mov al, ah shl eax, 16 //... }; or __asm { //... mov al, testData mov ah, testData shl eax, 16 //... }; or __asm { //... movzx eax, testData imul eax, 0x0101 shl eax, 16 //... ... | GCC inline assembly error: asm-specifier for variable '%al' conflicts with asm clobber list Sorry for so many questions, but I've encountered yet another cryptic error trying to compile the following inline assembly (with -fasm-blocks ) which works in MSVC, but apparently not in GCC and wasn't able to deal with it: uns... | TITLE:
GCC inline assembly error: asm-specifier for variable '%al' conflicts with asm clobber list
QUESTION:
Sorry for so many questions, but I've encountered yet another cryptic error trying to compile the following inline assembly (with -fasm-blocks ) which works in MSVC, but apparently not in GCC and wasn't able to... | [
"c++",
"visual-c++",
"gcc",
"assembly",
"inline-assembly"
] | 0 | 0 | 2,112 | 2 | 0 | 2011-06-02T06:22:37.443000 | 2011-06-02T06:31:25.870000 |
6,211,174 | 6,211,279 | How to optimize the query? t-sql | This query works about 3 minutes and returns 7279 rows: SELECT identity(int,1,1) as id, c.client_code, a.account_num, c.client_short_name, u.uso, us.fio, null as new, null as txt INTO #ttable FROM accounts a INNER JOIN Clients c ON c.id = a.client_id INNER JOIN Uso u ON c.uso_id = u.uso_id INNER JOIN Magazin m ON a.acc... | Insert the records in the Temporary table without using Order by Clause and then Sort them using the c.client_code. Hope it should help you. Create table #temp ( your columns... ) and Insert the records in this table Without Using the Order by Clause. Now run the select with Order by Clause | How to optimize the query? t-sql This query works about 3 minutes and returns 7279 rows: SELECT identity(int,1,1) as id, c.client_code, a.account_num, c.client_short_name, u.uso, us.fio, null as new, null as txt INTO #ttable FROM accounts a INNER JOIN Clients c ON c.id = a.client_id INNER JOIN Uso u ON c.uso_id = u.uso... | TITLE:
How to optimize the query? t-sql
QUESTION:
This query works about 3 minutes and returns 7279 rows: SELECT identity(int,1,1) as id, c.client_code, a.account_num, c.client_short_name, u.uso, us.fio, null as new, null as txt INTO #ttable FROM accounts a INNER JOIN Clients c ON c.id = a.client_id INNER JOIN Uso u O... | [
"sql",
"sql-server-2005",
"t-sql"
] | 0 | 1 | 188 | 4 | 0 | 2011-06-02T06:23:07.897000 | 2011-06-02T06:38:49.753000 |
6,211,177 | 6,217,852 | How to do transfer material from one warehouse to other warehouse in SAP MM Module? | I am making application in SAP MM. How to do transfer material from one warehouse to other warehouse in SAP MM Module? please share code snippet or useful link, which is appreciated. Thanks, Mishal Shah | Have you tried BAPI_GOODSMOVEMENT_CREATE? It should do what you want. | How to do transfer material from one warehouse to other warehouse in SAP MM Module? I am making application in SAP MM. How to do transfer material from one warehouse to other warehouse in SAP MM Module? please share code snippet or useful link, which is appreciated. Thanks, Mishal Shah | TITLE:
How to do transfer material from one warehouse to other warehouse in SAP MM Module?
QUESTION:
I am making application in SAP MM. How to do transfer material from one warehouse to other warehouse in SAP MM Module? please share code snippet or useful link, which is appreciated. Thanks, Mishal Shah
ANSWER:
Have y... | [
"transfer",
"sap-erp"
] | 0 | 2 | 737 | 1 | 0 | 2011-06-02T06:23:17.887000 | 2011-06-02T17:19:04.477000 |
6,211,179 | 6,211,224 | Can javascript be used to delegate events to a native android application? | Is it possible to invoke a method or a function of a running android application using javascript?? OR Is there a possible way to communicate between Javascript and native android application?? | Yes, there's such a method. Just use the WebView.addJavascriptInterface() method. It creates a javascript variable which is bound to a java object. You'll be able to call methods of this object from your javascript code. | Can javascript be used to delegate events to a native android application? Is it possible to invoke a method or a function of a running android application using javascript?? OR Is there a possible way to communicate between Javascript and native android application?? | TITLE:
Can javascript be used to delegate events to a native android application?
QUESTION:
Is it possible to invoke a method or a function of a running android application using javascript?? OR Is there a possible way to communicate between Javascript and native android application??
ANSWER:
Yes, there's such a meth... | [
"javascript",
"android"
] | 1 | 1 | 234 | 1 | 0 | 2011-06-02T06:23:31.300000 | 2011-06-02T06:31:16.270000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.