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,286,983 | 6,287,112 | Problem with Ruby Gem Paperclip | I am having trouble using the Ruby Gem paperclip. I followed the instructions in the ReadMe but I cannot seem to get it to actually load my images. Here is my edit form: <% form_for:user, @user,:html => {:multipart => true } do |f| %> <%= f.label:name %> <%= f.text_field:name %> <%= f.label:email %> <%= f.text_field:em... | The error is telling you that there's no /users/4/edit route. What does your config/routes.rb look like? If there's a line like: resources:users Then, try changing that first line to: form_for @user Instead of: form_for:user, @user Also, I don't see a file_field in there anywhere so I don't think this question is about... | Problem with Ruby Gem Paperclip I am having trouble using the Ruby Gem paperclip. I followed the instructions in the ReadMe but I cannot seem to get it to actually load my images. Here is my edit form: <% form_for:user, @user,:html => {:multipart => true } do |f| %> <%= f.label:name %> <%= f.text_field:name %> <%= f.la... | TITLE:
Problem with Ruby Gem Paperclip
QUESTION:
I am having trouble using the Ruby Gem paperclip. I followed the instructions in the ReadMe but I cannot seem to get it to actually load my images. Here is my edit form: <% form_for:user, @user,:html => {:multipart => true } do |f| %> <%= f.label:name %> <%= f.text_fiel... | [
"ruby-on-rails",
"paperclip"
] | 0 | 0 | 113 | 1 | 0 | 2011-06-09T00:55:10.107000 | 2011-06-09T01:23:33.220000 |
6,286,988 | 6,287,011 | PHP issue - mailserver blacklisted | My hosting company is now saying that their "(8)Exec format error: exec of '/home/ failed" is that "the mailserver ip is blacklisted" WTF does that mean and how do i fix it? please, i am about to tear my hair out. thank you. Previous issue solved: *My hosting company has disabled several PHP functions. This is really o... | The error isn't referring to the exec() function, but to the actual execution of the php file itself. PHP files need to be treated as executable by the file system in order for them to be processed by the server. It seems like your file permissions are off on the file. The standard is permission level is 755. You shoul... | PHP issue - mailserver blacklisted My hosting company is now saying that their "(8)Exec format error: exec of '/home/ failed" is that "the mailserver ip is blacklisted" WTF does that mean and how do i fix it? please, i am about to tear my hair out. thank you. Previous issue solved: *My hosting company has disabled seve... | TITLE:
PHP issue - mailserver blacklisted
QUESTION:
My hosting company is now saying that their "(8)Exec format error: exec of '/home/ failed" is that "the mailserver ip is blacklisted" WTF does that mean and how do i fix it? please, i am about to tear my hair out. thank you. Previous issue solved: *My hosting company... | [
"php",
"email",
"post",
"exec"
] | 0 | 0 | 143 | 1 | 0 | 2011-06-09T00:55:58.110000 | 2011-06-09T01:00:23.840000 |
6,286,990 | 6,287,866 | Silencing Flyway -- a log4j problem | I've written a wrapper around Flyway I call Nomad. I am well pleased with Flyway, save the incessant logging it performs outside of Maven. I created an issue here. Each user of Nomad must make their own configuration of log4j to silence Flyway. This is problematic if not done, for instance, during Spec testing. However... | The way you have done it in log4j.xml seems good. I don't see anything wrong. Since the project uses Maven, I recommend you adding a property file instead log4j.properties, that you place that in src/main/resources The contents can be: log4j.rootCategory=DEBUG, stderr log4j.appender.stderr=org.apache.log4j.ConsoleAppen... | Silencing Flyway -- a log4j problem I've written a wrapper around Flyway I call Nomad. I am well pleased with Flyway, save the incessant logging it performs outside of Maven. I created an issue here. Each user of Nomad must make their own configuration of log4j to silence Flyway. This is problematic if not done, for in... | TITLE:
Silencing Flyway -- a log4j problem
QUESTION:
I've written a wrapper around Flyway I call Nomad. I am well pleased with Flyway, save the incessant logging it performs outside of Maven. I created an issue here. Each user of Nomad must make their own configuration of log4j to silence Flyway. This is problematic i... | [
"java",
"logging",
"log4j",
"flyway"
] | 2 | 3 | 2,804 | 2 | 0 | 2011-06-09T00:56:21.323000 | 2011-06-09T03:44:40.387000 |
6,286,993 | 6,287,020 | File uploader with progress bar? | How would I go about creating an HTML/PHP/AJAX file uploader with a progress bar? I have no idea where to start. | The Dojo HTML5 Multi-File Uploader does all that and more. Highly recommended;) | File uploader with progress bar? How would I go about creating an HTML/PHP/AJAX file uploader with a progress bar? I have no idea where to start. | TITLE:
File uploader with progress bar?
QUESTION:
How would I go about creating an HTML/PHP/AJAX file uploader with a progress bar? I have no idea where to start.
ANSWER:
The Dojo HTML5 Multi-File Uploader does all that and more. Highly recommended;) | [
"php",
"ajax",
"file",
"progress",
"uploader"
] | 2 | 1 | 1,010 | 6 | 0 | 2011-06-09T00:57:38.413000 | 2011-06-09T01:02:32.977000 |
6,287,004 | 6,287,063 | what precautions are required when a UITableView is updating? (e.g. locking it?) | Should one "lock" a UITableView whilst it is updating somehow? That is, during a data refresh for a UITableView (assuming it takes a few seconds), should one be somehow locking the view itself so that users can't click through on rows etc? Just wondering what precautions (if any) a developer should take here. | Depends on the context. A common solution, when there’s no guarantee that the contents of the table will still be valid once the load completes, is to cover it with a semitransparent full-screen overlay view displaying an activity indicator or a progress bar. If you’re just loading new data, though—i.e. the old data in... | what precautions are required when a UITableView is updating? (e.g. locking it?) Should one "lock" a UITableView whilst it is updating somehow? That is, during a data refresh for a UITableView (assuming it takes a few seconds), should one be somehow locking the view itself so that users can't click through on rows etc?... | TITLE:
what precautions are required when a UITableView is updating? (e.g. locking it?)
QUESTION:
Should one "lock" a UITableView whilst it is updating somehow? That is, during a data refresh for a UITableView (assuming it takes a few seconds), should one be somehow locking the view itself so that users can't click th... | [
"iphone",
"ios",
"uitableview"
] | 0 | 1 | 165 | 3 | 0 | 2011-06-09T00:59:29.577000 | 2011-06-09T01:10:47.907000 |
6,287,015 | 6,287,060 | Create controller for partial view in ASP.NET MVC | How can I create an individual controller and model for a partial view? I want to be able to place this partial view any where on the site so it needs it's own controller. I am current rendering the partial as so @Html.Partial("_Testimonials") | Why not use Html.RenderAction()? Then you could put the following into any controller (even creating a new controller for it): [ChildActionOnly] public ActionResult MyActionThatGeneratesAPartial(string parameter1) { var model = repository.GetThingByParameter(parameter1); var partialViewModel = new PartialViewModel(mode... | Create controller for partial view in ASP.NET MVC How can I create an individual controller and model for a partial view? I want to be able to place this partial view any where on the site so it needs it's own controller. I am current rendering the partial as so @Html.Partial("_Testimonials") | TITLE:
Create controller for partial view in ASP.NET MVC
QUESTION:
How can I create an individual controller and model for a partial view? I want to be able to place this partial view any where on the site so it needs it's own controller. I am current rendering the partial as so @Html.Partial("_Testimonials")
ANSWER:... | [
"asp.net",
"asp.net-mvc",
"partial-views"
] | 65 | 120 | 116,274 | 6 | 0 | 2011-06-09T01:00:51.770000 | 2011-06-09T01:10:02.270000 |
6,287,019 | 6,287,026 | ! meaning in c++ (following context) | I know what!= is when if(x!=value){...}, but what does it mean in the following context: if (! ReadConsoleInput( hStdin, // input buffer handle irInBuf, // buffer to read into 128, // size of read buffer &cNumRead) ) // number of records read ErrorExit("ReadConsoleInput"); or if (! SetConsoleMode(hStdin, fdwMode) ) Err... | It's the "Not" operator: true (1) if the operand is zero, false (0) otherwise. | ! meaning in c++ (following context) I know what!= is when if(x!=value){...}, but what does it mean in the following context: if (! ReadConsoleInput( hStdin, // input buffer handle irInBuf, // buffer to read into 128, // size of read buffer &cNumRead) ) // number of records read ErrorExit("ReadConsoleInput"); or if (! ... | TITLE:
! meaning in c++ (following context)
QUESTION:
I know what!= is when if(x!=value){...}, but what does it mean in the following context: if (! ReadConsoleInput( hStdin, // input buffer handle irInBuf, // buffer to read into 128, // size of read buffer &cNumRead) ) // number of records read ErrorExit("ReadConsole... | [
"c++",
"operator-keyword"
] | 2 | 8 | 456 | 3 | 0 | 2011-06-09T01:02:29.077000 | 2011-06-09T01:03:04.437000 |
6,287,021 | 6,287,409 | Should I use a FORM element if I'm not submitting data? Proper (X)HTML markup | In my web application I have a user profile page. That page has these elements on it: Connect with Twitter Connect with Facebook Timezone Select Language Select The first two things pop up an OAuth window allowing the user to connect. The last two things are saved with AJAX. When I'm doing up the page, how should I do ... | Best practice is making the site work without Javascript, then adding Javascript / AJAX to it incrementally, as enhancements. Progressive Enhancement (Wikipedia) Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic HTML markup, and external stylesheet and scripting technologies. ... | Should I use a FORM element if I'm not submitting data? Proper (X)HTML markup In my web application I have a user profile page. That page has these elements on it: Connect with Twitter Connect with Facebook Timezone Select Language Select The first two things pop up an OAuth window allowing the user to connect. The las... | TITLE:
Should I use a FORM element if I'm not submitting data? Proper (X)HTML markup
QUESTION:
In my web application I have a user profile page. That page has these elements on it: Connect with Twitter Connect with Facebook Timezone Select Language Select The first two things pop up an OAuth window allowing the user t... | [
"html",
"css",
"forms",
"xhtml",
"accessibility"
] | 3 | 5 | 469 | 2 | 0 | 2011-06-09T01:02:33.680000 | 2011-06-09T02:20:28.663000 |
6,287,023 | 6,287,038 | What bug does zoom:1; fix in CSS? | I have seen people apply the CSS property zoom: 1; on HTML elements. Why do they do this, and what bug does it fix? | This provides an internal property known as hasLayout in Internet Explorer versions 7 and lower. The definitive article on the subject is here: http://www.satzansatz.de/cssd/onhavinglayout.html A lot of Internet Explorer's rendering inconsistencies can be fixed by giving an element “layout.” In this article, the author... | What bug does zoom:1; fix in CSS? I have seen people apply the CSS property zoom: 1; on HTML elements. Why do they do this, and what bug does it fix? | TITLE:
What bug does zoom:1; fix in CSS?
QUESTION:
I have seen people apply the CSS property zoom: 1; on HTML elements. Why do they do this, and what bug does it fix?
ANSWER:
This provides an internal property known as hasLayout in Internet Explorer versions 7 and lower. The definitive article on the subject is here:... | [
"css",
"internet-explorer",
"internet-explorer-7",
"internet-explorer-6"
] | 37 | 45 | 32,940 | 1 | 0 | 2011-06-09T01:02:39.733000 | 2011-06-09T01:05:27.293000 |
6,287,024 | 6,291,984 | error in making barchart using reportlab auto tool | I am getting the following error when trying to create a bar chart using the reportlab tool for chart creation. I am making a DataAwareDrawing chart. Please let me know what can I do. Traceback (most recent call last): File "C:\Python26\Lib\site-packages\rlextra\graphics\guiedit\guiedit.py", line 1582, in attrChange
s... | You attempt to create a BarChart object. Use VerticalBarChart instead. | error in making barchart using reportlab auto tool I am getting the following error when trying to create a bar chart using the reportlab tool for chart creation. I am making a DataAwareDrawing chart. Please let me know what can I do. Traceback (most recent call last): File "C:\Python26\Lib\site-packages\rlextra\graphi... | TITLE:
error in making barchart using reportlab auto tool
QUESTION:
I am getting the following error when trying to create a bar chart using the reportlab tool for chart creation. I am making a DataAwareDrawing chart. Please let me know what can I do. Traceback (most recent call last): File "C:\Python26\Lib\site-packa... | [
"reportlab"
] | 0 | 0 | 130 | 1 | 0 | 2011-06-09T01:02:49.257000 | 2011-06-09T11:21:29.880000 |
6,287,027 | 6,287,084 | Ant javac task running executable instead of java classes | I'm almost certain I can't really do this without writing my own Task classes, but I thought I'd ask anyway. Is there some magic property or ant task that works just like, but runs my $JAVA_HOME/bin/javac executable file instead of running the code from the javac classes in $JAVA_HOME/lib/tools.jar? The reason I'd like... | The Javac task has the fork attribute, and also the executable one. Combine these. Also, you might want to set compiler=extJavac, though I'm not sure if this changes something. Here is a quote from the examples section: If you want to run the javac compiler of a different JDK, you should tell Ant, where to find the com... | Ant javac task running executable instead of java classes I'm almost certain I can't really do this without writing my own Task classes, but I thought I'd ask anyway. Is there some magic property or ant task that works just like, but runs my $JAVA_HOME/bin/javac executable file instead of running the code from the java... | TITLE:
Ant javac task running executable instead of java classes
QUESTION:
I'm almost certain I can't really do this without writing my own Task classes, but I thought I'd ask anyway. Is there some magic property or ant task that works just like, but runs my $JAVA_HOME/bin/javac executable file instead of running the ... | [
"java",
"ant",
"javac"
] | 0 | 1 | 1,243 | 2 | 0 | 2011-06-09T01:03:33.837000 | 2011-06-09T01:15:11.673000 |
6,287,030 | 6,287,432 | How do I enable/disable google chrome extensions via console | Today, while opening Google Chrome, I realized that there is no easy way to enable or disable an extension without going to one of the following locations: chrome://extensions clicking on Tools>Extensions>Enable/Disable The reason why this is so important, is because of the resources it takes up. For example: I will be... | Chrome stores extension settings in a JSON file named Preferences in your profile directory (here it is ~/.config/google-chrome/Default/Preferences). The enabled/disabled flag is the "state" key for each extension, with 1 for enabled and 0 for disabled. You could write a script that modified this file before you start ... | How do I enable/disable google chrome extensions via console Today, while opening Google Chrome, I realized that there is no easy way to enable or disable an extension without going to one of the following locations: chrome://extensions clicking on Tools>Extensions>Enable/Disable The reason why this is so important, is... | TITLE:
How do I enable/disable google chrome extensions via console
QUESTION:
Today, while opening Google Chrome, I realized that there is no easy way to enable or disable an extension without going to one of the following locations: chrome://extensions clicking on Tools>Extensions>Enable/Disable The reason why this i... | [
"google-chrome-extension",
"google-chrome-devtools"
] | 7 | 10 | 26,630 | 1 | 0 | 2011-06-09T01:04:32.997000 | 2011-06-09T02:25:43.470000 |
6,287,032 | 6,296,649 | Android, emma, ant, and ant-related errors | I'm working with some Android code created by other developers, and they've asked me to run code coverage metrics on it. It's Android 2.3.3, and they use ant for their build files. I'm running on Ubuntu, while other developers are running on windows/macs. If I leave the SDK/tools/lib/ant/main_rules.xml file alone, I wi... | Consider the answer to this a case of "trying to do too much without understanding the implications." EMMA's sourceforge page recommends installing the emma.jar as an extension to the JRE. If you do that, you will cause conflicts with the SDK ant tools. The safest thing is to ignore the EMMA sourceforge separate build ... | Android, emma, ant, and ant-related errors I'm working with some Android code created by other developers, and they've asked me to run code coverage metrics on it. It's Android 2.3.3, and they use ant for their build files. I'm running on Ubuntu, while other developers are running on windows/macs. If I leave the SDK/to... | TITLE:
Android, emma, ant, and ant-related errors
QUESTION:
I'm working with some Android code created by other developers, and they've asked me to run code coverage metrics on it. It's Android 2.3.3, and they use ant for their build files. I'm running on Ubuntu, while other developers are running on windows/macs. If ... | [
"android",
"ant",
"emma"
] | 0 | 0 | 1,884 | 2 | 0 | 2011-06-09T01:04:44.017000 | 2011-06-09T17:09:52.690000 |
6,287,049 | 6,287,141 | How to create a patch file (SVN) in a Mac? | i'm helping out a friend who has a Mac and has installed Versions, but apparently there doesnt seem to be a way to create a patch file. I saw the screenshots he sent to me and it appeared that it was correct. Anyone used Versions on Mac for doing SVN and if so, were they able to create patches which could be shared wih... | It is commercial software, so your friend could fire off a question to the support center. But on their FAQ it says: Q: How can I use Versions to merge? A: Right now, there's no way to merge changes between branches in Versions. So maybe they really do not have the more "advanced" features (if you can call patching and... | How to create a patch file (SVN) in a Mac? i'm helping out a friend who has a Mac and has installed Versions, but apparently there doesnt seem to be a way to create a patch file. I saw the screenshots he sent to me and it appeared that it was correct. Anyone used Versions on Mac for doing SVN and if so, were they able ... | TITLE:
How to create a patch file (SVN) in a Mac?
QUESTION:
i'm helping out a friend who has a Mac and has installed Versions, but apparently there doesnt seem to be a way to create a patch file. I saw the screenshots he sent to me and it appeared that it was correct. Anyone used Versions on Mac for doing SVN and if s... | [
"svn",
"macos",
"versions"
] | 0 | 0 | 2,364 | 2 | 0 | 2011-06-09T01:07:07.913000 | 2011-06-09T01:30:45.323000 |
6,287,052 | 6,287,461 | Is there a way to use GLSL in a Live Wallpaper on Android? | So I used the code here to first initialize the OpenGL in my Live Wallpaper. But now I need to activate the GLSL, but there's no way to activate the it because the function setEGLContextClientVersion is missing. Another solution would be to be able to put a view in a Live Wallpaper, being able to use GLSurfaceView woul... | Please take a look at ghisguth / blurred-lines-live. Blurred Lines Live Wallpaper for android OpenGL ES 2.0 capable device Wallpaper.java - initialize GLSurfaceView for OpenGL ES 2.0 GLES20LinesRenderer.java - GLSL shaders | Is there a way to use GLSL in a Live Wallpaper on Android? So I used the code here to first initialize the OpenGL in my Live Wallpaper. But now I need to activate the GLSL, but there's no way to activate the it because the function setEGLContextClientVersion is missing. Another solution would be to be able to put a vie... | TITLE:
Is there a way to use GLSL in a Live Wallpaper on Android?
QUESTION:
So I used the code here to first initialize the OpenGL in my Live Wallpaper. But now I need to activate the GLSL, but there's no way to activate the it because the function setEGLContextClientVersion is missing. Another solution would be to be... | [
"android",
"opengl-es",
"view",
"glsl",
"live-wallpaper"
] | 1 | 3 | 1,449 | 1 | 0 | 2011-06-09T01:08:52.627000 | 2011-06-09T02:31:13.797000 |
6,287,053 | 6,287,197 | Comparison of one row to another in SQLite | I have an Android app. Inside my Android app I have an SQLite database. Inside my SQLite database I have a table that looks like this: _id a b c d 1 1 1 1 0 2 0 1 1 1 3 1 0 0 1 4 0 1 0 1 I want to calculate for each row: of all the columns a, b, c and d that have a 1 in EITHER the current or previous row, what percenta... | Select CurAndNext.T1_id, Sum( Case When D1.Val + D2.Val = 1 Then 1 End ) As CntInEitherRow, Sum( Case When D1.Val + D2.Val = 2 Then 1 End ) / 4.000 As PercBoth From ( Select T1._id As T1_id, Max( T2._id ) As T2_id From MyTable As T1 Left Join MyTable As T2 On T2._id < T1._id Group By T1._id ) As CurAndNext Join ( Selec... | Comparison of one row to another in SQLite I have an Android app. Inside my Android app I have an SQLite database. Inside my SQLite database I have a table that looks like this: _id a b c d 1 1 1 1 0 2 0 1 1 1 3 1 0 0 1 4 0 1 0 1 I want to calculate for each row: of all the columns a, b, c and d that have a 1 in EITHER... | TITLE:
Comparison of one row to another in SQLite
QUESTION:
I have an Android app. Inside my Android app I have an SQLite database. Inside my SQLite database I have a table that looks like this: _id a b c d 1 1 1 1 0 2 0 1 1 1 3 1 0 0 1 4 0 1 0 1 I want to calculate for each row: of all the columns a, b, c and d that ... | [
"android",
"sql",
"sqlite"
] | 4 | 5 | 2,381 | 1 | 0 | 2011-06-09T01:08:53.380000 | 2011-06-09T01:43:34.627000 |
6,287,066 | 6,287,095 | PHP/MySQL Query Results | Having an issue with a query..my wscategories stores the main categories of an online store, and my wssubcategories table stores the sub categories of the table with the foreign key called "parentcategory". I'm trying to list the main categories, with the subcategories underneath a la: Tops T-Shirts Wovens Sweaters Pan... | try something like this // note we need to order by maincategory for this to work // $query = "SELECT DISTINCT a.categoryname AS maincategory, b.categoryname AS smallcategory FROM wscategories a, wssubcategories b WHERE a.SECTION = 'girls' AND b.parentcategory = a.id ORDER BY maincategory ASC, smallcategory ASC "; $res... | PHP/MySQL Query Results Having an issue with a query..my wscategories stores the main categories of an online store, and my wssubcategories table stores the sub categories of the table with the foreign key called "parentcategory". I'm trying to list the main categories, with the subcategories underneath a la: Tops T-Sh... | TITLE:
PHP/MySQL Query Results
QUESTION:
Having an issue with a query..my wscategories stores the main categories of an online store, and my wssubcategories table stores the sub categories of the table with the foreign key called "parentcategory". I'm trying to list the main categories, with the subcategories undernea... | [
"php",
"mysql"
] | 1 | 1 | 321 | 2 | 0 | 2011-06-09T01:11:52.070000 | 2011-06-09T01:19:18.303000 |
6,287,073 | 6,287,123 | Beginner iPhone/iPad app question | I am a beginner in iPhone and iPad apps and wanted to learn to code(guessing they are here to stay for another 4years least).. I run a Win 7 PC with dual core. I didnt want to change OS to mac just for this as my games may not work in MAC:( lol So i came across Dragon Fire SDK. Is this correct way to do it on windows. ... | (paraphrasing) Is this a fine way to develop apps? Define "fine". You probably can get an app in the app store* but it's not the best way, and could potentially backfire. I strongly recommend getting a Mac if you want to develop iPhone apps, for a few reasons: There is an enormous community to leverage. There are tons ... | Beginner iPhone/iPad app question I am a beginner in iPhone and iPad apps and wanted to learn to code(guessing they are here to stay for another 4years least).. I run a Win 7 PC with dual core. I didnt want to change OS to mac just for this as my games may not work in MAC:( lol So i came across Dragon Fire SDK. Is this... | TITLE:
Beginner iPhone/iPad app question
QUESTION:
I am a beginner in iPhone and iPad apps and wanted to learn to code(guessing they are here to stay for another 4years least).. I run a Win 7 PC with dual core. I didnt want to change OS to mac just for this as my games may not work in MAC:( lol So i came across Dragon... | [
"iphone",
"ipad",
"ios4"
] | 0 | 2 | 119 | 1 | 0 | 2011-06-09T01:12:40.523000 | 2011-06-09T01:27:27.200000 |
6,287,088 | 6,300,616 | Make columns equal heights - with nesting | I have a design that uses two outer columns, and within one of the outer columns in a heading section and two more columns below, like so: ************************** * header * ************************** | | | | | | | out1 | out2 | | | | | | | | | | ************************** * footer * **************************
****... | One appraoch may be to have the three columns wrapped in a containing element and disregard the outer columns. Your title would just sit above the three columns which you could specify a width to match the first two columns of the three. Then you could apply a negative margin to the thrid column, making it line up with... | Make columns equal heights - with nesting I have a design that uses two outer columns, and within one of the outer columns in a heading section and two more columns below, like so: ************************** * header * ************************** | | | | | | | out1 | out2 | | | | | | | | | | ************************** *... | TITLE:
Make columns equal heights - with nesting
QUESTION:
I have a design that uses two outer columns, and within one of the outer columns in a heading section and two more columns below, like so: ************************** * header * ************************** | | | | | | | out1 | out2 | | | | | | | | | | **********... | [
"jquery",
"css"
] | 4 | 2 | 398 | 1 | 0 | 2011-06-09T01:16:03.217000 | 2011-06-10T00:00:52.270000 |
6,287,090 | 6,287,564 | Yii "framework" sub-folder not visible from apache? [error 403] | I'm having quite a weird problem here. I have just pasted the Yii folder into my htdocs folders and, for some reason, apache can't see one specific folder within the Yii folder, which is called "framework". I.e., when I type http://localhost/yii, apache correctly lists all sub-folder within the Yii folder except for th... | I'm not sure why you are even trying to view the framework folder directly. It does have an.htaccess file in it which says "deny from all". Just make sure you have the correct path for the "yii.php" file inside the framework folder set in the index.php file in your web root. PHP can include files that are inside "deny ... | Yii "framework" sub-folder not visible from apache? [error 403] I'm having quite a weird problem here. I have just pasted the Yii folder into my htdocs folders and, for some reason, apache can't see one specific folder within the Yii folder, which is called "framework". I.e., when I type http://localhost/yii, apache co... | TITLE:
Yii "framework" sub-folder not visible from apache? [error 403]
QUESTION:
I'm having quite a weird problem here. I have just pasted the Yii folder into my htdocs folders and, for some reason, apache can't see one specific folder within the Yii folder, which is called "framework". I.e., when I type http://localh... | [
"php",
"windows",
"apache",
"permissions",
"yii"
] | 1 | 6 | 4,120 | 1 | 0 | 2011-06-09T01:16:41.850000 | 2011-06-09T02:44:31.727000 |
6,287,119 | 6,287,417 | Javascript: load AddThis upon clicking | I have been puzzling with this for quite a while and can't get it to work. Here is the situation. I want a SOCIAL MEDIA bar to ONLY appear if people click some DIV. It should not be loaded unless people click the div. For Social Media I have ADD THIS, and the GOOGLE+1 icon. But I can not get them to load by such an ext... | The problem here is that addthis code fires on dom ready event. When you load it with jQuery the dom has already been loaded so the code is not executed. The fix is to use addthis.init() method to force the code execution after you load the code. There is no cross domain problem or anything. Note that according to addt... | Javascript: load AddThis upon clicking I have been puzzling with this for quite a while and can't get it to work. Here is the situation. I want a SOCIAL MEDIA bar to ONLY appear if people click some DIV. It should not be loaded unless people click the div. For Social Media I have ADD THIS, and the GOOGLE+1 icon. But I ... | TITLE:
Javascript: load AddThis upon clicking
QUESTION:
I have been puzzling with this for quite a while and can't get it to work. Here is the situation. I want a SOCIAL MEDIA bar to ONLY appear if people click some DIV. It should not be loaded unless people click the div. For Social Media I have ADD THIS, and the GOO... | [
"javascript",
"jquery",
"ajax"
] | 5 | 8 | 9,038 | 3 | 0 | 2011-06-09T01:26:44 | 2011-06-09T02:22:36.230000 |
6,287,120 | 6,289,086 | Searching through child objects nhibernate search? | I have this kind of relationship Supplier -> has many Products Both Supplier is indexed and products are indexed. I need (boss wants to) search through both the Supplier and all of the suppliers' products and list the resulting suppliers. Is this possible in nhibernate.search/Lucene.NET?? | Yes it is possible: http://ayende.com/blog/3992/nhibernate-search See the given example, IndexEmbedded attribute means the "child" object or collection will be indexed too: [Indexed] public class Post { [DocumentId] public virtual int Id { get; set; }
[IndexedEmbedded] public virtual Blog Blog { get; set; }
[IndexedE... | Searching through child objects nhibernate search? I have this kind of relationship Supplier -> has many Products Both Supplier is indexed and products are indexed. I need (boss wants to) search through both the Supplier and all of the suppliers' products and list the resulting suppliers. Is this possible in nhibernate... | TITLE:
Searching through child objects nhibernate search?
QUESTION:
I have this kind of relationship Supplier -> has many Products Both Supplier is indexed and products are indexed. I need (boss wants to) search through both the Supplier and all of the suppliers' products and list the resulting suppliers. Is this poss... | [
"nhibernate",
"lucene.net",
"nhibernate.search"
] | 0 | 2 | 446 | 1 | 0 | 2011-06-09T01:26:54.623000 | 2011-06-09T06:50:54.170000 |
6,287,121 | 6,287,159 | sql date between with parameters | What I thought was simple turned out to be a nightmare... The table I am trying to get the data out of is very simple: R_TYPE (string) R_PRICE (currency) S_DATE (date) E_DATE (date) I run: SELECT * FROM MYTABLE WHERE R_TYPE =:a1 AND R_PRICE BETWEEN S_DATE =:a2 AND E_DATE =:a3 Parameters are: ABSQuery1.params.ParamByNam... | Your query is muddled: Price can't be between the boolean result of date comparisons. If the date picker is picking any price that had its entire duration (ie it started and ended) between the dates picked, use this: select * from MYTABLE where R_TYPE =:a1 and S_DATE >:a2 AND E_DATE <:a3; If the date picker is picking ... | sql date between with parameters What I thought was simple turned out to be a nightmare... The table I am trying to get the data out of is very simple: R_TYPE (string) R_PRICE (currency) S_DATE (date) E_DATE (date) I run: SELECT * FROM MYTABLE WHERE R_TYPE =:a1 AND R_PRICE BETWEEN S_DATE =:a2 AND E_DATE =:a3 Parameters... | TITLE:
sql date between with parameters
QUESTION:
What I thought was simple turned out to be a nightmare... The table I am trying to get the data out of is very simple: R_TYPE (string) R_PRICE (currency) S_DATE (date) E_DATE (date) I run: SELECT * FROM MYTABLE WHERE R_TYPE =:a1 AND R_PRICE BETWEEN S_DATE =:a2 AND E_DA... | [
"sql",
"delphi",
"delphi-xe"
] | 0 | 1 | 5,429 | 1 | 0 | 2011-06-09T01:26:56.210000 | 2011-06-09T01:34:18.407000 |
6,287,122 | 6,287,147 | how to make jquery toggle action go over all my content? | I have a jquery toggler on the very top of my page that will eventually open up to reveal a form. The problem is that when the panel expands it will push down all the content under it instead of the panel going over the content. How do I make sure the panel expands over the content instead of pushing it down? I only ha... | You can try something with position:absolute. Check out this jsfiddle. | how to make jquery toggle action go over all my content? I have a jquery toggler on the very top of my page that will eventually open up to reveal a form. The problem is that when the panel expands it will push down all the content under it instead of the panel going over the content. How do I make sure the panel expan... | TITLE:
how to make jquery toggle action go over all my content?
QUESTION:
I have a jquery toggler on the very top of my page that will eventually open up to reveal a form. The problem is that when the panel expands it will push down all the content under it instead of the panel going over the content. How do I make su... | [
"javascript",
"jquery",
"html",
"css",
"forms"
] | 2 | 6 | 3,524 | 2 | 0 | 2011-06-09T01:27:01.940000 | 2011-06-09T01:32:01.160000 |
6,287,124 | 6,287,303 | What is a clean way to show an edit page on a windows phone app? | Is there a standard way to put up an entry form in WP7 silverlight? I'm currently planning on using the NavigationService to navigate to another page, but I was wondering if there was a better way. | I've found the best way is to have a separate page. As keyboardP mentioned you can potentially have weird navigation issues IF on completion of the edit you navigate back to the screen you came from. This gives you a stack that looks like List Page (then navigate to Edit Page) List Page -> Edit Page (then hit Save) Lis... | What is a clean way to show an edit page on a windows phone app? Is there a standard way to put up an entry form in WP7 silverlight? I'm currently planning on using the NavigationService to navigate to another page, but I was wondering if there was a better way. | TITLE:
What is a clean way to show an edit page on a windows phone app?
QUESTION:
Is there a standard way to put up an entry form in WP7 silverlight? I'm currently planning on using the NavigationService to navigate to another page, but I was wondering if there was a better way.
ANSWER:
I've found the best way is to ... | [
"silverlight",
"windows-phone-7"
] | 3 | 5 | 67 | 1 | 0 | 2011-06-09T01:27:29.003000 | 2011-06-09T02:02:48.893000 |
6,287,129 | 6,287,299 | C# covariance and inheritance | I'm curious to know why the implementation of my interface in the abstract base class does not satisfy the the requirements in sub-classes. Here's an example: public interface IBase { } public interface IConcrete: IBase { }
public interface IBaseManager where T: IBase { T Create(); IEnumerable SelectAll(); }
public i... | It looks like you're assuming return type covariance, since ConcreteManager (as an IConcreteManager ) expects both Create() and SelectAll() methods with a return type of IConcrete and IEnumerable respectively, which the base class does not provide. You are getting those errors because C# does not support return type co... | C# covariance and inheritance I'm curious to know why the implementation of my interface in the abstract base class does not satisfy the the requirements in sub-classes. Here's an example: public interface IBase { } public interface IConcrete: IBase { }
public interface IBaseManager where T: IBase { T Create(); IEnume... | TITLE:
C# covariance and inheritance
QUESTION:
I'm curious to know why the implementation of my interface in the abstract base class does not satisfy the the requirements in sub-classes. Here's an example: public interface IBase { } public interface IConcrete: IBase { }
public interface IBaseManager where T: IBase { ... | [
"c#",
"inheritance",
"covariance"
] | 7 | 5 | 2,271 | 3 | 0 | 2011-06-09T01:28:23.450000 | 2011-06-09T02:02:16.807000 |
6,287,134 | 6,287,259 | Is it possible to embed Python in PHP? | I work for a small tech start-up, and our main site is built on the CMS Drupal, which is a PHP-based CMS. However, I know some Python and would like to develop web applications to integrate with the website and allow users to interact with them. How would I go about doing this? Does anyone have any experience or knowle... | There are several different ways to do integrate Drupal with external applications, but your best bet is probably installing the services module in Drupal, and make calls from your Python app over HTTP, just as you would interact with a remote server. Some other options: Interact directly with Drupal's database, rather... | Is it possible to embed Python in PHP? I work for a small tech start-up, and our main site is built on the CMS Drupal, which is a PHP-based CMS. However, I know some Python and would like to develop web applications to integrate with the website and allow users to interact with them. How would I go about doing this? Do... | TITLE:
Is it possible to embed Python in PHP?
QUESTION:
I work for a small tech start-up, and our main site is built on the CMS Drupal, which is a PHP-based CMS. However, I know some Python and would like to develop web applications to integrate with the website and allow users to interact with them. How would I go ab... | [
"php",
"python",
"drupal"
] | 2 | 2 | 2,135 | 2 | 0 | 2011-06-09T01:28:59.410000 | 2011-06-09T01:55:44.047000 |
6,287,135 | 6,287,790 | C# Question About Delete Data Grid | I have binded a data grid to an array. Also, there is a button there to delete the row. The problem is that I am not sure how to implement it since the data source is an array. See below and here I would like to implement it.. private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommand... | Here is an example Markup. Code-behind. private static string[] names = new string[] { "Matt", "Joanne", "Robert" }; protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { BindGrid(); } } private void BindGrid() { DataGrid1.DataSource = names; DataGrid1.DataBind(); } protected void DataGrid1_DeleteCom... | C# Question About Delete Data Grid I have binded a data grid to an array. Also, there is a button there to delete the row. The problem is that I am not sure how to implement it since the data source is an array. See below and here I would like to implement it.. private void DataGrid1_DeleteCommand(object source, System... | TITLE:
C# Question About Delete Data Grid
QUESTION:
I have binded a data grid to an array. Also, there is a button there to delete the row. The problem is that I am not sure how to implement it since the data source is an array. See below and here I would like to implement it.. private void DataGrid1_DeleteCommand(obj... | [
"c#",
"asp.net",
"c#-4.0"
] | 1 | 1 | 670 | 2 | 0 | 2011-06-09T01:29:06.157000 | 2011-06-09T03:24:25.723000 |
6,287,139 | 6,287,214 | Difference between Bitwise and boolean operator 'AND' | Possible Duplicates: logical operators in java What's the difference between | and || in Java? As the title says, I need to know the difference between & operator and && operator. Can anyone help me in simple words. How do they differ from each other? And which one to be used in a IF statement? | There are in fact three "and" operators: a && b, with a and b being boolean: evaluate a. If true, evaluate b. If true, result is true. Otherwise, result is false. (I.e. b is not evaluated if a is not true.) a & b, with a and b being boolean: evaluate both, do logical and (i.e. true only if both are true). a & b, where ... | Difference between Bitwise and boolean operator 'AND' Possible Duplicates: logical operators in java What's the difference between | and || in Java? As the title says, I need to know the difference between & operator and && operator. Can anyone help me in simple words. How do they differ from each other? And which one ... | TITLE:
Difference between Bitwise and boolean operator 'AND'
QUESTION:
Possible Duplicates: logical operators in java What's the difference between | and || in Java? As the title says, I need to know the difference between & operator and && operator. Can anyone help me in simple words. How do they differ from each oth... | [
"java",
"if-statement",
"operators",
"bitwise-operators"
] | 2 | 6 | 4,799 | 3 | 0 | 2011-06-09T01:30:14.400000 | 2011-06-09T01:46:25.460000 |
6,287,143 | 6,296,802 | client-server ipc message 2 pipes communication simple example | I want to have a message send & receive through 2 half-duplex pipes Flow of data top half pipe stdin--->parent(client) fd1[1]--->pipe1-->child(server) fd1[0] bottom half pipe child(server) fd2[1]---->pipe2--->parent(client) fd2[0]--->stdout I need to have boundary structed message mesg_len+mesg_type+mesg_data The funct... | Your first problem is because you reversed the arguments to your client function. The read descriptor is always descriptor 0. So your code should read: client(pipe2[0],pipe1[1]); But you have issues that are far deeper than that. You are going about doing this header/data thing in the wrong way. Do not write structures... | client-server ipc message 2 pipes communication simple example I want to have a message send & receive through 2 half-duplex pipes Flow of data top half pipe stdin--->parent(client) fd1[1]--->pipe1-->child(server) fd1[0] bottom half pipe child(server) fd2[1]---->pipe2--->parent(client) fd2[0]--->stdout I need to have b... | TITLE:
client-server ipc message 2 pipes communication simple example
QUESTION:
I want to have a message send & receive through 2 half-duplex pipes Flow of data top half pipe stdin--->parent(client) fd1[1]--->pipe1-->child(server) fd1[0] bottom half pipe child(server) fd2[1]---->pipe2--->parent(client) fd2[0]--->stdou... | [
"c",
"unix",
"ipc",
"pipe",
"message-queue"
] | 0 | 0 | 3,427 | 1 | 0 | 2011-06-09T01:31:15.417000 | 2011-06-09T17:23:36.280000 |
6,287,145 | 6,287,283 | JButton subclass that sets itself to be the default button for a JFrame | How to create a subclass of JButton that makes itself the window's default button? I understand that designating a default button is set on the JRootPane rather than the button itself. Instead of adding such code to each window, I would like to specify the default button by instantiating a subclass of JButton, "JButton... | Override the addNotify() method of your JButton class. I believe this method gets invoked when the component is added to a frame. Or if this doesn't work then add an AncestorListener to the button and listen for the ancestorAdded event. Now you know the component is added to a top level container so you can get the roo... | JButton subclass that sets itself to be the default button for a JFrame How to create a subclass of JButton that makes itself the window's default button? I understand that designating a default button is set on the JRootPane rather than the button itself. Instead of adding such code to each window, I would like to spe... | TITLE:
JButton subclass that sets itself to be the default button for a JFrame
QUESTION:
How to create a subclass of JButton that makes itself the window's default button? I understand that designating a default button is set on the JRootPane rather than the button itself. Instead of adding such code to each window, I... | [
"java",
"swing",
"jbutton"
] | 1 | 3 | 907 | 2 | 0 | 2011-06-09T01:31:20.257000 | 2011-06-09T02:00:27.427000 |
6,287,154 | 6,287,182 | What is the appropriate HTTP status code for content-length not matching the actual content length | I know that missing the content-length header is a 411, but not sure how I should respond when the value given in the content-length does not match the actual content length | The standard seems silent on the actual code to respond with, only that the two lengths MUST match and that HTTP/1.1 agents MUST notify the user. I would just use the 400 Bad Request code since that is, after all, what the problem is (a request violating the standard) and none of the other 400-series codes seems a clos... | What is the appropriate HTTP status code for content-length not matching the actual content length I know that missing the content-length header is a 411, but not sure how I should respond when the value given in the content-length does not match the actual content length | TITLE:
What is the appropriate HTTP status code for content-length not matching the actual content length
QUESTION:
I know that missing the content-length header is a 411, but not sure how I should respond when the value given in the content-length does not match the actual content length
ANSWER:
The standard seems s... | [
"http",
"http-headers"
] | 1 | 4 | 1,763 | 1 | 0 | 2011-06-09T01:33:07.537000 | 2011-06-09T01:40:54.923000 |
6,287,155 | 6,287,219 | iPhone app crashes with no log (only with distribution profile) | My app crashes for some reason but I can't figure out why. It just crashes after about 3 seconds after application is launched. The console says: Error launching remote program: failed to get the task for process 4091. The program being debugged is not being run. But it does not have problem with debug profile or devel... | I just solved the problem. I removed all previous versions of the same application in my phone. And it works fine! Maybe there's some kind of collision. | iPhone app crashes with no log (only with distribution profile) My app crashes for some reason but I can't figure out why. It just crashes after about 3 seconds after application is launched. The console says: Error launching remote program: failed to get the task for process 4091. The program being debugged is not bei... | TITLE:
iPhone app crashes with no log (only with distribution profile)
QUESTION:
My app crashes for some reason but I can't figure out why. It just crashes after about 3 seconds after application is launched. The console says: Error launching remote program: failed to get the task for process 4091. The program being d... | [
"iphone",
"xcode",
"ios",
"distribution",
"provisioning"
] | 0 | 1 | 585 | 2 | 0 | 2011-06-09T01:33:27.473000 | 2011-06-09T01:47:09.913000 |
6,287,157 | 6,287,218 | C# get all parent directories from a path up to a point? | I have a listbox in WPF that automatically gets the FullName of the files listed within the box then will Add those files to a Zip under their specific folder. For example: C:\ProgramFiles\Folder1\Folder2\Folder3\Folder4\file.txt I need to be able to Zip it into its folder up to a specific folder, such as only \Folder2... | You can use the DirectoryInfo object to get the parent up the chain as far as you need to. If you want to get a the parent directory three levels up you can do something like this: DirectoryInfo di = new DirectoryInfo(@"C:\ProgramFiles\Folder1\Folder2\Folder3\Folder4\file.txt"); for(int i = 0; i<3; i++){ di = di.Parent... | C# get all parent directories from a path up to a point? I have a listbox in WPF that automatically gets the FullName of the files listed within the box then will Add those files to a Zip under their specific folder. For example: C:\ProgramFiles\Folder1\Folder2\Folder3\Folder4\file.txt I need to be able to Zip it into ... | TITLE:
C# get all parent directories from a path up to a point?
QUESTION:
I have a listbox in WPF that automatically gets the FullName of the files listed within the box then will Add those files to a Zip under their specific folder. For example: C:\ProgramFiles\Folder1\Folder2\Folder3\Folder4\file.txt I need to be ab... | [
"wpf",
"c#-4.0"
] | 4 | 3 | 6,830 | 2 | 0 | 2011-06-09T01:33:43.840000 | 2011-06-09T01:47:02.443000 |
6,287,160 | 6,287,400 | Calculating plugin dependencies | I have the need to create a plugin system that will have dependency support and I'm not sure the best way to account for dependencies. The plugins will all be subclassed from a base class, each with its own execute() method. In each plugin class, I'd planned to create a dependencies attribute as a list of all the other... | The algorithm you described sounds like it would work but would have a hard time detecting circular dependencies. What you're looking for is a Topological sort of your dependencies. If you create a graph of your dependencies where an edge from A to B means A depends on B then you can do a Depth-first search to determin... | Calculating plugin dependencies I have the need to create a plugin system that will have dependency support and I'm not sure the best way to account for dependencies. The plugins will all be subclassed from a base class, each with its own execute() method. In each plugin class, I'd planned to create a dependencies attr... | TITLE:
Calculating plugin dependencies
QUESTION:
I have the need to create a plugin system that will have dependency support and I'm not sure the best way to account for dependencies. The plugins will all be subclassed from a base class, each with its own execute() method. In each plugin class, I'd planned to create a... | [
"python",
"algorithm",
"logic"
] | 7 | 5 | 436 | 2 | 0 | 2011-06-09T01:34:35.773000 | 2011-06-09T02:19:35.730000 |
6,287,168 | 6,287,173 | Global access of PHP vars | I looked into past answers and was led to believe PHP variables assigned in a header file are global. I must be doing something wrong then. Here's a much-simplified version of my code: This is my myGlobals.php file: This is file index.php that 'requires' myGlobals.php then calls a function in a 3rd php file And here is... | You need to add at the top of your function... global $NAMELABEL; This will make $NAMELABEL available inside of your function. Globals however should be minimised. Could you re-factor your code? | Global access of PHP vars I looked into past answers and was led to believe PHP variables assigned in a header file are global. I must be doing something wrong then. Here's a much-simplified version of my code: This is my myGlobals.php file: This is file index.php that 'requires' myGlobals.php then calls a function in ... | TITLE:
Global access of PHP vars
QUESTION:
I looked into past answers and was led to believe PHP variables assigned in a header file are global. I must be doing something wrong then. Here's a much-simplified version of my code: This is my myGlobals.php file: This is file index.php that 'requires' myGlobals.php then ca... | [
"php"
] | 2 | 4 | 607 | 4 | 0 | 2011-06-09T01:37:43.603000 | 2011-06-09T01:39:46.333000 |
6,287,171 | 6,287,229 | Save files in .jar | I have a couple files I want to include in my.jar for a game server. The files, a SQLite database and an icon, work properly when and only when I put them in the Eclipse project folder and run it straight from Eclipse. As I want this to be distributable to end-users easily, how can I include these files and use them at... | Accessing files from within a jar file can be tricky depending on the code that's using them. If the code is written to open a file from the file system, you have to extract it. If your Java code opens it with Class.getResourceAsStream(), it can be read from within the jar. You mentioned an icon and SQLite. I would gue... | Save files in .jar I have a couple files I want to include in my.jar for a game server. The files, a SQLite database and an icon, work properly when and only when I put them in the Eclipse project folder and run it straight from Eclipse. As I want this to be distributable to end-users easily, how can I include these fi... | TITLE:
Save files in .jar
QUESTION:
I have a couple files I want to include in my.jar for a game server. The files, a SQLite database and an icon, work properly when and only when I put them in the Eclipse project folder and run it straight from Eclipse. As I want this to be distributable to end-users easily, how can ... | [
"java",
"jar"
] | 1 | 3 | 2,251 | 1 | 0 | 2011-06-09T01:38:42.183000 | 2011-06-09T01:49:11.450000 |
6,287,172 | 6,287,202 | Passing argument to JS function from link onclick | I have a link that looks like this: Yes It is able to call this JavaScript: window.onload = function() {
//Get a reference to the link on the page // with an id of "mylink" var a = document.getElementById("mylink");
//Set code to run when the link is clicked // by assigning a function to "onclick" a.onclick = functio... | You are trying to assign the function to your link in two different and conflicting ways. Using the eval-ed function string, onclick = "function(value)", works but is deprecated. The other way of binding the click handler in the onload event works too, but if you want a particular value to be passed, you'll have to cha... | Passing argument to JS function from link onclick I have a link that looks like this: Yes It is able to call this JavaScript: window.onload = function() {
//Get a reference to the link on the page // with an id of "mylink" var a = document.getElementById("mylink");
//Set code to run when the link is clicked // by ass... | TITLE:
Passing argument to JS function from link onclick
QUESTION:
I have a link that looks like this: Yes It is able to call this JavaScript: window.onload = function() {
//Get a reference to the link on the page // with an id of "mylink" var a = document.getElementById("mylink");
//Set code to run when the link is... | [
"javascript",
"ajax",
"closures"
] | 1 | 2 | 15,305 | 5 | 0 | 2011-06-09T01:39:30.130000 | 2011-06-09T01:44:00.107000 |
6,287,187 | 6,287,355 | Building Select Query Using IN(...) Clause | I need to do select * based on a list of input ids, what's the best way of batch select? here's what I have StringBuilder inClause = new StringBuilder(); boolean firstValue = true; for (int i=0; i < batchSize; i++) { inClause.append('?'); if ( firstValue ) { firstValue = false; } else { inClause.append(','); } } Prepar... | It looks pretty fine to me. Just spotted a logical bug there in this block of code, boolean firstValue = true; for (int i=0; i < batchSize; i++) { inClause.append('?'); if ( firstValue ) { firstValue = false; } else { inClause.append(','); } } It will not append a, after the first element. And there would be a, after t... | Building Select Query Using IN(...) Clause I need to do select * based on a list of input ids, what's the best way of batch select? here's what I have StringBuilder inClause = new StringBuilder(); boolean firstValue = true; for (int i=0; i < batchSize; i++) { inClause.append('?'); if ( firstValue ) { firstValue = false... | TITLE:
Building Select Query Using IN(...) Clause
QUESTION:
I need to do select * based on a list of input ids, what's the best way of batch select? here's what I have StringBuilder inClause = new StringBuilder(); boolean firstValue = true; for (int i=0; i < batchSize; i++) { inClause.append('?'); if ( firstValue ) { ... | [
"java",
"mysql",
"sql",
"select",
"jdbc"
] | 2 | 2 | 2,247 | 1 | 0 | 2011-06-09T01:41:40.167000 | 2011-06-09T02:10:56.067000 |
6,287,189 | 6,287,365 | Rails Tutorial: No Relationship Controller | I am following the rails controller and am confused as to why their isn't a controller. I don't recall it asking me to generate one but should I? I'm confused? Thanks! | Actually, relationship controller is created in "12.2.4 A working follow button the standard way", if we're talking about Rails 3 version of this book. | Rails Tutorial: No Relationship Controller I am following the rails controller and am confused as to why their isn't a controller. I don't recall it asking me to generate one but should I? I'm confused? Thanks! | TITLE:
Rails Tutorial: No Relationship Controller
QUESTION:
I am following the rails controller and am confused as to why their isn't a controller. I don't recall it asking me to generate one but should I? I'm confused? Thanks!
ANSWER:
Actually, relationship controller is created in "12.2.4 A working follow button th... | [
"ruby-on-rails",
"railstutorial.org"
] | 0 | 3 | 128 | 2 | 0 | 2011-06-09T01:41:51.723000 | 2011-06-09T02:13:10.863000 |
6,287,190 | 6,287,307 | Visual studio add watch to object property | In visual studio 2010 if I add a watch to a property of an object, by right clicking the property and going to add watch, in the watch window it just adds the property name instead of object.property name and hence it will also show "xxx does not exist in the current context". Am I going about this the wrong way or is ... | I would suggest that you should select the object.property completely and then add it to the watch window. | Visual studio add watch to object property In visual studio 2010 if I add a watch to a property of an object, by right clicking the property and going to add watch, in the watch window it just adds the property name instead of object.property name and hence it will also show "xxx does not exist in the current context".... | TITLE:
Visual studio add watch to object property
QUESTION:
In visual studio 2010 if I add a watch to a property of an object, by right clicking the property and going to add watch, in the watch window it just adds the property name instead of object.property name and hence it will also show "xxx does not exist in the... | [
"visual-studio-2010",
"properties",
"watch"
] | 0 | 3 | 1,478 | 1 | 0 | 2011-06-09T01:42:10.013000 | 2011-06-09T02:03:48.493000 |
6,287,209 | 6,287,263 | How to implement final steps in pagination project? | I am doing my first pagination implementation to my site. I feel like I am very close and just confusing my logic or mistaking the placement or actual value of some variables. Here is the code: $pgsize_wave = 40; $pg_wave = (is_numeric($_GET["p"])? $_GET["p"]: 1); $start = ($pg_wave-1)*$pgsize_wave; $waves = mysql_quer... | This is pseudo code but hopefully explains the logic. $total = SELECT COUNT(*) FROM `waves` $currentPage = 1 // changes through page parameter in URL $wavesPerPage = 40 $totalPages = ceil($total / $wavesPerPage) $offset = ($wavesPerPage * ($currentPage - 1)) + 1
$waves = mysql_query("SELECT * FROM `waves` LIMIT $offse... | How to implement final steps in pagination project? I am doing my first pagination implementation to my site. I feel like I am very close and just confusing my logic or mistaking the placement or actual value of some variables. Here is the code: $pgsize_wave = 40; $pg_wave = (is_numeric($_GET["p"])? $_GET["p"]: 1); $st... | TITLE:
How to implement final steps in pagination project?
QUESTION:
I am doing my first pagination implementation to my site. I feel like I am very close and just confusing my logic or mistaking the placement or actual value of some variables. Here is the code: $pgsize_wave = 40; $pg_wave = (is_numeric($_GET["p"])? $... | [
"php",
"css",
"pagination"
] | 0 | 2 | 273 | 1 | 0 | 2011-06-09T01:46:03.253000 | 2011-06-09T01:57:06.180000 |
6,287,212 | 6,287,249 | CSS/HTML Layout Help | I'm using this code... topbar sidebar content /** Styling **/
#app { border:1px solid #666; }
#app-actionbar { color: #333; width: 900px; float: left; height: 45px; background: #D9D9DC; margin-top:10px; }
#app-content { float: left; color: #333; background: #FFFFFF; height: 350px; width: 725px; display: inline; }
#... | You need to clear the floated elements in your #app. Try adding overflow:hidden; or overflow:auto; to #app. That will get the border to wrap you entire DIV. Here's a live jsfiddle link of your above snippets with the overflow:hidden assigned: http://jsfiddle.net/AhZAU/ The spacing at the top, "(and its moving the conte... | CSS/HTML Layout Help I'm using this code... topbar sidebar content /** Styling **/
#app { border:1px solid #666; }
#app-actionbar { color: #333; width: 900px; float: left; height: 45px; background: #D9D9DC; margin-top:10px; }
#app-content { float: left; color: #333; background: #FFFFFF; height: 350px; width: 725px; ... | TITLE:
CSS/HTML Layout Help
QUESTION:
I'm using this code... topbar sidebar content /** Styling **/
#app { border:1px solid #666; }
#app-actionbar { color: #333; width: 900px; float: left; height: 45px; background: #D9D9DC; margin-top:10px; }
#app-content { float: left; color: #333; background: #FFFFFF; height: 350... | [
"html",
"css"
] | 0 | 3 | 116 | 5 | 0 | 2011-06-09T01:46:22.673000 | 2011-06-09T01:53:18.323000 |
6,287,213 | 6,287,232 | Multiple Threads to load xml files into memory | I have a set of XML files that I want to load into memory in order to process. I am loading the files into a Collection and it seems that it is a lot faster if I load the files in a single thread rather than using the thread pool. I would have thought this would have been the other way around. Why is it the case that u... | Without seeing the code, I would guess it probably has to do with the fact that reading from disk is the slow part of the operation. Since the disk can really only read one file at a time the disk becomes the bottleneck. | Multiple Threads to load xml files into memory I have a set of XML files that I want to load into memory in order to process. I am loading the files into a Collection and it seems that it is a lot faster if I load the files in a single thread rather than using the thread pool. I would have thought this would have been ... | TITLE:
Multiple Threads to load xml files into memory
QUESTION:
I have a set of XML files that I want to load into memory in order to process. I am loading the files into a Collection and it seems that it is a lot faster if I load the files in a single thread rather than using the thread pool. I would have thought thi... | [
"c#",
"multithreading",
"performance",
"file"
] | 3 | 1 | 2,514 | 3 | 0 | 2011-06-09T01:46:22.940000 | 2011-06-09T01:49:47.430000 |
6,287,253 | 6,287,696 | Clang warning: Value stored to 'pool' during its initialization is never read | - (void)main { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Warning goes here
NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; while (YES) { NSAutoreleasePool *subPool = [[NSAutoreleasePool alloc] init]; [runLoop run]; [subPool drain]; }
[pool drain]; } I don't see why this code get such a warning, ... | I believe the issue is the while (YES) statement. Clang is seeing that as an endless loop that you'll never get outside of, so that the code below that block will never be reached. Just changing it to the following (a BOOL variable set to YES outside of the block) will remove the warning: int main (int argc, const char... | Clang warning: Value stored to 'pool' during its initialization is never read - (void)main { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Warning goes here
NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; while (YES) { NSAutoreleasePool *subPool = [[NSAutoreleasePool alloc] init]; [runLoop run]; [sub... | TITLE:
Clang warning: Value stored to 'pool' during its initialization is never read
QUESTION:
- (void)main { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Warning goes here
NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; while (YES) { NSAutoreleasePool *subPool = [[NSAutoreleasePool alloc] init]; [... | [
"objective-c",
"ios",
"clang"
] | 5 | 5 | 1,658 | 1 | 0 | 2011-06-09T01:54:54.730000 | 2011-06-09T03:07:16.147000 |
6,287,256 | 6,287,941 | Viewstate issue with first dropdownlist item selection | In my ASP.NET 4.0 website, which uses master pages, I've disabled viewstate sitewide in web.config: and am trying to enable it only when absolutely necessary. I've run into an issue with a DropDownList control (no databinding going on, just hardcoded items): Chocolate Strawberry Vanilla Even though I've enabled view st... | It appears you can't set in the web.config or in any page directives for the ViewStateMode property to work. Basically EnableViewState=false will override any and all ViewStateMode settings. There doesn't appear to be a way to set the ViewStateMode property in the web.config at this point so it looks like you'll have t... | Viewstate issue with first dropdownlist item selection In my ASP.NET 4.0 website, which uses master pages, I've disabled viewstate sitewide in web.config: and am trying to enable it only when absolutely necessary. I've run into an issue with a DropDownList control (no databinding going on, just hardcoded items): Chocol... | TITLE:
Viewstate issue with first dropdownlist item selection
QUESTION:
In my ASP.NET 4.0 website, which uses master pages, I've disabled viewstate sitewide in web.config: and am trying to enable it only when absolutely necessary. I've run into an issue with a DropDownList control (no databinding going on, just hardco... | [
"asp.net",
"drop-down-menu",
"viewstate",
"selectedindexchanged"
] | 3 | 1 | 2,590 | 2 | 0 | 2011-06-09T01:55:15.967000 | 2011-06-09T04:00:00.337000 |
6,287,265 | 6,287,305 | Does apple allow any customized keyboards? | I'm sorry if this is a "duh" question, but this is sort of compounded with this. I've figured out that I need a custom view that basically mimics the virtual keyboard on the iPad, but with a different set of keys (like both numbers and letters). Here's the issue: this app is something that will be sold, so what I'm won... | Absolutely. As of iOS 4, you can set the inputView property of any UIResponder (like a UITextField ) to your own custom view, and the system will display that view at the bottom of the screen in place of the system keyboard whenever that view gets first-responder status. | Does apple allow any customized keyboards? I'm sorry if this is a "duh" question, but this is sort of compounded with this. I've figured out that I need a custom view that basically mimics the virtual keyboard on the iPad, but with a different set of keys (like both numbers and letters). Here's the issue: this app is s... | TITLE:
Does apple allow any customized keyboards?
QUESTION:
I'm sorry if this is a "duh" question, but this is sort of compounded with this. I've figured out that I need a custom view that basically mimics the virtual keyboard on the iPad, but with a different set of keys (like both numbers and letters). Here's the is... | [
"ipad"
] | 0 | 2 | 128 | 1 | 0 | 2011-06-09T01:57:46.800000 | 2011-06-09T02:02:52.097000 |
6,287,266 | 6,287,357 | Pass a value from one controller to another in asp.net mvc | I've been new to ASP.NET MVC. This is what I'm doing. I've 2 Controllers:Home and Customerservice. Now I have a Customer list where when I click details gets redirected to the products he acquired. So, I need to pass in the id so that the products of that customer can be displayed. So, my home consists of customer deta... | Passing it as a parameter is probably your best option. Try using something like return RedirectToAction(ActionName, ControllerName, RouteValues);. | Pass a value from one controller to another in asp.net mvc I've been new to ASP.NET MVC. This is what I'm doing. I've 2 Controllers:Home and Customerservice. Now I have a Customer list where when I click details gets redirected to the products he acquired. So, I need to pass in the id so that the products of that custo... | TITLE:
Pass a value from one controller to another in asp.net mvc
QUESTION:
I've been new to ASP.NET MVC. This is what I'm doing. I've 2 Controllers:Home and Customerservice. Now I have a Customer list where when I click details gets redirected to the products he acquired. So, I need to pass in the id so that the prod... | [
"asp.net-mvc-3"
] | 0 | 1 | 5,332 | 2 | 0 | 2011-06-09T01:57:50.630000 | 2011-06-09T02:11:10.983000 |
6,287,268 | 6,287,319 | Populating a Django DateTimeField with feedparser | I'm attempting to read my school's athletics/activities calendar, available in iCal or RSS format, into a Django Events model using feedparser. Everything works, except the dates. Feedparser populates item.updated_parsed with a "9-tuple" but I can't figure out how to make this into something Django will accept in a Dat... | Covert the time.struct_time object into a datetime.datetime object: from time import mktime from datetime import datetime dt = datetime.fromtimestamp(mktime(item['updated_parsed'])) | Populating a Django DateTimeField with feedparser I'm attempting to read my school's athletics/activities calendar, available in iCal or RSS format, into a Django Events model using feedparser. Everything works, except the dates. Feedparser populates item.updated_parsed with a "9-tuple" but I can't figure out how to ma... | TITLE:
Populating a Django DateTimeField with feedparser
QUESTION:
I'm attempting to read my school's athletics/activities calendar, available in iCal or RSS format, into a Django Events model using feedparser. Everything works, except the dates. Feedparser populates item.updated_parsed with a "9-tuple" but I can't fi... | [
"python",
"django",
"rss",
"date",
"feedparser"
] | 5 | 9 | 1,650 | 2 | 0 | 2011-06-09T01:57:58.803000 | 2011-06-09T02:05:37.790000 |
6,287,270 | 6,291,708 | newbie: help using mod_rewrite for localised website | Newbie: help switching locale with JSF Hi, I hope someone can help, I am having problems switching between locales in particular en_GB to en_US and en_US to en_GB for my website, however all other two character locales are switching fine. faces_config.xml snippet en_gb en_us en_gb cy es fr web page snippet Java bean pu... | The reason why it happens should be obvious: public String getLanguage() { return locale.getLanguage(); } This will always return language-code only. But your English identifiers are "en_GB" and "en_US" respectively, so it always selects first item. I believe now, the fix is obvious, isn't it? The modification I recomm... | newbie: help using mod_rewrite for localised website Newbie: help switching locale with JSF Hi, I hope someone can help, I am having problems switching between locales in particular en_GB to en_US and en_US to en_GB for my website, however all other two character locales are switching fine. faces_config.xml snippet en_... | TITLE:
newbie: help using mod_rewrite for localised website
QUESTION:
Newbie: help switching locale with JSF Hi, I hope someone can help, I am having problems switching between locales in particular en_GB to en_US and en_US to en_GB for my website, however all other two character locales are switching fine. faces_conf... | [
"web-applications",
"jsf",
"localization",
"locale",
"setlocale"
] | 2 | 0 | 107 | 1 | 0 | 2011-06-09T01:58:04.337000 | 2011-06-09T10:58:18.823000 |
6,287,289 | 6,287,374 | Examples Of SqlDataSource In Production Code | I'm new to ASP.net and I'm currently reading about the SqlDataSource and running through some examples. I was talking to a co-worker who said it was 'fine for quick and dirty apps' but nobody would use it in a production/deployed environment. I didn't really know where to look or ask for opinions on that. It's very dif... | I've never seen performance issues using a SqlDataSource, but I've also never used it for a large website, just small businesses that get maybe 10-15 visits a day, or internal apps. There are a lot of things that it can make really easy (features like built-in caching, filtering, paging, etc.). The downside has more to... | Examples Of SqlDataSource In Production Code I'm new to ASP.net and I'm currently reading about the SqlDataSource and running through some examples. I was talking to a co-worker who said it was 'fine for quick and dirty apps' but nobody would use it in a production/deployed environment. I didn't really know where to lo... | TITLE:
Examples Of SqlDataSource In Production Code
QUESTION:
I'm new to ASP.net and I'm currently reading about the SqlDataSource and running through some examples. I was talking to a co-worker who said it was 'fine for quick and dirty apps' but nobody would use it in a production/deployed environment. I didn't reall... | [
".net",
"asp.net"
] | 2 | 5 | 521 | 3 | 0 | 2011-06-09T02:01:20.367000 | 2011-06-09T02:15:21.913000 |
6,287,304 | 6,287,787 | Routes question: what if I want both a resource to be nested and on its own? | Objective: Be able to nest a resource, like records inside of users so that I can access /users/1/records to see all of the first users records. But I would also like to see /records to see all of the records ( or the new ones, or something like that ). Problem So I know I am missing something somewhere because that ca... | Not sure how to handle this route later in controllers (never tried), but something like this should work: resources:records
resources:users do resources:records end I think you'll need to do something in records's index controller to check if its called for some user or not. UPD: Ok, checked it. Check for params[:use... | Routes question: what if I want both a resource to be nested and on its own? Objective: Be able to nest a resource, like records inside of users so that I can access /users/1/records to see all of the first users records. But I would also like to see /records to see all of the records ( or the new ones, or something li... | TITLE:
Routes question: what if I want both a resource to be nested and on its own?
QUESTION:
Objective: Be able to nest a resource, like records inside of users so that I can access /users/1/records to see all of the first users records. But I would also like to see /records to see all of the records ( or the new one... | [
"ruby-on-rails",
"activerecord"
] | 4 | 2 | 111 | 1 | 0 | 2011-06-09T02:02:51.343000 | 2011-06-09T03:23:02.400000 |
6,287,308 | 6,287,347 | jQuery fade out then fade in | There's a bunch on this topic, but I havn't found an instance that applies well to my situation. Fade a picture out and then fade another picture in. Instead, I'm running into an issue where the first fades out and immediately (before the animation is finished) the next fades in. I read about this once and can't rememb... | fade the other in in the callback of fadeout, which runs when fadeout is done. Using your code: $('#two, #three').hide(); $('.slide').click(function(){ var $this = $(this); $this.fadeOut(function(){ $this.next().fadeIn(); }); }); alternatively, you can just "pause" the chain, but you need to specify for how long: $(thi... | jQuery fade out then fade in There's a bunch on this topic, but I havn't found an instance that applies well to my situation. Fade a picture out and then fade another picture in. Instead, I'm running into an issue where the first fades out and immediately (before the animation is finished) the next fades in. I read abo... | TITLE:
jQuery fade out then fade in
QUESTION:
There's a bunch on this topic, but I havn't found an instance that applies well to my situation. Fade a picture out and then fade another picture in. Instead, I'm running into an issue where the first fades out and immediately (before the animation is finished) the next fa... | [
"jquery",
"fadein",
"fadeout"
] | 37 | 84 | 118,001 | 4 | 0 | 2011-06-09T02:04:03.887000 | 2011-06-09T02:09:59.873000 |
6,287,326 | 6,287,480 | Renaming XML elements using value of attributes | I have the below XML file success eeee@eee.net somename Other 459d28cd11 bounced Blocked Not Trashed 5-24-11 12:05 am PDT bbbbb@eee.net somename Other 0dcc42ebe3 bounced Blocked Not Trashed 15-11-11 12:05 am PDT And I want to convert it into below format success eeee@eee.net somename Other 459d28cd11 bounced Blocked No... | This should work for you For a quick explanation of how this works check out the guides by w3schools and webucator. | Renaming XML elements using value of attributes I have the below XML file success eeee@eee.net somename Other 459d28cd11 bounced Blocked Not Trashed 5-24-11 12:05 am PDT bbbbb@eee.net somename Other 0dcc42ebe3 bounced Blocked Not Trashed 15-11-11 12:05 am PDT And I want to convert it into below format success eeee@eee.... | TITLE:
Renaming XML elements using value of attributes
QUESTION:
I have the below XML file success eeee@eee.net somename Other 459d28cd11 bounced Blocked Not Trashed 5-24-11 12:05 am PDT bbbbb@eee.net somename Other 0dcc42ebe3 bounced Blocked Not Trashed 15-11-11 12:05 am PDT And I want to convert it into below format... | [
"xslt"
] | 0 | 3 | 191 | 2 | 0 | 2011-06-09T02:06:22.503000 | 2011-06-09T02:33:40.473000 |
6,287,330 | 6,287,447 | MySQL JOIN based on highest date and non-unique columns | I need some help with a MySQL query I'm working on. I have data as follows. Table 1 id date1 text number ---|------------|--------|------- 1 | 2012-12-12 | hi | 399 2 | 2011-11-11 | so | 399 5 | 2010-10-10 | what | 555 3 | 2009-09-09 | bye | 300 4 | 2008-08-08 | you | 300 Table 2 id number date2 ref ---|--------|------... | I tried similar example with different tables just now and was able to get what you wanted. Below is a similar query modified to fit your needs. You might want to change < with <= if that is what you are looking for. SELECT a.date1, a.text, b.ref FROM table1 a LEFT JOIN table2 b ON ( a.number = b.number AND a.date1 > b... | MySQL JOIN based on highest date and non-unique columns I need some help with a MySQL query I'm working on. I have data as follows. Table 1 id date1 text number ---|------------|--------|------- 1 | 2012-12-12 | hi | 399 2 | 2011-11-11 | so | 399 5 | 2010-10-10 | what | 555 3 | 2009-09-09 | bye | 300 4 | 2008-08-08 | y... | TITLE:
MySQL JOIN based on highest date and non-unique columns
QUESTION:
I need some help with a MySQL query I'm working on. I have data as follows. Table 1 id date1 text number ---|------------|--------|------- 1 | 2012-12-12 | hi | 399 2 | 2011-11-11 | so | 399 5 | 2010-10-10 | what | 555 3 | 2009-09-09 | bye | 300 ... | [
"mysql",
"sql",
"join"
] | 1 | 1 | 197 | 2 | 0 | 2011-06-09T02:06:44.433000 | 2011-06-09T02:28:26.420000 |
6,287,338 | 6,287,783 | Library importing: #pragma comment VS Visual studio project input | using #pragma comment(lib, "../../xxx.lib") using Visual studio project option What is the advantage and disadvantage between two method? I'm finding way which is better convenient to manage for many projects. And what method does Microsoft recommend? | The advantage of #pragma comment is that the user of your library cannot forget to add the setting. Or add the wrong one, it is not uncommon to get lost at the difference between the debug and release build and the /MD vs /MT build. One disadvantage is that troubleshooting linker problems can be difficult in some cases... | Library importing: #pragma comment VS Visual studio project input using #pragma comment(lib, "../../xxx.lib") using Visual studio project option What is the advantage and disadvantage between two method? I'm finding way which is better convenient to manage for many projects. And what method does Microsoft recommend? | TITLE:
Library importing: #pragma comment VS Visual studio project input
QUESTION:
using #pragma comment(lib, "../../xxx.lib") using Visual studio project option What is the advantage and disadvantage between two method? I'm finding way which is better convenient to manage for many projects. And what method does Micro... | [
"windows",
"visual-studio"
] | 27 | 21 | 7,062 | 1 | 0 | 2011-06-09T02:08:03.663000 | 2011-06-09T03:22:18.810000 |
6,287,342 | 6,287,742 | how to use jQuery in Rails helper | I am trying to use the tabs function from jQuery UI in a Rails app. I am using a helper for the navigation and I would like to keep it that way. The code in my helper is: def links_for_navigation html = "" html = < Courses Parts Categories <% link_to "Courses", courses_path %> <% link_to "Parts", parts_path %> <% link_... | I recommend using a partial, rather than a helper method. The partial, I'll call it _nav.html.erb, would look like the following (note the id="tabs" on the surrounding div ): Courses Parts Categories <%= link_to "Courses", courses_path %> <%= link_to "Parts", parts_path %> <%= link_to "Categories", categories_path %> T... | how to use jQuery in Rails helper I am trying to use the tabs function from jQuery UI in a Rails app. I am using a helper for the navigation and I would like to keep it that way. The code in my helper is: def links_for_navigation html = "" html = < Courses Parts Categories <% link_to "Courses", courses_path %> <% link_... | TITLE:
how to use jQuery in Rails helper
QUESTION:
I am trying to use the tabs function from jQuery UI in a Rails app. I am using a helper for the navigation and I would like to keep it that way. The code in my helper is: def links_for_navigation html = "" html = < Courses Parts Categories <% link_to "Courses", course... | [
"ruby-on-rails",
"jquery-ui"
] | 3 | 4 | 1,800 | 1 | 0 | 2011-06-09T02:08:47.427000 | 2011-06-09T03:16:57.733000 |
6,287,345 | 6,287,370 | Javascript - value exists, then disappears, then appears again? | This is driving me nuts. I can't work it out stepping through with Firebug either. Can someone please explain what is going on here? Basically I have an incoming text file where each line contains a pipe-delimited record. I'm splitting these into an array of array of string for later use in an autocomplete textbox. The... | You are forgetting that the get() function is an asynchronous function. The callback you define inside will only get called once the file is loaded. In essence, the JavaScript interpreter puts it in a queue ready for when the action completes, and then allows the rest of the code to execute. So, your alert in the callb... | Javascript - value exists, then disappears, then appears again? This is driving me nuts. I can't work it out stepping through with Firebug either. Can someone please explain what is going on here? Basically I have an incoming text file where each line contains a pipe-delimited record. I'm splitting these into an array ... | TITLE:
Javascript - value exists, then disappears, then appears again?
QUESTION:
This is driving me nuts. I can't work it out stepping through with Firebug either. Can someone please explain what is going on here? Basically I have an incoming text file where each line contains a pipe-delimited record. I'm splitting th... | [
"javascript",
"jquery",
"multidimensional-array",
"scope",
"string-parsing"
] | 2 | 5 | 779 | 1 | 0 | 2011-06-09T02:09:34.897000 | 2011-06-09T02:14:36.637000 |
6,287,348 | 6,287,396 | Project Euler #11 | I recently started these projects to test my skills with Java. I got to problem 11, getting all the previous ones right. There is something wrong with my code. The answer that is returned seems to be correct, but it isn't when I check it on the official website: The problem is at Project Euler #11. Here is my code. I h... | You are checking the same diagonal lines both times. Draw the lines you are checking in the grid (on paper), to see this easily. Change one of them to add from X and subtract from Y (or the other way around). | Project Euler #11 I recently started these projects to test my skills with Java. I got to problem 11, getting all the previous ones right. There is something wrong with my code. The answer that is returned seems to be correct, but it isn't when I check it on the official website: The problem is at Project Euler #11. He... | TITLE:
Project Euler #11
QUESTION:
I recently started these projects to test my skills with Java. I got to problem 11, getting all the previous ones right. There is something wrong with my code. The answer that is returned seems to be correct, but it isn't when I check it on the official website: The problem is at Pro... | [
"java",
"loops",
"math",
"multiplication"
] | 4 | 5 | 4,497 | 6 | 0 | 2011-06-09T02:10:00.967000 | 2011-06-09T02:18:34.740000 |
6,287,351 | 6,287,394 | Drupal7 - Adding jQuery plugin in a block | I added the jQuery plugin smoothdivscroll to a block, it's works though it is not good to hard code all stuff to the block. I found that Drupal have already called jQuery core file in each page, but why the smoothdivscroll can't getting works if I don't add the jQuery core file AGAIN in the block? | It's because stock Drupal 7 runs jQuery in no conflict mode. If you want to use it you'll have to either replace your $() calls with jQuery() calls, or wrap it in a function like this: // We define a function that takes one parameter named $. (function ($) { // Now use jQuery with the $ shortcut again like you normally... | Drupal7 - Adding jQuery plugin in a block I added the jQuery plugin smoothdivscroll to a block, it's works though it is not good to hard code all stuff to the block. I found that Drupal have already called jQuery core file in each page, but why the smoothdivscroll can't getting works if I don't add the jQuery core file... | TITLE:
Drupal7 - Adding jQuery plugin in a block
QUESTION:
I added the jQuery plugin smoothdivscroll to a block, it's works though it is not good to hard code all stuff to the block. I found that Drupal have already called jQuery core file in each page, but why the smoothdivscroll can't getting works if I don't add th... | [
"drupal"
] | 0 | 3 | 2,158 | 1 | 0 | 2011-06-09T02:10:13.007000 | 2011-06-09T02:18:23.023000 |
6,287,353 | 6,287,367 | Open all links in new tabs with jQuery | I have some links that are placed in my page dynamically via JSON and have no way to directly edit them. I want to force all links to open in new tabs, ala target="_blank" Thought this would work.. but sadly it isn't. Any ideas? $('a').attr("target","_blank"); Here's a jsFiddle with the dynamic code: http://jsfiddle.ne... | You could do this (which lets the users browser decide whether to open a new window or tab) $('a').live('click', function() { window.open($(this).attr('href')); return false; }); For jQuery 1.7+: $(document).on('click', 'a', function() { window.open($(this).attr('href')); return false; }); | Open all links in new tabs with jQuery I have some links that are placed in my page dynamically via JSON and have no way to directly edit them. I want to force all links to open in new tabs, ala target="_blank" Thought this would work.. but sadly it isn't. Any ideas? $('a').attr("target","_blank"); Here's a jsFiddle wi... | TITLE:
Open all links in new tabs with jQuery
QUESTION:
I have some links that are placed in my page dynamically via JSON and have no way to directly edit them. I want to force all links to open in new tabs, ala target="_blank" Thought this would work.. but sadly it isn't. Any ideas? $('a').attr("target","_blank"); He... | [
"jquery",
"anchor",
"target",
"attr"
] | 11 | 14 | 13,290 | 5 | 0 | 2011-06-09T02:10:18.847000 | 2011-06-09T02:14:01.533000 |
6,287,358 | 6,287,462 | Michael Hartl guide chapter 5 LayoutLinks should have a Home page at '/' issue | I have been having this issue for a while now and I cannot seem to wrap my brain around as I have recreated everything from scratch numerous times Anyways I am at the part of the book where we want the home page link to go from http://localhost:3000/pages/home (This worked perfectly by the way) to http://localhost:3000... | Add "end" to the end of your routes.rb:) There is a block, that opens with "do" and you didn't close it. Check the listing 5.20 carefully. | Michael Hartl guide chapter 5 LayoutLinks should have a Home page at '/' issue I have been having this issue for a while now and I cannot seem to wrap my brain around as I have recreated everything from scratch numerous times Anyways I am at the part of the book where we want the home page link to go from http://localh... | TITLE:
Michael Hartl guide chapter 5 LayoutLinks should have a Home page at '/' issue
QUESTION:
I have been having this issue for a while now and I cannot seem to wrap my brain around as I have recreated everything from scratch numerous times Anyways I am at the part of the book where we want the home page link to go ... | [
"ruby-on-rails-3"
] | 0 | 0 | 166 | 1 | 0 | 2011-06-09T02:11:52.413000 | 2011-06-09T02:31:16.430000 |
6,287,362 | 6,287,901 | PyQT - creating a large list of actions | I'm working on some code where I need to create a list of QActions corresponding to the COM ports on the system, which will be added to the menu bar depending upon which COM ports are available. It looks sort of like this: self.actionCOM1 = QtGui.QAction(QtGui.QIcon(''), 'COM1', self) self.actionCOM1.setCheckable(True)... | Do you mean something like this? num = 10 for i in range(num): setattr(self, "actionCOM%d" % i, QtGui.QAction(QtGui.QIcon(''), "COM%d" % i, self)) action = getattr(self, "actionCOM%d" % i) action.setCheckable(True) self.COMPorts.append(action) | PyQT - creating a large list of actions I'm working on some code where I need to create a list of QActions corresponding to the COM ports on the system, which will be added to the menu bar depending upon which COM ports are available. It looks sort of like this: self.actionCOM1 = QtGui.QAction(QtGui.QIcon(''), 'COM1', ... | TITLE:
PyQT - creating a large list of actions
QUESTION:
I'm working on some code where I need to create a list of QActions corresponding to the COM ports on the system, which will be added to the menu bar depending upon which COM ports are available. It looks sort of like this: self.actionCOM1 = QtGui.QAction(QtGui.Q... | [
"python",
"loops",
"pyqt"
] | 0 | 1 | 407 | 2 | 0 | 2011-06-09T02:12:25.403000 | 2011-06-09T03:52:21.427000 |
6,287,364 | 6,287,372 | what is the best way to have a SQL that only looks at MAX of a date field | i want to query a table where one column is run_date. I want to only retrieve results where run_date is the latest run_date in run_date column. is it possible to have a dynamic query like this. something like: Select * from Order where DateUpdated = Max(DateUpdated) | This will return you all results with the latest DateUpdated. Select * from Order where DateUpdated = (SELECT Max(DateUpdated) FROM Order ) | what is the best way to have a SQL that only looks at MAX of a date field i want to query a table where one column is run_date. I want to only retrieve results where run_date is the latest run_date in run_date column. is it possible to have a dynamic query like this. something like: Select * from Order where DateUpdate... | TITLE:
what is the best way to have a SQL that only looks at MAX of a date field
QUESTION:
i want to query a table where one column is run_date. I want to only retrieve results where run_date is the latest run_date in run_date column. is it possible to have a dynamic query like this. something like: Select * from Orde... | [
"sql",
"sql-server"
] | 2 | 7 | 87 | 3 | 0 | 2011-06-09T02:12:54.180000 | 2011-06-09T02:15:02.003000 |
6,287,366 | 6,287,452 | WCF - how to expose strongly typed objects to clients from a base type (without client casting?) | I have a WCF service that needs to return different types of Quotes (ie Quote1, Quote2, Quote3) -- all inherit from Quote My plan is to expose a single method Quote GetQuote(Message message); However then I am forcing the client to do something like this if (quote is Quote1) elseif (quote is Quote2) etc Without having ... | If you are using DataContracts then you can decorate them with the KnownTypeAttribute. | WCF - how to expose strongly typed objects to clients from a base type (without client casting?) I have a WCF service that needs to return different types of Quotes (ie Quote1, Quote2, Quote3) -- all inherit from Quote My plan is to expose a single method Quote GetQuote(Message message); However then I am forcing the c... | TITLE:
WCF - how to expose strongly typed objects to clients from a base type (without client casting?)
QUESTION:
I have a WCF service that needs to return different types of Quotes (ie Quote1, Quote2, Quote3) -- all inherit from Quote My plan is to expose a single method Quote GetQuote(Message message); However then ... | [
"c#",
"wcf",
"inheritance",
"casting"
] | 3 | 2 | 1,017 | 2 | 0 | 2011-06-09T02:13:58.827000 | 2011-06-09T02:28:48.253000 |
6,287,375 | 6,289,025 | How to sort an unsorted binary leaf tree in parallel in haskell? | Possible Duplicate: Can I represent a Red-black tree as binary leaf tree? The following is just an example of small binary leaf tree with items in the leaves only and they are not sorted. Without flattening the tree, and then sorting it before building a sorted tree again, is there a way to sort it in parallel (using p... | To say "without flattening" is meaningless, as the tree has to be deconstructed and reconstructed anyway: Even in your simple example every single node must be changed, so you can't save anything from the existing structure. Read the tree, perform a suitable sorting algorithm (merge sort seems to be a good choice here,... | How to sort an unsorted binary leaf tree in parallel in haskell? Possible Duplicate: Can I represent a Red-black tree as binary leaf tree? The following is just an example of small binary leaf tree with items in the leaves only and they are not sorted. Without flattening the tree, and then sorting it before building a ... | TITLE:
How to sort an unsorted binary leaf tree in parallel in haskell?
QUESTION:
Possible Duplicate: Can I represent a Red-black tree as binary leaf tree? The following is just an example of small binary leaf tree with items in the leaves only and they are not sorted. Without flattening the tree, and then sorting it ... | [
"sorting",
"haskell",
"tree",
"parallel-processing"
] | 1 | 2 | 890 | 1 | 0 | 2011-06-09T02:15:43.293000 | 2011-06-09T06:44:14.327000 |
6,287,395 | 6,287,522 | Prevent two object internals from aliasing | I have a function signature similiar to this void Mutliply(const MatrixMN& a, const MatrixMN& b, MatrixMN& out); Internally the matrix class has a float* data; that represents the m x n components. I'd like to tell the compiler that a and b do not alias the out matrix so it doesn't do a ton of load-stores. How would I ... | Write a non-exported (file- static, private ) multiplication function that takes float* arguments, mark the arguments with restrict. Make Multiply call this function. | Prevent two object internals from aliasing I have a function signature similiar to this void Mutliply(const MatrixMN& a, const MatrixMN& b, MatrixMN& out); Internally the matrix class has a float* data; that represents the m x n components. I'd like to tell the compiler that a and b do not alias the out matrix so it do... | TITLE:
Prevent two object internals from aliasing
QUESTION:
I have a function signature similiar to this void Mutliply(const MatrixMN& a, const MatrixMN& b, MatrixMN& out); Internally the matrix class has a float* data; that represents the m x n components. I'd like to tell the compiler that a and b do not alias the o... | [
"c++",
"pointer-aliasing",
"restrict-qualifier"
] | 6 | 1 | 506 | 4 | 0 | 2011-06-09T02:18:27.907000 | 2011-06-09T02:38:46.743000 |
6,287,397 | 6,287,512 | An efficient algorithm to move ostrichs along a line at a constant speed | Problem: move an object along a straight line at a constant speed in the Cartesian coordinate system (x,y only). The rate of update is unstable. The movement speed must be close to exact and the object must arrive very close to the destination. The line's source and destination may be anywhere. Given: the source and de... | An asside: There is an answer on the SO regarding this, and it's good, however it presumes that total time spend traveling is given. basic physics to the rescue total time spent traveling = distance/speed btw Math.hypot(limitX,limitY) is faster than Math.sqrt(Math.pow(limitX, 2) + Math.pow(limitY, 2)) though really it'... | An efficient algorithm to move ostrichs along a line at a constant speed Problem: move an object along a straight line at a constant speed in the Cartesian coordinate system (x,y only). The rate of update is unstable. The movement speed must be close to exact and the object must arrive very close to the destination. Th... | TITLE:
An efficient algorithm to move ostrichs along a line at a constant speed
QUESTION:
Problem: move an object along a straight line at a constant speed in the Cartesian coordinate system (x,y only). The rate of update is unstable. The movement speed must be close to exact and the object must arrive very close to t... | [
"java",
"algorithm",
"performance"
] | 3 | 2 | 1,400 | 3 | 0 | 2011-06-09T02:18:59.510000 | 2011-06-09T02:37:32.447000 |
6,287,406 | 6,287,468 | Command to save files in MATLAB on Linux OS | My situation here is that I need to send my program to my university's cluster which runs on Linux. To save file on my com locally using Windows, I simply use fid = fopen('exp.txt', 'w'); fprintf(fid, '%6.2f %12.8f\n', y); fclose(fid); What is the Linux equivalent of this command if I want to save to a directory on the... | If you just start MatLab while you're in your desired directory ( cd /path/to/dir/ to change current directory), your existing code will still work. If you need a different working directory (e.g. to find scripts and other data files), fopen('/path/to/exp.txt', 'w'); should help. | Command to save files in MATLAB on Linux OS My situation here is that I need to send my program to my university's cluster which runs on Linux. To save file on my com locally using Windows, I simply use fid = fopen('exp.txt', 'w'); fprintf(fid, '%6.2f %12.8f\n', y); fclose(fid); What is the Linux equivalent of this com... | TITLE:
Command to save files in MATLAB on Linux OS
QUESTION:
My situation here is that I need to send my program to my university's cluster which runs on Linux. To save file on my com locally using Windows, I simply use fid = fopen('exp.txt', 'w'); fprintf(fid, '%6.2f %12.8f\n', y); fclose(fid); What is the Linux equi... | [
"linux",
"matlab",
"saving-data"
] | 0 | 1 | 1,151 | 1 | 0 | 2011-06-09T02:20:21.647000 | 2011-06-09T02:31:45.693000 |
6,287,407 | 6,287,434 | Java generics - getting a method to return the same type as the first parameter | Something like this is what Im trying to achieve: public Attribute getAttribute(Class attributeClass){ for(Attribute attribute: attributes) if(attributeClass.isInstance(attribute)) return attributeClass.cast(attribute); return null; } where the Attribute<?> is obviously the incorrect part. I want the return type of thi... | this is what you need public T getAttribute(Class attributeClass){ you need to specify the generic type before the return type | Java generics - getting a method to return the same type as the first parameter Something like this is what Im trying to achieve: public Attribute getAttribute(Class attributeClass){ for(Attribute attribute: attributes) if(attributeClass.isInstance(attribute)) return attributeClass.cast(attribute); return null; } where... | TITLE:
Java generics - getting a method to return the same type as the first parameter
QUESTION:
Something like this is what Im trying to achieve: public Attribute getAttribute(Class attributeClass){ for(Attribute attribute: attributes) if(attributeClass.isInstance(attribute)) return attributeClass.cast(attribute); re... | [
"java",
"generics",
"types",
"return",
"return-type"
] | 14 | 22 | 6,741 | 2 | 0 | 2011-06-09T02:20:26.687000 | 2011-06-09T02:25:52.650000 |
6,287,416 | 6,287,672 | Get value from a different element when creating an event handler | I have a series of HIDDEN contactID elements listed on a page and I've assigned an event handler to a nearby anchor (clicking the anchor pops up the contact's profile). I want to be able to pass in the value of the HIDDEN element when creating the event handler (the anchor might not be right next to the HIDDEN element,... | The usual strategy here would be to give the link an href attribute so that if scripting isn't available or fails on the client, the server can fulfil the request. In that case, the required value can be in the href attribute. If scripting is available, get the value from the href, cancel naviation and complete the req... | Get value from a different element when creating an event handler I have a series of HIDDEN contactID elements listed on a page and I've assigned an event handler to a nearby anchor (clicking the anchor pops up the contact's profile). I want to be able to pass in the value of the HIDDEN element when creating the event ... | TITLE:
Get value from a different element when creating an event handler
QUESTION:
I have a series of HIDDEN contactID elements listed on a page and I've assigned an event handler to a nearby anchor (clicking the anchor pops up the contact's profile). I want to be able to pass in the value of the HIDDEN element when c... | [
"javascript",
"html",
"dom-events"
] | 0 | 1 | 100 | 2 | 0 | 2011-06-09T02:21:54.643000 | 2011-06-09T03:02:36.617000 |
6,287,430 | 6,287,457 | Upgrade from SQL Server 2008 Standard to Developer? | I have installed SQL Server 2008 Standard edition and I want to upgrade it to Developer version. I installed the Standard version for my MSDN subscription. I have tried to upgrade from the Standard ISO and Developer ISO and it does not give you an option to upgrade. It ask for a product key but MSDN states "No key is r... | Just install the developer version next to the standard version. You can uninstall the standard edition if you want. The database.mdf files can be used by either. Detach them from the standard edition and attach them to the developer edition. | Upgrade from SQL Server 2008 Standard to Developer? I have installed SQL Server 2008 Standard edition and I want to upgrade it to Developer version. I installed the Standard version for my MSDN subscription. I have tried to upgrade from the Standard ISO and Developer ISO and it does not give you an option to upgrade. I... | TITLE:
Upgrade from SQL Server 2008 Standard to Developer?
QUESTION:
I have installed SQL Server 2008 Standard edition and I want to upgrade it to Developer version. I installed the Standard version for my MSDN subscription. I have tried to upgrade from the Standard ISO and Developer ISO and it does not give you an op... | [
"sql-server",
"sql-server-2008"
] | 6 | 6 | 4,577 | 2 | 0 | 2011-06-09T02:25:37.010000 | 2011-06-09T02:30:02.587000 |
6,287,454 | 6,287,500 | How can I default/focus to a button with jquery | Does anyone know how can I default/focus a button by using jquery? If I have a page with 3 input box and 3 button for difference action. How could I default the button when the user enter value into the input box. Example: Based in the following code, let say when the use key in the value under age input, then pressed ... | function buttonClicked(e) { code = (e.keyCode? e.keyCode: e.which); if (code == 13) { setTimeout(function () { $('#btnNameSearch').click(); }, 0); return false; } else { return true; } } Then on add an keydown event onkeydown="return buttonClicked(event);". | How can I default/focus to a button with jquery Does anyone know how can I default/focus a button by using jquery? If I have a page with 3 input box and 3 button for difference action. How could I default the button when the user enter value into the input box. Example: Based in the following code, let say when the use... | TITLE:
How can I default/focus to a button with jquery
QUESTION:
Does anyone know how can I default/focus a button by using jquery? If I have a page with 3 input box and 3 button for difference action. How could I default the button when the user enter value into the input box. Example: Based in the following code, le... | [
"jquery",
"html"
] | 0 | 0 | 557 | 2 | 0 | 2011-06-09T02:29:26.700000 | 2011-06-09T02:35:48.770000 |
6,287,456 | 6,287,530 | Python date object for MongoDB | I'm needing to prepare a date for insertion into MongoDB based on user input (string). Code: from datetime import datetime import time... self.d_birthdate = time.strptime('6/8/1980', '%m/%d/%Y') self.d_created = dict.get('d_created', datetime.now())... The d_created attribute works fine, but b_birthdate doesn't since I... | You can convert the time.time_struct object to a datetime.datetime object: from datetime import datetime from time import mktime
birthdate = time.strptime('6/8/1980', '%m/%d/%Y') self.d_birthdate = datetime.fromtimestamp(mktime(birthdate)) In newer versions of Python (I'm fairly sure you can't in 2.4) you could do: se... | Python date object for MongoDB I'm needing to prepare a date for insertion into MongoDB based on user input (string). Code: from datetime import datetime import time... self.d_birthdate = time.strptime('6/8/1980', '%m/%d/%Y') self.d_created = dict.get('d_created', datetime.now())... The d_created attribute works fine, ... | TITLE:
Python date object for MongoDB
QUESTION:
I'm needing to prepare a date for insertion into MongoDB based on user input (string). Code: from datetime import datetime import time... self.d_birthdate = time.strptime('6/8/1980', '%m/%d/%Y') self.d_created = dict.get('d_created', datetime.now())... The d_created attr... | [
"python",
"django",
"mongodb"
] | 2 | 3 | 1,915 | 1 | 0 | 2011-06-09T02:29:45.020000 | 2011-06-09T02:40:38.443000 |
6,287,459 | 6,287,587 | python function of a default argument | How can I access qux inside methods? Do I really have to define it again inside the body of foo(), or is there a way to import it from self? class Baz(object):
qux = lambda x: x + '_quux'
def foo(self, bar=qux('fred')): print bar
print qux('waldo') # NameError: global name 'qux' is not defined
print Baz.qux('waldo'... | qux is being treated like an instance method, because that's the default handling for class members that look like functions (more specifically, Baz.qux has a __get__ that is implicitly called to "bind" the first parameter to the instance, when you look it up via an instance). However, you haven't provided a self param... | python function of a default argument How can I access qux inside methods? Do I really have to define it again inside the body of foo(), or is there a way to import it from self? class Baz(object):
qux = lambda x: x + '_quux'
def foo(self, bar=qux('fred')): print bar
print qux('waldo') # NameError: global name 'qux'... | TITLE:
python function of a default argument
QUESTION:
How can I access qux inside methods? Do I really have to define it again inside the body of foo(), or is there a way to import it from self? class Baz(object):
qux = lambda x: x + '_quux'
def foo(self, bar=qux('fred')): print bar
print qux('waldo') # NameError:... | [
"python",
"function",
"lambda",
"arguments"
] | 4 | 1 | 1,516 | 3 | 0 | 2011-06-09T02:30:49.393000 | 2011-06-09T02:48:42.540000 |
6,287,460 | 6,287,647 | Make sure all threads exited | In a win form application, I have an array of threads which are started like this: bool stop = false; Thread[] threads = new Thread[10];
for (int i = 0; i < threads.Length; i++) threads[i] = new Thread(new ThreadStart(Job));
// How to make sure all threads have exited, when the boolean = false
void Job() { while (!s... | Have you thought about using BackgroundWorkers instead? You said "traditional threads"..I'm not exactly sure what you mean so I don't know if this is a valid proposal or not, but here it is anyways in case Join() doesn't solve your problem BackgroundWorker[] workers = new BackgroundWorker[10]; bool allThreadsDone = fal... | Make sure all threads exited In a win form application, I have an array of threads which are started like this: bool stop = false; Thread[] threads = new Thread[10];
for (int i = 0; i < threads.Length; i++) threads[i] = new Thread(new ThreadStart(Job));
// How to make sure all threads have exited, when the boolean = ... | TITLE:
Make sure all threads exited
QUESTION:
In a win form application, I have an array of threads which are started like this: bool stop = false; Thread[] threads = new Thread[10];
for (int i = 0; i < threads.Length; i++) threads[i] = new Thread(new ThreadStart(Job));
// How to make sure all threads have exited, w... | [
"c#",
"multithreading",
"synchronization"
] | 6 | 4 | 831 | 3 | 0 | 2011-06-09T02:31:12.313000 | 2011-06-09T02:58:47.140000 |
6,287,464 | 6,287,556 | PHP / MySQL How to get values from one table and check against another table | I'm creating a small voting application. I need to get the images and their vote counts from one table, and then check another vote table to see if the user has already voted for each of these images already. To get the images from the image table I'm doing this: SELECT id, file_name, total_votes FROM _images WHERE app... | Using LEFT JOIN/IS NULL: SELECT i.id, i.file_name, i.total_votes FROM _images i LEFT JOIN VOTES v ON v.image_id = i.id AND v.voter_id =? WHERE approved = 1 ORDER BY total_votes DESC LIMIT ".($page*5).", 5" Using NOT EXISTS SELECT i.id, i.file_name, i.total_votes FROM _images i WHERE approved = 1 AND NOT EXISTS (SELECT ... | PHP / MySQL How to get values from one table and check against another table I'm creating a small voting application. I need to get the images and their vote counts from one table, and then check another vote table to see if the user has already voted for each of these images already. To get the images from the image t... | TITLE:
PHP / MySQL How to get values from one table and check against another table
QUESTION:
I'm creating a small voting application. I need to get the images and their vote counts from one table, and then check another vote table to see if the user has already voted for each of these images already. To get the image... | [
"php",
"mysql",
"mysqli"
] | 0 | 3 | 1,732 | 1 | 0 | 2011-06-09T02:31:23.763000 | 2011-06-09T02:43:05.323000 |
6,287,467 | 6,287,616 | Way to slim down this if..else statement even more? | $specify_step = ($_GET['specify_step'])? $_GET['specify_step']: getNextStep($returnId,$type); Given the above statement, is there a way to shorthand this if statement even more so that I don't have to say $_GET['specify_step'] twice? In the cases when I'm accessing GET or COOKIES etc, it always seems redundant and "wor... | $specify_step = ($_GET['specify_step'])?: getNextStep($returnId,$type); It made enough logical sense to me that I had to go look it up....and according to php.net, it works in PHP 5.3. If you're using 5.3, you're in luck. | Way to slim down this if..else statement even more? $specify_step = ($_GET['specify_step'])? $_GET['specify_step']: getNextStep($returnId,$type); Given the above statement, is there a way to shorthand this if statement even more so that I don't have to say $_GET['specify_step'] twice? In the cases when I'm accessing GE... | TITLE:
Way to slim down this if..else statement even more?
QUESTION:
$specify_step = ($_GET['specify_step'])? $_GET['specify_step']: getNextStep($returnId,$type); Given the above statement, is there a way to shorthand this if statement even more so that I don't have to say $_GET['specify_step'] twice? In the cases whe... | [
"php",
"syntax"
] | 0 | 1 | 262 | 4 | 0 | 2011-06-09T02:31:38.070000 | 2011-06-09T02:54:09.450000 |
6,287,472 | 6,287,499 | Visual Studio 2008, Timer, c# | If i want my application to do something every 2hr (eg. pop up a message), how do i do that? Do i program that set of code under onLoad() or somewhere else? | Assuming WinForms. You should use Windows Timer Class Drag and drop timer component to your form. Set interval to 7200000 (2 * 60 * 60 * 1000) milliseconds. Subscribe to Tick event (the only event that this component has). private void timer1_Tick(object sender, EventArgs e) { MessageBox.Show("Example"); } The code ins... | Visual Studio 2008, Timer, c# If i want my application to do something every 2hr (eg. pop up a message), how do i do that? Do i program that set of code under onLoad() or somewhere else? | TITLE:
Visual Studio 2008, Timer, c#
QUESTION:
If i want my application to do something every 2hr (eg. pop up a message), how do i do that? Do i program that set of code under onLoad() or somewhere else?
ANSWER:
Assuming WinForms. You should use Windows Timer Class Drag and drop timer component to your form. Set inte... | [
"c#",
".net",
"visual-studio-2008",
"timer"
] | 1 | 4 | 2,232 | 3 | 0 | 2011-06-09T02:32:49.770000 | 2011-06-09T02:35:44.713000 |
6,287,476 | 6,287,521 | Creating barcodes locally in iOS | I've been searching all day for a library that makes barcodes, but they're all readers not creators. I've found a few that (maybe) work. Jeff LaMarche's works, but for some reason it can't be detected by any readers. The other ones were very expensive to license and didn't fit my needs. Does anyone know of a good way t... | Have you tried using a custom barcode font? There are many types of fonts that you can include in your app. | Creating barcodes locally in iOS I've been searching all day for a library that makes barcodes, but they're all readers not creators. I've found a few that (maybe) work. Jeff LaMarche's works, but for some reason it can't be detected by any readers. The other ones were very expensive to license and didn't fit my needs.... | TITLE:
Creating barcodes locally in iOS
QUESTION:
I've been searching all day for a library that makes barcodes, but they're all readers not creators. I've found a few that (maybe) work. Jeff LaMarche's works, but for some reason it can't be detected by any readers. The other ones were very expensive to license and di... | [
"iphone"
] | 2 | 4 | 608 | 1 | 0 | 2011-06-09T02:33:25.043000 | 2011-06-09T02:38:31.327000 |
6,287,481 | 6,287,555 | CSS/HTML Speech Bubbles | What would be the best way to do the following "speech bubbles" in html/css? Thanks! | Here is a JSFiddle with what you want http://jsfiddle.net/CDksf/4/ CSS:.bubble_wrap { overflow: auto; width: 520px; margin-bottom: 10px; float: left; }.bubble_wrap.bubble_image { float: left; width: 100px; height: 100px; background-color: red; margin-right: 20px; }.bubble_wrap.bubble_content { width: 400px; height: 100... | CSS/HTML Speech Bubbles What would be the best way to do the following "speech bubbles" in html/css? Thanks! | TITLE:
CSS/HTML Speech Bubbles
QUESTION:
What would be the best way to do the following "speech bubbles" in html/css? Thanks!
ANSWER:
Here is a JSFiddle with what you want http://jsfiddle.net/CDksf/4/ CSS:.bubble_wrap { overflow: auto; width: 520px; margin-bottom: 10px; float: left; }.bubble_wrap.bubble_image { float... | [
"html",
"css"
] | 2 | 3 | 898 | 1 | 0 | 2011-06-09T02:33:41.360000 | 2011-06-09T02:42:58.117000 |
6,287,489 | 6,287,519 | SQL query- probably wrong | I am trying this query, but didn't work INSERT INTO single_user (location_home.id_location_home ) SELECT location_home.id_location_home WHERE location_home.location = 'London' Any help? error: for the right syntax to use near 'WHERE location_home.location = 'London'' at line 3 thanks | INSERT INTO single_user (location_home.id_location_home ) SELECT location_home.id_location_home FROM some_table WHERE location_home.location = 'London' You forgot the FROM clause. | SQL query- probably wrong I am trying this query, but didn't work INSERT INTO single_user (location_home.id_location_home ) SELECT location_home.id_location_home WHERE location_home.location = 'London' Any help? error: for the right syntax to use near 'WHERE location_home.location = 'London'' at line 3 thanks | TITLE:
SQL query- probably wrong
QUESTION:
I am trying this query, but didn't work INSERT INTO single_user (location_home.id_location_home ) SELECT location_home.id_location_home WHERE location_home.location = 'London' Any help? error: for the right syntax to use near 'WHERE location_home.location = 'London'' at line ... | [
"mysql",
"database"
] | 0 | 0 | 27 | 2 | 0 | 2011-06-09T02:34:15.353000 | 2011-06-09T02:38:18.810000 |
6,287,490 | 6,287,680 | UITextView in tableHeaderView can't find delegate | I have a UITableView tableHeaderView defined in a nib file. The tableHeaderView contains a UITextView. The UITextView's delegate is set to the UITableViewController and the UITableViewController supports the UITextViewDelegate protocol. The UITableViewController is setting various properties in the tableHeaderView incl... | textFieldShouldReturn is a method of UITextFieldDelegate and not UITextViewDelegate. Thats probably your problem. | UITextView in tableHeaderView can't find delegate I have a UITableView tableHeaderView defined in a nib file. The tableHeaderView contains a UITextView. The UITextView's delegate is set to the UITableViewController and the UITableViewController supports the UITextViewDelegate protocol. The UITableViewController is sett... | TITLE:
UITextView in tableHeaderView can't find delegate
QUESTION:
I have a UITableView tableHeaderView defined in a nib file. The tableHeaderView contains a UITextView. The UITextView's delegate is set to the UITableViewController and the UITableViewController supports the UITextViewDelegate protocol. The UITableView... | [
"iphone",
"ios",
"uitableview",
"uitextviewdelegate"
] | 1 | 2 | 600 | 1 | 0 | 2011-06-09T02:34:21.003000 | 2011-06-09T03:03:47.483000 |
6,287,495 | 6,287,540 | 400 Bad Request Error uploading videos to YouTube using C# YouTube API | I can't seem to get my ASP.net application to succesfully publish to my YouTube account but not matter what I do I get a 400 Bad Request error. I used the YouTube documentation to create my code and obtaining a dev key. Also, I am not receiving and authentication error so I believe that my parameters are correct. Despi... | According to the response, your media:category might be incorrect. Try: video.Tags.Add(new MediaCategory("Sports", YouTubeNameTable.CategorySchema)); | 400 Bad Request Error uploading videos to YouTube using C# YouTube API I can't seem to get my ASP.net application to succesfully publish to my YouTube account but not matter what I do I get a 400 Bad Request error. I used the YouTube documentation to create my code and obtaining a dev key. Also, I am not receiving and ... | TITLE:
400 Bad Request Error uploading videos to YouTube using C# YouTube API
QUESTION:
I can't seem to get my ASP.net application to succesfully publish to my YouTube account but not matter what I do I get a 400 Bad Request error. I used the YouTube documentation to create my code and obtaining a dev key. Also, I am ... | [
"c#",
"asp.net",
"youtube",
"youtube-api",
"youtube.net-api"
] | 4 | 5 | 3,763 | 2 | 0 | 2011-06-09T02:35:13.213000 | 2011-06-09T02:41:48.047000 |
6,287,498 | 6,287,574 | jQuery fade through a list of elements then restart at the beginning | I have a slideshow of sorts- clicking on an image fades it out and fades in the next via jQuery's.next() When it hits the end of the list, it doesn't skip back to the beginning (naturally) because there's no element that's next. What can I add to my code to start it back at the beginning after it gets to the end? Here'... | very simple fix. hide #two and #three with css #two,#three {display: none;} and change Jquery to this $('.slide').click(function(){ $(this).fadeOut().next().fadeIn(); $(this).insertAfter('.slide:last'); }); basically after you hide the first one move it to the end. updated live example: http://jsfiddle.net/XeCUf/ note:... | jQuery fade through a list of elements then restart at the beginning I have a slideshow of sorts- clicking on an image fades it out and fades in the next via jQuery's.next() When it hits the end of the list, it doesn't skip back to the beginning (naturally) because there's no element that's next. What can I add to my c... | TITLE:
jQuery fade through a list of elements then restart at the beginning
QUESTION:
I have a slideshow of sorts- clicking on an image fades it out and fades in the next via jQuery's.next() When it hits the end of the list, it doesn't skip back to the beginning (naturally) because there's no element that's next. What... | [
"jquery",
"list",
"slideshow",
"fadein",
"fadeout"
] | 0 | 2 | 1,866 | 4 | 0 | 2011-06-09T02:35:32.250000 | 2011-06-09T02:47:20.010000 |
6,287,502 | 6,287,576 | Make images be downloaded even if they are not being shown | I have a html: Button The image button_hover.png is only being downloaded when I hover the button. I know that it is the default browser behaviour. Is there some way to force the download of the image? If yes, how? (I would prefer not to use JavaScript, but I could if there was no other choice). Thanks and sorry for my... | The standard way to do an a & a:hover state is to use a sprite that contains both states of the image. Then instead of having to load an image for the hover state (which is really ugly), you instead get both "images" at the same time. a.button { background: url('button.png') repeat-x; background-position: 0px 0px; } a.... | Make images be downloaded even if they are not being shown I have a html: Button The image button_hover.png is only being downloaded when I hover the button. I know that it is the default browser behaviour. Is there some way to force the download of the image? If yes, how? (I would prefer not to use JavaScript, but I c... | TITLE:
Make images be downloaded even if they are not being shown
QUESTION:
I have a html: Button The image button_hover.png is only being downloaded when I hover the button. I know that it is the default browser behaviour. Is there some way to force the download of the image? If yes, how? (I would prefer not to use J... | [
"html",
"css"
] | 1 | 2 | 123 | 3 | 0 | 2011-06-09T02:35:53.667000 | 2011-06-09T02:47:30.993000 |
6,287,508 | 6,288,997 | How to set the first item as selected | I have 2 ListView controls here, let's say Listview1 and Listview2, respectively. What I would like to achieve is that I want the first item in Listview2 to be selected & highlighted whenever Listview1's SelectionChanged event is triggered. I have tried to use the following line of code to make it happened but I guess ... | I tried with this code and its running fine. private void listView1_SelectedIndexChanged(object sender, EventArgs e) { try { //listView.Focus(); listView2.Items[0].Selected = true; } catch { } } But after running its output when i select the first item in "listView1" the item of "listView2" is selected but you can not ... | How to set the first item as selected I have 2 ListView controls here, let's say Listview1 and Listview2, respectively. What I would like to achieve is that I want the first item in Listview2 to be selected & highlighted whenever Listview1's SelectionChanged event is triggered. I have tried to use the following line of... | TITLE:
How to set the first item as selected
QUESTION:
I have 2 ListView controls here, let's say Listview1 and Listview2, respectively. What I would like to achieve is that I want the first item in Listview2 to be selected & highlighted whenever Listview1's SelectionChanged event is triggered. I have tried to use the... | [
"c#",
".net",
"wpf",
"listview"
] | 5 | 0 | 2,051 | 3 | 0 | 2011-06-09T02:36:40.580000 | 2011-06-09T06:40:53.927000 |
6,287,511 | 6,290,481 | Reason behind this self invoking anonymous function variant | While looking at code on github, I found the following: (function() {
}).call(this); This is clearly a self invoking anonymous function. But why is it written this way? I'm used to seeing the canonical variant (function() {})(). Is there any particular advantage to using.call(this) for a self invoking anonymous functi... | .call(this) (was actually just () until I changed it) ensures your top level this to be consistent through strict mode, --bare option and/or the running environment (where top level this doesn't point to global object). | Reason behind this self invoking anonymous function variant While looking at code on github, I found the following: (function() {
}).call(this); This is clearly a self invoking anonymous function. But why is it written this way? I'm used to seeing the canonical variant (function() {})(). Is there any particular advant... | TITLE:
Reason behind this self invoking anonymous function variant
QUESTION:
While looking at code on github, I found the following: (function() {
}).call(this); This is clearly a self invoking anonymous function. But why is it written this way? I'm used to seeing the canonical variant (function() {})(). Is there any... | [
"javascript",
"module",
"anonymous-function",
"coffeescript",
"commonjs"
] | 30 | 7 | 6,496 | 5 | 0 | 2011-06-09T02:37:27.960000 | 2011-06-09T09:08:34.620000 |
6,287,517 | 6,287,832 | Getting Facebook ID number with API | I know - I have read the documentation - but frankly Facebook is horrible at it. I can't figure out how to send a request that illicits a response. Here's what I'm trying: NSURL *fbID = [NSURL URLWithString:@"https://graph.facebook.com/me?fields=id"]; fbUserID = [[NSData alloc] initWithContentsOfURL: fbID]; Where shoul... | How are you trying to integrate FB into your app? I have been looking into Facebook connect recently and found their documentation very helpful ( http://developers.facebook.com/docs/guides/mobile/#ios ). I know you said you looked at the documentation, but for me after going through their steps for iOS I was able to ma... | Getting Facebook ID number with API I know - I have read the documentation - but frankly Facebook is horrible at it. I can't figure out how to send a request that illicits a response. Here's what I'm trying: NSURL *fbID = [NSURL URLWithString:@"https://graph.facebook.com/me?fields=id"]; fbUserID = [[NSData alloc] initW... | TITLE:
Getting Facebook ID number with API
QUESTION:
I know - I have read the documentation - but frankly Facebook is horrible at it. I can't figure out how to send a request that illicits a response. Here's what I'm trying: NSURL *fbID = [NSURL URLWithString:@"https://graph.facebook.com/me?fields=id"]; fbUserID = [[N... | [
"iphone",
"objective-c",
"facebook"
] | 1 | 3 | 2,507 | 1 | 0 | 2011-06-09T02:37:50.597000 | 2011-06-09T03:33:37.377000 |
6,287,523 | 6,287,589 | Using Core Audio to extract float from default line out sound device | I am in need for some assistance/guidance with using Core Audio to extract floats from the sound out device. I have read similar posts regarding the extraction of floats from AIFF. My end goal is something along the lines of: iTunes is playing a song C/C++ program using Core Audio extracts float values from the sound d... | This question comes up frequently on the Core Audio mailing list. There is no easy way to accomplish what you want to do. See: http://lists.apple.com/archives/coreaudio-api/2007/Jul/msg00066.html http://lists.apple.com/archives/coreaudio-api/2009/Nov/msg00308.html You'll need to write either a kext or a user-land drive... | Using Core Audio to extract float from default line out sound device I am in need for some assistance/guidance with using Core Audio to extract floats from the sound out device. I have read similar posts regarding the extraction of floats from AIFF. My end goal is something along the lines of: iTunes is playing a song ... | TITLE:
Using Core Audio to extract float from default line out sound device
QUESTION:
I am in need for some assistance/guidance with using Core Audio to extract floats from the sound out device. I have read similar posts regarding the extraction of floats from AIFF. My end goal is something along the lines of: iTunes ... | [
"c++",
"c",
"macos",
"core-audio"
] | 0 | 0 | 524 | 1 | 0 | 2011-06-09T02:39:07.850000 | 2011-06-09T02:48:51.047000 |
6,287,529 | 6,287,601 | How to find children of nodes using BeautifulSoup | I want to get all the tags which are children of: link1 link2 I know how to find element with particular class like this: soup.find("li", { "class": "test" }) But I don't know how to find all which are children of but not any others. Like I want to select: link1 | Try this li = soup.find('li', {'class': 'test'}) children = li.findChildren("a", recursive=False) for child in children: print(child) | How to find children of nodes using BeautifulSoup I want to get all the tags which are children of: link1 link2 I know how to find element with particular class like this: soup.find("li", { "class": "test" }) But I don't know how to find all which are children of but not any others. Like I want to select: link1 | TITLE:
How to find children of nodes using BeautifulSoup
QUESTION:
I want to get all the tags which are children of: link1 link2 I know how to find element with particular class like this: soup.find("li", { "class": "test" }) But I don't know how to find all which are children of but not any others. Like I want to sel... | [
"python",
"html",
"beautifulsoup"
] | 185 | 216 | 344,961 | 7 | 0 | 2011-06-09T02:40:37.420000 | 2011-06-09T02:51:50.820000 |
6,287,532 | 6,291,071 | session variables classic asp | I have a problem when using session variables to store the checked state of a checkbox. I'm using pagination so when each letter is pressed a checkbox will appear with the respective letter stored as its value. When a checkbox is checked its state is saved, however the problem is that when i uncheck the checkbox it rem... | You should save the value you 'unchecked' before you postback, and then use this value. <% for i = 97 to 122 %> <% next %> <% alphaB = request.form("Button") if alphaB <>"" then
alphaCheck = request.form("checkBox") if alphaCheck <>"" then session("checkBox_"&alphaCheck) = "checked" else 'EDIT use last one session("ch... | session variables classic asp I have a problem when using session variables to store the checked state of a checkbox. I'm using pagination so when each letter is pressed a checkbox will appear with the respective letter stored as its value. When a checkbox is checked its state is saved, however the problem is that when... | TITLE:
session variables classic asp
QUESTION:
I have a problem when using session variables to store the checked state of a checkbox. I'm using pagination so when each letter is pressed a checkbox will appear with the respective letter stored as its value. When a checkbox is checked its state is saved, however the pr... | [
"html",
"vbscript",
"asp-classic",
"pagination",
"session-variables"
] | 1 | 3 | 5,218 | 2 | 0 | 2011-06-09T02:41:02.183000 | 2011-06-09T09:59:37.103000 |
6,287,541 | 6,287,950 | Bounding box frustum rendering - Distance rendering - OpenGL | I am rendering an old game format where I have a list of meshes that make up the are you are in. I have finally gotten the PVS (regions visible from another region) working and that cuts out a lot of the meshes I don't need to render but not by much. So now, my list of meshes I should render only includes the other mes... | AABB or Axis Aligned Bounding Box is a very simple and fast object for testing intersection/containment of two 3D regions. As you suggest, you are calculating a min and max x,y,z for the two regions you want to compare, for example, the region that describes a frustum and the region that describes a mesh. It is axis al... | Bounding box frustum rendering - Distance rendering - OpenGL I am rendering an old game format where I have a list of meshes that make up the are you are in. I have finally gotten the PVS (regions visible from another region) working and that cuts out a lot of the meshes I don't need to render but not by much. So now, ... | TITLE:
Bounding box frustum rendering - Distance rendering - OpenGL
QUESTION:
I am rendering an old game format where I have a list of meshes that make up the are you are in. I have finally gotten the PVS (regions visible from another region) working and that cuts out a lot of the meshes I don't need to render but not... | [
"c++",
"opengl",
"bounding-box",
"frustum"
] | 1 | 2 | 2,981 | 1 | 0 | 2011-06-09T02:41:49.423000 | 2011-06-09T04:02:30.690000 |
6,287,542 | 6,287,711 | Grails Domain Classes in Sets | Is it a bad practice to use domain objects in Sets or as keys in Maps? In the past I've done things like this a lot Set someBooks = [] as Set someBooks.addAll (Book.findAllByAuthorLike('%hofstadter%')) someBooks.add (Book.findByTitleLike ('%eternal%')) However I have noticed that I often encounter problems when findAll... | It's not bad practice at all, but just like in a non-Grails application you should override equals and hashCode if you'll be putting them in hash-based collections ( HashSet, HashMap, etc.) and also implement Comparable (which implies a compareTo method) if you're going to use TreeSet / TreeMap /etc. | Grails Domain Classes in Sets Is it a bad practice to use domain objects in Sets or as keys in Maps? In the past I've done things like this a lot Set someBooks = [] as Set someBooks.addAll (Book.findAllByAuthorLike('%hofstadter%')) someBooks.add (Book.findByTitleLike ('%eternal%')) However I have noticed that I often e... | TITLE:
Grails Domain Classes in Sets
QUESTION:
Is it a bad practice to use domain objects in Sets or as keys in Maps? In the past I've done things like this a lot Set someBooks = [] as Set someBooks.addAll (Book.findAllByAuthorLike('%hofstadter%')) someBooks.add (Book.findByTitleLike ('%eternal%')) However I have noti... | [
"grails",
"groovy",
"domain-object"
] | 7 | 9 | 4,187 | 2 | 0 | 2011-06-09T02:41:51.577000 | 2011-06-09T03:09:54.290000 |
6,287,550 | 6,287,618 | Companion object in Scala isn't associating itself with case class | I'm having some trouble understanding why this code won't work. I got it from 99 Scala Problems in the Binary Trees section (http://aperiodic.net/phil/scala/s-99/). It looks valid to me: the Node object is a companion object to the Node class, and it's adding a constructor for leafs on the tree. But when I try compilin... | Works for me (see below). Have you defined them in the same file? Welcome to Scala version 2.9.0.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24). Type in expressions to have them evaluated. Type:help for more information.
scala>:paste // Entering paste mode (ctrl-D to finish)
sealed abstract class Tree[+T] c... | Companion object in Scala isn't associating itself with case class I'm having some trouble understanding why this code won't work. I got it from 99 Scala Problems in the Binary Trees section (http://aperiodic.net/phil/scala/s-99/). It looks valid to me: the Node object is a companion object to the Node class, and it's ... | TITLE:
Companion object in Scala isn't associating itself with case class
QUESTION:
I'm having some trouble understanding why this code won't work. I got it from 99 Scala Problems in the Binary Trees section (http://aperiodic.net/phil/scala/s-99/). It looks valid to me: the Node object is a companion object to the Nod... | [
"scala",
"object",
"factory",
"apply"
] | 4 | 12 | 2,852 | 1 | 0 | 2011-06-09T02:42:13.713000 | 2011-06-09T02:54:41.333000 |
6,287,565 | 6,287,582 | What is the most secure method for an application to connect/authenticate to SQL Server 2008 R2? | Assume that we have a network deployed desktop application written in.NET. We don't want any users (except admins) to be able to manipulate data outside of the application. For example, normal users should not be able to use SQL Server Management Studio to modify/read data. I know of 3 ways to authenticate to SQL Serve... | The #1 is the most secure approach. Advantages and Disadvantages | What is the most secure method for an application to connect/authenticate to SQL Server 2008 R2? Assume that we have a network deployed desktop application written in.NET. We don't want any users (except admins) to be able to manipulate data outside of the application. For example, normal users should not be able to us... | TITLE:
What is the most secure method for an application to connect/authenticate to SQL Server 2008 R2?
QUESTION:
Assume that we have a network deployed desktop application written in.NET. We don't want any users (except admins) to be able to manipulate data outside of the application. For example, normal users should... | [
".net",
"sql-server",
"authentication"
] | 1 | 3 | 269 | 3 | 0 | 2011-06-09T02:45:33.867000 | 2011-06-09T02:47:52.497000 |
6,287,577 | 6,288,905 | How to change default start page of Glassfish? | Currently when I type in the URL of my webapp, say "http://abc.edu/mywebapp/", I am taken to the login page of my webapp. When I type "http://abc.edu/", I am taken to the GlassFish info page. How can I do it such that when I key in "http://abc.edu/", I will be taken to my login page and not the GlassFish info page? | Option 1: You can set one of your webapps as default. This can be done with the admin console: Configuration --> Virtual Servers --> server Then select your default web application from the drop-down menu. If your webserver port is 8080, you can start your application now by: http://hostname:8080 instead of http://host... | How to change default start page of Glassfish? Currently when I type in the URL of my webapp, say "http://abc.edu/mywebapp/", I am taken to the login page of my webapp. When I type "http://abc.edu/", I am taken to the GlassFish info page. How can I do it such that when I key in "http://abc.edu/", I will be taken to my ... | TITLE:
How to change default start page of Glassfish?
QUESTION:
Currently when I type in the URL of my webapp, say "http://abc.edu/mywebapp/", I am taken to the login page of my webapp. When I type "http://abc.edu/", I am taken to the GlassFish info page. How can I do it such that when I key in "http://abc.edu/", I wi... | [
"redirect",
"glassfish"
] | 5 | 19 | 20,736 | 2 | 0 | 2011-06-09T02:47:33.307000 | 2011-06-09T06:29:22.883000 |
6,287,579 | 6,306,922 | How do I get posted data in MVC Action? | I am trying to post some data to a ASP.NET MVC Controller Action. Current I am trying to use WebClient.UploadData() to post several parameters to my action. The following will hit the action but all the parameters are null. How can get the posted data from the http request? string postFormat = "hwid={0}&label={1}&inter... | I was able to get the post xml data from the Request objects InputStream property. public ActionResult BuildPreview(string hwid, string label, string localization) { StreamReader streamReader = new StreamReader(Request.InputStream); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(streamReader.ReadToEnd... | How do I get posted data in MVC Action? I am trying to post some data to a ASP.NET MVC Controller Action. Current I am trying to use WebClient.UploadData() to post several parameters to my action. The following will hit the action but all the parameters are null. How can get the posted data from the http request? strin... | TITLE:
How do I get posted data in MVC Action?
QUESTION:
I am trying to post some data to a ASP.NET MVC Controller Action. Current I am trying to use WebClient.UploadData() to post several parameters to my action. The following will hit the action but all the parameters are null. How can get the posted data from the h... | [
"c#",
"asp.net-mvc",
"controller"
] | 3 | 3 | 9,316 | 4 | 0 | 2011-06-09T02:47:41.887000 | 2011-06-10T13:20:59.060000 |
6,287,580 | 6,287,599 | Is there any c# web framework like Django or Ruby on Rails? | Is there any c# web framework like Django or Ruby on Rails? I know ASP.net MVC, but is seems not like Django, still got.aspx page and server side code on.aspx pages. Is there some other c# web framework like django, pure html templates and c# code at back end side? Thanks | try MVC3. It has scaffolding and Razor View Engine which is much better and more htmlish than aspx | Is there any c# web framework like Django or Ruby on Rails? Is there any c# web framework like Django or Ruby on Rails? I know ASP.net MVC, but is seems not like Django, still got.aspx page and server side code on.aspx pages. Is there some other c# web framework like django, pure html templates and c# code at back end ... | TITLE:
Is there any c# web framework like Django or Ruby on Rails?
QUESTION:
Is there any c# web framework like Django or Ruby on Rails? I know ASP.net MVC, but is seems not like Django, still got.aspx page and server side code on.aspx pages. Is there some other c# web framework like django, pure html templates and c#... | [
"c#",
"ruby-on-rails",
"django"
] | 1 | 4 | 1,536 | 1 | 0 | 2011-06-09T02:47:51.750000 | 2011-06-09T02:51:19.603000 |
6,287,600 | 6,287,639 | unable to process files of a directory in for loop in linux | i have directory that has 2 sub-directories and that again has few sub-directory and they have some files. I need to rename all the files to append an html extension to the filenames. the directory structure looks like this main-directory sub-directory sub-directory sub-directory file1 file2 and so on to lot of files n... | you can use find and look into of type file and then -exec to change all the file and then appending the.html. find main-directory -type f -exec mv -v '{}' '{}'.html \; | unable to process files of a directory in for loop in linux i have directory that has 2 sub-directories and that again has few sub-directory and they have some files. I need to rename all the files to append an html extension to the filenames. the directory structure looks like this main-directory sub-directory sub-dir... | TITLE:
unable to process files of a directory in for loop in linux
QUESTION:
i have directory that has 2 sub-directories and that again has few sub-directory and they have some files. I need to rename all the files to append an html extension to the filenames. the directory structure looks like this main-directory sub... | [
"linux",
"bash",
"for-loop",
"directory",
"file-rename"
] | 0 | 3 | 596 | 4 | 0 | 2011-06-09T02:51:37.827000 | 2011-06-09T02:57:40.570000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.