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,283,295 | 6,283,456 | mysql_list_tables | I have a script in kohana which runs fine on php 5.2.11. I took out a line for mysql_select_tables using a mysql_query. When I put it on a php 5.3 server, I get the following errors: Warning Message An error was detected which prevented the loading of this page. If this problem persists, please contact the website admi... | The following function has been deprecated in 5.3 Please see the manual for other alternative https://www.php.net/manual/en/function.mysql-list-tables.php According to php manual " This function is deprecated. It is preferable to use mysql_query() to issue an SQL SHOW TABLES [FROM db_name] [LIKE 'pattern'] statement in... | mysql_list_tables I have a script in kohana which runs fine on php 5.2.11. I took out a line for mysql_select_tables using a mysql_query. When I put it on a php 5.3 server, I get the following errors: Warning Message An error was detected which prevented the loading of this page. If this problem persists, please contac... | TITLE:
mysql_list_tables
QUESTION:
I have a script in kohana which runs fine on php 5.2.11. I took out a line for mysql_select_tables using a mysql_query. When I put it on a php 5.3 server, I get the following errors: Warning Message An error was detected which prevented the loading of this page. If this problem persi... | [
"php",
"kohana"
] | 0 | 0 | 2,117 | 1 | 0 | 2011-06-08T18:14:19.570000 | 2011-06-08T18:28:10.887000 |
6,283,297 | 6,283,395 | Java SwingWorker - using publish/process to update a TextArea in EDT? | I had just coded a Swing program that starts up a SwingWorker (which runs a Socket Server). I have a JTextArea on the Swing GUI which gets updated with the data received by the Socket Server, using a JTextArea.append(String). Is it the correct/threadsafe way to update a JTextArea on the Swing GUI? What about using publ... | SwingWorker is usually used for one time long running processes (anything that will take more than a few milliseconds to complete). If you have persistent connection, it would be more appropriate to use a dedicated ExecutorService which will run the process, then when you want to update a swing component call SwingUtil... | Java SwingWorker - using publish/process to update a TextArea in EDT? I had just coded a Swing program that starts up a SwingWorker (which runs a Socket Server). I have a JTextArea on the Swing GUI which gets updated with the data received by the Socket Server, using a JTextArea.append(String). Is it the correct/thread... | TITLE:
Java SwingWorker - using publish/process to update a TextArea in EDT?
QUESTION:
I had just coded a Swing program that starts up a SwingWorker (which runs a Socket Server). I have a JTextArea on the Swing GUI which gets updated with the data received by the Socket Server, using a JTextArea.append(String). Is it ... | [
"java",
"swing",
"swingworker"
] | 1 | 4 | 1,358 | 1 | 0 | 2011-06-08T18:14:44.563000 | 2011-06-08T18:23:14.203000 |
6,283,298 | 6,283,441 | Windows Gadgets: Testing environment? | Is there anything that provides a console, error logging, etc. for testing Windows Gadgets? I've searched but I'm unable to find anything. Thanks in advance! | A simple and easy start is to just use any web developing toolkit. I found out myself that for developing simple Windows Gadgets, Notepad++ and Firefox with its Web Developer toolbar was more than enough. You can implement all the business logic and just test the results in a browser. Actually starting it as a Gadget w... | Windows Gadgets: Testing environment? Is there anything that provides a console, error logging, etc. for testing Windows Gadgets? I've searched but I'm unable to find anything. Thanks in advance! | TITLE:
Windows Gadgets: Testing environment?
QUESTION:
Is there anything that provides a console, error logging, etc. for testing Windows Gadgets? I've searched but I'm unable to find anything. Thanks in advance!
ANSWER:
A simple and easy start is to just use any web developing toolkit. I found out myself that for de... | [
"javascript",
"html",
"css",
"windows",
"windows-desktop-gadgets"
] | 2 | 1 | 212 | 2 | 0 | 2011-06-08T18:14:44.827000 | 2011-06-08T18:26:35.083000 |
6,283,299 | 6,283,450 | How do you delete a lines within a file where range is determined using regular expressions in python? | I am trying to clean up a series of text files by deleting unneeded lines. I want to delete lines starting with the line that matches Regex1 and keep deleting until the line with Regex2 is found. I need to do this using python. I have already done this using a sed command something like sed -r '/regex1/,/regex2/d' and ... | You can do this by using re.DOTALL to make. match newlines: import re
pattern = re.compile(r"regex1.*?regex2", re.DOTALL) You can then use pattern.sub("", data) to delete the lines. | How do you delete a lines within a file where range is determined using regular expressions in python? I am trying to clean up a series of text files by deleting unneeded lines. I want to delete lines starting with the line that matches Regex1 and keep deleting until the line with Regex2 is found. I need to do this usi... | TITLE:
How do you delete a lines within a file where range is determined using regular expressions in python?
QUESTION:
I am trying to clean up a series of text files by deleting unneeded lines. I want to delete lines starting with the line that matches Regex1 and keep deleting until the line with Regex2 is found. I n... | [
"python",
"regex",
"lines"
] | 1 | 2 | 218 | 3 | 0 | 2011-06-08T18:14:45.563000 | 2011-06-08T18:27:35.527000 |
6,283,300 | 6,283,371 | I want to read a local text file on my computer on an Android Emulator | How can I put that file in userdata.img so that the emulator can read it? Also, how can to specifiy the path of the file in the code? I am using Windows 7. | To push a file onto the emulator or any other rooted device you'd just issue a adb push command. adb push FILE PATH_ON_DEVICE In Java to define the path to a file you can simply create a File object with the path set in its constructor. File file = new File("/path/on/device"); | I want to read a local text file on my computer on an Android Emulator How can I put that file in userdata.img so that the emulator can read it? Also, how can to specifiy the path of the file in the code? I am using Windows 7. | TITLE:
I want to read a local text file on my computer on an Android Emulator
QUESTION:
How can I put that file in userdata.img so that the emulator can read it? Also, how can to specifiy the path of the file in the code? I am using Windows 7.
ANSWER:
To push a file onto the emulator or any other rooted device you'd ... | [
"android",
"file",
"android-emulator"
] | 2 | 1 | 2,559 | 2 | 0 | 2011-06-08T18:14:46.790000 | 2011-06-08T18:21:09.643000 |
6,283,301 | 6,283,338 | Move MySQL database to a new server | What's the easiest way to move mysql schemas (tables, data, everything) from one server to another? Is there an easy method move all this from one server running mysql to another also already running mysql? | Dump the Database either using mysqldump or if you are using PHPMyAdmin then Export the structure and data. For mysqldump you will require the console and use the following command: mysqldump -u -p -h > /path/to/dump.sql Then in the other server: mysql -u -p < /path/to/dump.sql | Move MySQL database to a new server What's the easiest way to move mysql schemas (tables, data, everything) from one server to another? Is there an easy method move all this from one server running mysql to another also already running mysql? | TITLE:
Move MySQL database to a new server
QUESTION:
What's the easiest way to move mysql schemas (tables, data, everything) from one server to another? Is there an easy method move all this from one server running mysql to another also already running mysql?
ANSWER:
Dump the Database either using mysqldump or if you... | [
"mysql"
] | 15 | 13 | 16,949 | 3 | 0 | 2011-06-08T18:14:56.067000 | 2011-06-08T18:18:08.303000 |
6,283,309 | 6,284,654 | Loading Thousands of Codes to Map to a Shopping Cart Rule in Magento | I've been looking at the salesrule_coupon table, and I've discovered that I can map many coupon codes to a single rule, if the rule itself is of type 'Auto.' This is highly convenient as my client needs us to sync the codes periodically with a feed of data. So in loading in these thousands of codes (using a custom modu... | I fixed the same issue when I was creating something similar for one of my customers. The source of the problem for retrieving of valid coupon Magento Core Sales Rule module uses FIND_IN_SET() with GROUP_CONCAT() MySQL functions instead adding additional condition for joined table. So FIND_IN_SET just truncates number ... | Loading Thousands of Codes to Map to a Shopping Cart Rule in Magento I've been looking at the salesrule_coupon table, and I've discovered that I can map many coupon codes to a single rule, if the rule itself is of type 'Auto.' This is highly convenient as my client needs us to sync the codes periodically with a feed of... | TITLE:
Loading Thousands of Codes to Map to a Shopping Cart Rule in Magento
QUESTION:
I've been looking at the salesrule_coupon table, and I've discovered that I can map many coupon codes to a single rule, if the rule itself is of type 'Auto.' This is highly convenient as my client needs us to sync the codes periodica... | [
"magento",
"coupon"
] | 4 | 5 | 1,265 | 2 | 0 | 2011-06-08T18:15:35.073000 | 2011-06-08T20:12:12.553000 |
6,283,310 | 6,283,525 | Using JSF EL in a plain HTML attribute | Can we use JSF EL inside a HTML tag? For example, inside a plain HTML element, can we use EL #{bean.color} for the bgcolor attribute? | The answer depends on the JSF version and the view technology used. The technical term you're looking for is "using EL in template text" (i.e. not inside any tag/component). As per your question history you're using JSF 1.2 on Websphere. I assume that you're still using old JSP, the predecesor of Facelets. Whether JSF ... | Using JSF EL in a plain HTML attribute Can we use JSF EL inside a HTML tag? For example, inside a plain HTML element, can we use EL #{bean.color} for the bgcolor attribute? | TITLE:
Using JSF EL in a plain HTML attribute
QUESTION:
Can we use JSF EL inside a HTML tag? For example, inside a plain HTML element, can we use EL #{bean.color} for the bgcolor attribute?
ANSWER:
The answer depends on the JSF version and the view technology used. The technical term you're looking for is "using EL i... | [
"html",
"jsf",
"attributes",
"el",
"managed-bean"
] | 6 | 7 | 5,678 | 3 | 0 | 2011-06-08T18:15:48.977000 | 2011-06-08T18:33:46.270000 |
6,283,312 | 6,283,640 | Subsonic ORM experience | I'm looking for new ORM for a important project, im used to nHibernate with ActiveRecord and I already have a very bad experiencia with EF4, performance and crashing GUI. So search on web I found the Subsonic, i liked what I read in the documentation. So, I would like to know if anyone already used the Subsonic and if ... | Hmm... well... how should I put it.... I am currently (as in right now) expending effort to replace SubSonic with PetaPoco. I suppose that says something. It's not that SubSonic was bad exactly, but it didn't fit my way of developing very well. And for people looking to adopt it at this point, it seems very important t... | Subsonic ORM experience I'm looking for new ORM for a important project, im used to nHibernate with ActiveRecord and I already have a very bad experiencia with EF4, performance and crashing GUI. So search on web I found the Subsonic, i liked what I read in the documentation. So, I would like to know if anyone already u... | TITLE:
Subsonic ORM experience
QUESTION:
I'm looking for new ORM for a important project, im used to nHibernate with ActiveRecord and I already have a very bad experiencia with EF4, performance and crashing GUI. So search on web I found the Subsonic, i liked what I read in the documentation. So, I would like to know i... | [
"c#",
".net",
"orm",
"subsonic"
] | 7 | 13 | 7,146 | 3 | 0 | 2011-06-08T18:15:56.430000 | 2011-06-08T18:44:26.913000 |
6,283,316 | 6,283,364 | Updating attributes from retrieved objects that has required attr_acessors - Rails Tutorial - Michael Hartl's | On Chapter 7 from Michael Hartl's tutorial there is a User model < code here > that has a password attribute defined as a attr_accessor and also as attr_accessible with a presence validator. The problem is: if I retrieve an existent User and try to update its email, ruby throws an exception claiming for its password, a... | You want to add the validator to the password hash field so that it is the actual password stored in the database which is checked. If you make the password= function set the value of a hash column, then this method will work independently of the actual password virtual variable. | Updating attributes from retrieved objects that has required attr_acessors - Rails Tutorial - Michael Hartl's On Chapter 7 from Michael Hartl's tutorial there is a User model < code here > that has a password attribute defined as a attr_accessor and also as attr_accessible with a presence validator. The problem is: if ... | TITLE:
Updating attributes from retrieved objects that has required attr_acessors - Rails Tutorial - Michael Hartl's
QUESTION:
On Chapter 7 from Michael Hartl's tutorial there is a User model < code here > that has a password attribute defined as a attr_accessor and also as attr_accessible with a presence validator. T... | [
"ruby-on-rails",
"railstutorial.org"
] | 0 | 0 | 287 | 1 | 0 | 2011-06-08T18:16:15.713000 | 2011-06-08T18:20:33.897000 |
6,283,320 | 6,283,363 | := vs = in make macros | Possible Duplicate: What is the difference between the GNU Makefile variable assignments =,?=,:= and +=? I only know very basic makefile syntax, and was reading through another project's makefile and came across:= for macro declaration. Why would they use that? In other words, is there any difference between MYMACRO = ... | Variables defined with:= in GNU make are expanded when they are defined rather than when they are used. | := vs = in make macros Possible Duplicate: What is the difference between the GNU Makefile variable assignments =,?=,:= and +=? I only know very basic makefile syntax, and was reading through another project's makefile and came across:= for macro declaration. Why would they use that? In other words, is there any differ... | TITLE:
:= vs = in make macros
QUESTION:
Possible Duplicate: What is the difference between the GNU Makefile variable assignments =,?=,:= and +=? I only know very basic makefile syntax, and was reading through another project's makefile and came across:= for macro declaration. Why would they use that? In other words, i... | [
"makefile",
"gnu-make",
"colon-equals"
] | 92 | 130 | 78,525 | 1 | 0 | 2011-06-08T18:16:50.350000 | 2011-06-08T18:20:33.940000 |
6,283,328 | 6,283,609 | Format String : Parsing | I have a parsing question. I have a paragraph which has instances of: word. So basically it has a colon, two spaces, a word (could be anything), then two more spaces. So when I have those instances I want to convert the string so I have A new line character after: and the word. Removed the double space after the word. ... | You can try var str = ": first: second "; var result = Regex.Replace(str, ":\\s{2}(? [a-zA-Z0-9]+)\\s{2}", ":\n${word}\n"); | Format String : Parsing I have a parsing question. I have a paragraph which has instances of: word. So basically it has a colon, two spaces, a word (could be anything), then two more spaces. So when I have those instances I want to convert the string so I have A new line character after: and the word. Removed the doubl... | TITLE:
Format String : Parsing
QUESTION:
I have a parsing question. I have a paragraph which has instances of: word. So basically it has a colon, two spaces, a word (could be anything), then two more spaces. So when I have those instances I want to convert the string so I have A new line character after: and the word.... | [
"c#",
".net",
"parsing"
] | 1 | 2 | 394 | 5 | 0 | 2011-06-08T18:17:11.393000 | 2011-06-08T18:41:46.320000 |
6,283,339 | 6,283,397 | Deep Copying NSMutableArray Issue | Possible Duplicate: deep copy NSMutableArray in Objective-C? I have two arrays of length 5 with items of a custom class I've built. I want to copy the first array into the second. Once copied I want these two arrays to be totally independent (I want to be able to change the first without affecting the second). I have t... | Is your custom class properly implementing the NSCopying protocol? (I.e. implement copyWithZone: to return a completely independent instance.) Is you custom class properly implementing the NSCoding protocol to archive and decode all of the relevant instance variables? This won't work unless you actually copy the object... | Deep Copying NSMutableArray Issue Possible Duplicate: deep copy NSMutableArray in Objective-C? I have two arrays of length 5 with items of a custom class I've built. I want to copy the first array into the second. Once copied I want these two arrays to be totally independent (I want to be able to change the first witho... | TITLE:
Deep Copying NSMutableArray Issue
QUESTION:
Possible Duplicate: deep copy NSMutableArray in Objective-C? I have two arrays of length 5 with items of a custom class I've built. I want to copy the first array into the second. Once copied I want these two arrays to be totally independent (I want to be able to chan... | [
"iphone",
"objective-c",
"memory",
"nsarray",
"deep-copy"
] | 1 | 1 | 778 | 1 | 0 | 2011-06-08T18:18:12.160000 | 2011-06-08T18:23:34.537000 |
6,283,348 | 6,283,377 | Creating new Queue for each time an object is created | I have created a simple class to filter out data from a data stream. The problem is that if I use more than one ValueFilter object, they all use the same queue. I want there to be a separate queue for each ValueFilter Object. I am declaring the ValueFilter in my main program like this: ValueFilter filter = new ValueFil... | Since the Queue seems to be private, all you need to do is remove the static modifier: //private static int sum = 0; //private static Queue queue = new Queue(); private int sum = 0; private Queue queue = new Queue(); Now every ValueFilter instance has its own sum and queue instances. A non-static member is an instance ... | Creating new Queue for each time an object is created I have created a simple class to filter out data from a data stream. The problem is that if I use more than one ValueFilter object, they all use the same queue. I want there to be a separate queue for each ValueFilter Object. I am declaring the ValueFilter in my mai... | TITLE:
Creating new Queue for each time an object is created
QUESTION:
I have created a simple class to filter out data from a data stream. The problem is that if I use more than one ValueFilter object, they all use the same queue. I want there to be a separate queue for each ValueFilter Object. I am declaring the Val... | [
"c#",
"class",
"object",
"queue"
] | 0 | 3 | 469 | 3 | 0 | 2011-06-08T18:19:04.497000 | 2011-06-08T18:22:09.420000 |
6,283,361 | 6,283,422 | Unable to get table data from a html page | I am trying to get some data fields in a table in a html webpage. The webpage is dynamically generated on posting some content. I am using php-curl to get the web page and then xpath to get the data from some fields. I am able to get the page not the specific fields. The code looks like this $url="http://www.rtu.ac.in/... | You write: echo $total->length; //shows 0 That means that the xpath returned 0 elements. So it's actually not doing what you would like it to do. //html/body/table[4]/tr[3]/td[4] Or otherwise check the syntax of your xpath query that you didn't made an error. Additionally I would first load the HTML document and then i... | Unable to get table data from a html page I am trying to get some data fields in a table in a html webpage. The webpage is dynamically generated on posting some content. I am using php-curl to get the web page and then xpath to get the data from some fields. I am able to get the page not the specific fields. The code l... | TITLE:
Unable to get table data from a html page
QUESTION:
I am trying to get some data fields in a table in a html webpage. The webpage is dynamically generated on posting some content. I am using php-curl to get the web page and then xpath to get the data from some fields. I am able to get the page not the specific ... | [
"php",
"html",
"curl",
"xpath",
"web-scraping"
] | 1 | 3 | 1,204 | 2 | 0 | 2011-06-08T18:20:14.137000 | 2011-06-08T18:25:11.763000 |
6,283,380 | 6,283,548 | Embed.ly and PHP... round 2 | Apparently my last question was too vague even though it was pretty straightforward. I'm trying to use Embed.ly's API to embed some stuff, for example, some of the stuff shown here. https://github.com/embedly/embedly-php/blob/master/README.rst I have the entire Embedly.php source file in my working directory. However, ... | It looks like curl isn't installed or enabled. If you're on you own server (assuming something similar to ubuntu server), a simple sudo apt-get install php5-curl should solve it. Otherwise, you may have to contact your hosting provider. | Embed.ly and PHP... round 2 Apparently my last question was too vague even though it was pretty straightforward. I'm trying to use Embed.ly's API to embed some stuff, for example, some of the stuff shown here. https://github.com/embedly/embedly-php/blob/master/README.rst I have the entire Embedly.php source file in my ... | TITLE:
Embed.ly and PHP... round 2
QUESTION:
Apparently my last question was too vague even though it was pretty straightforward. I'm trying to use Embed.ly's API to embed some stuff, for example, some of the stuff shown here. https://github.com/embedly/embedly-php/blob/master/README.rst I have the entire Embedly.php ... | [
"php",
"html",
"embed",
"wamp"
] | 1 | 0 | 499 | 2 | 0 | 2011-06-08T18:22:19.453000 | 2011-06-08T18:35:55.523000 |
6,283,401 | 6,283,417 | Java copy files distorting file | So I am trying to copy a file to a new location this way: FileReader in = new FileReader(strTempPath); FileWriter out = new FileWriter(destTempPath);
int c; while ((c = in.read())!= -1){ out.write(c); }
in.close(); out.close(); Which works fine 99% of the time. Sometimes, if the image is rather small, <= 60x80px, the... | Don't use a Readers / Writers to read binary data. Use a InputStreams / OutputStreams or Channels from the nio package (see below). Example from exampledepot.com: try { // Create channel on the source FileChannel srcChannel = new FileInputStream("srcFilename").getChannel();
// Create channel on the destination FileCha... | Java copy files distorting file So I am trying to copy a file to a new location this way: FileReader in = new FileReader(strTempPath); FileWriter out = new FileWriter(destTempPath);
int c; while ((c = in.read())!= -1){ out.write(c); }
in.close(); out.close(); Which works fine 99% of the time. Sometimes, if the image ... | TITLE:
Java copy files distorting file
QUESTION:
So I am trying to copy a file to a new location this way: FileReader in = new FileReader(strTempPath); FileWriter out = new FileWriter(destTempPath);
int c; while ((c = in.read())!= -1){ out.write(c); }
in.close(); out.close(); Which works fine 99% of the time. Someti... | [
"java",
"file-io",
"file-copying"
] | 3 | 11 | 1,460 | 2 | 0 | 2011-06-08T18:23:45.323000 | 2011-06-08T18:24:44.227000 |
6,283,409 | 6,296,775 | Keeping a custom cursor on a WPF popup | I have some custom cursors in my application. I used informations found on the second answer here to create my custom cursor. This works well. My problem is that when I move my mouse over a Popup, the mouse appears as the default Cursor. Strange thing is that when i move my mouse out of the Popup, my custom cursor come... | Ok so i found out a way to make my cursor appear correctly into my popup. My SimplePopup use a border as its child element. I tried to set that border's Cursor to the _relativeTo cursor like this: popBorder.Cursor = _relativeTo.Cursor; and it worked I Was wondering why so i did a bit of research and i found this intere... | Keeping a custom cursor on a WPF popup I have some custom cursors in my application. I used informations found on the second answer here to create my custom cursor. This works well. My problem is that when I move my mouse over a Popup, the mouse appears as the default Cursor. Strange thing is that when i move my mouse ... | TITLE:
Keeping a custom cursor on a WPF popup
QUESTION:
I have some custom cursors in my application. I used informations found on the second answer here to create my custom cursor. This works well. My problem is that when I move my mouse over a Popup, the mouse appears as the default Cursor. Strange thing is that whe... | [
"c#",
"wpf"
] | 0 | 0 | 1,306 | 1 | 0 | 2011-06-08T18:24:11.890000 | 2011-06-09T17:20:43.273000 |
6,283,458 | 6,283,593 | Adding custom request header works for IIS 7.0 but not Asp.net dev server | We're tracking the total time it takes for a request to be responded to. We implemented added custom header: request.headers.add("reqKey",key) with an unique key to the request in Application_AcquireRequestState of our global.asax.cs. When the Application_PostRequestHandlerExecute is hit for that request, it pulls the ... | You can use IIS 7.5 Express if you are using VS2010 SP1. Download from here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=abc59783-89de-4adc-b770-0a720bb21deb | Adding custom request header works for IIS 7.0 but not Asp.net dev server We're tracking the total time it takes for a request to be responded to. We implemented added custom header: request.headers.add("reqKey",key) with an unique key to the request in Application_AcquireRequestState of our global.asax.cs. When the Ap... | TITLE:
Adding custom request header works for IIS 7.0 but not Asp.net dev server
QUESTION:
We're tracking the total time it takes for a request to be responded to. We implemented added custom header: request.headers.add("reqKey",key) with an unique key to the request in Application_AcquireRequestState of our global.as... | [
"c#",
"asp.net",
"iis",
"iis-7"
] | 4 | 2 | 2,273 | 1 | 0 | 2011-06-08T18:28:23.060000 | 2011-06-08T18:40:16.517000 |
6,283,466 | 6,283,527 | Count Key/Values in JSON | Possible Duplicate: Length of Javascript Associative Array I have a JSON that looks like this: Object: www.website1.com: "dogs" www.website2.com: "cats" >__proto__: Object This prints when I do this: console.log(obj); I am trying to get the count of the items inside this JSON, obj.length returns "undefined" and obj[0].... | You have to count them yourself: function count(obj) { var count=0; for(var prop in obj) { if (obj.hasOwnProperty(prop)) { ++count; } } return count; } Although now that I saw the first comment on the question, there is a much nicer answer on that page. One-liner, probably just as fast if not faster: function count(obj... | Count Key/Values in JSON Possible Duplicate: Length of Javascript Associative Array I have a JSON that looks like this: Object: www.website1.com: "dogs" www.website2.com: "cats" >__proto__: Object This prints when I do this: console.log(obj); I am trying to get the count of the items inside this JSON, obj.length return... | TITLE:
Count Key/Values in JSON
QUESTION:
Possible Duplicate: Length of Javascript Associative Array I have a JSON that looks like this: Object: www.website1.com: "dogs" www.website2.com: "cats" >__proto__: Object This prints when I do this: console.log(obj); I am trying to get the count of the items inside this JSON,... | [
"javascript",
"json"
] | 24 | 32 | 71,700 | 2 | 0 | 2011-06-08T18:29:12.777000 | 2011-06-08T18:33:49.580000 |
6,283,502 | 6,283,570 | syntax error on varbinary(-1) | I am receiving a syntax error: MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1) NULL, PRIMARY KEY (diagram_id), UNIQUE INDEX UK_principal_name (p' at line 6 This is what i am trying to run. i have... | Try changing the VARBINARY(-1) to a positive length, like VARBINARY(1) | syntax error on varbinary(-1) I am receiving a syntax error: MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1) NULL, PRIMARY KEY (diagram_id), UNIQUE INDEX UK_principal_name (p' at line 6 This is w... | TITLE:
syntax error on varbinary(-1)
QUESTION:
I am receiving a syntax error: MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1) NULL, PRIMARY KEY (diagram_id), UNIQUE INDEX UK_principal_name (p' a... | [
"mysql",
"sql"
] | 0 | 2 | 1,153 | 2 | 0 | 2011-06-08T18:32:13.303000 | 2011-06-08T18:38:15.477000 |
6,283,511 | 6,283,607 | Disable Table Name Double Quoting on FluentNhibernate | I am switching my application to Postgresql, All the tables in my schema are in lowercase and when I'm doing a query with NHibernate it is adding double quotes to the table name which on the mappings is in PascalCase and causing the query to fail telling me that the table does not exists. I could easily go to all the m... | You could change this behavior using Fluent NHibernate's IClassConvention. I guess here is no other way to do it according to this question | Disable Table Name Double Quoting on FluentNhibernate I am switching my application to Postgresql, All the tables in my schema are in lowercase and when I'm doing a query with NHibernate it is adding double quotes to the table name which on the mappings is in PascalCase and causing the query to fail telling me that the... | TITLE:
Disable Table Name Double Quoting on FluentNhibernate
QUESTION:
I am switching my application to Postgresql, All the tables in my schema are in lowercase and when I'm doing a query with NHibernate it is adding double quotes to the table name which on the mappings is in PascalCase and causing the query to fail t... | [
"nhibernate",
"postgresql",
"case",
"case-sensitive",
"quote"
] | 3 | 5 | 1,473 | 1 | 0 | 2011-06-08T18:32:43.880000 | 2011-06-08T18:41:44.440000 |
6,283,528 | 6,283,572 | Resize container div after ajax request | I have a webpage where I am loading a twitter feed via ajax. My html and jquery call look like this: Recent Tweets (document) It loads the result properly into the feed div, but none of the containers resize their height and it overflows poorly. All of the divs have height:auto; set on them, but that appears to do noth... | Sounds like your elements don't exactly have "layout". When going for a fluid feel you shouldn't have to explicitly set dimensions. Divs should auto adjust. Whenever I have divs that won't take on children dimensions properly I add clear: both; and float: left:.yourDiv { clear: both; float: left;/* or right */ } That a... | Resize container div after ajax request I have a webpage where I am loading a twitter feed via ajax. My html and jquery call look like this: Recent Tweets (document) It loads the result properly into the feed div, but none of the containers resize their height and it overflows poorly. All of the divs have height:auto; ... | TITLE:
Resize container div after ajax request
QUESTION:
I have a webpage where I am loading a twitter feed via ajax. My html and jquery call look like this: Recent Tweets (document) It loads the result properly into the feed div, but none of the containers resize their height and it overflows poorly. All of the divs ... | [
"jquery",
"css",
"ajax"
] | 2 | 2 | 4,169 | 1 | 0 | 2011-06-08T18:33:59.920000 | 2011-06-08T18:38:34.877000 |
6,283,552 | 6,287,898 | TotalRowCount with paging in Linq2SQL | Im getting a paged datasource from a fairly complex linq query. My problem is that is takes twice as long to execute since I need to get the total row count before paging is applied in order to calculate the nr. of pages to dispaly. (the query will be executed twice) Is there somehow I can do this in a more optimal way... | Linq2Sql will actually translate the use of Skip & Take into the SQL Statement so even if you could get @@RowCount the value will not be great than your take parameter. If we take the following simple example (lifted from MSDN http://msdn.microsoft.com/en-us/library/bb386988.aspx ). IQueryable custQuery3 = (from custs ... | TotalRowCount with paging in Linq2SQL Im getting a paged datasource from a fairly complex linq query. My problem is that is takes twice as long to execute since I need to get the total row count before paging is applied in order to calculate the nr. of pages to dispaly. (the query will be executed twice) Is there someh... | TITLE:
TotalRowCount with paging in Linq2SQL
QUESTION:
Im getting a paged datasource from a fairly complex linq query. My problem is that is takes twice as long to execute since I need to get the total row count before paging is applied in order to calculate the nr. of pages to dispaly. (the query will be executed twi... | [
"c#",
"linq",
"performance",
"linq-to-sql",
"paging"
] | 1 | 3 | 604 | 1 | 0 | 2011-06-08T18:36:18.960000 | 2011-06-09T03:51:41.167000 |
6,283,557 | 6,283,626 | Auto-delegation to a val in a Scala method | I'm writing ScalaTest FeatureSpec's for a Wicket app. I have a wicketTester value, that I keep on having to call methods on, viz: scenario("No username and password") { val wicketTester = new WicketTester(app) given("user visits Admin home page") wicketTester.startPage(classOf[AdminHomePage])
then("signin page is disp... | Did you try an import? scenario("No username and password") { val wicketTester = new WicketTester(app) import wicketTester._ // import wicketTester's members into scope given("user visits Admin home page") startPage(classOf[AdminHomePage])
then("signin page is displayed") val login = wicketTester.newFormTester("signIn... | Auto-delegation to a val in a Scala method I'm writing ScalaTest FeatureSpec's for a Wicket app. I have a wicketTester value, that I keep on having to call methods on, viz: scenario("No username and password") { val wicketTester = new WicketTester(app) given("user visits Admin home page") wicketTester.startPage(classOf... | TITLE:
Auto-delegation to a val in a Scala method
QUESTION:
I'm writing ScalaTest FeatureSpec's for a Wicket app. I have a wicketTester value, that I keep on having to call methods on, viz: scenario("No username and password") { val wicketTester = new WicketTester(app) given("user visits Admin home page") wicketTester... | [
"scala",
"dsl"
] | 2 | 7 | 207 | 1 | 0 | 2011-06-08T18:37:09.637000 | 2011-06-08T18:43:35.570000 |
6,283,580 | 6,283,654 | Solution to generate invoices on monthly basis automatically? | What is the solution to generate invoices every 2 weeks automatically? Cron Jobs? I have multiple orders in the tbl_order table, I want to generate an invoices for every 2 weeks (for billing). - tbl_order table OrderID (PK) ShopID (FK) CustomerID (FK) Status Total OrderDate
- invoice table InvoiceID (PK) InvoiceDate I... | To assign cron task, use tutorial like this: http://www.thefactory.ro/php-cron-tutorial Next, in PHP handler query database for every order that was in that time range and create report based on your needs. | Solution to generate invoices on monthly basis automatically? What is the solution to generate invoices every 2 weeks automatically? Cron Jobs? I have multiple orders in the tbl_order table, I want to generate an invoices for every 2 weeks (for billing). - tbl_order table OrderID (PK) ShopID (FK) CustomerID (FK) Status... | TITLE:
Solution to generate invoices on monthly basis automatically?
QUESTION:
What is the solution to generate invoices every 2 weeks automatically? Cron Jobs? I have multiple orders in the tbl_order table, I want to generate an invoices for every 2 weeks (for billing). - tbl_order table OrderID (PK) ShopID (FK) Cust... | [
"php",
"mysql",
"database",
"cron",
"billing"
] | 0 | 1 | 2,912 | 3 | 0 | 2011-06-08T18:39:18.497000 | 2011-06-08T18:45:28.647000 |
6,283,586 | 6,283,615 | Code to trim part of a text file in C# | I have a situation where I am given a text file with text formatted as follows: C:\Users\Admin\Documents\report2011.docx: My Report 2011 C:\Users\Admin\Documents\newposter.docx: Dinner Party Poster 08 How would it be possible to trim the text file, so to trim the ":" and all characters after it. E.g. so the output woul... | int index = myString.LastIndexOf(":"); if (index > 0) myString= myString.Substring(0, index); Edit - Added answer based on modified question. It can be condensed slightly, but left expanded for clarity of what's going on. using (StreamWriter sw = File.AppendText(@"c:\output.txt")) { using(StreamReader sr = new StreamRe... | Code to trim part of a text file in C# I have a situation where I am given a text file with text formatted as follows: C:\Users\Admin\Documents\report2011.docx: My Report 2011 C:\Users\Admin\Documents\newposter.docx: Dinner Party Poster 08 How would it be possible to trim the text file, so to trim the ":" and all chara... | TITLE:
Code to trim part of a text file in C#
QUESTION:
I have a situation where I am given a text file with text formatted as follows: C:\Users\Admin\Documents\report2011.docx: My Report 2011 C:\Users\Admin\Documents\newposter.docx: Dinner Party Poster 08 How would it be possible to trim the text file, so to trim the... | [
"c#",
".net",
"windows"
] | 2 | 1 | 2,361 | 7 | 0 | 2011-06-08T18:39:39.993000 | 2011-06-08T18:42:16.650000 |
6,283,625 | 6,287,246 | Most efficient database schema for counting keywords | I'm working on an iPhone app with a GAE backend. I currently have a database of ~8000 products and each product has 5 keywords, mined from reviews, that are the words used most often to describe the product. Once I deploy the app, I'd like to allow users to add new products, and add their 5 keywords to existing product... | The easiest way to do this would be to have a 'tags' kind, defined something like this (you haven't specified a backend language, so I'm assuming Python): class Tag(db.Model): # Tags should be child entities of Products and have key name based on the tag # eg, created with Tag(parent=a_product, key_name='awesome',...) ... | Most efficient database schema for counting keywords I'm working on an iPhone app with a GAE backend. I currently have a database of ~8000 products and each product has 5 keywords, mined from reviews, that are the words used most often to describe the product. Once I deploy the app, I'd like to allow users to add new p... | TITLE:
Most efficient database schema for counting keywords
QUESTION:
I'm working on an iPhone app with a GAE backend. I currently have a database of ~8000 products and each product has 5 keywords, mined from reviews, that are the words used most often to describe the product. Once I deploy the app, I'd like to allow ... | [
"iphone",
"ios",
"google-app-engine",
"database-design"
] | 1 | 2 | 191 | 2 | 0 | 2011-06-08T18:43:25 | 2011-06-09T01:52:18.697000 |
6,284,419 | 6,284,511 | Best way to create a plugin environment in .NET | I read this aricle How to load plugins in.NET?, and I really don't see the brilliance of Microsoft's System.Addin namespace. Why can't I just have a plugins folder in my bin directory that users can put an assembly into that implements an interface I design? I could then just use reflection to create an instance of the... | "so much better" always depends on your point of view and requirements. If your approach fits your needs, go for it. But plugins can become very fast much more complicated. What about dependencies between plugins? Security? Different schemata how to find plugins?...? Those kind of features are already solved for you. I... | Best way to create a plugin environment in .NET I read this aricle How to load plugins in.NET?, and I really don't see the brilliance of Microsoft's System.Addin namespace. Why can't I just have a plugins folder in my bin directory that users can put an assembly into that implements an interface I design? I could then ... | TITLE:
Best way to create a plugin environment in .NET
QUESTION:
I read this aricle How to load plugins in.NET?, and I really don't see the brilliance of Microsoft's System.Addin namespace. Why can't I just have a plugins folder in my bin directory that users can put an assembly into that implements an interface I des... | [
"c#",
".net",
"inheritance",
"plugins"
] | 10 | 6 | 7,801 | 4 | 0 | 2011-06-08T19:53:58.600000 | 2011-06-08T20:00:37.367000 |
6,284,432 | 6,284,609 | In R, what is the keyword for jumping out of a function without executing the rest of it? | I am wondering if there is any keyword in R for jumping out of a function without executing the rest of it. In C, Java, or Matlab, there is the keyword 'return'. But the 'return' keyword in R works different than in those languages. Here is an example, myfunc = function() { if (TRUE) { return # hopefully, jump out of t... | What you show is actually syntactically valid R code... but you have the mistake of not supplying a value to return. So here is a corrected version: R> myfunc <- function() { if (TRUE) { return(NULL) # hopefully, jump out of the function } print('the rest of the function is still executed!') } myfunc <- function() { + ... | In R, what is the keyword for jumping out of a function without executing the rest of it? I am wondering if there is any keyword in R for jumping out of a function without executing the rest of it. In C, Java, or Matlab, there is the keyword 'return'. But the 'return' keyword in R works different than in those language... | TITLE:
In R, what is the keyword for jumping out of a function without executing the rest of it?
QUESTION:
I am wondering if there is any keyword in R for jumping out of a function without executing the rest of it. In C, Java, or Matlab, there is the keyword 'return'. But the 'return' keyword in R works different than... | [
"function",
"r",
"return"
] | 9 | 9 | 3,126 | 2 | 0 | 2011-06-08T19:55:25.713000 | 2011-06-08T20:08:43.600000 |
6,284,440 | 6,284,618 | Is there a way to avoid the subqueries with a query has three subqueries | I have this query and it works great (not sure) about performance SELECT ssp.product_id, p.price FROM system_step_product AS ssp JOIN product AS p ON p.product_id=ssp.product_id WHERE ssp.system_id = 14 AND ssp.step_number = ( SELECT step_number FROM system_step_product WHERE system_id = '14' AND step_number > ( SELECT... | The two limit clauses make the join statement require the row_number() OVER () window function, which is not available in MySQL. And even that, would likely make your query less efficient than it currently is. | Is there a way to avoid the subqueries with a query has three subqueries I have this query and it works great (not sure) about performance SELECT ssp.product_id, p.price FROM system_step_product AS ssp JOIN product AS p ON p.product_id=ssp.product_id WHERE ssp.system_id = 14 AND ssp.step_number = ( SELECT step_number F... | TITLE:
Is there a way to avoid the subqueries with a query has three subqueries
QUESTION:
I have this query and it works great (not sure) about performance SELECT ssp.product_id, p.price FROM system_step_product AS ssp JOIN product AS p ON p.product_id=ssp.product_id WHERE ssp.system_id = 14 AND ssp.step_number = ( SE... | [
"mysql"
] | 2 | 1 | 108 | 3 | 0 | 2011-06-08T19:56:13.407000 | 2011-06-08T20:09:38.853000 |
6,284,453 | 6,284,477 | C++ dynamically sized static array puzzler | While trying to explain to someone why a C++ static array could not by dynamically sized, I found gcc disagreeing with me. How does the following code even compile, given that the dimension argc of array is not known at compile time? #include int main(int argc, char* argv[]) { int array[argc]; for(int i = 0; i < argc; ... | Variable-length arrays (VLAs) are part of C99 and have been supported by gcc for a long time: http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html Note that the use of VLAs in C90 and C++ code is non-standard, but is supported by gcc as an extension. | C++ dynamically sized static array puzzler While trying to explain to someone why a C++ static array could not by dynamically sized, I found gcc disagreeing with me. How does the following code even compile, given that the dimension argc of array is not known at compile time? #include int main(int argc, char* argv[]) {... | TITLE:
C++ dynamically sized static array puzzler
QUESTION:
While trying to explain to someone why a C++ static array could not by dynamically sized, I found gcc disagreeing with me. How does the following code even compile, given that the dimension argc of array is not known at compile time? #include int main(int arg... | [
"c++",
"arrays",
"dynamic",
"static"
] | 7 | 10 | 1,711 | 5 | 0 | 2011-06-08T19:57:15.387000 | 2011-06-08T19:58:54.180000 |
6,284,457 | 6,284,501 | Will the function wait for the asynchronous functions completion before returning? | Let's say I have these geocoding calls: function myFunction(marker1,marker2) { var firstAddress = null; var secondAddress = null; geocoder.geocode({'latLng': marker1.getPosition()}, function(results, status) { # if geocoding successful, set firstAddress })
geocoder.geocode({'latLng': marker2.getPosition()}, function(r... | Short answer: no. You will almost immediately get to the return line of myFunction, most likely well before the AJAX has completed. Your best bet is to force geoCoder's requests to be synchronous. If you can't, then what you will need to do is set a global flag indicating when both requests have completed and wait for ... | Will the function wait for the asynchronous functions completion before returning? Let's say I have these geocoding calls: function myFunction(marker1,marker2) { var firstAddress = null; var secondAddress = null; geocoder.geocode({'latLng': marker1.getPosition()}, function(results, status) { # if geocoding successful, ... | TITLE:
Will the function wait for the asynchronous functions completion before returning?
QUESTION:
Let's say I have these geocoding calls: function myFunction(marker1,marker2) { var firstAddress = null; var secondAddress = null; geocoder.geocode({'latLng': marker1.getPosition()}, function(results, status) { # if geoc... | [
"javascript",
"google-maps"
] | 2 | 5 | 2,998 | 3 | 0 | 2011-06-08T19:57:27.157000 | 2011-06-08T20:00:14.167000 |
6,284,464 | 6,284,577 | vim search wildcard match first occurrence | I have a file that blah I want to match rel="blahblah" but when i do \rel=".*" it matches rel="blahblah" style="textdecoration:none;" I have tried rel=".*\{-\}" but that gives an error nested \{ | You can use: rel=".\{-}" \{-} is used for non-greedy match in VIM | vim search wildcard match first occurrence I have a file that blah I want to match rel="blahblah" but when i do \rel=".*" it matches rel="blahblah" style="textdecoration:none;" I have tried rel=".*\{-\}" but that gives an error nested \{ | TITLE:
vim search wildcard match first occurrence
QUESTION:
I have a file that blah I want to match rel="blahblah" but when i do \rel=".*" it matches rel="blahblah" style="textdecoration:none;" I have tried rel=".*\{-\}" but that gives an error nested \{
ANSWER:
You can use: rel=".\{-}" \{-} is used for non-greedy ma... | [
"regex",
"search",
"vim"
] | 19 | 38 | 21,662 | 4 | 0 | 2011-06-08T19:57:57.020000 | 2011-06-08T20:06:21.227000 |
6,284,468 | 6,284,591 | Change newline character .readline() seeks | Is it possible to change the newline character the.readline() method looks for while reading lines? I might have the need to read a stream from a file object that will be delimited in something other than newlines and it could be handy to get a chunk at a time. file objects don't have a readuntil which I wouldn't have ... | No. Consider creating a generator using file.read() and yielding chunks delimited by given character. Edit: The sample you provided should work just fine. I would prefer to use a generator though: def chunks(file, delim='\n'): buf = bytearray(), while True: c = self.read(1) if c == '': return buf += c if c == delim: yi... | Change newline character .readline() seeks Is it possible to change the newline character the.readline() method looks for while reading lines? I might have the need to read a stream from a file object that will be delimited in something other than newlines and it could be handy to get a chunk at a time. file objects do... | TITLE:
Change newline character .readline() seeks
QUESTION:
Is it possible to change the newline character the.readline() method looks for while reading lines? I might have the need to read a stream from a file object that will be delimited in something other than newlines and it could be handy to get a chunk at a tim... | [
"python",
"input",
"readline"
] | 6 | 6 | 3,484 | 1 | 0 | 2011-06-08T19:58:10.767000 | 2011-06-08T20:07:10.403000 |
6,284,470 | 6,296,892 | Coredata number returns a number of PFCachedNumber class | Like the title says i have a one to many relationship and the many accepts numbers, and it is given an NSNumber, however when i retrieve that number back from coredata it comes in the form of a PFCachedNumber. Any thoughts on why this may be? Thanks! for (UserNumber *info in pinNumberArray) {
//The numbers I'm after a... | I wouldn't worry about it. This is a common occurrence. NSNumber, like most common API classes, is actually a "class cluster" in which a large number of classes masquerade as a single class. For example, if you initialize an NSString as a file path, you actually get back a class dedicated to handling file paths. I have... | Coredata number returns a number of PFCachedNumber class Like the title says i have a one to many relationship and the many accepts numbers, and it is given an NSNumber, however when i retrieve that number back from coredata it comes in the form of a PFCachedNumber. Any thoughts on why this may be? Thanks! for (UserNum... | TITLE:
Coredata number returns a number of PFCachedNumber class
QUESTION:
Like the title says i have a one to many relationship and the many accepts numbers, and it is given an NSNumber, however when i retrieve that number back from coredata it comes in the form of a PFCachedNumber. Any thoughts on why this may be? Th... | [
"iphone",
"objective-c",
"xcode",
"core-data"
] | 1 | 1 | 306 | 1 | 0 | 2011-06-08T19:58:16.430000 | 2011-06-09T17:31:04.670000 |
6,284,478 | 6,284,730 | Preg_grep to find request URI in array of possibilities | I have an array that contains possible request URIs. Some of the array values could contain comma delimited URIs: array( 0 => 'GET /, GET /something', 1 => 'GET /login', 2 => 'GET /user/profile', ) Let's say I want to find the key that contains "GET /something". How can I use preg_grep to do this? Currently, I'm trying... | Rather than having $uri in your string for preg_grep, concat it into a $pattern var first (for ease of reading mostly plus you can echo it and check as the above comment suggested): $uri = 'something'; $pattern = '/(.*)GET \/'.$uri.'(.*)/'; $array = preg_grep($pattern, $starting_array); print_r($array); As to answer yo... | Preg_grep to find request URI in array of possibilities I have an array that contains possible request URIs. Some of the array values could contain comma delimited URIs: array( 0 => 'GET /, GET /something', 1 => 'GET /login', 2 => 'GET /user/profile', ) Let's say I want to find the key that contains "GET /something". H... | TITLE:
Preg_grep to find request URI in array of possibilities
QUESTION:
I have an array that contains possible request URIs. Some of the array values could contain comma delimited URIs: array( 0 => 'GET /, GET /something', 1 => 'GET /login', 2 => 'GET /user/profile', ) Let's say I want to find the key that contains "... | [
"php",
"regex"
] | 1 | 2 | 248 | 4 | 0 | 2011-06-08T19:58:59.437000 | 2011-06-08T20:17:41.883000 |
6,284,485 | 6,284,549 | SQL Ce 4 - How can I run DBCC CHECKIDENT | I want to run DBCC CHECKIDENT on a SqlCe4 database but it wont let me. I need to reset the identity column as its messed up. I think because IDENTITY was turned off, an import of data was done and then IDENTITY turned on again so I guess its out of sync | There is no DBCC CHECKIDENT in SQL CE 4. You need to use ALTER TABLE. ALTER TABLE [MyTable] ALTER COLUMN [IdentityColumn] IDENTITY (999,1). | SQL Ce 4 - How can I run DBCC CHECKIDENT I want to run DBCC CHECKIDENT on a SqlCe4 database but it wont let me. I need to reset the identity column as its messed up. I think because IDENTITY was turned off, an import of data was done and then IDENTITY turned on again so I guess its out of sync | TITLE:
SQL Ce 4 - How can I run DBCC CHECKIDENT
QUESTION:
I want to run DBCC CHECKIDENT on a SqlCe4 database but it wont let me. I need to reset the identity column as its messed up. I think because IDENTITY was turned off, an import of data was done and then IDENTITY turned on again so I guess its out of sync
ANSWER... | [
"sql",
"sql-server",
"sql-server-ce",
"sql-server-ce-4"
] | 0 | 3 | 7,740 | 1 | 0 | 2011-06-08T19:59:31.050000 | 2011-06-08T20:04:10.937000 |
6,284,499 | 6,284,584 | JavaScript colon operator | I am trying to learn JavaScript. After reading this page: What does ':' (colon) do in JavaScript? I tried to replace var store = new dojo.data.ItemFileReadStore({ url: "countries.json" }); with var store = new dojo.data.ItemFileReadStore(); store.url = "countries.json"; It does not work. Can any one please point out th... | That's not a fair comparison, although you're almost there. var store = new dojo.data.ItemFileReadStore({ url: "countries.json" }); //Creates a new store object, passing an anonymous object in with URL // property set to "countries.json" The alternative without the colon operator is: var props={}; props.url="countries.... | JavaScript colon operator I am trying to learn JavaScript. After reading this page: What does ':' (colon) do in JavaScript? I tried to replace var store = new dojo.data.ItemFileReadStore({ url: "countries.json" }); with var store = new dojo.data.ItemFileReadStore(); store.url = "countries.json"; It does not work. Can a... | TITLE:
JavaScript colon operator
QUESTION:
I am trying to learn JavaScript. After reading this page: What does ':' (colon) do in JavaScript? I tried to replace var store = new dojo.data.ItemFileReadStore({ url: "countries.json" }); with var store = new dojo.data.ItemFileReadStore(); store.url = "countries.json"; It do... | [
"javascript"
] | 3 | 9 | 7,138 | 6 | 0 | 2011-06-08T20:00:08.123000 | 2011-06-08T20:06:46.273000 |
6,284,507 | 6,284,580 | Aggregate Initialization Safety in C++ | Suppose I have the following struct: struct sampleData { int x; int y; }; And when used, I want to initialize variables of sampleData type to a known state. sampleData sample = { 1, 2 } Later, I decide that I need additional data stored in my sampleData struct, as follows: struct sampleData { int x; int y; int z; }; It... | Initialising variables that way is only supported with Aggregate Classes. If you add constructor(s) then then problem goes away, but you'll need to change the syntax a little and you lose the ability to store the struct in a union (among other things). struct sampleData { sampleData(int x, int y): x(x), y(y) {} int x; ... | Aggregate Initialization Safety in C++ Suppose I have the following struct: struct sampleData { int x; int y; }; And when used, I want to initialize variables of sampleData type to a known state. sampleData sample = { 1, 2 } Later, I decide that I need additional data stored in my sampleData struct, as follows: struct ... | TITLE:
Aggregate Initialization Safety in C++
QUESTION:
Suppose I have the following struct: struct sampleData { int x; int y; }; And when used, I want to initialize variables of sampleData type to a known state. sampleData sample = { 1, 2 } Later, I decide that I need additional data stored in my sampleData struct, a... | [
"c++",
"ada",
"aggregate-initialization"
] | 8 | 5 | 1,212 | 4 | 0 | 2011-06-08T20:00:20.720000 | 2011-06-08T20:06:34.210000 |
6,284,508 | 6,284,554 | How can I find all the commented lines in the entire solution? | If I search them with ctrl+f, they mix up with the comments, that has 3 bars. I'll appreciate your help | Search for this in Visual Studio with regular expression turned on: (^|[^/])//[^/] | How can I find all the commented lines in the entire solution? If I search them with ctrl+f, they mix up with the comments, that has 3 bars. I'll appreciate your help | TITLE:
How can I find all the commented lines in the entire solution?
QUESTION:
If I search them with ctrl+f, they mix up with the comments, that has 3 bars. I'll appreciate your help
ANSWER:
Search for this in Visual Studio with regular expression turned on: (^|[^/])//[^/] | [
"c#",
"visual-studio"
] | 9 | 20 | 11,107 | 3 | 0 | 2011-06-08T20:00:22.063000 | 2011-06-08T20:04:32.133000 |
6,284,515 | 6,284,551 | Bayesian network implemented in Matlab | Possible Duplicate: Bayesian networks in MATLAB Is there a toolbox in Matlab which implement Bayesian Networks, or Bayesian Inference Problems? | I haven't used any myself, but a quick google search turned up the Bayes Net Toolbox, which seems to be an open source 3rd party toolbox. | Bayesian network implemented in Matlab Possible Duplicate: Bayesian networks in MATLAB Is there a toolbox in Matlab which implement Bayesian Networks, or Bayesian Inference Problems? | TITLE:
Bayesian network implemented in Matlab
QUESTION:
Possible Duplicate: Bayesian networks in MATLAB Is there a toolbox in Matlab which implement Bayesian Networks, or Bayesian Inference Problems?
ANSWER:
I haven't used any myself, but a quick google search turned up the Bayes Net Toolbox, which seems to be an ope... | [
"matlab"
] | 1 | 3 | 3,305 | 2 | 0 | 2011-06-08T20:00:49.097000 | 2011-06-08T20:04:16.423000 |
6,284,518 | 6,284,624 | How to insert a line using sed before a pattern and after a line number? | How to insert a line into a file using sed before a pattern and after a line number? And how to use the same in shell script? This inserts a line before every line with the pattern: sed '/Sysadmin/i \ Linux Scripting' filename.txt And this changes this using line number range: sed '1,$ s/A/a/' So now how to use these b... | You can either write a sed script file and use: sed -f sed.script file1... Or you can use (multiple) -e 'command' options: sed -e '/SysAdmin/i\ Linux Scripting' -e '1,$s/A/a/' file1... If you want to append something after a line, then: sed -e '234a\ Text to insert after line 234' file1... | How to insert a line using sed before a pattern and after a line number? How to insert a line into a file using sed before a pattern and after a line number? And how to use the same in shell script? This inserts a line before every line with the pattern: sed '/Sysadmin/i \ Linux Scripting' filename.txt And this changes... | TITLE:
How to insert a line using sed before a pattern and after a line number?
QUESTION:
How to insert a line into a file using sed before a pattern and after a line number? And how to use the same in shell script? This inserts a line before every line with the pattern: sed '/Sysadmin/i \ Linux Scripting' filename.tx... | [
"shell",
"unix",
"awk",
"sed"
] | 31 | 29 | 50,989 | 5 | 0 | 2011-06-08T20:01:14.600000 | 2011-06-08T20:09:53.507000 |
6,284,536 | 6,284,563 | Grouping two methods together in C# | I currently have two different event handlers in C#, which perform two different functions. Although how could I combine the two methods together, so only 1 button could perform both actions? (Taking into account that button1_Click event must be performed first.) private void button2_Click(object sender, EventArgs e) {... | Instead of writing the code in the event handler, bring them out into two functions and then call those functions whichever way you want from the event handler. | Grouping two methods together in C# I currently have two different event handlers in C#, which perform two different functions. Although how could I combine the two methods together, so only 1 button could perform both actions? (Taking into account that button1_Click event must be performed first.) private void button2... | TITLE:
Grouping two methods together in C#
QUESTION:
I currently have two different event handlers in C#, which perform two different functions. Although how could I combine the two methods together, so only 1 button could perform both actions? (Taking into account that button1_Click event must be performed first.) pr... | [
"c#",
".net",
"windows"
] | 1 | 11 | 1,224 | 5 | 0 | 2011-06-08T20:03:21.077000 | 2011-06-08T20:05:12.803000 |
6,284,540 | 6,284,585 | Is it possible for Hibernate to use a class with no default c'tor as a component or composite-element? | I need to use some legacy classes in Hibernate. One of the classes doesn't have a default constructor so I get a "org.hibernate.InstantiationException: No default constructor for entity:.." error. I do not need to persist this class directly. Here is the mapping: I need to persist the 'Observation' and 'Station', and w... | No, you need a no argument constructor. Hibernate needs a way to create objects. You might be able to create a subclass of this class, and give the subclass the no-arg constructor. | Is it possible for Hibernate to use a class with no default c'tor as a component or composite-element? I need to use some legacy classes in Hibernate. One of the classes doesn't have a default constructor so I get a "org.hibernate.InstantiationException: No default constructor for entity:.." error. I do not need to per... | TITLE:
Is it possible for Hibernate to use a class with no default c'tor as a component or composite-element?
QUESTION:
I need to use some legacy classes in Hibernate. One of the classes doesn't have a default constructor so I get a "org.hibernate.InstantiationException: No default constructor for entity:.." error. I ... | [
"java",
"hibernate",
"hibernate-mapping"
] | 1 | 1 | 3,113 | 3 | 0 | 2011-06-08T20:03:40.047000 | 2011-06-08T20:06:47.003000 |
6,284,544 | 6,287,102 | Expressions from data.frame to ggplot2 legend | I would like to add an expression to a legend entry without entering the legend directly (since I am looping over variables). Essentially I would like this: d <- data.frame(x=1:10,y=1:10,f=rep(c("0–74",">=75"),each=5)) qplot(x,y,data=d,color=f) to output the way this does: qplot(x,y,data=d,color=f) + scale_colour_manua... | I think you can do this within your loop by using parse(text=) to convert a string to the appropriate expression. So you could set scale_colour_manual with the appropriate labels by taking the character strings from your f variable and passing them in a manner something like this (some tweaking may be necessary): scale... | Expressions from data.frame to ggplot2 legend I would like to add an expression to a legend entry without entering the legend directly (since I am looping over variables). Essentially I would like this: d <- data.frame(x=1:10,y=1:10,f=rep(c("0–74",">=75"),each=5)) qplot(x,y,data=d,color=f) to output the way this does: ... | TITLE:
Expressions from data.frame to ggplot2 legend
QUESTION:
I would like to add an expression to a legend entry without entering the legend directly (since I am looping over variables). Essentially I would like this: d <- data.frame(x=1:10,y=1:10,f=rep(c("0–74",">=75"),each=5)) qplot(x,y,data=d,color=f) to output t... | [
"r",
"plot",
"ggplot2"
] | 2 | 2 | 2,560 | 1 | 0 | 2011-06-08T20:03:54.930000 | 2011-06-09T01:21:09.460000 |
6,284,548 | 6,284,593 | Document labelled UTF-16 but has UTF-8 content in Entity PHP error | I recently transferred my site to PHP5.3 from PHP5.2. I had in place an authentication module which was working fine earlier but now gives the error Document labelled UTF-16 but has UTF-8 content in Entity I have tried replacing all occurrences of UTF-8 with UTF-16 but that did not help. What could be the possible solu... | See this: http://forums.devshed.com/php-development-5/document-labelled-utf-16-but-has-utf-8-content-694388.html Solution from this link simply replaces encoding information in the XML code: $xml = $result->GetWeatherResult; $xml = preg_replace('/(<\?xml[^?]+?)utf-16/i', '$1utf-8', $xml); Not a nice solution, but worke... | Document labelled UTF-16 but has UTF-8 content in Entity PHP error I recently transferred my site to PHP5.3 from PHP5.2. I had in place an authentication module which was working fine earlier but now gives the error Document labelled UTF-16 but has UTF-8 content in Entity I have tried replacing all occurrences of UTF-8... | TITLE:
Document labelled UTF-16 but has UTF-8 content in Entity PHP error
QUESTION:
I recently transferred my site to PHP5.3 from PHP5.2. I had in place an authentication module which was working fine earlier but now gives the error Document labelled UTF-16 but has UTF-8 content in Entity I have tried replacing all oc... | [
"php",
"character-encoding"
] | 3 | 8 | 11,416 | 1 | 0 | 2011-06-08T20:04:10.673000 | 2011-06-08T20:07:28.517000 |
6,284,556 | 6,284,575 | Simple problem with MAX in sql | I have the table with rows: ID CountryCode Status ----------- ----------- ----------- 2 PL 1 3 PL 2 4 EN 1 5 EN 1 and by the query SELECT [CountryCode],MAX([Status]) FROM [TestTable] GROUP BY CountryCode,Status I want to get: CountryCode Status ----------- ----------- PL 2 EN 1 but I get: CountryCode Status -----------... | You need to get rid of the group by status. The group by says return a new row for every unique combination of CountryCode and Status, which is not what you want. You can add the where clause to exclude the rows that you don't want to consider in your query. Try: SELECT [CountryCode],MAX([Status]) FROM [TestTable] WHER... | Simple problem with MAX in sql I have the table with rows: ID CountryCode Status ----------- ----------- ----------- 2 PL 1 3 PL 2 4 EN 1 5 EN 1 and by the query SELECT [CountryCode],MAX([Status]) FROM [TestTable] GROUP BY CountryCode,Status I want to get: CountryCode Status ----------- ----------- PL 2 EN 1 but I get:... | TITLE:
Simple problem with MAX in sql
QUESTION:
I have the table with rows: ID CountryCode Status ----------- ----------- ----------- 2 PL 1 3 PL 2 4 EN 1 5 EN 1 and by the query SELECT [CountryCode],MAX([Status]) FROM [TestTable] GROUP BY CountryCode,Status I want to get: CountryCode Status ----------- ----------- PL... | [
"sql",
"sql-server-2005"
] | 0 | 5 | 63 | 4 | 0 | 2011-06-08T20:04:40.030000 | 2011-06-08T20:06:15.580000 |
6,284,560 | 6,284,596 | How to split a variable by a special character | I have value which stores the present resolution, such as: $2 = 1920x1080. I would like to split the value based on the x character and store the result in 2 variables. With the example above, the first variable will store 1920 and the second 1080. I would then like to make the definition for a print command based on t... | awk '{ res=$2 split(res,resArr,"x") print "resX=" resArr[1] "\tresY="resArr[2] }' inFile If I understand your needs correctly. I hope this helps. | How to split a variable by a special character I have value which stores the present resolution, such as: $2 = 1920x1080. I would like to split the value based on the x character and store the result in 2 variables. With the example above, the first variable will store 1920 and the second 1080. I would then like to mak... | TITLE:
How to split a variable by a special character
QUESTION:
I have value which stores the present resolution, such as: $2 = 1920x1080. I would like to split the value based on the x character and store the result in 2 variables. With the example above, the first variable will store 1920 and the second 1080. I woul... | [
"awk"
] | 24 | 27 | 37,126 | 4 | 0 | 2011-06-08T20:04:46.037000 | 2011-06-08T20:07:48.670000 |
6,284,581 | 6,284,690 | jQuery to cycle up and down select list values | This should be really simple with jQuery but I cant get it to work! Cant seem to find anything on searches either... I have a select list, and I want to use + and - buttons next to it (like quantity boxes) to cycle through the list values, so the user does not need to click the dropdown, scroll and select. Effectively ... | Given the following Opion 1 Opion 2 Opion 3 Opion 4 Opion 5 Opion 6 And the script: $("#up").click(function(){ $("select option:selected").next().prop("selected", true); }); $("#down").click(function(){ $("select option:selected").prev().prop("selected", true); }); Note, this relies on jQuery 1.6 and.prop(), if using l... | jQuery to cycle up and down select list values This should be really simple with jQuery but I cant get it to work! Cant seem to find anything on searches either... I have a select list, and I want to use + and - buttons next to it (like quantity boxes) to cycle through the list values, so the user does not need to clic... | TITLE:
jQuery to cycle up and down select list values
QUESTION:
This should be really simple with jQuery but I cant get it to work! Cant seem to find anything on searches either... I have a select list, and I want to use + and - buttons next to it (like quantity boxes) to cycle through the list values, so the user doe... | [
"jquery",
"list",
"select"
] | 2 | 4 | 2,213 | 3 | 0 | 2011-06-08T20:06:34.930000 | 2011-06-08T20:14:46.937000 |
6,284,589 | 6,284,639 | Setting a seed to shuffle ArrayList in Java deterministically | I have a list of integers (currently using cern.colt.list.IntArrayList ). I can call "shuffle()" and randomly shuffle them. I would like to be able to reproduce a shuffle. I can reproduce a series of random numbers by setting a seed. I do not seem to be able to set a seed in this case. What should I do? I am open to ot... | This is possible by using the shuffle method that allows you to provide the backing Random instance: Collections.shuffle(List list, Random rnd): Example: Collections.shuffle(yourList, new Random(somePredefinedSeed)); | Setting a seed to shuffle ArrayList in Java deterministically I have a list of integers (currently using cern.colt.list.IntArrayList ). I can call "shuffle()" and randomly shuffle them. I would like to be able to reproduce a shuffle. I can reproduce a series of random numbers by setting a seed. I do not seem to be able... | TITLE:
Setting a seed to shuffle ArrayList in Java deterministically
QUESTION:
I have a list of integers (currently using cern.colt.list.IntArrayList ). I can call "shuffle()" and randomly shuffle them. I would like to be able to reproduce a shuffle. I can reproduce a series of random numbers by setting a seed. I do n... | [
"java",
"random"
] | 32 | 65 | 19,300 | 3 | 0 | 2011-06-08T20:07:04.180000 | 2011-06-08T20:11:16.503000 |
6,284,592 | 6,284,697 | help me edit this jquery | I have a jQ: $(function() { if($('span').css('color')=='rgb(250, 0, 0)' || $('span').css('color')=='#fa0000') { $('span').before('hello '); } }); it work with this html: Ann but it do not work with: Ann | When you are calling.css('color'), it's only getting the color of the 1st span. You want to check the color of each span. Try this: $('span').each(function() { var $this = $(this); var color = $this.css('color'); if (color == 'rgb(250, 0, 0)' || color == '#fa0000') { $this.before('hello '); } }) Demo: http://jsfiddle.n... | help me edit this jquery I have a jQ: $(function() { if($('span').css('color')=='rgb(250, 0, 0)' || $('span').css('color')=='#fa0000') { $('span').before('hello '); } }); it work with this html: Ann but it do not work with: Ann | TITLE:
help me edit this jquery
QUESTION:
I have a jQ: $(function() { if($('span').css('color')=='rgb(250, 0, 0)' || $('span').css('color')=='#fa0000') { $('span').before('hello '); } }); it work with this html: Ann but it do not work with: Ann
ANSWER:
When you are calling.css('color'), it's only getting the color of... | [
"jquery"
] | 0 | 1 | 77 | 4 | 0 | 2011-06-08T20:04:37.563000 | 2011-06-08T20:15:23.340000 |
6,284,599 | 6,287,412 | Locking the Fields in MFMailComposeViewController | Is it possible to somehow lock the fields in an MFMailComposeViewController so that the body, recipients etc cannot be changed by the user? I need the e-mail the user sends to go to a particular account and the body to meet certain criteria so if the user drastically edits the format everything could go horribly wrong.... | Download the framework from the link below. Then I have put together some code that sends the email with a nice "please wait" overlay. I have attached an image of what this looks like while its running (for the few seconds it takes). Please note, I take no credit for creating the SMTP framework. It was downloaded from ... | Locking the Fields in MFMailComposeViewController Is it possible to somehow lock the fields in an MFMailComposeViewController so that the body, recipients etc cannot be changed by the user? I need the e-mail the user sends to go to a particular account and the body to meet certain criteria so if the user drastically ed... | TITLE:
Locking the Fields in MFMailComposeViewController
QUESTION:
Is it possible to somehow lock the fields in an MFMailComposeViewController so that the body, recipients etc cannot be changed by the user? I need the e-mail the user sends to go to a particular account and the body to meet certain criteria so if the u... | [
"iphone",
"ios",
"email",
"locking",
"mfmailcomposeviewcontroller"
] | 23 | 43 | 19,525 | 1 | 0 | 2011-06-08T20:07:57.597000 | 2011-06-09T02:21:08.953000 |
6,284,602 | 6,284,701 | Sessions in my web app are mixing | I have web app, and this is scenario User is logging in. Data is loaded from db added to Object (e.g) class UserData { public string Name { get; set; } } and instance of this object is added into session, when user from another computer log in then his session is also applied to first user session. I know this because ... | There will probably be the need for more information. Check if you do not store this user data in a static object. This object might be shared across sessions. Do you see the first or the second/last person's name (in the order of logging in) on your screen? This might also be a case of output caching. Do you know how ... | Sessions in my web app are mixing I have web app, and this is scenario User is logging in. Data is loaded from db added to Object (e.g) class UserData { public string Name { get; set; } } and instance of this object is added into session, when user from another computer log in then his session is also applied to first ... | TITLE:
Sessions in my web app are mixing
QUESTION:
I have web app, and this is scenario User is logging in. Data is loaded from db added to Object (e.g) class UserData { public string Name { get; set; } } and instance of this object is added into session, when user from another computer log in then his session is also... | [
"c#",
"asp.net",
"authentication"
] | 1 | 2 | 634 | 2 | 0 | 2011-06-08T20:08:17.170000 | 2011-06-08T20:15:33.653000 |
6,284,605 | 6,284,734 | Image link not to download the image | How to make an image link not to download the image but to show it on the browser? If you go to twitter and click on a user's photo it will redirect you to the photo and it seems to be a simple link. In my case-Google Chrome and firefox are downloading the image. Is this has to do with the IIS or just the browsers? Any... | Forced downloads are caused by HTTP response codes. for example if you have Content-Disposition header set it will force download. You have to check the settings in your IIS. | Image link not to download the image How to make an image link not to download the image but to show it on the browser? If you go to twitter and click on a user's photo it will redirect you to the photo and it seems to be a simple link. In my case-Google Chrome and firefox are downloading the image. Is this has to do w... | TITLE:
Image link not to download the image
QUESTION:
How to make an image link not to download the image but to show it on the browser? If you go to twitter and click on a user's photo it will redirect you to the photo and it seems to be a simple link. In my case-Google Chrome and firefox are downloading the image. I... | [
"html",
"twitter",
"hyperlink"
] | 1 | 0 | 337 | 1 | 0 | 2011-06-08T20:08:29.450000 | 2011-06-08T20:17:57.083000 |
6,284,611 | 6,284,756 | Adding PNG and color to background | I have LinearLayout, and I have png that I used as tiles - but i want also that the color behind it will be white. Is that possible? My code is: and the drawable is: I dont know where to put #fff Thanks | You can also create a composite drawable by doing: drawable/composite.xml: And for your color, you can create a shape drawable: | Adding PNG and color to background I have LinearLayout, and I have png that I used as tiles - but i want also that the color behind it will be white. Is that possible? My code is: and the drawable is: I dont know where to put #fff Thanks | TITLE:
Adding PNG and color to background
QUESTION:
I have LinearLayout, and I have png that I used as tiles - but i want also that the color behind it will be white. Is that possible? My code is: and the drawable is: I dont know where to put #fff Thanks
ANSWER:
You can also create a composite drawable by doing: draw... | [
"android"
] | 3 | 6 | 2,580 | 2 | 0 | 2011-06-08T20:09:04.943000 | 2011-06-08T20:20:17.280000 |
6,284,641 | 6,284,668 | g++ Compile error: missing ';' | I am trying to run this code tResults = itos(Freq)+"\t"dtos(maxTemp)+"\t"+dtos(xB * FP.parU[1])+"\t"+dtos(xH * FP.parI[1])+"\t"+dtos(FP.parI[1]);
string MaxResults::itos(int i) { stringstream s; s << i; return s.str(); }
string MaxResults::dtos(double i) { stringstream s; s << i; return s.str(); } and when I try to c... | tResults = itos(Freq)+"\t"dtos(maxTemp) Missing a plus between the tab and dtos(maxTemp)... | g++ Compile error: missing ';' I am trying to run this code tResults = itos(Freq)+"\t"dtos(maxTemp)+"\t"+dtos(xB * FP.parU[1])+"\t"+dtos(xH * FP.parI[1])+"\t"+dtos(FP.parI[1]);
string MaxResults::itos(int i) { stringstream s; s << i; return s.str(); }
string MaxResults::dtos(double i) { stringstream s; s << i; return... | TITLE:
g++ Compile error: missing ';'
QUESTION:
I am trying to run this code tResults = itos(Freq)+"\t"dtos(maxTemp)+"\t"+dtos(xB * FP.parU[1])+"\t"+dtos(xH * FP.parI[1])+"\t"+dtos(FP.parI[1]);
string MaxResults::itos(int i) { stringstream s; s << i; return s.str(); }
string MaxResults::dtos(double i) { stringstream... | [
"g++",
"compiler-errors",
"sstream"
] | 0 | 4 | 221 | 4 | 0 | 2011-06-08T20:11:19.357000 | 2011-06-08T20:13:16.873000 |
6,284,673 | 6,284,706 | Read all registry keys in subfolder WSH | I am trying to read all the registry keys below this path: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ Under that folder there are a list of GUIDs that I want to get Edit - I cannot use.Net Thanks. | You can use the REG.exe QUERY command and capture the results (see this page: http://www.rgagnon.com/wshdetails/wsh-0017.html ) reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Read all registry keys in subfolder WSH I am trying to read all the registry keys below this path: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ Under that folder there are a list of GUIDs that I want to get Edit - I cannot use.Net Thanks. | TITLE:
Read all registry keys in subfolder WSH
QUESTION:
I am trying to read all the registry keys below this path: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ Under that folder there are a list of GUIDs that I want to get Edit - I cannot use.Net Thanks.
ANSWER:
You can use the REG.exe QUERY command and... | [
"javascript",
"windows",
"vbscript",
"registry"
] | 0 | 1 | 1,204 | 1 | 0 | 2011-06-08T20:13:29.603000 | 2011-06-08T20:16:06.937000 |
6,284,680 | 6,284,764 | listener functions created in an addFrameScript not acting as closures? | For reference, here's a question I asked earlier today regarding this same project: Reference objects on stage/frame from document class addFrameScript seems to do what I need it to, except for one thing. In the function I'm passing to be added as a frame script, I want to dynamically create some event listeners for bu... | No, scoping in added frame scripts behave exactly like scoping everywhere else in AS3. Flash late-binds variables, but you're trying to access them as though they're early-bound inside your listener. Oddly enough, I just answered this same question earlier today here: How do you bind a variable to a function in as3 For... | listener functions created in an addFrameScript not acting as closures? For reference, here's a question I asked earlier today regarding this same project: Reference objects on stage/frame from document class addFrameScript seems to do what I need it to, except for one thing. In the function I'm passing to be added as ... | TITLE:
listener functions created in an addFrameScript not acting as closures?
QUESTION:
For reference, here's a question I asked earlier today regarding this same project: Reference objects on stage/frame from document class addFrameScript seems to do what I need it to, except for one thing. In the function I'm passi... | [
"flash",
"actionscript-3"
] | 0 | 2 | 379 | 1 | 0 | 2011-06-08T20:13:57.593000 | 2011-06-08T20:20:40.923000 |
6,286,675 | 6,286,685 | What are the possible issues when running a PHP script for a long time | I am developing a PHP web application for photographers. A normal process would be a photographer uploads a folder of approx 1000 High res images by FTP and then clicks a button in the browser. At this point my script is triggered which resizes the image into 3 sizes. Currently on my localhost this process is taking ab... | If you're using GD to resize images - then it is a time to move to imagemagick. | What are the possible issues when running a PHP script for a long time I am developing a PHP web application for photographers. A normal process would be a photographer uploads a folder of approx 1000 High res images by FTP and then clicks a button in the browser. At this point my script is triggered which resizes the ... | TITLE:
What are the possible issues when running a PHP script for a long time
QUESTION:
I am developing a PHP web application for photographers. A normal process would be a photographer uploads a folder of approx 1000 High res images by FTP and then clicks a button in the browser. At this point my script is triggered ... | [
"php",
"memory",
"time",
"ini"
] | 2 | 4 | 166 | 1 | 0 | 2011-06-09T00:03:18.420000 | 2011-06-09T00:05:26.780000 |
6,286,682 | 6,286,957 | Tumblr SDK(or Sharekit) for Android, does it exist? | I need to integrate Tumblr to my Android app, is there any official(I could not find) or 3rd party SDK available? Thanks! edit: I found ShareKit is a good tool for sharing purpose on iOS, is there any equivalent in Android? | The standard way to enable sharing in an Android app is to use the ACTION_SEND intent. This will let the user share the content to any compatible app they may have installed. | Tumblr SDK(or Sharekit) for Android, does it exist? I need to integrate Tumblr to my Android app, is there any official(I could not find) or 3rd party SDK available? Thanks! edit: I found ShareKit is a good tool for sharing purpose on iOS, is there any equivalent in Android? | TITLE:
Tumblr SDK(or Sharekit) for Android, does it exist?
QUESTION:
I need to integrate Tumblr to my Android app, is there any official(I could not find) or 3rd party SDK available? Thanks! edit: I found ShareKit is a good tool for sharing purpose on iOS, is there any equivalent in Android?
ANSWER:
The standard way ... | [
"android",
"sdk",
"tumblr"
] | 4 | 1 | 3,319 | 3 | 0 | 2011-06-09T00:04:55.913000 | 2011-06-09T00:51:07.747000 |
6,286,690 | 6,286,734 | Instantiating exception for a service class and a broadcast class | Has been struggling on this for a week I have two classes WiFiScanReceiver which extends BroadcastReceiver, WiFiNewClass which extends Service. WifiScanReceiver runs WifiNewclass as a service. And the WifiNewclass has the following code public class WiFiNewClass extends Service{ private static final String TAG = "WiFiS... | I think your problem is your constructor: public WiFiNewClass(Wifiscan wifiDemo) { super(); this.wifiDemo = wifiDemo; } How is the framework going to pass in a Wifiscan object? Try removing it and see if it starts up then. | Instantiating exception for a service class and a broadcast class Has been struggling on this for a week I have two classes WiFiScanReceiver which extends BroadcastReceiver, WiFiNewClass which extends Service. WifiScanReceiver runs WifiNewclass as a service. And the WifiNewclass has the following code public class WiFi... | TITLE:
Instantiating exception for a service class and a broadcast class
QUESTION:
Has been struggling on this for a week I have two classes WiFiScanReceiver which extends BroadcastReceiver, WiFiNewClass which extends Service. WifiScanReceiver runs WifiNewclass as a service. And the WifiNewclass has the following code... | [
"android"
] | 1 | 1 | 336 | 1 | 0 | 2011-06-09T00:07:00.383000 | 2011-06-09T00:13:39.470000 |
6,286,697 | 6,286,738 | HTML <br/> tag breaks <code> segments? | I have an HTML page with some segments, and I have given them these attributes in an external CSS folder: code {
background-color: f5f5ff; border-color: 7f7fbf; border-style: dashed; border-width: 1px; font-family: courier new; margin-left: 128px; padding: 14px; } Whenever I put a in my code segments, the code seems t... | You are better off not adding and using white-space: pre and display: block on the code element. code { display: block; white-space: pre; } jsFiddle. | HTML <br/> tag breaks <code> segments? I have an HTML page with some segments, and I have given them these attributes in an external CSS folder: code {
background-color: f5f5ff; border-color: 7f7fbf; border-style: dashed; border-width: 1px; font-family: courier new; margin-left: 128px; padding: 14px; } Whenever I put ... | TITLE:
HTML <br/> tag breaks <code> segments?
QUESTION:
I have an HTML page with some segments, and I have given them these attributes in an external CSS folder: code {
background-color: f5f5ff; border-color: 7f7fbf; border-style: dashed; border-width: 1px; font-family: courier new; margin-left: 128px; padding: 14px;... | [
"html",
"css"
] | 3 | 1 | 2,026 | 4 | 0 | 2011-06-09T00:08:11.490000 | 2011-06-09T00:14:06.187000 |
6,286,702 | 6,310,281 | Java Concurrency - Better Design approach to manage thread life cycle (start/stop) | I'm designing a concurrent Java application that reads data from various medical devices available on the hospital Intranet. I've read "Java concurrency in practice - Brian Goetz..." to understand how to do stuff, but I think I'm still missing something. Here's a quick simple diagram of what I'm trying to do and there'... | Rob's comment got me thinking about a possible alternative solution. You can utilize an ExecutorService in which a start would submit to said service. When the runnable completes and pause or stop were not selected then the callable will re submit itself to the service. So you will now effectively have only a pre deter... | Java Concurrency - Better Design approach to manage thread life cycle (start/stop) I'm designing a concurrent Java application that reads data from various medical devices available on the hospital Intranet. I've read "Java concurrency in practice - Brian Goetz..." to understand how to do stuff, but I think I'm still m... | TITLE:
Java Concurrency - Better Design approach to manage thread life cycle (start/stop)
QUESTION:
I'm designing a concurrent Java application that reads data from various medical devices available on the hospital Intranet. I've read "Java concurrency in practice - Brian Goetz..." to understand how to do stuff, but I... | [
"java",
"concurrency"
] | 2 | 1 | 2,053 | 4 | 0 | 2011-06-09T00:09:08.857000 | 2011-06-10T17:56:39.283000 |
6,286,710 | 6,286,728 | How to to poll a server that updates every 1 second? | I have a server at http://foobar that returns a JSON object containing information about things that happened in the past second, e.g., something like { time: 2011-06-08 05:07:33, total: 235324, average: 1233 } What's the best way to poll this server so that I get every update? I'm guessing I don't want to just poll th... | If you need to get every update, the server should be pushing the updates to you instead of going the other direction. For example, you should look into setting up a stream between the client and server so that the server can send event notifications to the client. | How to to poll a server that updates every 1 second? I have a server at http://foobar that returns a JSON object containing information about things that happened in the past second, e.g., something like { time: 2011-06-08 05:07:33, total: 235324, average: 1233 } What's the best way to poll this server so that I get ev... | TITLE:
How to to poll a server that updates every 1 second?
QUESTION:
I have a server at http://foobar that returns a JSON object containing information about things that happened in the past second, e.g., something like { time: 2011-06-08 05:07:33, total: 235324, average: 1233 } What's the best way to poll this serve... | [
"java",
"real-time"
] | 1 | 4 | 1,671 | 2 | 0 | 2011-06-09T00:10:00.780000 | 2011-06-09T00:12:41.077000 |
6,286,724 | 6,286,761 | Pre-loaded iFrame Content | I'm using an iframe in my page to display an embedded video. The issue I have is that I already have the embed code I need, and can I render it directly into the iframe when I load the full page. However, the iframe always seems to attempt to load a src attribute. I'd like the iframe to keep the content I provide in it... | var stuff = " I already know this is the iframe content I want. "; document.getElementById('iframe').contentDocument.body.innerHTML = stuff; http://jsfiddle.net/EcusH/ | Pre-loaded iFrame Content I'm using an iframe in my page to display an embedded video. The issue I have is that I already have the embed code I need, and can I render it directly into the iframe when I load the full page. However, the iframe always seems to attempt to load a src attribute. I'd like the iframe to keep t... | TITLE:
Pre-loaded iFrame Content
QUESTION:
I'm using an iframe in my page to display an embedded video. The issue I have is that I already have the embed code I need, and can I render it directly into the iframe when I load the full page. However, the iframe always seems to attempt to load a src attribute. I'd like th... | [
"html",
"iframe"
] | 1 | 1 | 2,137 | 2 | 0 | 2011-06-09T00:11:40.900000 | 2011-06-09T00:18:35.543000 |
6,286,732 | 6,286,754 | java.lang.NullPointerException when writing byte array | I am trying this code in java: try { String url = "http://url.com/file.ext"; InputStream myInputStream = getClass().getResourceAsStream(url); ByteArrayOutputStream myByteArrayOutputStream = new ByteArrayOutputStream(); byte[] arrayOfByte = new byte[1024]; int i; while ((i = myInputStream.read(arrayOfByte))!= -1) { myBy... | Actually taking a second look, your InputStream myInputStream = getClass().getResourceAsStream(url); Doesn't make sense, instead use Url url = new Url("http://url.com/file.ext"); UrlConnection urlCon = url.openConnection(); InputStream input = urlCon.getInputStream(); That should grab the bytes correctly | java.lang.NullPointerException when writing byte array I am trying this code in java: try { String url = "http://url.com/file.ext"; InputStream myInputStream = getClass().getResourceAsStream(url); ByteArrayOutputStream myByteArrayOutputStream = new ByteArrayOutputStream(); byte[] arrayOfByte = new byte[1024]; int i; wh... | TITLE:
java.lang.NullPointerException when writing byte array
QUESTION:
I am trying this code in java: try { String url = "http://url.com/file.ext"; InputStream myInputStream = getClass().getResourceAsStream(url); ByteArrayOutputStream myByteArrayOutputStream = new ByteArrayOutputStream(); byte[] arrayOfByte = new byt... | [
"java",
"exception",
"byte",
"arrays"
] | 0 | 3 | 3,252 | 2 | 0 | 2011-06-09T00:13:20.287000 | 2011-06-09T00:17:36.527000 |
6,286,733 | 6,286,779 | Automatic line break in js SyntaxHighlighter | Im using the js SyntaxHighlighter 3.0.83 from http://alexgorbatchev.com/SyntaxHighlighter/ I've been googling the entire world now it seem but cant really find how to enable line breaks. Instad i get a horizontal scrollbar, which is good sometimes but not in my scenario. In example Anyone out there who know the way aro... | I don't actually use SyntaxHighlight, but it seems to be possible to attach an white-space: pre-wrap CSS style to the or CSS:.syntaxhighlight { white-space: pre-wrap; } | Automatic line break in js SyntaxHighlighter Im using the js SyntaxHighlighter 3.0.83 from http://alexgorbatchev.com/SyntaxHighlighter/ I've been googling the entire world now it seem but cant really find how to enable line breaks. Instad i get a horizontal scrollbar, which is good sometimes but not in my scenario. In ... | TITLE:
Automatic line break in js SyntaxHighlighter
QUESTION:
Im using the js SyntaxHighlighter 3.0.83 from http://alexgorbatchev.com/SyntaxHighlighter/ I've been googling the entire world now it seem but cant really find how to enable line breaks. Instad i get a horizontal scrollbar, which is good sometimes but not i... | [
"javascript",
"syntaxhighlighter"
] | 15 | 10 | 10,711 | 2 | 0 | 2011-06-09T00:13:32.043000 | 2011-06-09T00:21:02.017000 |
6,286,744 | 6,287,048 | Would it be possible to partially shutdown an OS, then boot back up to functioning state? | I read through this very interesting q/a about how computers reboot, and although I do not know much at all about OS development, I was wondering if you could partially shut down the system, then boot back up from that point on. For example, on Linux, if I read the output correctly during a shutdown, it goes a bit like... | Focusing on Linux here: "Rebooting" userspace (and some hardware parts) You're missing something from your boot sequence in terms of how those services, daemons and programs are started. Enter init on Linux. The purpose of /sbin/init, which could be system V init, upstart or systemd, is exactly launching all of these o... | Would it be possible to partially shutdown an OS, then boot back up to functioning state? I read through this very interesting q/a about how computers reboot, and although I do not know much at all about OS development, I was wondering if you could partially shut down the system, then boot back up from that point on. F... | TITLE:
Would it be possible to partially shutdown an OS, then boot back up to functioning state?
QUESTION:
I read through this very interesting q/a about how computers reboot, and although I do not know much at all about OS development, I was wondering if you could partially shut down the system, then boot back up fro... | [
"operating-system",
"kernel",
"boot"
] | 0 | 3 | 132 | 2 | 0 | 2011-06-09T00:15:33.287000 | 2011-06-09T01:06:59.747000 |
6,286,747 | 6,286,766 | Timezone issue in .NET | I'm on the east coast so my timezone is Eastern Standard Time which has an offset of -05:00:00. But I noticied when calling methods like DateTimeOffset.UtcNow and DateTime.Now.ToUniversalTime() it's only claiming that I have an offset of -04:00:00. DateTime.Now // 6/8/2011 8:08:26 PM
DateTime.UtcNow // 6/9/2011 12:08:... | Might have something to do with it being summer. Aren't you on Eastern Daylight Time now? That's UTC minus 4. | Timezone issue in .NET I'm on the east coast so my timezone is Eastern Standard Time which has an offset of -05:00:00. But I noticied when calling methods like DateTimeOffset.UtcNow and DateTime.Now.ToUniversalTime() it's only claiming that I have an offset of -04:00:00. DateTime.Now // 6/8/2011 8:08:26 PM
DateTime.Ut... | TITLE:
Timezone issue in .NET
QUESTION:
I'm on the east coast so my timezone is Eastern Standard Time which has an offset of -05:00:00. But I noticied when calling methods like DateTimeOffset.UtcNow and DateTime.Now.ToUniversalTime() it's only claiming that I have an offset of -04:00:00. DateTime.Now // 6/8/2011 8:08:... | [
"c#",
"datetime",
".net-4.0",
"timezone"
] | 1 | 8 | 351 | 2 | 0 | 2011-06-09T00:15:43.647000 | 2011-06-09T00:20:01.840000 |
6,286,753 | 6,286,782 | MySQL insert query with missing not null fields | I currently trying to use an Object Relational Mapper for CodeIgniter and I'm experiencing something I did not expect. I have a table with a couple of fields, some of which are NOT NULL. An insert query is which is missing of the NOT NULL fields is generated -- a new row is added but with blanks for those fields. I did... | Empty string is not the same thing as NULL. Perhaps ORM inserts just '' for those fields. | MySQL insert query with missing not null fields I currently trying to use an Object Relational Mapper for CodeIgniter and I'm experiencing something I did not expect. I have a table with a couple of fields, some of which are NOT NULL. An insert query is which is missing of the NOT NULL fields is generated -- a new row ... | TITLE:
MySQL insert query with missing not null fields
QUESTION:
I currently trying to use an Object Relational Mapper for CodeIgniter and I'm experiencing something I did not expect. I have a table with a couple of fields, some of which are NOT NULL. An insert query is which is missing of the NOT NULL fields is gener... | [
"mysql",
"sql",
"codeigniter",
"insert"
] | 0 | 3 | 4,343 | 3 | 0 | 2011-06-09T00:17:35.403000 | 2011-06-09T00:21:59.580000 |
6,286,762 | 6,286,784 | Show text or image if MySQL returns certain string | What would I do if I wanted my PHP script to show some text or an image if the value of 'count' from a user equals 11? Example, In the URL I have count.php?ID=(ID) and the page displays their ID and their current count. I would like an image or some text to display if their 'count' equals 11. If you could help in any w... | $toPrint = ($row["count"] == 11)? " ": $row["count"]; echo $toPrint; | Show text or image if MySQL returns certain string What would I do if I wanted my PHP script to show some text or an image if the value of 'count' from a user equals 11? Example, In the URL I have count.php?ID=(ID) and the page displays their ID and their current count. I would like an image or some text to display if ... | TITLE:
Show text or image if MySQL returns certain string
QUESTION:
What would I do if I wanted my PHP script to show some text or an image if the value of 'count' from a user equals 11? Example, In the URL I have count.php?ID=(ID) and the page displays their ID and their current count. I would like an image or some t... | [
"php",
"mysql"
] | 0 | 0 | 568 | 2 | 0 | 2011-06-09T00:18:41.737000 | 2011-06-09T00:22:09.353000 |
6,286,764 | 6,286,835 | Get A Computer's Dynamic Public IP Address | I've managed to get my static IP Address and some other mac addresses. Using this code: IPAddress[] addr = Dns.GetHostEntry( Dns.GetHostName() ).AddressList; string dynamicip = addr[addr.Length - 3].ToString(); Any idea how to get the dynamic public address like the one on the site whatismyip.com? | I think this is probably the question that you're asking: How to get the IP address of the server on which my C# application is running on? | Get A Computer's Dynamic Public IP Address I've managed to get my static IP Address and some other mac addresses. Using this code: IPAddress[] addr = Dns.GetHostEntry( Dns.GetHostName() ).AddressList; string dynamicip = addr[addr.Length - 3].ToString(); Any idea how to get the dynamic public address like the one on the... | TITLE:
Get A Computer's Dynamic Public IP Address
QUESTION:
I've managed to get my static IP Address and some other mac addresses. Using this code: IPAddress[] addr = Dns.GetHostEntry( Dns.GetHostName() ).AddressList; string dynamicip = addr[addr.Length - 3].ToString(); Any idea how to get the dynamic public address l... | [
"c#",
"winforms",
"dns",
"ip"
] | 0 | 0 | 8,935 | 3 | 0 | 2011-06-09T00:19:54.340000 | 2011-06-09T00:31:43.697000 |
6,286,771 | 6,287,043 | Match whole word (Visual Studio style) | I am trying to add Match Whole Word search to my small application. I want it to do the same thing that Visual Studio is doing. So for example, below code should work fine: public partial class MainWindow: Window { public MainWindow() { InitializeComponent();
String input = "[ abc() *abc ]";
Match(input, "abc", 2); M... | The \b metacharacter matches on a word-boundary between an alphanumeric and non-alphanumeric character. The strings that end with non-alphanumeric characters end up failing to match since \b is working as expected. To perform a proper whole word match that supports both types of data you need to: use \b before or after... | Match whole word (Visual Studio style) I am trying to add Match Whole Word search to my small application. I want it to do the same thing that Visual Studio is doing. So for example, below code should work fine: public partial class MainWindow: Window { public MainWindow() { InitializeComponent();
String input = "[ ab... | TITLE:
Match whole word (Visual Studio style)
QUESTION:
I am trying to add Match Whole Word search to my small application. I want it to do the same thing that Visual Studio is doing. So for example, below code should work fine: public partial class MainWindow: Window { public MainWindow() { InitializeComponent();
St... | [
"regex"
] | 3 | 4 | 1,739 | 3 | 0 | 2011-06-09T00:20:18.140000 | 2011-06-09T01:06:21.010000 |
6,286,804 | 6,286,857 | PHP Directory structure in source code where to put AJAX code | I have accumulated a few AJAX scrips and they are a bit spread out within my directory structure. Usually I just have the JavaScript call them and the scripts are named like "xyz_ajax.php" I am trying to make things more organized. What is the best place to put these scripts within the source directory structure? And w... | Because this is a matter of taste, you can do it however you want. The way I have done it is create a single AJAX handler file, which is a front-facing web file that all AJAX requests are sent through. Based on the type of request, it will serve the right data. If you have many files, keep them in a single folder somew... | PHP Directory structure in source code where to put AJAX code I have accumulated a few AJAX scrips and they are a bit spread out within my directory structure. Usually I just have the JavaScript call them and the scripts are named like "xyz_ajax.php" I am trying to make things more organized. What is the best place to ... | TITLE:
PHP Directory structure in source code where to put AJAX code
QUESTION:
I have accumulated a few AJAX scrips and they are a bit spread out within my directory structure. Usually I just have the JavaScript call them and the scripts are named like "xyz_ajax.php" I am trying to make things more organized. What is ... | [
"php",
"javascript",
"ajax"
] | 0 | 3 | 1,095 | 2 | 0 | 2011-06-09T00:26:06.923000 | 2011-06-09T00:34:01.650000 |
6,286,818 | 6,286,820 | How do I use escape_javascript with Rails 3.0.8 and beyond? | This is fixed in Rails 3.0.9 now. raw() is no longer necessary. If you’re using js views and partial html replacements, Rails 3.0.8 is totally broken. Right after the 3.0.8 release, 3.0.9rc1 was released which partially addresses the problem. | After upgrading, you have to wrap every escape_javascript call with raw() if you want your javascript to replace HTML. This was absolutely not the case with 3.0.7. So, escape_javascript(' ') becomes raw(escape_javascript(' ')). | How do I use escape_javascript with Rails 3.0.8 and beyond? This is fixed in Rails 3.0.9 now. raw() is no longer necessary. If you’re using js views and partial html replacements, Rails 3.0.8 is totally broken. Right after the 3.0.8 release, 3.0.9rc1 was released which partially addresses the problem. | TITLE:
How do I use escape_javascript with Rails 3.0.8 and beyond?
QUESTION:
This is fixed in Rails 3.0.9 now. raw() is no longer necessary. If you’re using js views and partial html replacements, Rails 3.0.8 is totally broken. Right after the 3.0.8 release, 3.0.9rc1 was released which partially addresses the problem.... | [
"ruby-on-rails"
] | 1 | 3 | 838 | 2 | 0 | 2011-06-09T00:29:41.773000 | 2011-06-09T00:29:59.230000 |
6,286,826 | 6,286,985 | Django: class views, generic views, etc | I'm coming back to Django after a brief encounter with version 1.2, and now in version 1.3 the favored approach to views seems to be using classes. Keeping in mind code style, maintainability and modularity: when should I use classes, and when functions? Should I always extend from generic class views (there seems to b... | There are in my opinion two cases for necessity of class-based(-generic)-views: You really need generic functionality in your views and a little bit extra. You write a resusable Django app and want to make it possible that others can extend your views. For anything else use what you feel most comfortable with. As you s... | Django: class views, generic views, etc I'm coming back to Django after a brief encounter with version 1.2, and now in version 1.3 the favored approach to views seems to be using classes. Keeping in mind code style, maintainability and modularity: when should I use classes, and when functions? Should I always extend fr... | TITLE:
Django: class views, generic views, etc
QUESTION:
I'm coming back to Django after a brief encounter with version 1.2, and now in version 1.3 the favored approach to views seems to be using classes. Keeping in mind code style, maintainability and modularity: when should I use classes, and when functions? Should ... | [
"python",
"django"
] | 5 | 4 | 754 | 2 | 0 | 2011-06-09T00:30:43.400000 | 2011-06-09T00:55:28.643000 |
6,286,832 | 6,286,887 | Doubles in MySQL Query | I'm trying to make it so I can find people with a certain zipcode but list the results by their full name in ASC order under the users table... SELECT profiles.id FROM `profiles`,`users` WHERE profiles.zipcode = '$ZIPCODE' ORDER BY users.full_name ASC It like shows doubles. | You need a join I think, try something like SELECT Users.full_name FROM Users INNER JOIN profiles ON profiles.user_id = users.id WHERE profiles.zipcode = '$ZIPCODE' ORDER BY users.full_name ASC I assume there is a foreign key for users in the profiles table? The answer assumes a foreign key of user_id in the profiles t... | Doubles in MySQL Query I'm trying to make it so I can find people with a certain zipcode but list the results by their full name in ASC order under the users table... SELECT profiles.id FROM `profiles`,`users` WHERE profiles.zipcode = '$ZIPCODE' ORDER BY users.full_name ASC It like shows doubles. | TITLE:
Doubles in MySQL Query
QUESTION:
I'm trying to make it so I can find people with a certain zipcode but list the results by their full name in ASC order under the users table... SELECT profiles.id FROM `profiles`,`users` WHERE profiles.zipcode = '$ZIPCODE' ORDER BY users.full_name ASC It like shows doubles.
ANS... | [
"mysql",
"sql"
] | 0 | 2 | 101 | 3 | 0 | 2011-06-09T00:31:35.483000 | 2011-06-09T00:38:58.823000 |
6,286,838 | 6,286,944 | Implement time-based quotas in python | I need to implement a time-based quota in my python (twisted) application. Is there an existing module, or other implementation that I should use as a reference? Specifically, my application needs to ratelimit connections from clients, using rules like '10 connections per minute'. There is a Google App Engine module na... | I'm not aware of any ready-made component, but it should be fairly simple to do this. I would probably use a database table, containing two columns: user ID and timestamp. Each time a user (IP address?) wants a connection, you find all the entries with that user ID with a timestamp between now and 60 seconds ago. If it... | Implement time-based quotas in python I need to implement a time-based quota in my python (twisted) application. Is there an existing module, or other implementation that I should use as a reference? Specifically, my application needs to ratelimit connections from clients, using rules like '10 connections per minute'. ... | TITLE:
Implement time-based quotas in python
QUESTION:
I need to implement a time-based quota in my python (twisted) application. Is there an existing module, or other implementation that I should use as a reference? Specifically, my application needs to ratelimit connections from clients, using rules like '10 connect... | [
"python",
"quota"
] | 2 | 1 | 288 | 1 | 0 | 2011-06-09T00:31:57.093000 | 2011-06-09T00:47:35.030000 |
6,286,853 | 6,286,898 | Comparing objects | I have a form that let user enter values about address information. I want to compare the values I get from user, with information stored into ADDRESS table in the database. I have an entity class public class Address { private String gevernate; private int homeNo; private String neighborhood; private String street; } ... | add an equals method to the class like this: public class Address { private String gevernate; private int homeNo; private String neighborhood; private String street;
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass()!= obj.getClass()) return false; Address o... | Comparing objects I have a form that let user enter values about address information. I want to compare the values I get from user, with information stored into ADDRESS table in the database. I have an entity class public class Address { private String gevernate; private int homeNo; private String neighborhood; private... | TITLE:
Comparing objects
QUESTION:
I have a form that let user enter values about address information. I want to compare the values I get from user, with information stored into ADDRESS table in the database. I have an entity class public class Address { private String gevernate; private int homeNo; private String nei... | [
"java",
"compare"
] | 0 | 1 | 378 | 4 | 0 | 2011-06-09T00:33:38.810000 | 2011-06-09T00:40:20.763000 |
6,286,856 | 6,286,956 | TSQL Query Where All Records Must Exists to Return A Record | I am not sure even how to ask this question. I have a table of tags: TagId Tag ----- ----- 1 Fruit 2 Meat 3 Grain I have a table of events: EventId Event ------- ----------- 1 Eating Food 2 Buying Food What I need to do is bring back only Events that have all selected tags associated with it. If three tags are selected... | There was a very similar question yesterday: Query for exact match of users in a conversation in SQL Server basically you can do this: DECLARE @NumTags INT = 2
SELECT EventID FROM EventTag GROUP BY EventID HAVING Sum(CASE WHEN TagID IN (1, 3) THEN 1 ELSE 0 END) >= @NumTags so this will find all events that both the ta... | TSQL Query Where All Records Must Exists to Return A Record I am not sure even how to ask this question. I have a table of tags: TagId Tag ----- ----- 1 Fruit 2 Meat 3 Grain I have a table of events: EventId Event ------- ----------- 1 Eating Food 2 Buying Food What I need to do is bring back only Events that have all ... | TITLE:
TSQL Query Where All Records Must Exists to Return A Record
QUESTION:
I am not sure even how to ask this question. I have a table of tags: TagId Tag ----- ----- 1 Fruit 2 Meat 3 Grain I have a table of events: EventId Event ------- ----------- 1 Eating Food 2 Buying Food What I need to do is bring back only Eve... | [
"c#",
"t-sql",
"select",
"join"
] | 3 | 4 | 1,602 | 4 | 0 | 2011-06-09T00:33:58.423000 | 2011-06-09T00:51:03.987000 |
6,286,867 | 6,287,041 | best way to set multiple html attribute without making a usercontrol or using literal control? | Trying to find the best way to dynamically add a direction attribute to each of these html elements. I know how to obtain the direction with var dir = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft? "rtl": "ltr"; but I need to find a graceful way to dynamically add it to the following html; If I put this into a User... | You could use the control to output the entire result. You can generate the entire excerpt in code-behind and then feed it to the literal control. Or, you could create a public function: public string Direction() { return (CultureInfo.CurrentCulture.TextInfo.IsRightToLeft)? "rtl": "ltr"; } And call it from within your ... | best way to set multiple html attribute without making a usercontrol or using literal control? Trying to find the best way to dynamically add a direction attribute to each of these html elements. I know how to obtain the direction with var dir = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft? "rtl": "ltr"; but I nee... | TITLE:
best way to set multiple html attribute without making a usercontrol or using literal control?
QUESTION:
Trying to find the best way to dynamically add a direction attribute to each of these html elements. I know how to obtain the direction with var dir = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft? "rtl"... | [
"c#",
"asp.net"
] | 0 | 1 | 1,069 | 3 | 0 | 2011-06-09T00:35:25.193000 | 2011-06-09T01:06:09.090000 |
6,286,868 | 6,286,910 | Convert month int to month name | I was simply trying to use the DateTime structure to transform an integer between 1 and 12 into an abbrieviated month name. Here is what I tried: DateTime getMonth = DateTime.ParseExact(Month.ToString(), "M", CultureInfo.CurrentCulture); return getMonth.ToString("MMM"); However I get a FormatException on the first line... | CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1); See Here for more details. Or DateTime dt = DateTime.Now; Console.WriteLine( dt.ToString( "MMMM" ) ); Or if you want to get the culture-specific abbreviated name. GetAbbreviatedMonthName(1); Reference | Convert month int to month name I was simply trying to use the DateTime structure to transform an integer between 1 and 12 into an abbrieviated month name. Here is what I tried: DateTime getMonth = DateTime.ParseExact(Month.ToString(), "M", CultureInfo.CurrentCulture); return getMonth.ToString("MMM"); However I get a F... | TITLE:
Convert month int to month name
QUESTION:
I was simply trying to use the DateTime structure to transform an integer between 1 and 12 into an abbrieviated month name. Here is what I tried: DateTime getMonth = DateTime.ParseExact(Month.ToString(), "M", CultureInfo.CurrentCulture); return getMonth.ToString("MMM");... | [
"c#",
".net",
"datetime",
".net-4.0"
] | 94 | 169 | 147,388 | 4 | 0 | 2011-06-09T00:35:27.457000 | 2011-06-09T00:42:17.107000 |
6,286,874 | 6,287,966 | C naming suggestion for Error Code enums | I'm writing a simple parser to read the config file.The config.h interface have only three main functions they are in brief as follows, config_init(); config_dinit(); config_parse(); config_read_value(); My question is those functions will emit different type of errors, for a example, config_init() emit, FILE_NOT_FOUND... | I'm usually a fan of one set of error returns for an entire library. This way in consumers they don't have to worry about "was the -1 bad input to X or could not connect to Y". I'm also a fan of E_ prefixes, but really any will do: enum _config_error { E_SUCCESS = 0, E_INVALID_INPUT = -1, E_FILE_NOT_FOUND = -2, /* cons... | C naming suggestion for Error Code enums I'm writing a simple parser to read the config file.The config.h interface have only three main functions they are in brief as follows, config_init(); config_dinit(); config_parse(); config_read_value(); My question is those functions will emit different type of errors, for a ex... | TITLE:
C naming suggestion for Error Code enums
QUESTION:
I'm writing a simple parser to read the config file.The config.h interface have only three main functions they are in brief as follows, config_init(); config_dinit(); config_parse(); config_read_value(); My question is those functions will emit different type o... | [
"c",
"enums",
"naming"
] | 15 | 31 | 21,726 | 3 | 0 | 2011-06-09T00:37:15.767000 | 2011-06-09T04:05:30.440000 |
6,286,875 | 6,286,943 | I want a UINavigationItem to be a square button with an image. How do i do this? | I want to put a square button in the UINavigationBar, much like the + button, but with an image I have. When i do this: self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"settings wheel.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(prefsPressed)... | UIBarButtonItem has a width property you can set. I'm not sure if that will do the trick for you, though. If not, you can go with creating a custom UIView (e.g. a UIImageView) and setting it using the initWithCustomView method: See here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonI... | I want a UINavigationItem to be a square button with an image. How do i do this? I want to put a square button in the UINavigationBar, much like the + button, but with an image I have. When i do this: self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"settings wheel.pn... | TITLE:
I want a UINavigationItem to be a square button with an image. How do i do this?
QUESTION:
I want to put a square button in the UINavigationBar, much like the + button, but with an image I have. When i do this: self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@... | [
"iphone",
"objective-c"
] | 1 | 2 | 433 | 1 | 0 | 2011-06-09T00:37:19.200000 | 2011-06-09T00:47:29.483000 |
6,286,884 | 6,287,050 | is there a way to set up the acl roles that are allowed to access different parts of the site in my navigation.xml? | I have this in my bootstrap: protected function _initAutoload() { $this->_auth = Zend_Auth::getInstance(); $this->_acl = new Federico_Plugin_Acl($this->_auth);.... }.... protected function _initNavigation() { $this->bootstrap('view');
$view = $this->getResource('view'); $config = new Zend_Config_Xml(APPLICATION_PATH. ... | Get the Zend_View instance (in your bootstrap, in an action helper, wherever it's easier for you) and then: $view->navigation() ->setAcl(Zend_Acl $acl) ->setRole(Zend_Acl_Role $role); Basically, the navigation view helper must explicitly be given knowledge about the ACL and current role. | is there a way to set up the acl roles that are allowed to access different parts of the site in my navigation.xml? I have this in my bootstrap: protected function _initAutoload() { $this->_auth = Zend_Auth::getInstance(); $this->_acl = new Federico_Plugin_Acl($this->_auth);.... }.... protected function _initNavigation... | TITLE:
is there a way to set up the acl roles that are allowed to access different parts of the site in my navigation.xml?
QUESTION:
I have this in my bootstrap: protected function _initAutoload() { $this->_auth = Zend_Auth::getInstance(); $this->_acl = new Federico_Plugin_Acl($this->_auth);.... }.... protected functi... | [
"zend-framework",
"zend-navigation"
] | 0 | 1 | 829 | 1 | 0 | 2011-06-09T00:38:38.983000 | 2011-06-09T01:07:23.507000 |
6,286,886 | 6,286,951 | Need a keyboard with specific keys | Okay, I've seen the webpage that shows you how to enter a decimal key on the number pad, but that's pretty complicated for one button, and the problem I have involves multiple buttons. See, I have a program that involves typing in functions like "x + 5". My problem right now is that the user has to go through three dif... | You'll have to create a custom keyboard if none of the apple keyboards toots your flute. The easiest way to do this is to create a view and add lots of buttons with their own titles and background images and, most importantly, actions. You'll also need a delegate. To be more official, there are numerous online tutorial... | Need a keyboard with specific keys Okay, I've seen the webpage that shows you how to enter a decimal key on the number pad, but that's pretty complicated for one button, and the problem I have involves multiple buttons. See, I have a program that involves typing in functions like "x + 5". My problem right now is that t... | TITLE:
Need a keyboard with specific keys
QUESTION:
Okay, I've seen the webpage that shows you how to enter a decimal key on the number pad, but that's pretty complicated for one button, and the problem I have involves multiple buttons. See, I have a program that involves typing in functions like "x + 5". My problem r... | [
"objective-c",
"xcode"
] | 0 | 0 | 94 | 1 | 0 | 2011-06-09T00:38:53.500000 | 2011-06-09T00:49:54.283000 |
6,286,888 | 6,291,787 | VLOOKUP-style range lookup in T-SQL | Here's a tricky problem I haven't quite been able to get my head around. I'm using SQL Server 2008, and I have a sparse range table that looks like this: Range Profession ----- ---------- 0 Office Worker 23 Construction 54 Medical Then I have another table with values that are within these ranges. I'd like to construct... | You could use CROSS APPLY: select v.Value, p.Profession from tblValues v cross apply (select top(1) pr.Profession from tblProfessionRanges pr where pr.Range <= v.Value ORDER BY pr.[Range] DESC) p It should be faster than using max and doesn't need a max-range do be maintained. | VLOOKUP-style range lookup in T-SQL Here's a tricky problem I haven't quite been able to get my head around. I'm using SQL Server 2008, and I have a sparse range table that looks like this: Range Profession ----- ---------- 0 Office Worker 23 Construction 54 Medical Then I have another table with values that are within... | TITLE:
VLOOKUP-style range lookup in T-SQL
QUESTION:
Here's a tricky problem I haven't quite been able to get my head around. I'm using SQL Server 2008, and I have a sparse range table that looks like this: Range Profession ----- ---------- 0 Office Worker 23 Construction 54 Medical Then I have another table with valu... | [
"sql-server",
"t-sql",
"sql",
"vlookup"
] | 4 | 3 | 7,605 | 3 | 0 | 2011-06-09T00:39:08.060000 | 2011-06-09T11:05:59.177000 |
6,286,901 | 6,287,047 | Replace images with Ruby? | If I had a folder full of thousands of images that were all the same size, could I take 1 image and replace all the others with that image (but retain the file names) with Ruby? If so, how would you do that exactly? | First off, if I understand your question you wish to do this: Take a directory with dog.jpg (image of a dog), cat.jpg (image of a cat) and horse.jpg (image of a horse) Choose dog.jpg as your source image Replace the image of a cat and horse with a dog while keeping their filenames Resulting in a directory with dog.jpg ... | Replace images with Ruby? If I had a folder full of thousands of images that were all the same size, could I take 1 image and replace all the others with that image (but retain the file names) with Ruby? If so, how would you do that exactly? | TITLE:
Replace images with Ruby?
QUESTION:
If I had a folder full of thousands of images that were all the same size, could I take 1 image and replace all the others with that image (but retain the file names) with Ruby? If so, how would you do that exactly?
ANSWER:
First off, if I understand your question you wish t... | [
"ruby",
"image"
] | 0 | 3 | 128 | 1 | 0 | 2011-06-09T00:40:51.053000 | 2011-06-09T01:06:58.343000 |
6,286,909 | 6,286,949 | what specification for jsTree node icons? | I want to create my own node icons for jsTree application. A jsTree sample could be found here I want to know what specification the new icon has to have size transparent? could you recommend any program (mac or pc) anything else I forgot | Bit of a weird question, but anyway: The icons are individually 16x16. All the icons are inside one.png using alpha transparency (the background). The CSS Sprites technique is being utilized: http://static.jstree.com/v.1.0pre/themes/default/d.png Which image editor to use? I'd use Photoshop, but any image editor that c... | what specification for jsTree node icons? I want to create my own node icons for jsTree application. A jsTree sample could be found here I want to know what specification the new icon has to have size transparent? could you recommend any program (mac or pc) anything else I forgot | TITLE:
what specification for jsTree node icons?
QUESTION:
I want to create my own node icons for jsTree application. A jsTree sample could be found here I want to know what specification the new icon has to have size transparent? could you recommend any program (mac or pc) anything else I forgot
ANSWER:
Bit of a wei... | [
"css",
"jstree"
] | 2 | 4 | 4,658 | 1 | 0 | 2011-06-09T00:42:13.853000 | 2011-06-09T00:49:07.310000 |
6,286,914 | 6,286,963 | What is the meaning of the ^ character in the Objective-C code? | For me, this is quite a mouthful of code. I understand the pieces of each code part but I cannot describe the logic flow of what how it hangs together and works as a whole, starting with the interpretation of the '^' character after the completionHandler: method. May I ask for some help here to re-write this code in a ... | The ^ symbols the start of a block. Basically what it's doing is the code inside the block (from ^{ to } ) isn't called until the method captureStillImageAsynchronouslyFromConnection is completed. Once the method has finished capturing the image, it then performs the methods inside the block. Using blocks is relatively... | What is the meaning of the ^ character in the Objective-C code? For me, this is quite a mouthful of code. I understand the pieces of each code part but I cannot describe the logic flow of what how it hangs together and works as a whole, starting with the interpretation of the '^' character after the completionHandler: ... | TITLE:
What is the meaning of the ^ character in the Objective-C code?
QUESTION:
For me, this is quite a mouthful of code. I understand the pieces of each code part but I cannot describe the logic flow of what how it hangs together and works as a whole, starting with the interpretation of the '^' character after the c... | [
"objective-c",
"objective-c-blocks"
] | 4 | 7 | 335 | 3 | 0 | 2011-06-09T00:42:59.137000 | 2011-06-09T00:52:24.963000 |
6,286,922 | 6,286,969 | How well does your language support unicode in practice? | I'm looking into new languages, kind of craving for one where I no longer need to worry about charset problems amongst inordinate amounts of other niggles I have with PHP for a new project. I tend to find Java too verbose and messy, and my not wanting to touch Windows with a 6-foot pole tends to rule out.Net. That leav... | Python's unicode support did not really change in 3.x. The unicode support in Python has been pretty much the same since Python 2.x, which introduced the separate unicode type and the encoding handling. What Python 3.x changes is that unicode becomes the only string type (and is renamed to str ), whereas 2.x has bytest... | How well does your language support unicode in practice? I'm looking into new languages, kind of craving for one where I no longer need to worry about charset problems amongst inordinate amounts of other niggles I have with PHP for a new project. I tend to find Java too verbose and messy, and my not wanting to touch Wi... | TITLE:
How well does your language support unicode in practice?
QUESTION:
I'm looking into new languages, kind of craving for one where I no longer need to worry about charset problems amongst inordinate amounts of other niggles I have with PHP for a new project. I tend to find Java too verbose and messy, and my not w... | [
"python",
"ruby",
"node.js",
"lisp"
] | 7 | 7 | 2,254 | 6 | 0 | 2011-06-09T00:44:07.840000 | 2011-06-09T00:53:24.617000 |
6,286,929 | 6,286,987 | Private Message Database Design | Alright, so I think I'm pretty close to having what I need, but I'm unsure about a couple of things: TABLE messages
message_id message_type sender_id timestamp
TABLE message_type
message_type_code (1, 2, 3) name (global, company, personal)
TABLE message_to_user
message_id receiver_id status (read/unread) Goals: Be... | Schema looks like it will work. Should probably have a Created date too. There's no way to know if you've read a global message though without creating entries for everyone. Here's some SQL: SELECT M.*, MTU.* FROM messages M LEFT JOIN message_to_user MTU ON MTU.message_id=M.message_id WHERE MTU.receiver_id={$UserID} OR... | Private Message Database Design Alright, so I think I'm pretty close to having what I need, but I'm unsure about a couple of things: TABLE messages
message_id message_type sender_id timestamp
TABLE message_type
message_type_code (1, 2, 3) name (global, company, personal)
TABLE message_to_user
message_id receiver_i... | TITLE:
Private Message Database Design
QUESTION:
Alright, so I think I'm pretty close to having what I need, but I'm unsure about a couple of things: TABLE messages
message_id message_type sender_id timestamp
TABLE message_type
message_type_code (1, 2, 3) name (global, company, personal)
TABLE message_to_user
mes... | [
"mysql",
"database-design",
"database-schema"
] | 13 | 9 | 19,326 | 2 | 0 | 2011-06-09T00:45:11.057000 | 2011-06-09T00:55:47.693000 |
6,286,942 | 6,287,641 | How can I configure a Tkinter widget from a separate class? | I am writing a Tkinter program that requires a loop. I can't run the loop from the same class that Tkinter is in, I'm fairly certain of that much. To run said loop, I believe that I have to use a separate thread, therefore a separate class, to keep Tkinter from freezing. I have gotten Tkinter to run while a loop in the... | You don't necessarily need another thread, because you don't necessarily need to create a loop (see my answer to your other question about using a nested loop ). However, to answer your specific question, you have to implement a queue. The worker thread will place messages of some sort on the queue, and the main thread... | How can I configure a Tkinter widget from a separate class? I am writing a Tkinter program that requires a loop. I can't run the loop from the same class that Tkinter is in, I'm fairly certain of that much. To run said loop, I believe that I have to use a separate thread, therefore a separate class, to keep Tkinter fro... | TITLE:
How can I configure a Tkinter widget from a separate class?
QUESTION:
I am writing a Tkinter program that requires a loop. I can't run the loop from the same class that Tkinter is in, I'm fairly certain of that much. To run said loop, I believe that I have to use a separate thread, therefore a separate class, t... | [
"python",
"multithreading",
"class",
"tkinter",
"configure"
] | 2 | 0 | 362 | 1 | 0 | 2011-06-09T00:47:25.840000 | 2011-06-09T02:57:45.523000 |
6,286,946 | 6,286,954 | Quick Python Syntax Error | allData is a hash table. key values are product numbers. the value is a list of tuples. The first value in the tuple is either 0,1,2,3 and the second value of the tuple is a list of errors for that number. print len(allData[modelNumber][0][1]) #compiles fine
File "burninprocessor.py", line 467 bars = [len(allData[mode... | You have no closing parentheses on the second and third term in your 4-tuple. Try (split across lines for readability here but you probably want to keep it on one line in your code): bars = [len(allData[modelNumber][0][1]), len(allData[modelNumber][1][1]), len(allData[modelNumber][2][1]), len(allData[modelNumber][3][1]... | Quick Python Syntax Error allData is a hash table. key values are product numbers. the value is a list of tuples. The first value in the tuple is either 0,1,2,3 and the second value of the tuple is a list of errors for that number. print len(allData[modelNumber][0][1]) #compiles fine
File "burninprocessor.py", line 46... | TITLE:
Quick Python Syntax Error
QUESTION:
allData is a hash table. key values are product numbers. the value is a list of tuples. The first value in the tuple is either 0,1,2,3 and the second value of the tuple is a list of errors for that number. print len(allData[modelNumber][0][1]) #compiles fine
File "burninproc... | [
"python"
] | 0 | 6 | 78 | 1 | 0 | 2011-06-09T00:48:06.783000 | 2011-06-09T00:50:28.210000 |
6,286,962 | 6,286,984 | Generate unique 10-digit number | I want to generate customer ids for invoices and thus don't want to start counting from 1 for obvious reasons. In MySQL can you generate a random number that is unique? I know about the RAND() function, but it does not guarantee uniqueness. What's the right approach for this? Doesn't work: INSERT INTO test (number) VAL... | I suggest an AUTO_INCREMENT column and seed the value at 10 digits. You could have it be the only column in the table, like below, or more practically seed your invoice table id. CREATE TABLE tablename ( id bigint unsigned not null auto_increment, primary key(id), auto_increment=1000000000 ); | Generate unique 10-digit number I want to generate customer ids for invoices and thus don't want to start counting from 1 for obvious reasons. In MySQL can you generate a random number that is unique? I know about the RAND() function, but it does not guarantee uniqueness. What's the right approach for this? Doesn't wor... | TITLE:
Generate unique 10-digit number
QUESTION:
I want to generate customer ids for invoices and thus don't want to start counting from 1 for obvious reasons. In MySQL can you generate a random number that is unique? I know about the RAND() function, but it does not guarantee uniqueness. What's the right approach for... | [
"mysql",
"numbers",
"unique"
] | 1 | 4 | 7,010 | 3 | 0 | 2011-06-09T00:52:02.753000 | 2011-06-09T00:55:18.277000 |
6,286,965 | 6,296,335 | In-app purchases not working shortly after review | I have an app with two in-app purchases. One is called adfree, the other galaxycluster. The adfree product has been working for a long time. In the newest version, I added the galaxycluster product. I tested it in the sandbox and submitted it for review together with the app update. Since the app status changed to in r... | Waiting (12 hours) did indeed resolve the issue (and created two bad reviews in the meantime). | In-app purchases not working shortly after review I have an app with two in-app purchases. One is called adfree, the other galaxycluster. The adfree product has been working for a long time. In the newest version, I added the galaxycluster product. I tested it in the sandbox and submitted it for review together with th... | TITLE:
In-app purchases not working shortly after review
QUESTION:
I have an app with two in-app purchases. One is called adfree, the other galaxycluster. The adfree product has been working for a long time. In the newest version, I added the galaxycluster product. I tested it in the sandbox and submitted it for revie... | [
"iphone",
"ios4",
"in-app-purchase"
] | 1 | 1 | 301 | 1 | 0 | 2011-06-09T00:52:58.513000 | 2011-06-09T16:44:53.690000 |
6,286,978 | 6,287,076 | JQuery/Javascript set value of form field with generated ID | On my page I have many forms, in witch field ids are generated based on DB id. like this: That gives me unique ids for all forms. Now I have Javascript function in jquery framework that sets vale of specified field that doesnt work: $(function(){ $('#jcrop_target_id getId()?>').Jcrop({ onSelect: updateCoords }); });
f... | Attempting to mix php and javascript can be pretty difficult. The reason for this is that they are not processed at the same time, or in the same way. PHP gets processed first on the server and the results of that process are sent to the browser. Then any javascript is processed. Additionally, I don't think that php ta... | JQuery/Javascript set value of form field with generated ID On my page I have many forms, in witch field ids are generated based on DB id. like this: That gives me unique ids for all forms. Now I have Javascript function in jquery framework that sets vale of specified field that doesnt work: $(function(){ $('#jcrop_tar... | TITLE:
JQuery/Javascript set value of form field with generated ID
QUESTION:
On my page I have many forms, in witch field ids are generated based on DB id. like this: That gives me unique ids for all forms. Now I have Javascript function in jquery framework that sets vale of specified field that doesnt work: $(functio... | [
"php",
"javascript",
"jquery",
"jcrop"
] | 1 | 0 | 503 | 2 | 0 | 2011-06-09T00:54:39.590000 | 2011-06-09T01:13:54.003000 |
6,286,981 | 6,286,999 | Windows Forms - How to access ListView's SubItems by column name? | I've tried this but it's giving me 'System.NullReferenceException': For Each MyListViewItem As ListViewItem In MyListView.Items MsgBox(MyListViewItem.SubItems("MyColumn").Text) Next These lines of codes work (weird!): For Each MyListViewItem As ListViewItem In MyListView.Items MsgBox(MyListViewItem.SubItems(0).Text) Ne... | It is likly throwing the null reference exception when trying to access the Text property on the SubItems("MyColumn") part of your sample. You could check to see if MyListViewItem.SubItems("MyColumn") is not null before trying to read the Text property from it. It could also be (based on your edit) that the name you ar... | Windows Forms - How to access ListView's SubItems by column name? I've tried this but it's giving me 'System.NullReferenceException': For Each MyListViewItem As ListViewItem In MyListView.Items MsgBox(MyListViewItem.SubItems("MyColumn").Text) Next These lines of codes work (weird!): For Each MyListViewItem As ListViewI... | TITLE:
Windows Forms - How to access ListView's SubItems by column name?
QUESTION:
I've tried this but it's giving me 'System.NullReferenceException': For Each MyListViewItem As ListViewItem In MyListView.Items MsgBox(MyListViewItem.SubItems("MyColumn").Text) Next These lines of codes work (weird!): For Each MyListVie... | [
"vb.net",
"listview"
] | 3 | 3 | 8,450 | 2 | 0 | 2011-06-09T00:54:59.240000 | 2011-06-09T00:58:01.733000 |
6,286,982 | 6,287,258 | git windows post pull | I have recently converted from svn. My server is under Windows (don't blame me, it wasn't my choice:} I have created a repo with two branches "master" and "stable". On my server I want to get files from stable branch. I have done: git clone git://url/.git src cd src git checkout --track -b stable origin/stable Previous... | Few points: Make sure you have git.exe on path. Do a where git and you must get something like C:\Program Files (x86)\Git\bin\git.exe If git.cmd is being used ( from C:\Program Files (x86)\Git\cmd\git.cmd ), you have to do call git pull for it to continue execution. I would say add git.exe to path and start using it. E... | git windows post pull I have recently converted from svn. My server is under Windows (don't blame me, it wasn't my choice:} I have created a repo with two branches "master" and "stable". On my server I want to get files from stable branch. I have done: git clone git://url/.git src cd src git checkout --track -b stable ... | TITLE:
git windows post pull
QUESTION:
I have recently converted from svn. My server is under Windows (don't blame me, it wasn't my choice:} I have created a repo with two branches "master" and "stable". On my server I want to get files from stable branch. I have done: git clone git://url/.git src cd src git checkout ... | [
"windows",
"git",
"batch-file",
"hook",
"pull"
] | 1 | 3 | 2,354 | 2 | 0 | 2011-06-09T00:55:01.507000 | 2011-06-09T01:55:39.647000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.