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,184,694 | 6,184,726 | Retrieving a database record set into an array in php | I want to retrieve a set of records from a MySQL table as an array. So far I was able to retrieve each row as an associative array. But I want all the rows in one array because I have to access that complete object in jQuery to display them. This is what I have done so far.This is my.php script to retrieve data //selec... | Put it all in one array, then json_encode it: $json = array( ); $result = mysql_query("SELECT * FROM student",$con) or die (mysql_error()); while( $row = mysql_fetch_assoc( $result ) ) { $json[] = $row; } echo json_encode( $json ); FYI: there's no need to count the number of results to loop. mysql_fetch_* will internal... | Retrieving a database record set into an array in php I want to retrieve a set of records from a MySQL table as an array. So far I was able to retrieve each row as an associative array. But I want all the rows in one array because I have to access that complete object in jQuery to display them. This is what I have done... | TITLE:
Retrieving a database record set into an array in php
QUESTION:
I want to retrieve a set of records from a MySQL table as an array. So far I was able to retrieve each row as an associative array. But I want all the rows in one array because I have to access that complete object in jQuery to display them. This i... | [
"php",
"arrays",
"json",
"dataset"
] | 5 | 8 | 16,622 | 1 | 0 | 2011-05-31T08:11:10.647000 | 2011-05-31T08:14:15.020000 |
6,184,697 | 6,184,728 | How to get a substring of text? | I have text with length ~700. How do I get only ~30 of its first characters? | If you have your text in your_text variable, you can use: your_text[0..29] | How to get a substring of text? I have text with length ~700. How do I get only ~30 of its first characters? | TITLE:
How to get a substring of text?
QUESTION:
I have text with length ~700. How do I get only ~30 of its first characters?
ANSWER:
If you have your text in your_text variable, you can use: your_text[0..29] | [
"ruby"
] | 188 | 262 | 207,221 | 5 | 0 | 2011-05-31T08:11:37.047000 | 2011-05-31T08:14:36.473000 |
6,184,704 | 6,185,095 | How strongly jQMobile depends on jQuery? | I have built an app using jQuery mobile. Apart of some compatibility issues across different Android devices I have experienced extremely poor performance on Android system. Because even clean template from jquerymobile.com works slow on my galaxy tab I've decided that maybe removing unnecessary parts of jQuery will sp... | It is impossible to run jQuery Mobile without jQuery itself. (that's for the people who might come here and not know that already) You can try to shrink the size of JQ and JQM. Sadly, I don't think there is a lot to remove from jQuery. I'll give it anoder thought and edit;) But you sure can "clean up" jQuery Mobile as ... | How strongly jQMobile depends on jQuery? I have built an app using jQuery mobile. Apart of some compatibility issues across different Android devices I have experienced extremely poor performance on Android system. Because even clean template from jquerymobile.com works slow on my galaxy tab I've decided that maybe rem... | TITLE:
How strongly jQMobile depends on jQuery?
QUESTION:
I have built an app using jQuery mobile. Apart of some compatibility issues across different Android devices I have experienced extremely poor performance on Android system. Because even clean template from jquerymobile.com works slow on my galaxy tab I've deci... | [
"jquery",
"performance",
"mobile",
"jquery-mobile"
] | 4 | 3 | 1,108 | 3 | 0 | 2011-05-31T08:12:01.830000 | 2011-05-31T08:51:19.470000 |
6,184,719 | 6,184,842 | apple only have one distribution certificate | I have already submitted an iphone app. However, I need to do an ad hoc distribution for testing, so I revoke the distribution certificate and create and ad hoc distribution certificate. My questions is in order to submit the app, I need to revoke the ad hoc distribution again and create a new distribution certificate?... | AFAIK you can have multiple multiple distribution profiles on one distribution certificate. we have one for ADHOC and one for App Store. This link should help. https://developer.apple.com/ios/manage/distribution/index.action | apple only have one distribution certificate I have already submitted an iphone app. However, I need to do an ad hoc distribution for testing, so I revoke the distribution certificate and create and ad hoc distribution certificate. My questions is in order to submit the app, I need to revoke the ad hoc distribution aga... | TITLE:
apple only have one distribution certificate
QUESTION:
I have already submitted an iphone app. However, I need to do an ad hoc distribution for testing, so I revoke the distribution certificate and create and ad hoc distribution certificate. My questions is in order to submit the app, I need to revoke the ad ho... | [
"iphone"
] | 2 | 3 | 4,433 | 2 | 0 | 2011-05-31T08:13:37.080000 | 2011-05-31T08:25:52.733000 |
6,184,734 | 6,282,254 | How to structure multiple pages with RequireJS | How to structure multiple pages with RequireJS? Is, like the following sample, declaring every class in app.js is the right thing to do? Has every html file to declare the? What I want to avoid is loading all the script when a user reach the first page of a site. main.js defining all external dependencies: require( { b... | You can require files within your existing module. So say when someone clicks a link you could trigger a function that does the following: // If you have a require in your other module // The other module will execute its own logic require(["module/one"], function(One) { $("a").click(function() { require(["new/module"]... | How to structure multiple pages with RequireJS How to structure multiple pages with RequireJS? Is, like the following sample, declaring every class in app.js is the right thing to do? Has every html file to declare the? What I want to avoid is loading all the script when a user reach the first page of a site. main.js d... | TITLE:
How to structure multiple pages with RequireJS
QUESTION:
How to structure multiple pages with RequireJS? Is, like the following sample, declaring every class in app.js is the right thing to do? Has every html file to declare the? What I want to avoid is loading all the script when a user reach the first page of... | [
"module",
"requirejs"
] | 6 | 9 | 2,899 | 2 | 0 | 2011-05-31T08:15:04.303000 | 2011-06-08T16:42:01.097000 |
6,184,736 | 6,185,098 | Different reference returned from Process.Start | ProcessStartInfo psi = new ProcessStartInfo(BatchFile)
Process p = Process.Start(psi) Why p.ID is different than process id visible in WindowsTaskManager ( BatchFile is path to external program with appropriate parameters) | A process ID is only meaningful while the process is alive. The first thing to check is.HasExited - if this is true, ignore the process ID; it no longer has any meaning. There are a number of ways you can start something and have no process left even though you can apparently see it still on screen: if it is a script/b... | Different reference returned from Process.Start ProcessStartInfo psi = new ProcessStartInfo(BatchFile)
Process p = Process.Start(psi) Why p.ID is different than process id visible in WindowsTaskManager ( BatchFile is path to external program with appropriate parameters) | TITLE:
Different reference returned from Process.Start
QUESTION:
ProcessStartInfo psi = new ProcessStartInfo(BatchFile)
Process p = Process.Start(psi) Why p.ID is different than process id visible in WindowsTaskManager ( BatchFile is path to external program with appropriate parameters)
ANSWER:
A process ID is only ... | [
"c#",
".net-4.0",
"process",
"reference",
"taskmanager"
] | 1 | 1 | 388 | 3 | 0 | 2011-05-31T08:15:18.450000 | 2011-05-31T08:51:51.653000 |
6,184,740 | 6,185,015 | check if <p1> tag is not exist in <M> add this <p1><a>1223</a></p1> into it | My XML something like this: l1 m1 n1 l1 m1 n1 check if tag is not exist in add this 1223 into it. l1 m1 1223 n1 I am trying: $xml = simplexml_load_string($myxml); // return object $nss = $xml->getDocNamespaces(TRUE); $xml->registerXPathNamespace('__empty_ns', $nss[""]); $result = $xml->xpath("/__empty_ns:Document/__emp... | You could try something like this: loadXML(' l1 m1 n1 l1 m1 unchanged n1 ');
$xpath = new DOMXPath($dom); $xpath->registerNameSpace('what-ever', 'urn:iso:std:iso:20022:tech:xsd:test.001.001.02'); // 'what-ever' can be anything other than an empty string
foreach ($xpath->query('//what-ever:consonant/what-ever:M[not(wh... | check if <p1> tag is not exist in <M> add this <p1><a>1223</a></p1> into it My XML something like this: l1 m1 n1 l1 m1 n1 check if tag is not exist in add this 1223 into it. l1 m1 1223 n1 I am trying: $xml = simplexml_load_string($myxml); // return object $nss = $xml->getDocNamespaces(TRUE); $xml->registerXPathNamespac... | TITLE:
check if <p1> tag is not exist in <M> add this <p1><a>1223</a></p1> into it
QUESTION:
My XML something like this: l1 m1 n1 l1 m1 n1 check if tag is not exist in add this 1223 into it. l1 m1 1223 n1 I am trying: $xml = simplexml_load_string($myxml); // return object $nss = $xml->getDocNamespaces(TRUE); $xml->reg... | [
"php",
"xml"
] | 0 | 0 | 216 | 1 | 0 | 2011-05-31T08:15:54.157000 | 2011-05-31T08:43:11.183000 |
6,184,741 | 6,184,778 | Ruby on rails - Model, validation coordinates | here is my question. I have a map and I want the user can create a marker only into a certain area. In javascript all is done well BUT I want a validation also in Ruby on Rails, on the model. How can I proceed? Thanks a lot for help! | There are model validations, which are of great help. Also described here. | Ruby on rails - Model, validation coordinates here is my question. I have a map and I want the user can create a marker only into a certain area. In javascript all is done well BUT I want a validation also in Ruby on Rails, on the model. How can I proceed? Thanks a lot for help! | TITLE:
Ruby on rails - Model, validation coordinates
QUESTION:
here is my question. I have a map and I want the user can create a marker only into a certain area. In javascript all is done well BUT I want a validation also in Ruby on Rails, on the model. How can I proceed? Thanks a lot for help!
ANSWER:
There are mod... | [
"ruby-on-rails",
"validation",
"coordinates"
] | 0 | 1 | 404 | 1 | 0 | 2011-05-31T08:15:54.763000 | 2011-05-31T08:19:12.373000 |
6,184,742 | 6,184,766 | How to align my link to the right side of the page? | I have a link on my index page: Buy I would like to align it to the right side of my page, I tried: a.buy{ color: #2da1c1; font-size: small; text-decoration: none; left: 252px; float: left;
} a.buy:hover { color: #f90; text-decoration: underline; left: 252px; float: left; } But it still located on the left side. (I ha... | Try float: right: a.buy { color: #2da1c1; font-size: small; text-decoration: none; float: right; } a.buy:hover { color: #f90; text-decoration: underline; } Another way would be:.content { position: relative } a.buy { color: #2da1c1; font-size: small; text-decoration: none; position: absolute; right: 0; } a.buy:hover { ... | How to align my link to the right side of the page? I have a link on my index page: Buy I would like to align it to the right side of my page, I tried: a.buy{ color: #2da1c1; font-size: small; text-decoration: none; left: 252px; float: left;
} a.buy:hover { color: #f90; text-decoration: underline; left: 252px; float: ... | TITLE:
How to align my link to the right side of the page?
QUESTION:
I have a link on my index page: Buy I would like to align it to the right side of my page, I tried: a.buy{ color: #2da1c1; font-size: small; text-decoration: none; left: 252px; float: left;
} a.buy:hover { color: #f90; text-decoration: underline; le... | [
"html",
"css"
] | 15 | 28 | 68,084 | 5 | 0 | 2011-05-31T08:16:03.903000 | 2011-05-31T08:18:16.627000 |
6,184,743 | 6,184,790 | How to make the User's Control's BackGround transparent? | I want my UserControl's BackGround to look like it's not there. I tried to do it like that: if ((Parent!= null) && (Parent.BackgroundImage!= null)) { Bitmap backGroundImage = new Bitmap(Width, Height); Graphics.FromImage(backGroundImage).DrawImage(owner.BackgroundImage, 0, 0, new Rectangle(Location.X, Location.Y, Width... | Make usercontrol backcolor as Transparent this.BackColor = Color.Transparent; | How to make the User's Control's BackGround transparent? I want my UserControl's BackGround to look like it's not there. I tried to do it like that: if ((Parent!= null) && (Parent.BackgroundImage!= null)) { Bitmap backGroundImage = new Bitmap(Width, Height); Graphics.FromImage(backGroundImage).DrawImage(owner.Backgroun... | TITLE:
How to make the User's Control's BackGround transparent?
QUESTION:
I want my UserControl's BackGround to look like it's not there. I tried to do it like that: if ((Parent!= null) && (Parent.BackgroundImage!= null)) { Bitmap backGroundImage = new Bitmap(Width, Height); Graphics.FromImage(backGroundImage).DrawIma... | [
"c#",
"user-controls",
"background",
"parent",
"transparent"
] | 1 | 4 | 4,581 | 3 | 0 | 2011-05-31T08:16:09.397000 | 2011-05-31T08:20:17.780000 |
6,184,752 | 6,192,680 | Set Timeout For Controller Action | I have come across this thread already, but I might need something else for my situation. I have an action that returns a ViewResult, which is called by the client's $.post() JavaScript: var link = 'GetFoo?fooBar=' + fooBar;
var jqxhr = $.post(link, function (response) { $('#myDiv').replaceWith(response); }); Controll... | The problem is that the Azure load balancer has it's own timeout which is set to one minute. Any request that takes longer than a minute gets terminated. There is no way to change this. The way around this in the Azure environment is to have one ajax call start the process and return some sort of process ID then have t... | Set Timeout For Controller Action I have come across this thread already, but I might need something else for my situation. I have an action that returns a ViewResult, which is called by the client's $.post() JavaScript: var link = 'GetFoo?fooBar=' + fooBar;
var jqxhr = $.post(link, function (response) { $('#myDiv').r... | TITLE:
Set Timeout For Controller Action
QUESTION:
I have come across this thread already, but I might need something else for my situation. I have an action that returns a ViewResult, which is called by the client's $.post() JavaScript: var link = 'GetFoo?fooBar=' + fooBar;
var jqxhr = $.post(link, function (respons... | [
"c#",
"jquery",
"asp.net-mvc-2",
"azure",
"timeout"
] | 1 | 3 | 8,554 | 3 | 0 | 2011-05-31T08:16:35.597000 | 2011-05-31T19:43:18.910000 |
6,184,759 | 6,184,792 | Ajax call function after success | I'm working on a site, where we get information from an XML-file. It work great, but now I need to make a slider of the content. To do this, I will use jCarousel that claims they can do it with Dynamicly loaded content, by calling a callback function. I can't, however, make the initial ajax load, when I call a function... | Use hulabula instead of hulabula() or pass the function directly to the ajax options: 1. $.ajax({ type: "GET", //Url to the XML-file url: "data_flash_0303.xml", dataType: "xml", success: hulabula }); 2. $.ajax({ type: "GET", //Url to the XML-file url: "data_flash_0303.xml", dataType: "xml", success: function(xml) { /*.... | Ajax call function after success I'm working on a site, where we get information from an XML-file. It work great, but now I need to make a slider of the content. To do this, I will use jCarousel that claims they can do it with Dynamicly loaded content, by calling a callback function. I can't, however, make the initial ... | TITLE:
Ajax call function after success
QUESTION:
I'm working on a site, where we get information from an XML-file. It work great, but now I need to make a slider of the content. To do this, I will use jCarousel that claims they can do it with Dynamicly loaded content, by calling a callback function. I can't, however,... | [
"jquery",
"xml",
"ajax",
"jcarousel"
] | 9 | 16 | 50,574 | 3 | 0 | 2011-05-31T08:17:34.293000 | 2011-05-31T08:20:22.277000 |
6,184,767 | 6,188,797 | How to compile ogre4j under linux | I've download sources and imported then into eclipse. But when i try to run it, it prints error that ogre4j isn't found. I've looked into folder where should be library binaries, but there was nothing. I tried to compile it on my own, not automatic with eclipse, but i haven't found any makefile. Is there any plugin req... | According to the Joachims reply i've used ant. But there was two steps, which i've did. In projects directory: mkdir sdk ln -s /usr/include/OGRE sdk/include ln -s /usr/lib/OGRE sdk/lib And modify build.xml, add these lines: And finally run: ant ogre4j.build.c | How to compile ogre4j under linux I've download sources and imported then into eclipse. But when i try to run it, it prints error that ogre4j isn't found. I've looked into folder where should be library binaries, but there was nothing. I tried to compile it on my own, not automatic with eclipse, but i haven't found any... | TITLE:
How to compile ogre4j under linux
QUESTION:
I've download sources and imported then into eclipse. But when i try to run it, it prints error that ogre4j isn't found. I've looked into folder where should be library binaries, but there was nothing. I tried to compile it on my own, not automatic with eclipse, but i... | [
"java",
"linux",
"eclipse",
"compilation",
"ogre3d"
] | 0 | 0 | 313 | 2 | 0 | 2011-05-31T08:18:22.713000 | 2011-05-31T14:05:05.080000 |
6,184,775 | 6,184,905 | Get another column from sum-sub-select | I'm selecting something from a sub-select, which in turn gives me a list of sums. Now I want to select the base_unit column, which contains the unit of measurement. I can't seem to add base_unit to the sub-select because then it doesn't work with the GROUP BY statement. SELECT to_char(a.pow * f_unit_converter(base_unit... | SELECT to_char(a.pow * f_unit_converter(a.base_unit, '[W]'), '000.00') FROM ( SELECT sum (time_value) AS pow, t_mp.base_unit FROM v_value_quarter_hour inner join t_mp on (v_value_quarter_hour.mp_id = t_mp.mp_id) WHERE t_mp.mp_name = 'AC' AND (now() - time_stamp < '5 day') GROUP BY time_stamp, base_unit ORDER BY time_st... | Get another column from sum-sub-select I'm selecting something from a sub-select, which in turn gives me a list of sums. Now I want to select the base_unit column, which contains the unit of measurement. I can't seem to add base_unit to the sub-select because then it doesn't work with the GROUP BY statement. SELECT to_... | TITLE:
Get another column from sum-sub-select
QUESTION:
I'm selecting something from a sub-select, which in turn gives me a list of sums. Now I want to select the base_unit column, which contains the unit of measurement. I can't seem to add base_unit to the sub-select because then it doesn't work with the GROUP BY sta... | [
"sql",
"group-by",
"subquery"
] | 2 | 1 | 462 | 3 | 0 | 2011-05-31T08:18:48.520000 | 2011-05-31T08:31:57.923000 |
6,184,777 | 6,184,858 | Rails web service not returning required response | I am newbie to rails and currently trying to build a REST api on Rails.I am trying to connect to the rest web service from my android app. This is the controller code that i am routing the request to. class SessionsController < ApplicationController
def create user = User.authenticate(params[:userid], params[:password... | If you have no render in your Controller, then rails will use the view related to the action name. Try "render:text => message" for example. I hope I understood your question correctly. | Rails web service not returning required response I am newbie to rails and currently trying to build a REST api on Rails.I am trying to connect to the rest web service from my android app. This is the controller code that i am routing the request to. class SessionsController < ApplicationController
def create user = U... | TITLE:
Rails web service not returning required response
QUESTION:
I am newbie to rails and currently trying to build a REST api on Rails.I am trying to connect to the rest web service from my android app. This is the controller code that i am routing the request to. class SessionsController < ApplicationController
d... | [
"android",
"web-services",
"ruby-on-rails-3"
] | 0 | 1 | 233 | 1 | 0 | 2011-05-31T08:18:54.990000 | 2011-05-31T08:27:13.697000 |
6,184,786 | 6,184,889 | Javascript - verify the values of fields with dynamic names | I have a set of text fields qty with dynamic names: like qty541; qty542; qty957 formed by the word: "qty" and the product id How can I verify if all my qty fields are empty or not with Javascript? Thanks a lot. | Using: Log Javascript (no jQuery): var inputs = document.getElementsByTagName('input'); var log = document.getElementById('log');
for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == 'text' && inputs[i].name.substring(0,3) == 'qty') { if (inputs[i].value == '') { log.innerHTML += inputs[i].name + " value em... | Javascript - verify the values of fields with dynamic names I have a set of text fields qty with dynamic names: like qty541; qty542; qty957 formed by the word: "qty" and the product id How can I verify if all my qty fields are empty or not with Javascript? Thanks a lot. | TITLE:
Javascript - verify the values of fields with dynamic names
QUESTION:
I have a set of text fields qty with dynamic names: like qty541; qty542; qty957 formed by the word: "qty" and the product id How can I verify if all my qty fields are empty or not with Javascript? Thanks a lot.
ANSWER:
Using: Log Javascript ... | [
"javascript"
] | 1 | 0 | 2,623 | 4 | 0 | 2011-05-31T08:20:02.110000 | 2011-05-31T08:30:34.910000 |
6,184,797 | 6,185,646 | Not able to call functions on extracted entities with Doctrine 2 | I'm new to PHP and also with Doctrine. (Worked before with Hibernate ORM implementation). My problem is that after I fetch a record from my database by the entityManager, I can't access the object methods at all. Below are some code snippets: Entity manager creation: $classLoader = new \Doctrine\Common\ClassLoader('ent... | The problem is due to the fact that I was declared the namespace in entities. This was the reason for what I got this error. If you have entities under entities/ directory scattered in it's own directory, you need to put this paths in the driver creation array configuration: $driverImpl = $config->newDefaultAnnotationD... | Not able to call functions on extracted entities with Doctrine 2 I'm new to PHP and also with Doctrine. (Worked before with Hibernate ORM implementation). My problem is that after I fetch a record from my database by the entityManager, I can't access the object methods at all. Below are some code snippets: Entity manag... | TITLE:
Not able to call functions on extracted entities with Doctrine 2
QUESTION:
I'm new to PHP and also with Doctrine. (Worked before with Hibernate ORM implementation). My problem is that after I fetch a record from my database by the entityManager, I can't access the object methods at all. Below are some code snip... | [
"php",
"orm",
"doctrine-orm"
] | 1 | 1 | 320 | 1 | 0 | 2011-05-31T08:20:49.470000 | 2011-05-31T09:36:16.940000 |
6,184,799 | 6,184,974 | PHP How to mixed the two FOREACH data random? | I tried this method, but it caused Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 42 bytes) in E:\www\json_example\4.php on line 170 the line in foreach foreach($data_b as $b) $arr[] =. so in addition to the this method, is there any easy way can mixed the two FOREACH data random? less... | Try to free memory as soon as you don't need it anymore: function _h_dec($val) { return html_entity_decode($val, ENT_QUOTES, 'UTF-8'); } foreach ($data_a as $key => $a) { $arr[] = array('title' => _h_dec($a['title']), 'content' => _h_dec($a['content'])); unset($data_a[$key]); } unset($data_a);
foreach ($data_b as $key... | PHP How to mixed the two FOREACH data random? I tried this method, but it caused Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 42 bytes) in E:\www\json_example\4.php on line 170 the line in foreach foreach($data_b as $b) $arr[] =. so in addition to the this method, is there any easy w... | TITLE:
PHP How to mixed the two FOREACH data random?
QUESTION:
I tried this method, but it caused Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 42 bytes) in E:\www\json_example\4.php on line 170 the line in foreach foreach($data_b as $b) $arr[] =. so in addition to the this method, i... | [
"php",
"foreach"
] | 0 | 1 | 384 | 3 | 0 | 2011-05-31T08:21:03.743000 | 2011-05-31T08:38:52.287000 |
6,184,800 | 6,188,408 | Using IntelliJ IDE and Lua Programming Language to make Corona Applications | I have successfully installed: 1) IntelliJ IDEA 10.0.3 with Lua Plugin 2) Corona SDK 3) Corona API for IntelliJ I can now use autocompletion features of Lua and Corona using IntelliJ IDEA Now my problem is: When I try to run a sample main.lua script file using IntelliJ IDEA, i get this error "C:\Program Files\Lua\5.1\l... | There is a good blog post that explains the setup http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/ | Using IntelliJ IDE and Lua Programming Language to make Corona Applications I have successfully installed: 1) IntelliJ IDEA 10.0.3 with Lua Plugin 2) Corona SDK 3) Corona API for IntelliJ I can now use autocompletion features of Lua and Corona using IntelliJ IDEA Now my problem is: When I try to run a sample main.lua s... | TITLE:
Using IntelliJ IDE and Lua Programming Language to make Corona Applications
QUESTION:
I have successfully installed: 1) IntelliJ IDEA 10.0.3 with Lua Plugin 2) Corona SDK 3) Corona API for IntelliJ I can now use autocompletion features of Lua and Corona using IntelliJ IDEA Now my problem is: When I try to run a... | [
"windows",
"lua",
"intellij-idea",
"coronasdk"
] | 13 | 14 | 12,098 | 2 | 0 | 2011-05-31T08:21:06.617000 | 2011-05-31T13:35:09.783000 |
6,184,801 | 6,185,587 | JQuery is not running | I am using master page and content page. In content page I am using following jquery code When I run this code I am getting this error Compiler Error Message: CS1002:; expected Line 167: @__w.Write("\").val();\r\n });\r\n \r\n\r\n\r\n"); Any solution? | Right code is var y = $('#<%=hid.ClientID%>').val(); # Tells jquery that find a control with given ID and <%=hid.ClientID%> gives the exact ID. Only <%=hid.ClientID%> this will not work. '#<%=hid.ClientID%>' is the right code. | JQuery is not running I am using master page and content page. In content page I am using following jquery code When I run this code I am getting this error Compiler Error Message: CS1002:; expected Line 167: @__w.Write("\").val();\r\n });\r\n \r\n\r\n\r\n"); Any solution? | TITLE:
JQuery is not running
QUESTION:
I am using master page and content page. In content page I am using following jquery code When I run this code I am getting this error Compiler Error Message: CS1002:; expected Line 167: @__w.Write("\").val();\r\n });\r\n \r\n\r\n\r\n"); Any solution?
ANSWER:
Right code is var y... | [
"javascript",
"jquery",
"asp.net",
"visual-studio-2008"
] | 1 | 0 | 251 | 5 | 0 | 2011-05-31T08:21:07.443000 | 2011-05-31T09:29:55.287000 |
6,184,804 | 6,185,643 | How do I port characters expressed as decimals? | How do I port characters expressed as decimals (#0, #1, #9, #10, #13, #32, #128, #255) in Delphi 7 to Delphi Unicode? Some documents (such as 'Delphi in a Unicode world' from Embarcadero) only says that they should be replaced with the actual character. For example instead of #128 I should use '€'. But what would you d... | The low half of ANSI codes [#0..#127] does not change after conversion to Unicode, so you should not bother about it. The high half [#128..#255] is more complicated. The compiler interprets lines const s1:AnsiString = #200; const s2:UnicodeString = #200; depending on {$HIGHCHARUNICODE} directive {$HIGHCHARUNICODE OFF} ... | How do I port characters expressed as decimals? How do I port characters expressed as decimals (#0, #1, #9, #10, #13, #32, #128, #255) in Delphi 7 to Delphi Unicode? Some documents (such as 'Delphi in a Unicode world' from Embarcadero) only says that they should be replaced with the actual character. For example instea... | TITLE:
How do I port characters expressed as decimals?
QUESTION:
How do I port characters expressed as decimals (#0, #1, #9, #10, #13, #32, #128, #255) in Delphi 7 to Delphi Unicode? Some documents (such as 'Delphi in a Unicode world' from Embarcadero) only says that they should be replaced with the actual character. ... | [
"delphi",
"unicode"
] | 3 | 7 | 724 | 1 | 0 | 2011-05-31T08:21:27.560000 | 2011-05-31T09:36:04.377000 |
6,184,808 | 6,184,970 | Firefox work offline with virtual host | So I have an offline website on my PC that I want to test in Firefox. I would like to do it in the offline mode. The problem is, I have defined a virtual host for the website in httpd.conf Apache configuration file like this: DocumentRoot "D:\data\o\WebProjects\website\public" ServerName website When in online mode, I ... | I don't think in offline mode FF will bother to open any TCP connection (not even so with localhost). Try opening http://127.0.0.1 in offline mode. If it fails then no chance. | Firefox work offline with virtual host So I have an offline website on my PC that I want to test in Firefox. I would like to do it in the offline mode. The problem is, I have defined a virtual host for the website in httpd.conf Apache configuration file like this: DocumentRoot "D:\data\o\WebProjects\website\public" Ser... | TITLE:
Firefox work offline with virtual host
QUESTION:
So I have an offline website on my PC that I want to test in Firefox. I would like to do it in the offline mode. The problem is, I have defined a virtual host for the website in httpd.conf Apache configuration file like this: DocumentRoot "D:\data\o\WebProjects\w... | [
"apache",
"firefox",
"httpd.conf"
] | 3 | 1 | 1,333 | 2 | 0 | 2011-05-31T08:21:41.780000 | 2011-05-31T08:38:38.247000 |
6,184,810 | 6,184,825 | How to create an object out of Vector<Class>? | I have a Vector v = new Vector (); a.addElement(HashMap.class);.... How would I create an object out of i-element of the vector? | Do you mean? Class clazz = vector.get(i); Object object = clazz.newInstance(); BTW: I wouldn't use Vector unless you have to as it is a legacy class replaced by List in Java 1.2 (1998) | How to create an object out of Vector<Class>? I have a Vector v = new Vector (); a.addElement(HashMap.class);.... How would I create an object out of i-element of the vector? | TITLE:
How to create an object out of Vector<Class>?
QUESTION:
I have a Vector v = new Vector (); a.addElement(HashMap.class);.... How would I create an object out of i-element of the vector?
ANSWER:
Do you mean? Class clazz = vector.get(i); Object object = clazz.newInstance(); BTW: I wouldn't use Vector unless you h... | [
"java"
] | 1 | 5 | 142 | 4 | 0 | 2011-05-31T08:21:45.910000 | 2011-05-31T08:23:42.390000 |
6,184,813 | 6,185,164 | PUT method in jersey | I am new to Restful webservice. When I was going through the tutorials, I saw that PUT method can be used to create the resource. the creation means adding into the database or somewhere by implementing our own effort? or will Jersey take care of creating the resource its own? Sorry for asking silly questions.. I did n... | Jersey won't do anything except you tell it to. A PUT request semantically should create or update a ressource, so if you plan to create some entity, thats the HTTP method to use. Use @PUT to annotate your method and implement your functionality (as your tutorials tell you). | PUT method in jersey I am new to Restful webservice. When I was going through the tutorials, I saw that PUT method can be used to create the resource. the creation means adding into the database or somewhere by implementing our own effort? or will Jersey take care of creating the resource its own? Sorry for asking sill... | TITLE:
PUT method in jersey
QUESTION:
I am new to Restful webservice. When I was going through the tutorials, I saw that PUT method can be used to create the resource. the creation means adding into the database or somewhere by implementing our own effort? or will Jersey take care of creating the resource its own? Sor... | [
"jersey"
] | 0 | 0 | 491 | 1 | 0 | 2011-05-31T08:21:55.977000 | 2011-05-31T08:56:28.107000 |
6,184,814 | 6,198,098 | stop backbone.js default route from firing | I have the following backbone.js controller: App.Controllers.PlanMembers = Backbone.Controller.extend({ routes: { "message/:messageType": "sendMessage", "": "index" },
sendMessage: function (messageType) { alert(messageType); },
index: function () { alert('should not get here'); } }); I want the index to action to be... | It turns out this is a known issue This fixed the problem. I honestly thought I was going insane! | stop backbone.js default route from firing I have the following backbone.js controller: App.Controllers.PlanMembers = Backbone.Controller.extend({ routes: { "message/:messageType": "sendMessage", "": "index" },
sendMessage: function (messageType) { alert(messageType); },
index: function () { alert('should not get her... | TITLE:
stop backbone.js default route from firing
QUESTION:
I have the following backbone.js controller: App.Controllers.PlanMembers = Backbone.Controller.extend({ routes: { "message/:messageType": "sendMessage", "": "index" },
sendMessage: function (messageType) { alert(messageType); },
index: function () { alert('... | [
"backbone.js"
] | 0 | 2 | 1,457 | 2 | 0 | 2011-05-31T08:22:00.543000 | 2011-06-01T08:08:40.977000 |
6,184,815 | 6,189,680 | How to delete markers from google map before painting new ones on idle event | I'm drawing markers on a google map after it's been panned or zoomed. If the viewport has not totally changed than the markers that appeared before the move and should still appear after it are being painted on top of themselves again and again. I know I have to delete all the markers from the map before the new marker... | For performance reasoning you don't want to clear all the markers; Only the ones no longer on the map. This can be accomplished by storing the marker in an array or object. On 'success' you want to check if a marker is already at the lat lng using your array/object. If so then don't add a new one, if not then add it. A... | How to delete markers from google map before painting new ones on idle event I'm drawing markers on a google map after it's been panned or zoomed. If the viewport has not totally changed than the markers that appeared before the move and should still appear after it are being painted on top of themselves again and agai... | TITLE:
How to delete markers from google map before painting new ones on idle event
QUESTION:
I'm drawing markers on a google map after it's been panned or zoomed. If the viewport has not totally changed than the markers that appeared before the move and should still appear after it are being painted on top of themsel... | [
"ajax",
"google-maps",
"jquery"
] | 0 | 0 | 806 | 1 | 0 | 2011-05-31T08:22:07.337000 | 2011-05-31T15:10:17.953000 |
6,184,816 | 6,184,852 | Get user data pass to table view? | I want developed a similar alarm application to remind user send message, and my question is I want get user field in data like numbers, message and date to table view by array. I do this use tabbar controller,my first view is gave to user field in all data and check save button. My second view is table view to remind ... | Replace the viewDidLoad with viewWillappear...viewDidLoad is called only once when you loaded the view so you cant able to replace the array. viewWillappear is called everytime when the view is appeared on the screen... EDIT:afer seeing the comments. keep the viewdidload as it is. add these codes to your application. -... | Get user data pass to table view? I want developed a similar alarm application to remind user send message, and my question is I want get user field in data like numbers, message and date to table view by array. I do this use tabbar controller,my first view is gave to user field in all data and check save button. My se... | TITLE:
Get user data pass to table view?
QUESTION:
I want developed a similar alarm application to remind user send message, and my question is I want get user field in data like numbers, message and date to table view by array. I do this use tabbar controller,my first view is gave to user field in all data and check ... | [
"ios",
"iphone",
"uitableview",
"cocoa-touch",
"view"
] | 0 | 0 | 622 | 1 | 0 | 2011-05-31T08:22:13.917000 | 2011-05-31T08:26:33.477000 |
6,184,824 | 6,190,097 | Core Data under Japanese Calendar incorrectly comparing dates | So I seem to be getting burned by the iPhone's calendar support again. I've come across an issue with the way core data compares dates. Core data appears to be storing dates using the Gregorian calendar as they come out in a 20XX-MM-dd format. But when I build an NSPredicate this way [nsRequest setPredicate:[NSPredicat... | You really have no choice but to translate from NSDate to various calendars, especially if your users employ multiple calendars. Calendar objects are not dates themselves but rather specialized formatters. All dates are actually stored in the GMT standard format regardless of the calendar they originated with. Then the... | Core Data under Japanese Calendar incorrectly comparing dates So I seem to be getting burned by the iPhone's calendar support again. I've come across an issue with the way core data compares dates. Core data appears to be storing dates using the Gregorian calendar as they come out in a 20XX-MM-dd format. But when I bui... | TITLE:
Core Data under Japanese Calendar incorrectly comparing dates
QUESTION:
So I seem to be getting burned by the iPhone's calendar support again. I've come across an issue with the way core data compares dates. Core data appears to be storing dates using the Gregorian calendar as they come out in a 20XX-MM-dd form... | [
"iphone",
"core-data",
"unicode",
"localization",
"nsdate"
] | 0 | 2 | 424 | 1 | 0 | 2011-05-31T08:23:37.360000 | 2011-05-31T15:42:53.143000 |
6,184,831 | 6,185,200 | Android: how to take over message loop of Activity, like GetMessage/PostMessage in Win32? | My original goal is to build my own modal dialog. At some point, I have to run an inner loop, which would do really close to what GetMessage/PostMessage do in Win32, if you got Win32 experience then you are quite familiar with this. The inner loop will block current workflow but still process events. The pseudo code wo... | Sorry, Android deliberately does not support nested event loops like this. You just will have to structure your code a different way -- for dialogs you will typically start the dialog, return to the event loop, and implement callbacks to handle the result from it. | Android: how to take over message loop of Activity, like GetMessage/PostMessage in Win32? My original goal is to build my own modal dialog. At some point, I have to run an inner loop, which would do really close to what GetMessage/PostMessage do in Win32, if you got Win32 experience then you are quite familiar with thi... | TITLE:
Android: how to take over message loop of Activity, like GetMessage/PostMessage in Win32?
QUESTION:
My original goal is to build my own modal dialog. At some point, I have to run an inner loop, which would do really close to what GetMessage/PostMessage do in Win32, if you got Win32 experience then you are quite... | [
"android",
"android-activity",
"modal-dialog",
"message-queue"
] | 1 | 2 | 1,932 | 1 | 0 | 2011-05-31T08:24:04.870000 | 2011-05-31T08:58:32.480000 |
6,184,835 | 6,185,365 | Client's CC double charged when Back is clicked | I'm trying to eliminate the phenomenon of resending information when a client press the back button (php). I'm using post to post values to a result page when a client hits the details from result and goes to details page once press back then the message <<(To display this page, Firefox must send information that will ... | Please read up on the post-redirect-get-pattern to solve the issue. Basically, redirect to a GET request once a POST request was successful. | Client's CC double charged when Back is clicked I'm trying to eliminate the phenomenon of resending information when a client press the back button (php). I'm using post to post values to a result page when a client hits the details from result and goes to details page once press back then the message <<(To display thi... | TITLE:
Client's CC double charged when Back is clicked
QUESTION:
I'm trying to eliminate the phenomenon of resending information when a client press the back button (php). I'm using post to post values to a result page when a client hits the details from result and goes to details page once press back then the message... | [
"php",
"javascript"
] | 2 | 2 | 67 | 1 | 0 | 2011-05-31T08:24:54.247000 | 2011-05-31T09:11:22.127000 |
6,184,839 | 6,184,928 | DJango - __in database query | I have the following data structure: FruitObject with fields FruitType and FruitColor. On the other hand I have FruitOffer (which is input by user). It has same fields as FruitObject and is being input by user (some kind of demand-support pairing system; we input FruitObjects and user input FruitOffers; the task is to ... | The hard way. FruitObject.objects.filter(reduce(operator.or_, (Q(FruitColor=color, FruitType=type) for (color, type) in FruitOffer.objects.filter(user=request.user).values_list('FruitColor', 'FruitType')))) | DJango - __in database query I have the following data structure: FruitObject with fields FruitType and FruitColor. On the other hand I have FruitOffer (which is input by user). It has same fields as FruitObject and is being input by user (some kind of demand-support pairing system; we input FruitObjects and user input... | TITLE:
DJango - __in database query
QUESTION:
I have the following data structure: FruitObject with fields FruitType and FruitColor. On the other hand I have FruitOffer (which is input by user). It has same fields as FruitObject and is being input by user (some kind of demand-support pairing system; we input FruitObje... | [
"django",
"many-to-many"
] | 1 | 2 | 609 | 3 | 0 | 2011-05-31T08:25:42.077000 | 2011-05-31T08:34:18.843000 |
6,184,840 | 6,271,443 | Dependencies Symfony2 | I'm wondering if there is a proper way to check the dependencies. For example I've got a NewsBundle. Now I'll have to check if there is a CommentBundle. If there is one, it should execute a few more Code. Any suggestions? | In addition to markymark's answer, you can check if a specific service exists from your controller (or any other container-aware code) with the following snippet: if ($this->container->has('foo_service.alias')) { // service is loaded and usable } If you're not sure of the exact alias of a given service, or just for kic... | Dependencies Symfony2 I'm wondering if there is a proper way to check the dependencies. For example I've got a NewsBundle. Now I'll have to check if there is a CommentBundle. If there is one, it should execute a few more Code. Any suggestions? | TITLE:
Dependencies Symfony2
QUESTION:
I'm wondering if there is a proper way to check the dependencies. For example I've got a NewsBundle. Now I'll have to check if there is a CommentBundle. If there is one, it should execute a few more Code. Any suggestions?
ANSWER:
In addition to markymark's answer, you can check ... | [
"business-logic",
"symfony"
] | 6 | 28 | 3,046 | 3 | 0 | 2011-05-31T08:25:48.703000 | 2011-06-07T20:48:13.757000 |
6,184,849 | 6,185,052 | symbolic link: find all files that link to this file | Hallo all, I need to do this in linux: Given: file name 'foo.txt' Find: all files that are symbolic links to 'foo.txt' How to do it? Thanks! | It depends, if you are trying to find links to a specific file that is called foo.txt, then this is the only good way: find -L / -samefile path/to/foo.txt On the other hand, if you are just trying to find links to any file that happens to be named foo.txt, then something like find / -lname foo.txt or find. -lname \*foo... | symbolic link: find all files that link to this file Hallo all, I need to do this in linux: Given: file name 'foo.txt' Find: all files that are symbolic links to 'foo.txt' How to do it? Thanks! | TITLE:
symbolic link: find all files that link to this file
QUESTION:
Hallo all, I need to do this in linux: Given: file name 'foo.txt' Find: all files that are symbolic links to 'foo.txt' How to do it? Thanks!
ANSWER:
It depends, if you are trying to find links to a specific file that is called foo.txt, then this is... | [
"linux",
"symlink"
] | 142 | 170 | 102,727 | 3 | 0 | 2011-05-31T08:26:20.747000 | 2011-05-31T08:46:39.790000 |
6,184,851 | 6,185,025 | Why does Scala maintain the type of collection not return Iterable (as in .Net)? | In Scala, you can do val l = List(1, 2, 3) l.filter(_ > 2) // returns a List[Int] val s = Set("hello", "world") s.map(_.length) // returns a Set[Int] The question is: why is this useful? Scala collections are probably the only existing collection framework that does this. Scala community seems to agree that this functi... | Not a full answer to your question, but Scala never forces you to use one collection type over another. You're free to write code like this: import collection._ import immutable._
val s = Set("hello", "world") val l: Vector[Int] = s.map(_.length)(breakOut) Read more about breakOut in Daniel Sobral's detailed answer to... | Why does Scala maintain the type of collection not return Iterable (as in .Net)? In Scala, you can do val l = List(1, 2, 3) l.filter(_ > 2) // returns a List[Int] val s = Set("hello", "world") s.map(_.length) // returns a Set[Int] The question is: why is this useful? Scala collections are probably the only existing col... | TITLE:
Why does Scala maintain the type of collection not return Iterable (as in .Net)?
QUESTION:
In Scala, you can do val l = List(1, 2, 3) l.filter(_ > 2) // returns a List[Int] val s = Set("hello", "world") s.map(_.length) // returns a Set[Int] The question is: why is this useful? Scala collections are probably the... | [
"scala",
"collections"
] | 6 | 10 | 554 | 4 | 0 | 2011-05-31T08:26:29.590000 | 2011-05-31T08:44:09.247000 |
6,184,853 | 6,185,938 | Adding MySql.Data.dll to Qt C++? | How do I add a MySql.Data.dll file to a Qt C++ project? | For QT, check out QSQL instead to connect to a database. Or use the C++/C connectors: For C++: MySQL++ For C: MySQL C API | Adding MySql.Data.dll to Qt C++? How do I add a MySql.Data.dll file to a Qt C++ project? | TITLE:
Adding MySql.Data.dll to Qt C++?
QUESTION:
How do I add a MySql.Data.dll file to a Qt C++ project?
ANSWER:
For QT, check out QSQL instead to connect to a database. Or use the C++/C connectors: For C++: MySQL++ For C: MySQL C API | [
"c++",
"mysql",
"qt"
] | 0 | 0 | 436 | 2 | 0 | 2011-05-31T08:26:33.820000 | 2011-05-31T10:02:40.733000 |
6,184,869 | 6,185,005 | What is the difference between memoization and dynamic programming? | What is the difference between memoization and dynamic programming? I think dynamic programming is a subset of memoization. Is it right? | Relevant article on Programming.Guide: Dynamic programming vs memoization vs tabulation What is difference between memoization and dynamic programming? Memoization is a term describing an optimization technique where you cache previously computed results, and return the cached result when the same computation is needed... | What is the difference between memoization and dynamic programming? What is the difference between memoization and dynamic programming? I think dynamic programming is a subset of memoization. Is it right? | TITLE:
What is the difference between memoization and dynamic programming?
QUESTION:
What is the difference between memoization and dynamic programming? I think dynamic programming is a subset of memoization. Is it right?
ANSWER:
Relevant article on Programming.Guide: Dynamic programming vs memoization vs tabulation ... | [
"dynamic-programming",
"terminology",
"difference",
"memoization"
] | 361 | 518 | 141,968 | 12 | 0 | 2011-05-31T08:28:31.933000 | 2011-05-31T08:42:11.210000 |
6,184,870 | 6,184,899 | Change all CSS property at run time | I have page which has several Button & images inside the. I have such requirement: On clicking over any image or button a div/page appears which contains all the css property and gives option to change the CSS property of concern element. eg. color, value, font size etc.... Is there any plugin available for that or do ... | you can refer these plugins and modify the source code according to requirement.... changecss http://www.bramstein.com/projects/jsizes/ | Change all CSS property at run time I have page which has several Button & images inside the. I have such requirement: On clicking over any image or button a div/page appears which contains all the css property and gives option to change the CSS property of concern element. eg. color, value, font size etc.... Is there ... | TITLE:
Change all CSS property at run time
QUESTION:
I have page which has several Button & images inside the. I have such requirement: On clicking over any image or button a div/page appears which contains all the css property and gives option to change the CSS property of concern element. eg. color, value, font size... | [
"javascript",
"jquery"
] | 1 | 0 | 513 | 5 | 0 | 2011-05-31T08:28:31.897000 | 2011-05-31T08:31:15.537000 |
6,184,887 | 6,194,417 | Simple HTML5/CSS3 background image transition on mouse hover | I'm trying to understand the simplest background transition possible using only HTML5 and CSS3. Searching through stackoverflow I've learned it can be easily implemented using external libraries such as jQuery but for this project I've decided not relying on any of those. Markup Foobar Styles body { background: url('ba... | As I mentioned in my comment, you can't transition the background-image property but you can get the sort of effect you're looking for if you're willing to add extra markup and then transition the opacity. So you'll have some markup like this: Foobar Then set the transition on the images, absolute position them (so the... | Simple HTML5/CSS3 background image transition on mouse hover I'm trying to understand the simplest background transition possible using only HTML5 and CSS3. Searching through stackoverflow I've learned it can be easily implemented using external libraries such as jQuery but for this project I've decided not relying on ... | TITLE:
Simple HTML5/CSS3 background image transition on mouse hover
QUESTION:
I'm trying to understand the simplest background transition possible using only HTML5 and CSS3. Searching through stackoverflow I've learned it can be easily implemented using external libraries such as jQuery but for this project I've decid... | [
"html",
"css",
"stylesheet",
"markup",
"transition"
] | 4 | 7 | 33,827 | 2 | 0 | 2011-05-31T08:30:17.940000 | 2011-05-31T22:47:12.903000 |
6,184,906 | 6,185,068 | How to model in UML this specific scenario | I have to model some specs, and I can't understand what kind of uml diagram I should be using. This is the scenario: There are 3 nested categories called area, grouping and topic. Under the topic, there are possible "activation codes" which will define a serie of document. Let me clarify with an example: Area A1, Group... | I would say that this behavior is too fine-grained to be in an UML spec. Do a basic class diagram with Topic "has many" Documents, then write the rules as plain English in an accompanying notice. My answer might not be what you expect as I know some people like to specify the smallest details of their apps in complex U... | How to model in UML this specific scenario I have to model some specs, and I can't understand what kind of uml diagram I should be using. This is the scenario: There are 3 nested categories called area, grouping and topic. Under the topic, there are possible "activation codes" which will define a serie of document. Let... | TITLE:
How to model in UML this specific scenario
QUESTION:
I have to model some specs, and I can't understand what kind of uml diagram I should be using. This is the scenario: There are 3 nested categories called area, grouping and topic. Under the topic, there are possible "activation codes" which will define a seri... | [
"uml"
] | 0 | 1 | 289 | 2 | 0 | 2011-05-31T08:32:06.080000 | 2011-05-31T08:48:07.960000 |
6,184,907 | 6,188,060 | How to represent dynamically derived data? (model without a table?) | I have tables for salespeople, products, and sales_activities (consider these to be 'transactions', but Rails reserves that name, so I'm calling them sales_activities). For each salesperson, I need to dynamically derive their sales_total for a given day. To do this, I run through the list of sales_activities, and creat... | Maybe a plain Ruby class would do the trick? class SalesStats def initialize(sales_person, date_range = Date.today) @sales_person = sales_person @date_range = date_range end
def results # return a array or hash (anything which responds to an 'each' method), e.g: SalesActivity.find(:all,:conditions => {:sales_person =>... | How to represent dynamically derived data? (model without a table?) I have tables for salespeople, products, and sales_activities (consider these to be 'transactions', but Rails reserves that name, so I'm calling them sales_activities). For each salesperson, I need to dynamically derive their sales_total for a given da... | TITLE:
How to represent dynamically derived data? (model without a table?)
QUESTION:
I have tables for salespeople, products, and sales_activities (consider these to be 'transactions', but Rails reserves that name, so I'm calling them sales_activities). For each salesperson, I need to dynamically derive their sales_to... | [
"ruby-on-rails"
] | 0 | 0 | 532 | 1 | 0 | 2011-05-31T08:32:10.887000 | 2011-05-31T13:08:48.167000 |
6,184,911 | 6,185,046 | android gps app for traffic application | I've currently finished learning the basics of android development and am trying to learn to make an android gps app in smartphones for my traffic system project. Not so very good yet in doing complicated codes. Please advise some resources or tutorials which will greatly help me to make this app. - the app will send g... | Why are you using the sms service to send the location? try using the webservice. To implement this app you has to use the LocationManager and LocationListener libraries. You can start by creating a gps listening class implementing the LocationListener, like the one shown below public class CTLocationListener implement... | android gps app for traffic application I've currently finished learning the basics of android development and am trying to learn to make an android gps app in smartphones for my traffic system project. Not so very good yet in doing complicated codes. Please advise some resources or tutorials which will greatly help me... | TITLE:
android gps app for traffic application
QUESTION:
I've currently finished learning the basics of android development and am trying to learn to make an android gps app in smartphones for my traffic system project. Not so very good yet in doing complicated codes. Please advise some resources or tutorials which wi... | [
"android",
"gps",
"traffic"
] | 0 | 1 | 1,652 | 2 | 0 | 2011-05-31T08:32:22.557000 | 2011-05-31T08:46:06.453000 |
6,184,924 | 6,186,508 | Heroku, cron.rake and friendly_id gem | I'm using the friendly_id gem. There's a rake task for deleting old slugs ( from the docs ): rake friendly_id:remove_old_slugs MODEL= DAYS= It can be run via cron. Do you know how it should be added to cron.rake (I'm on Heroku)? Here is my cron.rake: desc "This task is called by the Heroku cron add-on" task:cron =>:env... | Try this: desc "This task is called by the Heroku cron add-on" task:cron =>:environment do Rake::Task['friendly_id:remove_old_slugs'].execute end | Heroku, cron.rake and friendly_id gem I'm using the friendly_id gem. There's a rake task for deleting old slugs ( from the docs ): rake friendly_id:remove_old_slugs MODEL= DAYS= It can be run via cron. Do you know how it should be added to cron.rake (I'm on Heroku)? Here is my cron.rake: desc "This task is called by th... | TITLE:
Heroku, cron.rake and friendly_id gem
QUESTION:
I'm using the friendly_id gem. There's a rake task for deleting old slugs ( from the docs ): rake friendly_id:remove_old_slugs MODEL= DAYS= It can be run via cron. Do you know how it should be added to cron.rake (I'm on Heroku)? Here is my cron.rake: desc "This ta... | [
"ruby-on-rails",
"friendly-id"
] | 1 | 2 | 406 | 1 | 0 | 2011-05-31T08:33:44.707000 | 2011-05-31T10:56:55.180000 |
6,184,927 | 6,185,203 | How open pdf in Air for Android/Black berry | I want to open pdf in Air for Android/Black berry. How i do that? I use AIR 2.6 and IDE is Flash Builder 4.5. | StageWebView. http://help.adobe.com/en_US/as3/dev/WS901d38e593cd1bac3ef1d28412ac57b094b-8000.html Example copied from the link above: package { import flash.display.MovieClip; import flash.media.StageWebView; import flash.geom.Rectangle;
public class StageWebViewExample extends MovieClip{
var webView:StageWebView = n... | How open pdf in Air for Android/Black berry I want to open pdf in Air for Android/Black berry. How i do that? I use AIR 2.6 and IDE is Flash Builder 4.5. | TITLE:
How open pdf in Air for Android/Black berry
QUESTION:
I want to open pdf in Air for Android/Black berry. How i do that? I use AIR 2.6 and IDE is Flash Builder 4.5.
ANSWER:
StageWebView. http://help.adobe.com/en_US/as3/dev/WS901d38e593cd1bac3ef1d28412ac57b094b-8000.html Example copied from the link above: packa... | [
"actionscript-3",
"adobe",
"air",
"flexbuilder"
] | 2 | 2 | 4,941 | 3 | 0 | 2011-05-31T08:33:52.197000 | 2011-05-31T08:58:36.523000 |
6,184,929 | 6,185,061 | Casting from type object to a class | I'm currently trying to populate an array of of objects of the type Stipulations which is a class which is an public abstract interface My method of populating this array is as follows where popStipAttr is a simple switch statement. public static Stipulations[] popStipArr(ZASAllocation zasAlloc)
{ //ArrayList s = new ... | What you are doing in Stipulations[] StipArr = (Stipulations[]) stipAL.toArray(); is calling the method on the java.util.List class Object[] toArray(); which is returning you an Object[] which cant be cast to your Stipulations[] What you want to be calling is the method on java.util.List T[] toArray(T[] a); which will ... | Casting from type object to a class I'm currently trying to populate an array of of objects of the type Stipulations which is a class which is an public abstract interface My method of populating this array is as follows where popStipAttr is a simple switch statement. public static Stipulations[] popStipArr(ZASAllocati... | TITLE:
Casting from type object to a class
QUESTION:
I'm currently trying to populate an array of of objects of the type Stipulations which is a class which is an public abstract interface My method of populating this array is as follows where popStipAttr is a simple switch statement. public static Stipulations[] popS... | [
"java",
"arrays",
"casting",
"arraylist"
] | 1 | 0 | 135 | 2 | 0 | 2011-05-31T08:34:24.833000 | 2011-05-31T08:47:41.203000 |
6,184,930 | 6,191,713 | Use UIAutomation and other Instruments like Allocation | How can we use more than one instruments at the same time? I'm currently using UIAutomation with a very long test, and I would like to use also the allocation instruments. I can't find any reference on how to combine a new instruments with a current one already running. The Build new instrument menu option is not what ... | Open the instrument library, which contains the available instruments. Choose Window > Library or click the Library button in the toolbar to open the instrument library. To add an instrument to a trace, drag the instrument from the library to the instrument list on the left side of the trace document window. | Use UIAutomation and other Instruments like Allocation How can we use more than one instruments at the same time? I'm currently using UIAutomation with a very long test, and I would like to use also the allocation instruments. I can't find any reference on how to combine a new instruments with a current one already run... | TITLE:
Use UIAutomation and other Instruments like Allocation
QUESTION:
How can we use more than one instruments at the same time? I'm currently using UIAutomation with a very long test, and I would like to use also the allocation instruments. I can't find any reference on how to combine a new instruments with a curre... | [
"iphone",
"xcode",
"ios",
"memory-management",
"instruments"
] | 0 | 1 | 426 | 1 | 0 | 2011-05-31T08:34:26.180000 | 2011-05-31T18:15:11.320000 |
6,184,937 | 6,185,123 | Route doesn't get displayed Google Maps API V3 | For the simplicity sake I have put the code for displaying the map and the route in the function " initialize ". The Map IS getting displayed, but the route is not. Please point out the error. Google Maps JavaScript API Example | You have two problems. First there is no method defined called GUnload. Second, the directions you are trying to get returns ZERO_RESULTS. You can always try to alert status to see whether it returns any directions. If it doesn't nothing will be shown. You should try with some other locations instead and it should be f... | Route doesn't get displayed Google Maps API V3 For the simplicity sake I have put the code for displaying the map and the route in the function " initialize ". The Map IS getting displayed, but the route is not. Please point out the error. Google Maps JavaScript API Example | TITLE:
Route doesn't get displayed Google Maps API V3
QUESTION:
For the simplicity sake I have put the code for displaying the map and the route in the function " initialize ". The Map IS getting displayed, but the route is not. Please point out the error. Google Maps JavaScript API Example
ANSWER:
You have two probl... | [
"google-maps",
"google-maps-api-3",
"driving-directions"
] | 0 | 1 | 1,819 | 1 | 0 | 2011-05-31T08:35:22.227000 | 2011-05-31T08:54:09.213000 |
6,184,940 | 6,184,986 | Haskell error parse error on input `=' | I'm new to Haskell and after starting ghci I tried: f x = 2 * x and I obtained::1:4: parse error on input `=' which I don't understand. Strangely, it worked well before. I suppose that I have done misconfigured Haskell. Reinstalling ghc6 doesn't solve the problem. For information, I use Ubuntu 10.4 and the version of g... | In GHCi 7.x or below, you need a let to define things in it. Prelude> let f x = x * 2 Prelude> f 4 8 Starting from GHC 8.0.1, top-level bindings are supported in GHCi, so OP's code will work without change. GHCi, version 8.0.1.20161213: http://www.haskell.org/ghc/:? for help Prelude> f x = x * 2 Prelude> f 4 8 | Haskell error parse error on input `=' I'm new to Haskell and after starting ghci I tried: f x = 2 * x and I obtained::1:4: parse error on input `=' which I don't understand. Strangely, it worked well before. I suppose that I have done misconfigured Haskell. Reinstalling ghc6 doesn't solve the problem. For information,... | TITLE:
Haskell error parse error on input `='
QUESTION:
I'm new to Haskell and after starting ghci I tried: f x = 2 * x and I obtained::1:4: parse error on input `=' which I don't understand. Strangely, it worked well before. I suppose that I have done misconfigured Haskell. Reinstalling ghc6 doesn't solve the problem... | [
"haskell"
] | 116 | 161 | 66,248 | 4 | 0 | 2011-05-31T08:35:29.603000 | 2011-05-31T08:39:52.857000 |
6,184,943 | 6,185,096 | XCode importing C++ project problems: "referenced from" | I have some problems importing an existing C++ project into my XCode. I already resolved some issues on includes (the use of string.h from another library was a pain), and now I stumbled upon another problem. When I build the project, I have 35 errors, all of the same origin. For example: "_EVP_DigestInit_ex", referenc... | These are linker errors; you can tell that from the fact that.o files are being processed. That means compilation must have succeeded to produce these. Did you specify all the right libraries? By the looks of it, you need to link with at least OpenSSL ( -lssl -lcrypto -lz ) and wxWidgets. | XCode importing C++ project problems: "referenced from" I have some problems importing an existing C++ project into my XCode. I already resolved some issues on includes (the use of string.h from another library was a pain), and now I stumbled upon another problem. When I build the project, I have 35 errors, all of the ... | TITLE:
XCode importing C++ project problems: "referenced from"
QUESTION:
I have some problems importing an existing C++ project into my XCode. I already resolved some issues on includes (the use of string.h from another library was a pain), and now I stumbled upon another problem. When I build the project, I have 35 e... | [
"c++",
"xcode",
"import"
] | 0 | 1 | 328 | 1 | 0 | 2011-05-31T08:35:50.890000 | 2011-05-31T08:51:33.293000 |
6,184,948 | 6,193,432 | TypeInitializationException and NullReferenceException in Gallio when calling a shared member of a class | I'm trying to use Gallio and MbUnit (version 3.2.750). As per the tutorial ( http://gallio.org/wiki/doku.php?id=getting_started:my_first_tests ), I created a new class project, referenced the other project I wanted to test (another class library), wrote a few tests, then ran them. Every single one of my tests are reall... | Your static/shared method IsBool is part of the class CMS.Utility which has most probably a static constructor (around line 12 in Utility.vb ). Static constructors are called once before the type can be used for the first time (that is before IsBool is even executed). It seems that there is bug in it which causes a nul... | TypeInitializationException and NullReferenceException in Gallio when calling a shared member of a class I'm trying to use Gallio and MbUnit (version 3.2.750). As per the tutorial ( http://gallio.org/wiki/doku.php?id=getting_started:my_first_tests ), I created a new class project, referenced the other project I wanted ... | TITLE:
TypeInitializationException and NullReferenceException in Gallio when calling a shared member of a class
QUESTION:
I'm trying to use Gallio and MbUnit (version 3.2.750). As per the tutorial ( http://gallio.org/wiki/doku.php?id=getting_started:my_first_tests ), I created a new class project, referenced the other... | [
".net",
"vb.net",
"nullreferenceexception",
"typeinitializeexception"
] | 1 | 1 | 753 | 1 | 0 | 2011-05-31T08:36:36.330000 | 2011-05-31T20:53:17.170000 |
6,184,951 | 6,186,054 | Tool Tip is blocked by the POPUP WIndow | My tool tip is blocked by the POPUP Window. Please see the image here http://www.tiikoni.com/tis/view/?id=6ffd82f As you can see that My Tool tip is blocked by the pop up window. My CSS for the tooltip is elStyle = 'position:absolute;;background-color:#fefbd6;height: 75px; position: absolute;top: 50px;width: 150px;font... | To complete thirtydot's answer with the left-hand side positioning of the tooltip. Normal tooltip: lStyle = 'position:absolute;;background-color:#fefbd6;height: 75px; position: absolute;top: 50px;width: 150px;font-weight:bold;height: 80px;border-color: #FFFF99;'; Tooltip located to the left of the cursor: lStyleLeft = ... | Tool Tip is blocked by the POPUP WIndow My tool tip is blocked by the POPUP Window. Please see the image here http://www.tiikoni.com/tis/view/?id=6ffd82f As you can see that My Tool tip is blocked by the pop up window. My CSS for the tooltip is elStyle = 'position:absolute;;background-color:#fefbd6;height: 75px; positi... | TITLE:
Tool Tip is blocked by the POPUP WIndow
QUESTION:
My tool tip is blocked by the POPUP Window. Please see the image here http://www.tiikoni.com/tis/view/?id=6ffd82f As you can see that My Tool tip is blocked by the pop up window. My CSS for the tooltip is elStyle = 'position:absolute;;background-color:#fefbd6;he... | [
"javascript",
"css"
] | 0 | 0 | 162 | 2 | 0 | 2011-05-31T08:37:13.177000 | 2011-05-31T10:13:42.397000 |
6,184,953 | 6,185,022 | Socket's system call Bind In c | I have been asked in an interview why there is a need of calculating the size of the address to which it is bound in bind system call. bind(sockfd, (struct sockaddr *) &serv_addr,sizeof(serv_addr)) Means i would like to know what is purpose of having third argument in bind system call?? | Because the sockaddr structure serves more or less as a "base" structure for "derived" structures like sockaddr_in. It's almost an inheritance mechanism. sockaddr contains variable-length data that can be used by "derived" structures like sockaddr_*, hence you need to precise the effective size of the "derived" structu... | Socket's system call Bind In c I have been asked in an interview why there is a need of calculating the size of the address to which it is bound in bind system call. bind(sockfd, (struct sockaddr *) &serv_addr,sizeof(serv_addr)) Means i would like to know what is purpose of having third argument in bind system call?? | TITLE:
Socket's system call Bind In c
QUESTION:
I have been asked in an interview why there is a need of calculating the size of the address to which it is bound in bind system call. bind(sockfd, (struct sockaddr *) &serv_addr,sizeof(serv_addr)) Means i would like to know what is purpose of having third argument in bi... | [
"c",
"sockets"
] | 2 | 2 | 382 | 3 | 0 | 2011-05-31T08:37:22.263000 | 2011-05-31T08:44:08.200000 |
6,184,954 | 6,185,041 | Internal data post [Kohana 3.1] | In Kohana 3.1.x framework. What are the benefits to send data with internal requests like this $post = Request::factory('module/data') ->method(Request::POST) ->post(array('some' => 'random data')) ->execute() ->response; if you could simply send data like this Module::instance()->data(array('some' => 'random data')); ... | Because they're internal requests, there is no additional HTTP request being made. You might want to take a look at Request_Client_Internal and compare it to Request_Client_External. After that you should feel enlightened:) Edit: You should know that AJAX requests aren't the only "external HTTP requests". cURL, PECL HT... | Internal data post [Kohana 3.1] In Kohana 3.1.x framework. What are the benefits to send data with internal requests like this $post = Request::factory('module/data') ->method(Request::POST) ->post(array('some' => 'random data')) ->execute() ->response; if you could simply send data like this Module::instance()->data(a... | TITLE:
Internal data post [Kohana 3.1]
QUESTION:
In Kohana 3.1.x framework. What are the benefits to send data with internal requests like this $post = Request::factory('module/data') ->method(Request::POST) ->post(array('some' => 'random data')) ->execute() ->response; if you could simply send data like this Module::... | [
"post",
"request",
"kohana",
"internal"
] | 3 | 1 | 1,542 | 3 | 0 | 2011-05-31T08:37:25.677000 | 2011-05-31T08:45:23.613000 |
6,184,960 | 6,185,321 | check to see if file exists via FTP | I am transferring a file via FTP and want to be able to check if that file already exists... i guess it is using doesFileExist but can't seem to find example for doing this over FTP i have google'd etc but can't seem to find the right answer. can anyone help? | Two possible answers: 1) The traditional way to check for a file on an FTP server is the SIZE command - if you get a size, the file exists, otherwise you get an error and you know it doesn't exist. 2) Found some code that demonstrates a possible way to do this: Get file size on FTP download Hope this helps. | check to see if file exists via FTP I am transferring a file via FTP and want to be able to check if that file already exists... i guess it is using doesFileExist but can't seem to find example for doing this over FTP i have google'd etc but can't seem to find the right answer. can anyone help? | TITLE:
check to see if file exists via FTP
QUESTION:
I am transferring a file via FTP and want to be able to check if that file already exists... i guess it is using doesFileExist but can't seem to find example for doing this over FTP i have google'd etc but can't seem to find the right answer. can anyone help?
ANSWE... | [
"iphone",
"objective-c",
"xcode",
"ftp"
] | 1 | 1 | 994 | 1 | 0 | 2011-05-31T08:37:52.370000 | 2011-05-31T09:08:31.210000 |
6,184,962 | 6,185,034 | appending textfile using streamwriter | I have this code, where i would run the following code in sequence. I will always create a new text file at the beginning. then for the 2nd and 3rd portion of the code i just need to append the text file "checksnapshot" how do i do that using streamwriter? //1 using (StreamReader sr = new StreamReader("C:\\Work\\labtoo... | What about doing this, new StreamWriter("C:\\Work\\checksnapshot.properties",true) true means append if the file Exists. | appending textfile using streamwriter I have this code, where i would run the following code in sequence. I will always create a new text file at the beginning. then for the 2nd and 3rd portion of the code i just need to append the text file "checksnapshot" how do i do that using streamwriter? //1 using (StreamReader s... | TITLE:
appending textfile using streamwriter
QUESTION:
I have this code, where i would run the following code in sequence. I will always create a new text file at the beginning. then for the 2nd and 3rd portion of the code i just need to append the text file "checksnapshot" how do i do that using streamwriter? //1 usi... | [
"c#",
"file-io"
] | 1 | 9 | 8,035 | 4 | 0 | 2011-05-31T08:37:57.717000 | 2011-05-31T08:44:56.997000 |
6,184,963 | 6,189,430 | Extracting XML data from a FileMaker Web Viewer using a Custom Function | I have a script in Filemaker that calls a Brian Dunning hosted custom function called extractData this function looks for a given instance of a given attribute within a given XML contents. this however is not working for me (this may be due to FileMaker's reliance upon the default browser which in most cases will be IE... | The web viewer might not be getting the complete XML document. You need to pause and wait for the web viewer to finish loading. Or, use a plugin to get the URL contents. Set a break point and use the debugger to dump the XML contents you're getting before parsing. | Extracting XML data from a FileMaker Web Viewer using a Custom Function I have a script in Filemaker that calls a Brian Dunning hosted custom function called extractData this function looks for a given instance of a given attribute within a given XML contents. this however is not working for me (this may be due to File... | TITLE:
Extracting XML data from a FileMaker Web Viewer using a Custom Function
QUESTION:
I have a script in Filemaker that calls a Brian Dunning hosted custom function called extractData this function looks for a given instance of a given attribute within a given XML contents. this however is not working for me (this ... | [
"xml",
"filemaker",
"mailchimp"
] | 0 | 2 | 1,938 | 2 | 0 | 2011-05-31T08:38:00.713000 | 2011-05-31T14:51:05.770000 |
6,184,965 | 6,185,845 | Implementing a Powerpoint like application in the browser - Javascript, Silverlight, or something else? | I need to implement a moderately simple Powerpoint-like tool for the web. The user should be able to draw text boxes on a grid, drag & drop or resize them and save the result. Several options for formatting the text should be available (font, size, allignment, etc.). Also, the application should have an undo function (... | The technology depends on the finer requirements I guess, Google managed to make an OK presentation tool in Google Docs with HTML / JavaScript, but if you need custom fonts or don't want to bother with browser incompatibility you could go for Silverlight. I'm pretty sure the latter will be much easier to develop, but f... | Implementing a Powerpoint like application in the browser - Javascript, Silverlight, or something else? I need to implement a moderately simple Powerpoint-like tool for the web. The user should be able to draw text boxes on a grid, drag & drop or resize them and save the result. Several options for formatting the text ... | TITLE:
Implementing a Powerpoint like application in the browser - Javascript, Silverlight, or something else?
QUESTION:
I need to implement a moderately simple Powerpoint-like tool for the web. The user should be able to draw text boxes on a grid, drag & drop or resize them and save the result. Several options for fo... | [
"javascript",
".net",
"silverlight",
"web-applications"
] | 3 | 1 | 284 | 2 | 0 | 2011-05-31T08:38:17.923000 | 2011-05-31T09:54:35.237000 |
6,184,968 | 6,194,136 | Extjs mvc problems | i'm trying to recreate the MVC model of their simple example but i'm having the following problem. This is my grid declaration Ext.define('MCMS.view.items.List',{ extend: 'Ext.grid.Panel', alias: 'widget.itemsList', title: lang.items, store: 'Items', loadMask: true, columns: [ {header: "#ID", width: 60, dataIndex: 'id'... | Rename 'Ext.PagingToolbar' to 'Ext.toolbar.Paging' If that doesn't work, try xtype based config like this - bbar: { xtype:'pagingtoolbar' store: 'Items', pageSize: 5, displayInfo: true, displayMsg: 'Displaying topics {0} - {1} of {2}', emptyMsg: "No topics to display", } | Extjs mvc problems i'm trying to recreate the MVC model of their simple example but i'm having the following problem. This is my grid declaration Ext.define('MCMS.view.items.List',{ extend: 'Ext.grid.Panel', alias: 'widget.itemsList', title: lang.items, store: 'Items', loadMask: true, columns: [ {header: "#ID", width: ... | TITLE:
Extjs mvc problems
QUESTION:
i'm trying to recreate the MVC model of their simple example but i'm having the following problem. This is my grid declaration Ext.define('MCMS.view.items.List',{ extend: 'Ext.grid.Panel', alias: 'widget.itemsList', title: lang.items, store: 'Items', loadMask: true, columns: [ {head... | [
"javascript",
"extjs4",
"extjs"
] | 2 | 2 | 2,450 | 1 | 0 | 2011-05-31T08:38:29.340000 | 2011-05-31T22:07:23.113000 |
6,184,971 | 6,184,998 | Can the re-usability concept be applied to css? | I was just checking out this page, and came across the fact that CSS can be OO(Object oriented). So, is it possible to apply the re-usability concept of OOPs to css? If yes then how? | It's not exactly OOP but using Sass, in particular its mixins and variables, will help to reuse your CSS. http://sass-lang.com/ | Can the re-usability concept be applied to css? I was just checking out this page, and came across the fact that CSS can be OO(Object oriented). So, is it possible to apply the re-usability concept of OOPs to css? If yes then how? | TITLE:
Can the re-usability concept be applied to css?
QUESTION:
I was just checking out this page, and came across the fact that CSS can be OO(Object oriented). So, is it possible to apply the re-usability concept of OOPs to css? If yes then how?
ANSWER:
It's not exactly OOP but using Sass, in particular its mixins ... | [
"css",
"oop"
] | 4 | 3 | 287 | 4 | 0 | 2011-05-31T08:38:39.793000 | 2011-05-31T08:41:12.020000 |
6,184,976 | 6,195,093 | WebSphere Portal 6.1 default theme deleted | I deleted the chosen default theme in WebSphere Portal 6.1 using the administration pages. Now the portal is themeless. More importantly, the theme selection page in the administration section can no longer be displayed. How can I set the default theme "externally" (i.e. manually, without the administration pages)? | You will need to correct this with xmlaccess. I suggest you export from a working portal the theme configuration back into your broken portal. | WebSphere Portal 6.1 default theme deleted I deleted the chosen default theme in WebSphere Portal 6.1 using the administration pages. Now the portal is themeless. More importantly, the theme selection page in the administration section can no longer be displayed. How can I set the default theme "externally" (i.e. manua... | TITLE:
WebSphere Portal 6.1 default theme deleted
QUESTION:
I deleted the chosen default theme in WebSphere Portal 6.1 using the administration pages. Now the portal is themeless. More importantly, the theme selection page in the administration section can no longer be displayed. How can I set the default theme "exter... | [
"themes",
"websphere-portal"
] | 1 | 2 | 2,255 | 2 | 0 | 2011-05-31T08:39:00.383000 | 2011-06-01T00:41:48.837000 |
6,184,980 | 6,185,185 | Accessing a global array inside class constructor | My aim is to retrieve some data from a global array which is defined in another PHP file. My code is running inside database.php file and the array I want to use is inside config.php file. I understand that accessing a global array inside class is not a good idea, but I want to do it so because of some reasons. My code... | Your code looks right, so I think you should just debug it. Try to output $CONFIG before creating instance of Database class, $CONFIG may be redefined/changed somewhere in your code. And don't just check one value in array - output whole array with var_dump/print_r. | Accessing a global array inside class constructor My aim is to retrieve some data from a global array which is defined in another PHP file. My code is running inside database.php file and the array I want to use is inside config.php file. I understand that accessing a global array inside class is not a good idea, but I... | TITLE:
Accessing a global array inside class constructor
QUESTION:
My aim is to retrieve some data from a global array which is defined in another PHP file. My code is running inside database.php file and the array I want to use is inside config.php file. I understand that accessing a global array inside class is not ... | [
"php",
"arrays",
"class",
"global"
] | 1 | 2 | 2,822 | 3 | 0 | 2011-05-31T08:39:24.090000 | 2011-05-31T08:57:46.350000 |
6,184,994 | 6,249,925 | Allowing Users logged in with multiple accounts at once to the same Django site | I'm creating a widget that gets installed on various different sites and I need distinct users for each site. Problem is, the same person browsing might have 2 different sites open at once that use my widget. This means that I need users to be logged in with multiple accounts simultaneously to the same Django site. Fro... | I ended up storing the per-site data in the user's session, i.e. session['site_id_1'] = user_obj_1, session['site_id_2'] = user_obj_2, etc... Instead of logging in, I just store the user data in the appropriate key. Instead of logging out, I delete the key for the site. | Allowing Users logged in with multiple accounts at once to the same Django site I'm creating a widget that gets installed on various different sites and I need distinct users for each site. Problem is, the same person browsing might have 2 different sites open at once that use my widget. This means that I need users to... | TITLE:
Allowing Users logged in with multiple accounts at once to the same Django site
QUESTION:
I'm creating a widget that gets installed on various different sites and I need distinct users for each site. Problem is, the same person browsing might have 2 different sites open at once that use my widget. This means th... | [
"python",
"django",
"session",
"django-sessions",
"django-users"
] | 1 | 1 | 375 | 2 | 0 | 2011-05-31T08:41:00.053000 | 2011-06-06T09:21:51.357000 |
6,185,006 | 6,214,442 | English characters don't show up when entering text with Indic input method in Swing | I'm working on an application that accepts text in English and performs transliteration with a custom 3rd party API into an Indic language (one of several that are supported). The application is targeted at Windows XP/7 and Ubuntu. We use a custom input method that loads the required Indic font, and uses it render text... | I found a solution to the problem. I installed the fonts on Windows (open the font, click install) and browsed the contents using Character Map. These fonts only have glyphs for the language in question, not English. I used FontForge to merge the 2 fonts. (Fontforge's author doesn't provide binaries anymore - but if yo... | English characters don't show up when entering text with Indic input method in Swing I'm working on an application that accepts text in English and performs transliteration with a custom 3rd party API into an Indic language (one of several that are supported). The application is targeted at Windows XP/7 and Ubuntu. We ... | TITLE:
English characters don't show up when entering text with Indic input method in Swing
QUESTION:
I'm working on an application that accepts text in English and performs transliteration with a custom 3rd party API into an Indic language (one of several that are supported). The application is targeted at Windows XP... | [
"java",
"swing",
"internationalization",
"fonts",
"keyboard"
] | 2 | 0 | 387 | 1 | 0 | 2011-05-31T08:42:12.977000 | 2011-06-02T12:23:05.453000 |
6,185,007 | 6,185,083 | Sending bulk emails from ASP.NET | In the blog I'm working on currently whenever an user posts a comment for an article I like to send emails to all the other users commented for that post. What is the best way in sending mails in this case either synchronously or asynchronously? Can anyone share a code snippet for sending email to a list of users using... | You might want to use a separate webservice for sending emails. You app will send the body and email list to the webservice. You can use gzip or zip compression. This would make the webservice call very efficient(70%+ compression as the data is text). Now in the webservice you can use multi-threading or Async operation... | Sending bulk emails from ASP.NET In the blog I'm working on currently whenever an user posts a comment for an article I like to send emails to all the other users commented for that post. What is the best way in sending mails in this case either synchronously or asynchronously? Can anyone share a code snippet for sendi... | TITLE:
Sending bulk emails from ASP.NET
QUESTION:
In the blog I'm working on currently whenever an user posts a comment for an article I like to send emails to all the other users commented for that post. What is the best way in sending mails in this case either synchronously or asynchronously? Can anyone share a code... | [
"asp.net",
"email",
"smtp"
] | 0 | 1 | 3,981 | 6 | 0 | 2011-05-31T08:42:19.893000 | 2011-05-31T08:49:55.750000 |
6,185,016 | 6,185,757 | how to set postData in jqgrid AFTER it has been constructed? | I generate my jqgrid from model class which I pass into view. I get constructed and working jqgrid. However, I want to set postData on one view, where I use jqGrid, from script in that view, after I call helper for creating jqgrid, without having to change whole partial view which creates jqgrid. I tried running $("#@M... | You didn't include the definition of jqGrid in your question and we can't see the place where the setGridParam is called. First of all you should use setGridParam after the jqGrid is created, but before the request will be sent. If you will change the postData the next jqGrid request can use the new parameter. So one t... | how to set postData in jqgrid AFTER it has been constructed? I generate my jqgrid from model class which I pass into view. I get constructed and working jqgrid. However, I want to set postData on one view, where I use jqGrid, from script in that view, after I call helper for creating jqgrid, without having to change wh... | TITLE:
how to set postData in jqgrid AFTER it has been constructed?
QUESTION:
I generate my jqgrid from model class which I pass into view. I get constructed and working jqgrid. However, I want to set postData on one view, where I use jqGrid, from script in that view, after I call helper for creating jqgrid, without h... | [
"jquery",
"jqgrid",
"jqgrid-asp.net"
] | 10 | 12 | 41,263 | 3 | 0 | 2011-05-31T08:43:17.980000 | 2011-05-31T09:47:03.053000 |
6,185,020 | 6,185,043 | Initializing member variables using the same name for constructor arguments as for the member variables allowed by the C++ standard? | I figured out that it's possible to initialize the member variables with a constructor argument of the same name as show in the example below. #include #include class Blah { std::vector vec;
public: Blah(std::vector vec): vec(vec) {}
void printVec() {
for(unsigned int i=0; i myVector(3);
myVector.at(0) = 1; myVecto... | I wonder what the C++ standard says about it? Is it legal and guaranteed to always work? Yes. That is perfectly legal. Fully Standard conformant. Blah(std::vector vec): vec(vec){} ^ ^ | | | this is the argument to the constructor this is your member data Since you asked for the reference in the Standard, here it is, wi... | Initializing member variables using the same name for constructor arguments as for the member variables allowed by the C++ standard? I figured out that it's possible to initialize the member variables with a constructor argument of the same name as show in the example below. #include #include class Blah { std::vector v... | TITLE:
Initializing member variables using the same name for constructor arguments as for the member variables allowed by the C++ standard?
QUESTION:
I figured out that it's possible to initialize the member variables with a constructor argument of the same name as show in the example below. #include #include class Bl... | [
"c++"
] | 92 | 108 | 26,750 | 4 | 0 | 2011-05-31T08:43:50.197000 | 2011-05-31T08:45:33.550000 |
6,185,026 | 6,185,064 | Do i need to create automapper createmap both ways? | This might be a stupid question! (n00b to AutoMapper and time-short!) I want to use AutoMapper to map from EF4 entities to ViewModel classes. 1) If I call CreateMap () then do I also need to call CreateMap () to perform the reverse? 2) If two classes have the same property names, then do I need a CreateMap statement at... | In AutoMapper you have a Source type and a Destination type. So you will be able to map between this Source type and Destination type only if you have a corresponding CreateMap. So to answer your questions: You don't need to define the reverse mapping. You have to do it only if you intend to map back. Yes, you need to ... | Do i need to create automapper createmap both ways? This might be a stupid question! (n00b to AutoMapper and time-short!) I want to use AutoMapper to map from EF4 entities to ViewModel classes. 1) If I call CreateMap () then do I also need to call CreateMap () to perform the reverse? 2) If two classes have the same pro... | TITLE:
Do i need to create automapper createmap both ways?
QUESTION:
This might be a stupid question! (n00b to AutoMapper and time-short!) I want to use AutoMapper to map from EF4 entities to ViewModel classes. 1) If I call CreateMap () then do I also need to call CreateMap () to perform the reverse? 2) If two classes... | [
"asp.net-mvc-3",
"model",
"viewmodel",
"automapper"
] | 55 | 19 | 20,089 | 4 | 0 | 2011-05-31T08:44:11.157000 | 2011-05-31T08:47:46.143000 |
6,185,027 | 6,186,542 | GWT UIBinder IntegerBox is not stylish | In our project we decided to try to design our UIs with UIBinder instead of doing everything in Java mixing GWT widgets and logic. We found out how much prettier they look panels, buttons and such from scratch, which saves a lot of time especially for presenting a demo. However, when we use number box widgets, like Int... | UIBinder is not in any way responsible for things looking "pretty", it only generates Java code, the same kind of code that you were coding by hand previously. If things look "prettier", it's likely because you -ed a theme in your gwt.xml. Contrary to TextBox though, IntegerBox and DoubleBox don't have an associated ha... | GWT UIBinder IntegerBox is not stylish In our project we decided to try to design our UIs with UIBinder instead of doing everything in Java mixing GWT widgets and logic. We found out how much prettier they look panels, buttons and such from scratch, which saves a lot of time especially for presenting a demo. However, w... | TITLE:
GWT UIBinder IntegerBox is not stylish
QUESTION:
In our project we decided to try to design our UIs with UIBinder instead of doing everything in Java mixing GWT widgets and logic. We found out how much prettier they look panels, buttons and such from scratch, which saves a lot of time especially for presenting ... | [
"gwt",
"uibinder"
] | 0 | 2 | 1,146 | 1 | 0 | 2011-05-31T08:44:24.193000 | 2011-05-31T10:59:59.927000 |
6,185,030 | 6,207,261 | AppFabric: Xml or SQL Server? | I’m setting up AppFabric and I’m wondering if using xml (instead of SQL Express) for the “Caching Service Configuration Provider” has any impact on performance or may lead to other problems eventually? To keep dependencies (and things that can go wrong) to a minimum, using a plain xml file seems like a simpler solution... | XML is fine in non-HA scenarios; make sure the share is available to all account contexts on all hosts and you're good to go. Performance is a non-issue -- configuration is only checked/utilized at certain times, like startup, or adding/removing a host. SQL Server configuration is really targeted at higher availability... | AppFabric: Xml or SQL Server? I’m setting up AppFabric and I’m wondering if using xml (instead of SQL Express) for the “Caching Service Configuration Provider” has any impact on performance or may lead to other problems eventually? To keep dependencies (and things that can go wrong) to a minimum, using a plain xml file... | TITLE:
AppFabric: Xml or SQL Server?
QUESTION:
I’m setting up AppFabric and I’m wondering if using xml (instead of SQL Express) for the “Caching Service Configuration Provider” has any impact on performance or may lead to other problems eventually? To keep dependencies (and things that can go wrong) to a minimum, usin... | [
"appfabric"
] | 3 | 5 | 970 | 1 | 0 | 2011-05-31T08:44:39.230000 | 2011-06-01T20:30:20.277000 |
6,185,047 | 6,185,106 | Is there any way to use (embed) Gmail - Yahoo on your website? | I'm not talking about something like cURLs or SMTP server I have an stupid idea that instead of building a upload system, user can email for me with attach file. So I think if gmail (or yahoo..) has an API to embed the SEND Mail page with a free account to my webpage so that all the user can use it? Sorry for my bad En... | You could either simply provide an email address and ask that people send emails to it with their attachment(s), or create a HTML form which allows users to upload a file which is processed by CGI. I use Uploadify on the front end, and a Perl CGI script to process the results. | Is there any way to use (embed) Gmail - Yahoo on your website? I'm not talking about something like cURLs or SMTP server I have an stupid idea that instead of building a upload system, user can email for me with attach file. So I think if gmail (or yahoo..) has an API to embed the SEND Mail page with a free account to ... | TITLE:
Is there any way to use (embed) Gmail - Yahoo on your website?
QUESTION:
I'm not talking about something like cURLs or SMTP server I have an stupid idea that instead of building a upload system, user can email for me with attach file. So I think if gmail (or yahoo..) has an API to embed the SEND Mail page with ... | [
"gmail",
"yahoo"
] | 0 | 0 | 1,040 | 1 | 0 | 2011-05-31T08:46:11.257000 | 2011-05-31T08:52:46.483000 |
6,185,059 | 6,185,155 | How to get the phone number? | I'm trying to put in an edittext the phone number that was selected by user. I have a button:- contact.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { Intent intent = new Intent(Intent.ACTION_PICK, Phone.CONTENT_URI); startActivityForResult(intent, 0);
} }); and the function be... | Do something like: if (resultCode == Activity.RESULT_OK) { Uri contactData = data.getData(); ContentResolver cr = getContentResolver(); Cursor curContact = managedQuery(contactData, null, null, null, null);
if ((curContact!= null) && (curContact.moveToFirst())) { String id = curContact.getString(curContact.getColumnIn... | How to get the phone number? I'm trying to put in an edittext the phone number that was selected by user. I have a button:- contact.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { Intent intent = new Intent(Intent.ACTION_PICK, Phone.CONTENT_URI); startActivityForResult(intent, 0... | TITLE:
How to get the phone number?
QUESTION:
I'm trying to put in an edittext the phone number that was selected by user. I have a button:- contact.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { Intent intent = new Intent(Intent.ACTION_PICK, Phone.CONTENT_URI); startActivityF... | [
"android",
"android-intent",
"android-contacts",
"phone-number"
] | 1 | 1 | 1,161 | 2 | 0 | 2011-05-31T08:47:14.500000 | 2011-05-31T08:56:07.143000 |
6,185,062 | 6,185,089 | Dealing with .NET IO stream management (coding and storing in SQL Server) | I would like to know the following please: 1) I need, for an application of mine, to handle IO streams. In particular, I need to take a file and split it into several binary fragments to send on the network. Can I do this with.NET API? 2) I also need to save this fragments somewhere. I am really interested in saving fr... | For binary data in SQL Server (in version 2005 or newer), use the VARBINARY datatype - see the MSDN docs on binary and varbinary for details. With the VARBINARY(MAX) datatype, you can potentially store up to 2 GB of binary data in a column in your database table. As this really good paper by Microsoft Research called T... | Dealing with .NET IO stream management (coding and storing in SQL Server) I would like to know the following please: 1) I need, for an application of mine, to handle IO streams. In particular, I need to take a file and split it into several binary fragments to send on the network. Can I do this with.NET API? 2) I also ... | TITLE:
Dealing with .NET IO stream management (coding and storing in SQL Server)
QUESTION:
I would like to know the following please: 1) I need, for an application of mine, to handle IO streams. In particular, I need to take a file and split it into several binary fragments to send on the network. Can I do this with.N... | [
".net",
"sql-server",
"io"
] | 0 | 1 | 118 | 2 | 0 | 2011-05-31T08:47:45.233000 | 2011-05-31T08:50:25.563000 |
6,185,075 | 6,187,555 | Prompt a message if user click no on XL message "Do you want to save the changes?" on leaving | I have a workbook where I want to be sure user is really sure he want to quit without saving changes. Is there a way to prompt a message if user click no on XL message "Do you want to save the changes?" on leaving? I know there is a BeforeSave event but this one is triggered BEFORE the XL prompt and in my case, I would... | the Workbook_Deactivate event fires after the save dialog is dismissed. You will need to show a modal MsgBox and handle the responce, issue Thisworkbook.Save if required Private Sub Workbook_Deactivate() Dim res As VbMsgBoxResult If Not ThisWorkbook.Saved Then res = MsgBox("Save Now?", vbYesNo, "Book Not Saved") If res... | Prompt a message if user click no on XL message "Do you want to save the changes?" on leaving I have a workbook where I want to be sure user is really sure he want to quit without saving changes. Is there a way to prompt a message if user click no on XL message "Do you want to save the changes?" on leaving? I know ther... | TITLE:
Prompt a message if user click no on XL message "Do you want to save the changes?" on leaving
QUESTION:
I have a workbook where I want to be sure user is really sure he want to quit without saving changes. Is there a way to prompt a message if user click no on XL message "Do you want to save the changes?" on le... | [
"excel",
"excel-2007"
] | 0 | 0 | 123 | 1 | 0 | 2011-05-31T08:48:34.987000 | 2011-05-31T12:27:26.420000 |
6,185,077 | 6,186,666 | GWT label with line breaks | GWT Label widgets iterprets everything as text, not as html tags - that's good, but I would like it to interpret \n as a how do i do that. I would make subclass, but I cant find what to override to achieve this behaviour (I could use HTML widget, but it would interpret all tags - and all I need is an line brak) | Use an HTML widget and set its value using a SafeHtml constructed with SafeHtmlBuilder.appendEscapedLines: HTML label = new HTML(new SafeHtmlBuilder().appendEscapedLines("foo quux").toSafeHtml()); (alternatively, you can split("\n", -1) your text, call SafeHtml.htmlEscape on each part and join them back with a, that's ... | GWT label with line breaks GWT Label widgets iterprets everything as text, not as html tags - that's good, but I would like it to interpret \n as a how do i do that. I would make subclass, but I cant find what to override to achieve this behaviour (I could use HTML widget, but it would interpret all tags - and all I ne... | TITLE:
GWT label with line breaks
QUESTION:
GWT Label widgets iterprets everything as text, not as html tags - that's good, but I would like it to interpret \n as a how do i do that. I would make subclass, but I cant find what to override to achieve this behaviour (I could use HTML widget, but it would interpret all t... | [
"gwt"
] | 22 | 28 | 29,984 | 4 | 0 | 2011-05-31T08:48:51.133000 | 2011-05-31T11:08:59.940000 |
6,185,088 | 6,185,119 | Change extension of a gif file | I need to change the extension a GIF file (changing it in ".gaf") to use it in Visual studio 2005. Unfortunately the extension does not appear on the file name so when I change the name of the file I get "picture.gaf.gif" even if I see only "picture.gaf" in its name. | I guess you need to show the file name extensions. One of the more annoying default-settings in windows! Copied from http://windows.microsoft.com/en-US/windows-vista/Show-or-hide-file-name-extensions Show or hide file name extensions A file name extension is a set of characters added to the end of a file name that dete... | Change extension of a gif file I need to change the extension a GIF file (changing it in ".gaf") to use it in Visual studio 2005. Unfortunately the extension does not appear on the file name so when I change the name of the file I get "picture.gaf.gif" even if I see only "picture.gaf" in its name. | TITLE:
Change extension of a gif file
QUESTION:
I need to change the extension a GIF file (changing it in ".gaf") to use it in Visual studio 2005. Unfortunately the extension does not appear on the file name so when I change the name of the file I get "picture.gaf.gif" even if I see only "picture.gaf" in its name.
AN... | [
"visual-studio",
"image",
"visual-studio-2005",
"gif"
] | 0 | 1 | 252 | 1 | 0 | 2011-05-31T08:50:25.263000 | 2011-05-31T08:53:40.377000 |
6,185,093 | 6,185,109 | Java Reserve Keywords | Are generic, cast, and threadsafe reserved keywords in java? I am aware of the 52 keywords in java but looking for the new reserved keyword list. | See this link here. It's the reserved keyword list for Java 6. abstract continue for new switch assert (c) default goto (a) package synchronized boolean do if private this break double implements protected throw byte else import public throws case enum (d) instanceof return transient catch extends int short try char fi... | Java Reserve Keywords Are generic, cast, and threadsafe reserved keywords in java? I am aware of the 52 keywords in java but looking for the new reserved keyword list. | TITLE:
Java Reserve Keywords
QUESTION:
Are generic, cast, and threadsafe reserved keywords in java? I am aware of the 52 keywords in java but looking for the new reserved keyword list.
ANSWER:
See this link here. It's the reserved keyword list for Java 6. abstract continue for new switch assert (c) default goto (a) p... | [
"java"
] | 0 | 7 | 5,026 | 4 | 0 | 2011-05-31T08:51:03.057000 | 2011-05-31T08:52:54.963000 |
6,185,097 | 6,185,223 | Restart Galaxy in SSH | I'm working with a SSH server, to run my Galaxy platform. Without using SSH, I can use my Galaxy website, so I think that Galaxy runs on deamon. Now I want to update my Galaxy files, and therefore I need to stop the Galaxy server and restart him. My question is, how can I stop the Galaxy server, make an update en resta... | Running galaxy section in this link, shall help you do it. Please note that /etc/init.d/galaxy might already be existing on the server. If it already exists you can stop the server by writing: /etc/init.d/galaxy stop and start it again by writing this on the console where you are logged into the server: /etc/init.d/gal... | Restart Galaxy in SSH I'm working with a SSH server, to run my Galaxy platform. Without using SSH, I can use my Galaxy website, so I think that Galaxy runs on deamon. Now I want to update my Galaxy files, and therefore I need to stop the Galaxy server and restart him. My question is, how can I stop the Galaxy server, m... | TITLE:
Restart Galaxy in SSH
QUESTION:
I'm working with a SSH server, to run my Galaxy platform. Without using SSH, I can use my Galaxy website, so I think that Galaxy runs on deamon. Now I want to update my Galaxy files, and therefore I need to stop the Galaxy server and restart him. My question is, how can I stop th... | [
"ssh",
"restart",
"galaxy"
] | 1 | 0 | 493 | 1 | 0 | 2011-05-31T08:51:48.720000 | 2011-05-31T09:00:17.687000 |
6,185,111 | 6,185,212 | css position:relative div problem | this is part of my code: css:.body.left,.right { position:relative; z-index:6; display:inline-block; }.body.left { top:0; left:0; width:100px; height:300px; margin-right:10px; border:1px solid #333; }.body.right { top:0; width:100px; height:300px; border:1px solid #333; } and html i want them to be in one line top:0;,w... | .body.left,.body.right { display:inline-block; vertical-align: top; } add the explicit vertical-alignment you want the inline-blocks to have; Working example.body.left,.body.right { display:inline-block; vertical-align: top; width:100px; height:300px; border:1px solid #333; }.body.left { margin-right:10px; }.body.right... | css position:relative div problem this is part of my code: css:.body.left,.right { position:relative; z-index:6; display:inline-block; }.body.left { top:0; left:0; width:100px; height:300px; margin-right:10px; border:1px solid #333; }.body.right { top:0; width:100px; height:300px; border:1px solid #333; } and html i wa... | TITLE:
css position:relative div problem
QUESTION:
this is part of my code: css:.body.left,.right { position:relative; z-index:6; display:inline-block; }.body.left { top:0; left:0; width:100px; height:300px; margin-right:10px; border:1px solid #333; }.body.right { top:0; width:100px; height:300px; border:1px solid #33... | [
"html",
"css"
] | 0 | 1 | 669 | 2 | 0 | 2011-05-31T08:53:02.253000 | 2011-05-31T08:59:03.630000 |
6,185,114 | 6,185,138 | Why do php function json_decode fail if string contains the word undefined as a value? | I have this string, which is generated by dojo.toJson() function: {"page":"accommodation task=viewList","language":undefined} When decoding it with json_decode in php it returns null. I already figured out that this is caused by the value undefined, but I am not sure if this is to be expected or if it is a bug. Is the ... | Because undefined is not valid JSON. JSON doesn't have the JavaScript concept of undefined. It does have null, which is vaguely similar, but the usual thing (for better or worse) is to simply omit properties whose values would be undefined. I'm surprised if Dojo's toJson produces invalid JSON like that. You might consi... | Why do php function json_decode fail if string contains the word undefined as a value? I have this string, which is generated by dojo.toJson() function: {"page":"accommodation task=viewList","language":undefined} When decoding it with json_decode in php it returns null. I already figured out that this is caused by the ... | TITLE:
Why do php function json_decode fail if string contains the word undefined as a value?
QUESTION:
I have this string, which is generated by dojo.toJson() function: {"page":"accommodation task=viewList","language":undefined} When decoding it with json_decode in php it returns null. I already figured out that this... | [
"php",
"javascript",
"json",
"dojo"
] | 2 | 8 | 634 | 2 | 0 | 2011-05-31T08:53:16.023000 | 2011-05-31T08:54:58.343000 |
6,185,115 | 6,185,196 | Mysql group by - order by not working | Can't figure this out; I have a query with GROUP BY, but the ORDER BY is not working (is ordering accordingly to the GROUP BY field). This is the query: SELECT item.*, customer.title AS customertitle FROM gallery_items AS item LEFT JOIN gallery_customers AS customer ON (customer.id = item.customerid) WHERE item.publish... | Remove the GROUP BY and it should work. GROUP BY is useful when you want to use aggregate functions such as MIN or MAX to get a single value for each group, however it seems that you aren't doing that here. | Mysql group by - order by not working Can't figure this out; I have a query with GROUP BY, but the ORDER BY is not working (is ordering accordingly to the GROUP BY field). This is the query: SELECT item.*, customer.title AS customertitle FROM gallery_items AS item LEFT JOIN gallery_customers AS customer ON (customer.id... | TITLE:
Mysql group by - order by not working
QUESTION:
Can't figure this out; I have a query with GROUP BY, but the ORDER BY is not working (is ordering accordingly to the GROUP BY field). This is the query: SELECT item.*, customer.title AS customertitle FROM gallery_items AS item LEFT JOIN gallery_customers AS custom... | [
"mysql",
"left-join"
] | 0 | 3 | 719 | 1 | 0 | 2011-05-31T08:53:16.733000 | 2011-05-31T08:58:21.980000 |
6,185,117 | 6,185,303 | cudamemcpy error:"the launch timed out and was terminated" | My code is a parallel implmentation that calculates the nth digit of pi. When I finish the kernel and try to copy the memory back to the host I get a "the launch timed out and was terminated" error. I used this code for error checking for each cudamalloc, cudamemcpy, and kernal launch. std::string error = cudaGetErrorS... | This is exactly the same problem you asked about in this question. The kernel is getting terminated early by the driver because it is taking too long to finish. If you read the documentation for any of these runtime API functions you will see the following note: Note: Note that this function may also return error codes... | cudamemcpy error:"the launch timed out and was terminated" My code is a parallel implmentation that calculates the nth digit of pi. When I finish the kernel and try to copy the memory back to the host I get a "the launch timed out and was terminated" error. I used this code for error checking for each cudamalloc, cudam... | TITLE:
cudamemcpy error:"the launch timed out and was terminated"
QUESTION:
My code is a parallel implmentation that calculates the nth digit of pi. When I finish the kernel and try to copy the memory back to the host I get a "the launch timed out and was terminated" error. I used this code for error checking for each... | [
"memory",
"timeout",
"cuda"
] | 9 | 8 | 12,212 | 2 | 0 | 2011-05-31T08:53:29.263000 | 2011-05-31T09:06:48.213000 |
6,185,120 | 6,185,146 | Problem in getting Minimum length using LINQ? | Here i am retrieving minimum size of a text file inside a directory.But it gives 0 as a minimum size.But there is no 0 kb file inside that directory. var queryList3Only= (from i in di.GetFiles("*.txt", SearchOption.AllDirectories) select i.Length / 1024).Min(); dest.WriteLine(queryList3Only.ToString()+" Kb"); Any Sugge... | you need to select doubles not int's. if filesize is < 1024 then you will end with size 0 var queryList3Only= (from i in di.GetFiles("*.txt", SearchOption.AllDirectories) select (double)i.Length / 1024).Min(); | Problem in getting Minimum length using LINQ? Here i am retrieving minimum size of a text file inside a directory.But it gives 0 as a minimum size.But there is no 0 kb file inside that directory. var queryList3Only= (from i in di.GetFiles("*.txt", SearchOption.AllDirectories) select i.Length / 1024).Min(); dest.WriteLi... | TITLE:
Problem in getting Minimum length using LINQ?
QUESTION:
Here i am retrieving minimum size of a text file inside a directory.But it gives 0 as a minimum size.But there is no 0 kb file inside that directory. var queryList3Only= (from i in di.GetFiles("*.txt", SearchOption.AllDirectories) select i.Length / 1024).M... | [
"c#",
"linq"
] | 3 | 6 | 224 | 3 | 0 | 2011-05-31T08:53:41.267000 | 2011-05-31T08:55:36.850000 |
6,185,126 | 6,185,661 | XSLT 1.0: Concatenate attributes from child nodes | I'm having some trouble with xslt and was hoping that maybe someone here can help me: My xml-file that looks like this: Now I'd like to assign keys to the appletree-nodes, consisting of the concatenated name attributes of their fruit-children. So the key for the first tree would be 'abcd', for the 2nd tree 'efph' and f... | It's a bit of a hack, but there's no reason you can't just use concat, with 'n' being the most you'll ever find. concat(fruit/@name,fruit[2]/@name,fruit[3]/@name,fruit[4]/@name,fruit[5]/@name) If there's only 4, the last one will just be ignored, and it'll use the length 4 value. NB: You don't need the [1] on the first... | XSLT 1.0: Concatenate attributes from child nodes I'm having some trouble with xslt and was hoping that maybe someone here can help me: My xml-file that looks like this: Now I'd like to assign keys to the appletree-nodes, consisting of the concatenated name attributes of their fruit-children. So the key for the first t... | TITLE:
XSLT 1.0: Concatenate attributes from child nodes
QUESTION:
I'm having some trouble with xslt and was hoping that maybe someone here can help me: My xml-file that looks like this: Now I'd like to assign keys to the appletree-nodes, consisting of the concatenated name attributes of their fruit-children. So the k... | [
"xslt",
"xpath"
] | 1 | 2 | 1,970 | 1 | 0 | 2011-05-31T08:54:16.040000 | 2011-05-31T09:37:41.617000 |
6,185,128 | 6,185,281 | select NULL value from sql server db | i'm having a problem with a select statement. It looks like: myda = new SqlDataAdapter("Select * FROM tblAgenda WHERE tAgUsrId ='" + Session["usrId"] + "' AND tAgTBD = '" + Session["username"] + "' OR tAgTBD = '" + DBNull.Value + "' ", myconn); But I have no idea how to make that DBNull.Value work. I also tried with ju... | Assuming that your session values have already been sanitised, then you can do the following: myda = new SqlDataAdapter("Select * FROM tblAgenda WHERE tAgUsrId ='" + Session["usrId"] + "' AND tAgTBD = '" + Session["username"] + "' OR tAgTBD is null", myconn); The above assumes that you want all rows where tAgTBD are nu... | select NULL value from sql server db i'm having a problem with a select statement. It looks like: myda = new SqlDataAdapter("Select * FROM tblAgenda WHERE tAgUsrId ='" + Session["usrId"] + "' AND tAgTBD = '" + Session["username"] + "' OR tAgTBD = '" + DBNull.Value + "' ", myconn); But I have no idea how to make that DB... | TITLE:
select NULL value from sql server db
QUESTION:
i'm having a problem with a select statement. It looks like: myda = new SqlDataAdapter("Select * FROM tblAgenda WHERE tAgUsrId ='" + Session["usrId"] + "' AND tAgTBD = '" + Session["username"] + "' OR tAgTBD = '" + DBNull.Value + "' ", myconn); But I have no idea h... | [
"select",
"dbnull",
"sqldataadapter"
] | 0 | 1 | 4,973 | 1 | 0 | 2011-05-31T08:54:21.770000 | 2011-05-31T09:04:45.630000 |
6,185,129 | 6,185,197 | how to include 2 files with same name? | I am working in ubuntu, I have a folder that contains a subfolder. in the first folder i have a name.h file. in subfolder i have again a name.h file. the thing is that i need both the headers. the problem is the fact that both headers have the same name. i receive errors saying that a specific function was not declared... | So, something like this: -> header.hpp -> header.hpp This is resolved by telling the compiler to search in the common folder for the headers (in the above case ) and including like this: #include "sub1/header.hpp" #include "sub2/header.hpp" | how to include 2 files with same name? I am working in ubuntu, I have a folder that contains a subfolder. in the first folder i have a name.h file. in subfolder i have again a name.h file. the thing is that i need both the headers. the problem is the fact that both headers have the same name. i receive errors saying th... | TITLE:
how to include 2 files with same name?
QUESTION:
I am working in ubuntu, I have a folder that contains a subfolder. in the first folder i have a name.h file. in subfolder i have again a name.h file. the thing is that i need both the headers. the problem is the fact that both headers have the same name. i receiv... | [
"c++"
] | 3 | 4 | 3,941 | 2 | 0 | 2011-05-31T08:54:23.813000 | 2011-05-31T08:58:22.477000 |
6,185,130 | 6,185,237 | How to show random image in Swing | I want a Swing application which will randomly pick some images from a folder and will show them. I've tried some thing like this but the images are not rendering. import java.awt.*; import javax.swing.*; import java.util.*;
public class RandomCards extends JFrame { RandomCards() { setLayout(new FlowLayout(FlowLayout.... | Got list of images for the folder. Use File class list() method to get all file names ((or listFiles() if you need files). Use Random to get next integer. Use Toolkit.getDefaultToolkit().createImage(imgFileName) to create image. Create a JFrame (or JWindow), create a JLabel with the image and add to the JFrame. | How to show random image in Swing I want a Swing application which will randomly pick some images from a folder and will show them. I've tried some thing like this but the images are not rendering. import java.awt.*; import javax.swing.*; import java.util.*;
public class RandomCards extends JFrame { RandomCards() { se... | TITLE:
How to show random image in Swing
QUESTION:
I want a Swing application which will randomly pick some images from a folder and will show them. I've tried some thing like this but the images are not rendering. import java.awt.*; import javax.swing.*; import java.util.*;
public class RandomCards extends JFrame { ... | [
"java",
"swing",
"collections"
] | 3 | 3 | 3,304 | 2 | 0 | 2011-05-31T08:54:25.017000 | 2011-05-31T09:01:19.953000 |
6,185,135 | 6,185,481 | Session survives browser close? Should I want to prevent this? | I have a PHP app which requires log in, offers a log out option and force logs off users who have been inactive for X minutes. But, if I log in, close my browser and re-open it, the $_SESSION variables still exists. What's the general practise here? Should I want to prevent this and, if so, how? Something in me just wa... | PHP sessions work by saving a cookie to the user's browser containing the ID of the session on the server. Therefore PHP sessions work exactly like ordinary cookies do. If you close your browser, cookies are persistent. The server doesn't know what instance of the browser the user is using, whether the browser has rest... | Session survives browser close? Should I want to prevent this? I have a PHP app which requires log in, offers a log out option and force logs off users who have been inactive for X minutes. But, if I log in, close my browser and re-open it, the $_SESSION variables still exists. What's the general practise here? Should ... | TITLE:
Session survives browser close? Should I want to prevent this?
QUESTION:
I have a PHP app which requires log in, offers a log out option and force logs off users who have been inactive for X minutes. But, if I log in, close my browser and re-open it, the $_SESSION variables still exists. What's the general prac... | [
"php",
"session"
] | 1 | 4 | 2,198 | 3 | 0 | 2011-05-31T08:54:52.700000 | 2011-05-31T09:22:29.170000 |
6,185,137 | 6,185,308 | Recursive binary tree function | I am trying to insert items from my array into my tree. My function works fine and creates nodes all the way down to the leaf node on the left hand side of my tree. The problem is when it is supposed to return recursively when detecting a leaf node to the higher level, it just stops building the tree completely. Here i... | if ( tree_root->left > 0) { // implementation } else if (tree_root->right > 0) { // implementation } Shouldn't this be two separate if statements, rather than if/else? Otherwise it only does one or the other sides, but not both. | Recursive binary tree function I am trying to insert items from my array into my tree. My function works fine and creates nodes all the way down to the leaf node on the left hand side of my tree. The problem is when it is supposed to return recursively when detecting a leaf node to the higher level, it just stops build... | TITLE:
Recursive binary tree function
QUESTION:
I am trying to insert items from my array into my tree. My function works fine and creates nodes all the way down to the leaf node on the left hand side of my tree. The problem is when it is supposed to return recursively when detecting a leaf node to the higher level, i... | [
"c++",
"recursion",
"binary-tree"
] | 0 | 2 | 282 | 1 | 0 | 2011-05-31T08:54:56.877000 | 2011-05-31T09:07:20.693000 |
6,185,139 | 6,199,763 | HTML entities with application/xhtml+xml Content-Type | When using the application/xhtml+xml Content-Type I cannot use any named HTML entities in my javascript (, €, etc.). It works fine when I use a text/html Content-Type. The offending HTML entities also work fine when put in the document itself (Instead of using Javascript). When I hit the "F12 developer tools" in IE9, I... | XML hasn't text named entities, you can define them either in doctype or replace text named entities with char code entites ( eg. is etc. ) http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references ( Take unicode code point in decimal ) | HTML entities with application/xhtml+xml Content-Type When using the application/xhtml+xml Content-Type I cannot use any named HTML entities in my javascript (, €, etc.). It works fine when I use a text/html Content-Type. The offending HTML entities also work fine when put in the document itself (Instead of using Javas... | TITLE:
HTML entities with application/xhtml+xml Content-Type
QUESTION:
When using the application/xhtml+xml Content-Type I cannot use any named HTML entities in my javascript (, €, etc.). It works fine when I use a text/html Content-Type. The offending HTML entities also work fine when put in the document itself (Inst... | [
"javascript",
"internet-explorer-9"
] | 1 | 1 | 2,363 | 1 | 0 | 2011-05-31T08:55:02.117000 | 2011-06-01T10:32:20.987000 |
6,185,149 | 6,185,710 | Vb.net How to remove duplicates from an Array? | Dim ItemList As New ArrayList()
For i = 0 To dgExtract.Items.Count - 1 gRow = dgExtract.Items(i) chk = gRow.FindControl("chkSelect") If chk.Checked Then sEmail = gRow.Cells(7).Text dim number as string = Regex.Replace(sEmail,"[^0-9]","") if number.length = 11 then ItemList.Add(number) end if end if Next I build up the... | Setting: Dim number As Integer Dim num As String Dim al As New ArrayList() If Not (al.Contains(number)) Then al.Add(number) End If Getting: For Each number In al num = number.ToString() Next | Vb.net How to remove duplicates from an Array? Dim ItemList As New ArrayList()
For i = 0 To dgExtract.Items.Count - 1 gRow = dgExtract.Items(i) chk = gRow.FindControl("chkSelect") If chk.Checked Then sEmail = gRow.Cells(7).Text dim number as string = Regex.Replace(sEmail,"[^0-9]","") if number.length = 11 then ItemLis... | TITLE:
Vb.net How to remove duplicates from an Array?
QUESTION:
Dim ItemList As New ArrayList()
For i = 0 To dgExtract.Items.Count - 1 gRow = dgExtract.Items(i) chk = gRow.FindControl("chkSelect") If chk.Checked Then sEmail = gRow.Cells(7).Text dim number as string = Regex.Replace(sEmail,"[^0-9]","") if number.length... | [
"vb.net"
] | 2 | 9 | 42,323 | 6 | 0 | 2011-05-31T08:55:56.840000 | 2011-05-31T09:42:14.537000 |
6,185,151 | 6,185,309 | using jquery on child frame without loading it again | is it possible to load and use jquery in the parent iframe page & inside the iframe whithout loading jquery twice, meaning to load jquery just once in the page and using it in the ifrmae within. | Sure, just make sure the isn't loading the jQuery script i.e. | using jquery on child frame without loading it again is it possible to load and use jquery in the parent iframe page & inside the iframe whithout loading jquery twice, meaning to load jquery just once in the page and using it in the ifrmae within. | TITLE:
using jquery on child frame without loading it again
QUESTION:
is it possible to load and use jquery in the parent iframe page & inside the iframe whithout loading jquery twice, meaning to load jquery just once in the page and using it in the ifrmae within.
ANSWER:
Sure, just make sure the isn't loading the jQ... | [
"javascript",
"jquery",
"unobtrusive-javascript"
] | 0 | 1 | 759 | 2 | 0 | 2011-05-31T08:56:02.100000 | 2011-05-31T09:07:22.410000 |
6,185,152 | 6,185,246 | How to style default confirm box with only css? | I would like to style standard window.confirm without using any additional JavaScript code, only with CSS. Is it even possible? And if it is, how can I do it? | It is not possible. This window is displayed by the browser using the platform's UI kit. It's not in the DOM, not visible from the CSS or Javascript, there's nothing you can do. However, some very simple jQuery code can do the trick. How about $('a').confirm();? | How to style default confirm box with only css? I would like to style standard window.confirm without using any additional JavaScript code, only with CSS. Is it even possible? And if it is, how can I do it? | TITLE:
How to style default confirm box with only css?
QUESTION:
I would like to style standard window.confirm without using any additional JavaScript code, only with CSS. Is it even possible? And if it is, how can I do it?
ANSWER:
It is not possible. This window is displayed by the browser using the platform's UI ki... | [
"css",
"confirm"
] | 44 | 50 | 100,785 | 3 | 0 | 2011-05-31T08:56:02.677000 | 2011-05-31T09:01:44.053000 |
6,185,154 | 6,185,327 | No Results - UITableView iPhone | I'm trying to display a no results message on my tableview when it is empty. I have done the uilabel approach where it appears when it is empty but it seems like it's not how Apple has done it in the Contacts etc where the "No Results" move as well when you try to scroll up and down. Mine just stays there in one spot. ... | Yes. If you have no results to display, do the following Create a boolean flag named noResultsToDisplay, or something else. If you have no results to display then set noResultsToDisplay = YES, set it to NO otherwise. In numberOfRowsInSection, if (noResultsToDisplay) return 3; In cellForRowAtIndexPath, if (noResultsToDi... | No Results - UITableView iPhone I'm trying to display a no results message on my tableview when it is empty. I have done the uilabel approach where it appears when it is empty but it seems like it's not how Apple has done it in the Contacts etc where the "No Results" move as well when you try to scroll up and down. Min... | TITLE:
No Results - UITableView iPhone
QUESTION:
I'm trying to display a no results message on my tableview when it is empty. I have done the uilabel approach where it appears when it is empty but it seems like it's not how Apple has done it in the Contacts etc where the "No Results" move as well when you try to scrol... | [
"ios",
"iphone",
"objective-c",
"uitableview"
] | 8 | 9 | 6,097 | 5 | 0 | 2011-05-31T08:56:04.830000 | 2011-05-31T09:08:44.360000 |
6,185,159 | 6,185,236 | LINQ and pagination | We need to fetch data from a database using LINQ. We now need to implement pagination. I suppose at a time we need to fetch 10 records at a time and when we click the Next button then it will fetch the next 10 records from db. Please guide me with code. thanks | I always use the following code: public static class PagingExtensions { //used by LINQ to SQL public static IQueryable Page (this IQueryable source, int page, int pageSize) { return source.Skip((page - 1) * pageSize).Take(pageSize); }
//used by LINQ public static IEnumerable Page (this IEnumerable source, int page, in... | LINQ and pagination We need to fetch data from a database using LINQ. We now need to implement pagination. I suppose at a time we need to fetch 10 records at a time and when we click the Next button then it will fetch the next 10 records from db. Please guide me with code. thanks | TITLE:
LINQ and pagination
QUESTION:
We need to fetch data from a database using LINQ. We now need to implement pagination. I suppose at a time we need to fetch 10 records at a time and when we click the Next button then it will fetch the next 10 records from db. Please guide me with code. thanks
ANSWER:
I always use... | [
"c#",
"linq-to-sql"
] | 50 | 126 | 58,603 | 3 | 0 | 2011-05-31T08:56:13.860000 | 2011-05-31T09:01:19.403000 |
6,185,162 | 6,195,197 | Trouble talking to web service in C#: XmlChoiceIdentifierATtribute is not valid in Items | There is a WSDL webservice that is out of my control that I'm having trouble with; I can interact with this service using soapUI and using Add Service Reference -> advanced -> Add Web Reference without a problem. However, when I attempt to talk to it using the standard Add Service Reference method (add a service refere... | What is happening is that the DataContractSerializer (default for WCF) cannot handle the schema (this is typical in non WCF-WCF scenarios) so it "falls back" and generates a proxy which uses XmlSerializer. It is possible that the "fallback" mechanism of generating a proxy for use with XmlSerializer is not generating it... | Trouble talking to web service in C#: XmlChoiceIdentifierATtribute is not valid in Items There is a WSDL webservice that is out of my control that I'm having trouble with; I can interact with this service using soapUI and using Add Service Reference -> advanced -> Add Web Reference without a problem. However, when I at... | TITLE:
Trouble talking to web service in C#: XmlChoiceIdentifierATtribute is not valid in Items
QUESTION:
There is a WSDL webservice that is out of my control that I'm having trouble with; I can interact with this service using soapUI and using Add Service Reference -> advanced -> Add Web Reference without a problem. ... | [
"c#",
"soap",
"wsdl"
] | 3 | 1 | 3,864 | 1 | 0 | 2011-05-31T08:56:17.670000 | 2011-06-01T01:03:00.537000 |
6,185,163 | 6,185,674 | nor $_POST, $_GET passing my values | I have a foreach loop listing the unique codes as links: the above is also in another form tag: the action part works fine but in messageSent.php i do: var_dump($_POST); var_dump($_GET); and the output gives me: NULL array(1) { ["id"]=> string(2) "36" } Where is "message"? "id" contains the wrong id. It is not the id o... | You cannot have a form inside a form.. you must do them seperate or else in the same form.... I fixed the HTML markup for you | nor $_POST, $_GET passing my values I have a foreach loop listing the unique codes as links: the above is also in another form tag: the action part works fine but in messageSent.php i do: var_dump($_POST); var_dump($_GET); and the output gives me: NULL array(1) { ["id"]=> string(2) "36" } Where is "message"? "id" conta... | TITLE:
nor $_POST, $_GET passing my values
QUESTION:
I have a foreach loop listing the unique codes as links: the above is also in another form tag: the action part works fine but in messageSent.php i do: var_dump($_POST); var_dump($_GET); and the output gives me: NULL array(1) { ["id"]=> string(2) "36" } Where is "me... | [
"php",
"html"
] | 0 | 0 | 197 | 2 | 0 | 2011-05-31T08:56:27.513000 | 2011-05-31T09:38:46.923000 |
6,185,172 | 6,186,614 | JSF: f:ajax listener not called for t:selectOneRadio | This is my code: But the toggle-Listener is never called: public void toggle(AjaxBehaviorEvent event) { //... } I have googled and found this bug report, but I don't understand how I can work around it. Any ideas? I have Tomahawk 1.1.10 and JSF 2 (MyFaces). | The bug states that the issue was resolved in version 1.1.11-SNAPSHOT. The easiest way to workaround this would be to upgrade to this latest snapshot build. | JSF: f:ajax listener not called for t:selectOneRadio This is my code: But the toggle-Listener is never called: public void toggle(AjaxBehaviorEvent event) { //... } I have googled and found this bug report, but I don't understand how I can work around it. Any ideas? I have Tomahawk 1.1.10 and JSF 2 (MyFaces). | TITLE:
JSF: f:ajax listener not called for t:selectOneRadio
QUESTION:
This is my code: But the toggle-Listener is never called: public void toggle(AjaxBehaviorEvent event) { //... } I have googled and found this bug report, but I don't understand how I can work around it. Any ideas? I have Tomahawk 1.1.10 and JSF 2 (M... | [
"jsf",
"jsf-2",
"tomahawk"
] | 0 | 3 | 1,152 | 1 | 0 | 2011-05-31T08:56:44.533000 | 2011-05-31T11:05:14.210000 |
6,185,192 | 6,185,322 | mysql string concatenation returns 0 | im trying to concatenate 3 columns in a select query to show in one column in the results. the column is called DelPostalName and for some reason always shows a '0' when i run the select query. like its trying to add up the strings but theres not actual numbers to add. ive been googling string concatenation and this se... | The result appears as zero since you are trying to arithmetically add the strings to each other. The correct method for concatenating strings in MySQL is using the CONCAT(str1, str2, str3) function. Here is the manual for the function. PS: if you want to concate with a seperator use CONCAT_WS() - also in the same manua... | mysql string concatenation returns 0 im trying to concatenate 3 columns in a select query to show in one column in the results. the column is called DelPostalName and for some reason always shows a '0' when i run the select query. like its trying to add up the strings but theres not actual numbers to add. ive been goog... | TITLE:
mysql string concatenation returns 0
QUESTION:
im trying to concatenate 3 columns in a select query to show in one column in the results. the column is called DelPostalName and for some reason always shows a '0' when i run the select query. like its trying to add up the strings but theres not actual numbers to ... | [
"mysql",
"sql",
"string",
"concatenation"
] | 13 | 31 | 13,183 | 4 | 0 | 2011-05-31T08:58:09.657000 | 2011-05-31T09:08:38.057000 |
6,185,193 | 6,185,450 | PHP and Checkboxes check ones go to table | i have a table like this: $query = "select * from pharmacy"; $result = mysql_query($query); $num = mysql_num_rows($result); $num1 = mysql_num_fields($result);
if($num>0) { echo " "; for($i=0;$i<$num;$i++) { $row=mysql_fetch_row($result); echo " "; echo" "; echo" $row[0] ";
echo" "; } i want to insert the checked ones... | First off all you must change this HTML so that the checkbox is an array $query = "select * from pharmacy"; $result = mysql_query($query); $num = mysql_num_rows($result); $num1 = mysql_num_fields($result);
if($num>0) { echo " "; for($i=0;$i<$num;$i++) { $row=mysql_fetch_row($result); echo " "; echo" "; echo" $row[0] "... | PHP and Checkboxes check ones go to table i have a table like this: $query = "select * from pharmacy"; $result = mysql_query($query); $num = mysql_num_rows($result); $num1 = mysql_num_fields($result);
if($num>0) { echo " "; for($i=0;$i<$num;$i++) { $row=mysql_fetch_row($result); echo " "; echo" "; echo" $row[0] ";
ec... | TITLE:
PHP and Checkboxes check ones go to table
QUESTION:
i have a table like this: $query = "select * from pharmacy"; $result = mysql_query($query); $num = mysql_num_rows($result); $num1 = mysql_num_fields($result);
if($num>0) { echo " "; for($i=0;$i<$num;$i++) { $row=mysql_fetch_row($result); echo " "; echo" "; ec... | [
"php",
"mysql"
] | 0 | 2 | 2,263 | 4 | 0 | 2011-05-31T08:58:14.520000 | 2011-05-31T09:19:30.350000 |
6,185,205 | 6,185,531 | is there any of passing flashvars in static publishing method of SWF_Object? | Well i just want to know that using static publishing method SWF-Object, can we pass flashvars to flash swf file?? The static publish method is SWFObject 2 static publishing example page Alternative content but the flashvars and params are not passed to flash file?? | I think what you're asking is if you've got a statically embedded SWF using SWFObject.... thats about the only way that really makes sense. In that case the answer is yes. Even if your embed tag was dynamically generated using PHP or something, you can still pass flash vars. Easiest way to do this is to download and in... | is there any of passing flashvars in static publishing method of SWF_Object? Well i just want to know that using static publishing method SWF-Object, can we pass flashvars to flash swf file?? The static publish method is SWFObject 2 static publishing example page Alternative content but the flashvars and params are not... | TITLE:
is there any of passing flashvars in static publishing method of SWF_Object?
QUESTION:
Well i just want to know that using static publishing method SWF-Object, can we pass flashvars to flash swf file?? The static publish method is SWFObject 2 static publishing example page Alternative content but the flashvars ... | [
"flash",
"actionscript-3",
"swfobject"
] | 2 | 1 | 869 | 2 | 0 | 2011-05-31T08:58:41.663000 | 2011-05-31T09:26:03.637000 |
6,185,211 | 6,185,242 | Binding to DataTable with Select | I have a DataGrid control binded to DataTable using the following: dataGrid1.ItemsSource = dataTable1.DefaultView; Now I would want to items in my DataGrid changes corresponding to user selection in a ComboBox. I.e. I will need to bind to the dataTable selectively? The following code works but I felt it's being overkil... | Just bind to the DataView itself, like you're technically already doing. var dv = new DataView(dataTable1, "Combox_ID = " + comboBoxId, "ID ASC", DataViewRowState.CurrentRows);
dataGrid1.ItemsSource = dv; Unless you want to protect the original data from modification there's no need to create a new table copy. | Binding to DataTable with Select I have a DataGrid control binded to DataTable using the following: dataGrid1.ItemsSource = dataTable1.DefaultView; Now I would want to items in my DataGrid changes corresponding to user selection in a ComboBox. I.e. I will need to bind to the dataTable selectively? The following code wo... | TITLE:
Binding to DataTable with Select
QUESTION:
I have a DataGrid control binded to DataTable using the following: dataGrid1.ItemsSource = dataTable1.DefaultView; Now I would want to items in my DataGrid changes corresponding to user selection in a ComboBox. I.e. I will need to bind to the dataTable selectively? The... | [
"c#",
"binding"
] | 0 | 0 | 610 | 1 | 0 | 2011-05-31T08:59:02.450000 | 2011-05-31T09:01:34.110000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.