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,242,468
6,242,958
How to use a jQuery calendar inside a jQuery tab?
Today I am trying to make Adam Arshaw's fullCalendar to work inside my page. I 've read the documentation provided in his webpage, and also whatever question I found it might help here, in Stack overflow, but whatever I have tried so far is doomed to failure! Basically I have three jQuery-ui tabs. I want my calendar to...
there is a good reason the previous code is not working, your selectors are not correct, consider this one for example: $ ('a#plan').live('click', function(){ var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); there is no such Anchor with the id="plan" in your HTML, you ...
How to use a jQuery calendar inside a jQuery tab? Today I am trying to make Adam Arshaw's fullCalendar to work inside my page. I 've read the documentation provided in his webpage, and also whatever question I found it might help here, in Stack overflow, but whatever I have tried so far is doomed to failure! Basically ...
TITLE: How to use a jQuery calendar inside a jQuery tab? QUESTION: Today I am trying to make Adam Arshaw's fullCalendar to work inside my page. I 've read the documentation provided in his webpage, and also whatever question I found it might help here, in Stack overflow, but whatever I have tried so far is doomed to f...
[ "javascript", "jquery", "jquery-ui", "calendar", "fullcalendar" ]
0
1
1,574
1
0
2011-06-05T10:55:44.070000
2011-06-05T12:42:02.420000
6,242,473
6,242,522
Should I refer to Entity Object class always as DAL or I can use its classes?
Let's say I have 'Customer' table in SQL DB and I'm using Entity Framework. Now, for instance, in Controller or ViewModel I retrieve the customer by var customer = Page.Current.Customer when it's code is: public class Page {... // Customer is EntityObject that created by Entity Framework public Customer Customer { get ...
That all depends on the level of abstraction you want to use in your application and needs of presentation layer. Both approaches are possible. Your code is probably already tightly coupled to Entity Framework ( EntityObject is EF type) and it is also not very well testable ( Page.Current is probably static) so discuss...
Should I refer to Entity Object class always as DAL or I can use its classes? Let's say I have 'Customer' table in SQL DB and I'm using Entity Framework. Now, for instance, in Controller or ViewModel I retrieve the customer by var customer = Page.Current.Customer when it's code is: public class Page {... // Customer is...
TITLE: Should I refer to Entity Object class always as DAL or I can use its classes? QUESTION: Let's say I have 'Customer' table in SQL DB and I'm using Entity Framework. Now, for instance, in Controller or ViewModel I retrieve the customer by var customer = Page.Current.Customer when it's code is: public class Page {...
[ "c#", "entity-framework", "s#arp-architecture" ]
0
0
291
3
0
2011-06-05T10:56:38.093000
2011-06-05T11:06:59.450000
6,242,474
6,242,479
How to send some data from dynamic form using jquery?
I am trying to send data from dynamicly generated cheboxes(when ticked) to my php script, and then to mysql data base. I've got something like that: form method="post" id="form"> (amount of checkboxes is not const!) $(document).ready(function(){ $("form#form").check(function() { var achieved = $('input[check]'); var id...
You need to give your checkbox elements values ( value="something" ) you can check for on the server side. You can also use the serialize() method to create the parameters string instead of doing it manually. The way you are doing it now is sure to not work because your achieved variable will not match any of your elem...
How to send some data from dynamic form using jquery? I am trying to send data from dynamicly generated cheboxes(when ticked) to my php script, and then to mysql data base. I've got something like that: form method="post" id="form"> (amount of checkboxes is not const!) $(document).ready(function(){ $("form#form").check...
TITLE: How to send some data from dynamic form using jquery? QUESTION: I am trying to send data from dynamicly generated cheboxes(when ticked) to my php script, and then to mysql data base. I've got something like that: form method="post" id="form"> (amount of checkboxes is not const!) $(document).ready(function(){ $(...
[ "jquery" ]
1
0
251
1
0
2011-06-05T10:57:01.703000
2011-06-05T10:58:18.240000
6,242,489
6,242,543
Defining own command in command mode with :
I want to define a command that is executed by:command. I tried something like this: cmap hello exec "normal aHello World" I have two problems with the result: If I type slowly, then there sits:hello in the bottom line, and after pressing Return, I get Not an editor command: hello If I type fast then:hello doesn’t sit ...
The way I've always written colon-mode commands in vim is like this: command! BASH!start bash note the command must be in uppercase.
Defining own command in command mode with : I want to define a command that is executed by:command. I tried something like this: cmap hello exec "normal aHello World" I have two problems with the result: If I type slowly, then there sits:hello in the bottom line, and after pressing Return, I get Not an editor command: ...
TITLE: Defining own command in command mode with : QUESTION: I want to define a command that is executed by:command. I tried something like this: cmap hello exec "normal aHello World" I have two problems with the result: If I type slowly, then there sits:hello in the bottom line, and after pressing Return, I get Not a...
[ "vim" ]
1
1
255
1
0
2011-06-05T10:59:50.610000
2011-06-05T11:11:45.467000
6,242,502
6,247,680
How can I fill patch objects using a colormap instead of a solid color?
I need to create a plot like in this image: I wrote this code: close all x = [NaN 1 3 7 9 23 8]; y = [NaN 2 6 7 8 2 1]; z = [NaN 1 4 5 5 4 1]; for n = 1:length(z)-1 x1 = x(n); x2 = x(n+1); y1 = y(n); y2 = y(n+1); z1 = z(n); z2 = z(n+1); p = patch([x1 x2 x2 x1], [y1 y2 y2 y1], [0 0 z2 z1], [0 1 1]); set(p, 'LineStyle'...
There are a number of ways to define your patches, and a number of ways to color them as well. Here's a way to create your coordinate data without a for loop and plot and color your patches with a single call to the function patch: x = [NaN 1 3 7 9 23 8]; %# Sample x data y = [NaN 2 6 7 8 2 1]; %# Sample y data z = [Na...
How can I fill patch objects using a colormap instead of a solid color? I need to create a plot like in this image: I wrote this code: close all x = [NaN 1 3 7 9 23 8]; y = [NaN 2 6 7 8 2 1]; z = [NaN 1 4 5 5 4 1]; for n = 1:length(z)-1 x1 = x(n); x2 = x(n+1); y1 = y(n); y2 = y(n+1); z1 = z(n); z2 = z(n+1); p = patch...
TITLE: How can I fill patch objects using a colormap instead of a solid color? QUESTION: I need to create a plot like in this image: I wrote this code: close all x = [NaN 1 3 7 9 23 8]; y = [NaN 2 6 7 8 2 1]; z = [NaN 1 4 5 5 4 1]; for n = 1:length(z)-1 x1 = x(n); x2 = x(n+1); y1 = y(n); y2 = y(n+1); z1 = z(n); z2 =...
[ "matlab", "plot", "colormap" ]
6
5
7,738
1
0
2011-06-05T11:02:51.547000
2011-06-06T04:11:37.467000
6,242,511
6,242,525
positioning css background at the bottom of the window without extra markup or min-height
Is it possible to position a background image at the bottom of the window without extra elements or min-height? I'm trying to have an image at the bottom of the window, not the body, no matter how short the webpage is. What I mean is that if a page is longer than the vertical screen resolution, the browser allows you t...
I'd do it like so... html { min-height: 100%; } body { background: url(path/to/image.png) no-repeat center bottom; } jsFiddle.
positioning css background at the bottom of the window without extra markup or min-height Is it possible to position a background image at the bottom of the window without extra elements or min-height? I'm trying to have an image at the bottom of the window, not the body, no matter how short the webpage is. What I mean...
TITLE: positioning css background at the bottom of the window without extra markup or min-height QUESTION: Is it possible to position a background image at the bottom of the window without extra elements or min-height? I'm trying to have an image at the bottom of the window, not the body, no matter how short the webpa...
[ "css", "background", "positioning" ]
2
15
16,009
2
0
2011-06-05T11:04:13.913000
2011-06-05T11:07:32.293000
6,242,515
6,258,809
Error configuring Google Apps Email in Redmine 1.1.2
I have configured my email.yml in my Redmine installation, but when I try to send a test email, I get the following error message. An error occurred while sending mail (%{value}) Here is a dump of my email.yml excluding the password details. production: delivery_method::smtp smtp_settings: address: smtp.gmail.com port:...
Have you tried the steps outlined at http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/? That is what I've been using for years now with no problems. Some other users have shared their own configurations and results in the comments.
Error configuring Google Apps Email in Redmine 1.1.2 I have configured my email.yml in my Redmine installation, but when I try to send a test email, I get the following error message. An error occurred while sending mail (%{value}) Here is a dump of my email.yml excluding the password details. production: delivery_meth...
TITLE: Error configuring Google Apps Email in Redmine 1.1.2 QUESTION: I have configured my email.yml in my Redmine installation, but when I try to send a test email, I get the following error message. An error occurred while sending mail (%{value}) Here is a dump of my email.yml excluding the password details. product...
[ "email", "redmine" ]
0
1
837
1
0
2011-06-05T11:05:20.870000
2011-06-06T22:38:12.007000
6,242,533
6,243,054
How do I Highlight buttons when mouse pointer is hovered upon them in Java(Like Start button highlights in XP)?
If mouse pointer is hovered on start button in Windows XP, it highlights. I want to do the same in Java. Can anyone help me?
A possible solution is to create an Icon for your button to be displayed on rollover and then add it to the button via its setRolloverIcon. The mouse's model will do all that is needed to display this Icon. And even another solution is to add a ChangeListener to the button's model. In the listener if isRollover() retur...
How do I Highlight buttons when mouse pointer is hovered upon them in Java(Like Start button highlights in XP)? If mouse pointer is hovered on start button in Windows XP, it highlights. I want to do the same in Java. Can anyone help me?
TITLE: How do I Highlight buttons when mouse pointer is hovered upon them in Java(Like Start button highlights in XP)? QUESTION: If mouse pointer is hovered on start button in Windows XP, it highlights. I want to do the same in Java. Can anyone help me? ANSWER: A possible solution is to create an Icon for your button...
[ "java", "image", "swing", "icons", "jbutton" ]
2
4
2,703
2
0
2011-06-05T11:09:27.963000
2011-06-05T13:03:54.303000
6,242,534
6,243,456
How to use id from the db to use it for a ListAdapter?
So I am using a ListActivity to see every records information except _id from the db. How can I place id from the database to a ListAdapter and use it to Delete the same id record from the database? Scroll down to see my script. import java.util.ArrayList; import android.app.ListActivity; import android.database.Curso...
Use this in your onItemClickMethod to delete the row that was clicked from the database SQLiteDatabase dbase = dbHelper.getWritableDatabase(); dbase.delete("pocket", "_ID=?", new String[] {String.valueOf(position)});
How to use id from the db to use it for a ListAdapter? So I am using a ListActivity to see every records information except _id from the db. How can I place id from the database to a ListAdapter and use it to Delete the same id record from the database? Scroll down to see my script. import java.util.ArrayList; import ...
TITLE: How to use id from the db to use it for a ListAdapter? QUESTION: So I am using a ListActivity to see every records information except _id from the db. How can I place id from the database to a ListAdapter and use it to Delete the same id record from the database? Scroll down to see my script. import java.util.A...
[ "android", "database", "sqlite" ]
0
1
205
1
0
2011-06-05T11:09:38.440000
2011-06-05T14:17:20.073000
6,242,536
6,242,568
how do I use value of input element in a new file (GET method)
".$pizzaName." ".$pizzaNumber." ".$pizzaPrice." "; } mysql_close($db);?> I would like to display the pizzas of where there is a value in the input element. the processorder.php file would look like: my url shows the pizzaId's with the values after the '='. So I figured I have an associative array on my hands. I thought...
Your $pizzaId is an integer. I would change the name of the input elements to name="pizzas[$pizzaId]", and then you could access it through PHP like this: foreach ($_GET["pizzas"] as $pizzaId => $pizzaQty) { echo "$pizzaId $pizzaQty "; } with this method, instead of just plain name="pizzas[]", you also retain the assoc...
how do I use value of input element in a new file (GET method) ".$pizzaName." ".$pizzaNumber." ".$pizzaPrice." "; } mysql_close($db);?> I would like to display the pizzas of where there is a value in the input element. the processorder.php file would look like: my url shows the pizzaId's with the values after the '='. ...
TITLE: how do I use value of input element in a new file (GET method) QUESTION: ".$pizzaName." ".$pizzaNumber." ".$pizzaPrice." "; } mysql_close($db);?> I would like to display the pizzas of where there is a value in the input element. the processorder.php file would look like: my url shows the pizzaId's with the valu...
[ "php", "forms" ]
1
1
94
2
0
2011-06-05T11:11:00.410000
2011-06-05T11:16:41.617000
6,242,544
6,242,791
Disk storage in a Java EE application
I have Java EE app in which I want to small little amount of data to disk, eg just user/passwords. I dont want to go through the hassle of integrating with a full db for this little amount of data. Is there a standard way to access the file system and a standard folder where web applications can store their data on dis...
You could consider using the preferences API to store this data - it's available on Java EE as well.
Disk storage in a Java EE application I have Java EE app in which I want to small little amount of data to disk, eg just user/passwords. I dont want to go through the hassle of integrating with a full db for this little amount of data. Is there a standard way to access the file system and a standard folder where web ap...
TITLE: Disk storage in a Java EE application QUESTION: I have Java EE app in which I want to small little amount of data to disk, eg just user/passwords. I dont want to go through the hassle of integrating with a full db for this little amount of data. Is there a standard way to access the file system and a standard f...
[ "java", "database", "jakarta-ee", "persistence" ]
5
3
1,248
4
0
2011-06-05T11:12:03.773000
2011-06-05T12:05:56.137000
6,242,560
6,242,594
Platform Selection for management Application
Hi there I am desktop application developer but now i have to work on a School Management Application that needs to be web based. It has mainly features two login types School Administration and Students/Parents. School administrations will upload students Attendance,Marks in quizzes,performance etc and parents or stud...
There are many technical choices for accomplishing this. In this situation, I would recommend using the technology that you already know --.Net and C#. re your criteria, is scalability really a big issue? Aren't we talking about hundreds of users, not millions? And open source components? I don't think you really need ...
Platform Selection for management Application Hi there I am desktop application developer but now i have to work on a School Management Application that needs to be web based. It has mainly features two login types School Administration and Students/Parents. School administrations will upload students Attendance,Marks ...
TITLE: Platform Selection for management Application QUESTION: Hi there I am desktop application developer but now i have to work on a School Management Application that needs to be web based. It has mainly features two login types School Administration and Students/Parents. School administrations will upload students...
[ "php", ".net", "platform" ]
0
1
86
2
0
2011-06-05T11:15:14.567000
2011-06-05T11:24:26.187000
6,242,565
6,256,493
.htaccess, expire headers, and the W3 Total Cache plugin for WordPress
I currently have the W3 Total Cache plugin installed on my self-hosted WordPress site. The question is in regards to the behavior im experiencing with the plugin itself and its relation to the.htaccess file, which is located one-level up of my WordPress core files. I followed the WordPress Codex on moving the core file...
After talking with customer support over at my CDN's live chat (small chat window, mind you.. but great support), i sort of accepted an inevitable win-lose scenario to this problem. Since all my static files are hosted with them, i used their cache control override feature to set expiry's for me (known as Over-ride Cac...
.htaccess, expire headers, and the W3 Total Cache plugin for WordPress I currently have the W3 Total Cache plugin installed on my self-hosted WordPress site. The question is in regards to the behavior im experiencing with the plugin itself and its relation to the.htaccess file, which is located one-level up of my WordP...
TITLE: .htaccess, expire headers, and the W3 Total Cache plugin for WordPress QUESTION: I currently have the W3 Total Cache plugin installed on my self-hosted WordPress site. The question is in regards to the behavior im experiencing with the plugin itself and its relation to the.htaccess file, which is located one-le...
[ ".htaccess", "wordpress", "browser-cache" ]
0
0
1,880
1
0
2011-06-05T11:16:11.540000
2011-06-06T18:38:18.617000
6,242,573
6,242,892
Simplest way to make cross-appdomain call?
I need to call a method of object in another appdomain (pass param and get result). Ideas? UPD both AppDomain's are created not by my code (host app creates it, and then my code gets called). How I can get access to one AppDomain from another?
If you created an object in another domain e.g. with AppDomain.CreateInstanceAndUnwrap, all you need to call the object in another domain is to call an object's method. The simplest way to make a cross-application domain call is just to make a call directly on that object, which actually is exposed from another domain ...
Simplest way to make cross-appdomain call? I need to call a method of object in another appdomain (pass param and get result). Ideas? UPD both AppDomain's are created not by my code (host app creates it, and then my code gets called). How I can get access to one AppDomain from another?
TITLE: Simplest way to make cross-appdomain call? QUESTION: I need to call a method of object in another appdomain (pass param and get result). Ideas? UPD both AppDomain's are created not by my code (host app creates it, and then my code gets called). How I can get access to one AppDomain from another? ANSWER: If you...
[ "c#", ".net", "clr", "ipc" ]
12
14
14,490
2
0
2011-06-05T11:19:13.207000
2011-06-05T12:26:31.217000
6,242,576
6,243,817
Apache Solr Client = How to enable "wire" logging (with log4j)
I would be very thankfull, if someone can tell me, how to enable "wire logging" (printing all the XML that is sent and received from the solr-java-client to/from the solr-server). The Client i use: http://wiki.apache.org/solr/SolJava I use log4j!! Both did NOT work in log4j config: Solr internally uses another logging ...
Solr makes use of the JDK Logging since Version 1.4. Maybe this tutorial will help you figure out how to configure your Tomcat for that. Or replace the slfj api within the solr.war file with the one for log4j as mentioned in the Solr documentation. If you want to have more information within the client look at the Solr...
Apache Solr Client = How to enable "wire" logging (with log4j) I would be very thankfull, if someone can tell me, how to enable "wire logging" (printing all the XML that is sent and received from the solr-java-client to/from the solr-server). The Client i use: http://wiki.apache.org/solr/SolJava I use log4j!! Both did ...
TITLE: Apache Solr Client = How to enable "wire" logging (with log4j) QUESTION: I would be very thankfull, if someone can tell me, how to enable "wire logging" (printing all the XML that is sent and received from the solr-java-client to/from the solr-server). The Client i use: http://wiki.apache.org/solr/SolJava I use...
[ "java", "solr", "log4j", "slf4j", "solrj" ]
0
2
1,472
1
0
2011-06-05T11:20:12.537000
2011-06-05T15:23:45.557000
6,242,588
6,242,884
Highcharts with ajax and json data what am i doing wrong?
I have been trying for days to plot a simple line graph utilising HighchartsJS via ajax. I have tried posting on their forum but help seem to be slow in coming forward. I am using ASP.NET web forms. Server Side _ Public Function getData() As String Dim dr As DataRepository = New DataRepository Dim data As List(Of Arra...
Solved the issue. Needed to change the line series.data.push(obj.data); to; series.data = obj.data;
Highcharts with ajax and json data what am i doing wrong? I have been trying for days to plot a simple line graph utilising HighchartsJS via ajax. I have tried posting on their forum but help seem to be slow in coming forward. I am using ASP.NET web forms. Server Side _ Public Function getData() As String Dim dr As Da...
TITLE: Highcharts with ajax and json data what am i doing wrong? QUESTION: I have been trying for days to plot a simple line graph utilising HighchartsJS via ajax. I have tried posting on their forum but help seem to be slow in coming forward. I am using ASP.NET web forms. Server Side _ Public Function getData() As St...
[ "asp.net", "json", "highcharts" ]
3
1
5,728
2
0
2011-06-05T11:23:11.820000
2011-06-05T12:24:33.273000
6,242,591
6,242,773
How to implement __isset() magic method in PHP?
I'm trying to make functions like empty() and isset() work with data returned by methods. What I have so far: abstract class FooBase{ public function __isset($name){ $getter = 'get'.ucfirst($name); if(method_exists($this, $getter)) return isset($this->$getter()); // not working:( // Fatal error: Can't use method retur...
public function __isset($name){ $getter = 'get'.ucfirst($name); return method_exists($this, $getter) &&!is_null($this->$getter()); } This check whether or not $getter() exists (if it does not exist, it's assumed that the property also does not exist) and returns a non-null value. So NULL will cause it to return false, ...
How to implement __isset() magic method in PHP? I'm trying to make functions like empty() and isset() work with data returned by methods. What I have so far: abstract class FooBase{ public function __isset($name){ $getter = 'get'.ucfirst($name); if(method_exists($this, $getter)) return isset($this->$getter()); // not ...
TITLE: How to implement __isset() magic method in PHP? QUESTION: I'm trying to make functions like empty() and isset() work with data returned by methods. What I have so far: abstract class FooBase{ public function __isset($name){ $getter = 'get'.ucfirst($name); if(method_exists($this, $getter)) return isset($this->$...
[ "php", "class", "isset", "magic-methods" ]
13
10
10,013
3
0
2011-06-05T11:23:24.627000
2011-06-05T12:02:53.823000
6,242,596
6,242,996
How to create an event driven AJAX counter in Rails 3?
I have a simple User ActiveRecord model class and I need to update a user counter visible in all pages (a partial) each time a new User is created. It should basically look like the download counter for Firefox here. I can imagine writing some JavaScript code that constantly polls the db would do the trick, but I guess...
You could if you want use some kind of WebSockets solution. Which means that you can push the data whenever a new User is created to all the clients, and then just use JQuery to render the Counter area with the new data. There's also 3rd party apps that makes this push technology really easy to set up. http://pusher.co...
How to create an event driven AJAX counter in Rails 3? I have a simple User ActiveRecord model class and I need to update a user counter visible in all pages (a partial) each time a new User is created. It should basically look like the download counter for Firefox here. I can imagine writing some JavaScript code that ...
TITLE: How to create an event driven AJAX counter in Rails 3? QUESTION: I have a simple User ActiveRecord model class and I need to update a user counter visible in all pages (a partial) each time a new User is created. It should basically look like the download counter for Firefox here. I can imagine writing some Jav...
[ "javascript", "ruby-on-rails", "ruby", "ajax" ]
0
2
413
1
0
2011-06-05T11:24:54.280000
2011-06-05T12:50:21.270000
6,242,598
6,242,696
Accessing R list elements through function parameters
I have an R list which looks as follows > str(prices) List of 4 $ ID: int 102894616 $ delay: int 8 $ 47973:List of 12..$ id: int 47973..$ index: int 2..$ matched: num 5817 $ 47972:List of 12.. Clearly, I can access any element by e.g. prices$"47973"$id. However, how would I write a function which parametrises the acces...
Using '[[' instead of '$' seems to work: prices <- list( `47973` = list( id = 1, matched = 2)) access <- function(index1, index2) prices[[index1]][[index2]] access("47973","matched") As to why this works instead of: access <- function(index1, index2) prices$index1$index2 (which I assume is what you tried?) it's becaus...
Accessing R list elements through function parameters I have an R list which looks as follows > str(prices) List of 4 $ ID: int 102894616 $ delay: int 8 $ 47973:List of 12..$ id: int 47973..$ index: int 2..$ matched: num 5817 $ 47972:List of 12.. Clearly, I can access any element by e.g. prices$"47973"$id. However, how...
TITLE: Accessing R list elements through function parameters QUESTION: I have an R list which looks as follows > str(prices) List of 4 $ ID: int 102894616 $ delay: int 8 $ 47973:List of 12..$ id: int 47973..$ index: int 2..$ matched: num 5817 $ 47972:List of 12.. Clearly, I can access any element by e.g. prices$"47973...
[ "list", "r", "syntax" ]
3
5
1,622
2
0
2011-06-05T11:25:14.600000
2011-06-05T11:45:10.823000
6,242,600
6,242,889
Multiple Web Roles in an Azure Compute Instance [Deployment]
There is an option for us to have 2 or more web roles in a single deployment. But each deployment can be either be staging or production i.e. by extension, we get only 1 URL to access that deployment. Considering this case how to access the different webroles, what will be the URLs for those.Also what is the use for ha...
Why multiple web roles in a single deployment? Consider an application with a public-facing (customer-oriented) website, as well as an administrative website (maybe on port 8000). There are two basic ways to handle this: Place both sites in the same web role. This means they now share the VM instances, network cards, m...
Multiple Web Roles in an Azure Compute Instance [Deployment] There is an option for us to have 2 or more web roles in a single deployment. But each deployment can be either be staging or production i.e. by extension, we get only 1 URL to access that deployment. Considering this case how to access the different webroles...
TITLE: Multiple Web Roles in an Azure Compute Instance [Deployment] QUESTION: There is an option for us to have 2 or more web roles in a single deployment. But each deployment can be either be staging or production i.e. by extension, we get only 1 URL to access that deployment. Considering this case how to access the ...
[ "url", "deployment", "azure", "instance", "webrole" ]
2
1
1,676
2
0
2011-06-05T11:25:33.613000
2011-06-05T12:26:02.447000
6,242,605
6,242,655
Excel VBA: getting row of clicked button
I am trying to make a button in Excel which copies a certain range of cells from the active workbook to another workbook. The copying of this range works perfectly when I specify a fixed range, but I am stumped on how to figure out the row of the clicked button. Every row contains 7 or so cells, and the 8th cell contai...
Each Shape has TopLeftCell property. It contains a cell within which the top left corner of the shape resides.
Excel VBA: getting row of clicked button I am trying to make a button in Excel which copies a certain range of cells from the active workbook to another workbook. The copying of this range works perfectly when I specify a fixed range, but I am stumped on how to figure out the row of the clicked button. Every row contai...
TITLE: Excel VBA: getting row of clicked button QUESTION: I am trying to make a button in Excel which copies a certain range of cells from the active workbook to another workbook. The copying of this range works perfectly when I specify a fixed range, but I am stumped on how to figure out the row of the clicked button...
[ "excel", "vba", "button", "row", "click" ]
19
27
88,166
4
0
2011-06-05T11:26:21.300000
2011-06-05T11:37:56.863000
6,242,620
6,242,643
What is the right regex that matches one of the substrings at the end of the word in Java?
I nedd the check whether the word ends with one of the _LNG, _DBL, _STR. My regex is "_[(LNG|DBL|STR)]$" but does work. Following must match but did'nt work. (I use java) PARAM_LNG I have tried following "[(_LNG|_DBL|_STR)]$" but it matchs with following although it has no underscore. PARAMLNG Can anyone show the right...
Don't use [], that's a character class specification. "_(LNG|DBL|STR)$" Note that this will only match at the end of the string. Try: "_(LNG|DBL|STR)\b" to match any word ending with those suffixes inside a string.
What is the right regex that matches one of the substrings at the end of the word in Java? I nedd the check whether the word ends with one of the _LNG, _DBL, _STR. My regex is "_[(LNG|DBL|STR)]$" but does work. Following must match but did'nt work. (I use java) PARAM_LNG I have tried following "[(_LNG|_DBL|_STR)]$" but...
TITLE: What is the right regex that matches one of the substrings at the end of the word in Java? QUESTION: I nedd the check whether the word ends with one of the _LNG, _DBL, _STR. My regex is "_[(LNG|DBL|STR)]$" but does work. Following must match but did'nt work. (I use java) PARAM_LNG I have tried following "[(_LNG...
[ "java", "regex" ]
1
5
48
1
0
2011-06-05T11:30:13.717000
2011-06-05T11:34:14.590000
6,242,623
6,243,816
What is OpenGL ES 2 Shader language analog for HYDRA (pixel bender) sampleLinear?
So I look onto OpenGL ES shader specs but do not see such... For example - I created simple "pinch to zoon" and "rotate to turn around" and "move to move center" HYDRA pixel bender filter. it can be executed in flash. It is based on default pixel bender twirl example and this: kernel zoomandrotate < namespace: "Pixel B...
Per Adobe's Pixel Blender Reference, sampleLinear "Handles coordinates not at pixel centers by performing bilinear interpolation on the adjacent pixel values." The correct way to achieve that in OpenGL is to use texture2D, as you already are, but to set the texture environment for linear filtering via glTexParameter. Y...
What is OpenGL ES 2 Shader language analog for HYDRA (pixel bender) sampleLinear? So I look onto OpenGL ES shader specs but do not see such... For example - I created simple "pinch to zoon" and "rotate to turn around" and "move to move center" HYDRA pixel bender filter. it can be executed in flash. It is based on defau...
TITLE: What is OpenGL ES 2 Shader language analog for HYDRA (pixel bender) sampleLinear? QUESTION: So I look onto OpenGL ES shader specs but do not see such... For example - I created simple "pinch to zoon" and "rotate to turn around" and "move to move center" HYDRA pixel bender filter. it can be executed in flash. It...
[ "opengl-es", "shader", "pixel-shader", "pixel-bender", "hydra" ]
0
1
753
1
0
2011-06-05T11:30:33.547000
2011-06-05T15:23:38.953000
6,242,625
6,242,665
Querying a table with a date/time filter in SQL Server 2008
I have a table in my database. This table is called Order. It has a structure like this ID CustomerID OrderDate Quantity Price I need to get all of the orders for the past 2 weeks. How do I do that? I don't understand how to work with dates in this manner in SQL. Thank you!
You could incorporate something like this into your WHERE clause: WHERE OrderDate >= DATEADD(day,-14,GetDate()) (i.e OrderDate is more recent than today minus 14 days.) [I don't have access to SQL Server here so I can't check it - but it might work:)] Edit: Depending on the exact datatype of OrderDate, I'm not sure wha...
Querying a table with a date/time filter in SQL Server 2008 I have a table in my database. This table is called Order. It has a structure like this ID CustomerID OrderDate Quantity Price I need to get all of the orders for the past 2 weeks. How do I do that? I don't understand how to work with dates in this manner in S...
TITLE: Querying a table with a date/time filter in SQL Server 2008 QUESTION: I have a table in my database. This table is called Order. It has a structure like this ID CustomerID OrderDate Quantity Price I need to get all of the orders for the past 2 weeks. How do I do that? I don't understand how to work with dates i...
[ "sql-server" ]
0
1
5,112
3
0
2011-06-05T11:30:56.780000
2011-06-05T11:39:59.313000
6,242,626
6,243,417
MyISAM vs. InnoDB vs. others...?
On a very limited environment (slow CPU, little RAM, but a lot of disk space), what would be the advantages of using different storage engine than MyISAM assuming an optimized php script (w/ using cache) daily performs a lot of read queries (SELECT) and almost no writes (m/b 5% - UPDATE queries)?
At what point does MySQL INNODB fine tuning become a requirement? This was addressed in a post I made a while back In the post I reference other tuning articles Please read this in its entirety
MyISAM vs. InnoDB vs. others...? On a very limited environment (slow CPU, little RAM, but a lot of disk space), what would be the advantages of using different storage engine than MyISAM assuming an optimized php script (w/ using cache) daily performs a lot of read queries (SELECT) and almost no writes (m/b 5% - UPDATE...
TITLE: MyISAM vs. InnoDB vs. others...? QUESTION: On a very limited environment (slow CPU, little RAM, but a lot of disk space), what would be the advantages of using different storage engine than MyISAM assuming an optimized php script (w/ using cache) daily performs a lot of read queries (SELECT) and almost no write...
[ "mysql", "innodb", "myisam" ]
0
1
404
1
0
2011-06-05T11:31:12.920000
2011-06-05T14:08:48.260000
6,242,629
6,254,174
Detecting new RSS feed entries
I'm using feedparser for working with RSS. I'm getting regularly (e.g. every 15 minutes) RSS channel with items and store it. In the channels there aren't often any new items. So, it's unefficient. Is there a way to detect quickly if there are some new items in the channel and if not, do nothing with this channel? than...
For RSS 2.0, the channel element has an optional lastBuildDate eleement. For atom, there's a similar "atom:updated" element, but the standard does state that this is when "an entry or feed was modified in a way the publisher considers significant. Therefore, not all modifications necessarily result in a changed atom:up...
Detecting new RSS feed entries I'm using feedparser for working with RSS. I'm getting regularly (e.g. every 15 minutes) RSS channel with items and store it. In the channels there aren't often any new items. So, it's unefficient. Is there a way to detect quickly if there are some new items in the channel and if not, do ...
TITLE: Detecting new RSS feed entries QUESTION: I'm using feedparser for working with RSS. I'm getting regularly (e.g. every 15 minutes) RSS channel with items and store it. In the channels there aren't often any new items. So, it's unefficient. Is there a way to detect quickly if there are some new items in the chann...
[ "rss", "feedparser" ]
0
1
745
1
0
2011-06-05T11:31:34.953000
2011-06-06T15:16:05.347000
6,242,649
6,242,657
How do I change all tables in my database to use AUTO_INCREMENT=1
I have about 30 tables in my database: table1 table2 table3 table4 table5 etc. I want all tables to use AUTO_INCREMENT=1, how do I modify the tables? Here is the sample DDL of one of the tables. I have never defined AUTO_INCREMENT in any of the tables, it is fetching the value by default. CREATE TABLE `amenities` ( `id...
To change the value of the AUTO_INCREMENT counter to be used for new rows, do this: ALTER TABLE `table_name` AUTO_INCREMENT = 1; To update all your 31 tables you can use this php script:
How do I change all tables in my database to use AUTO_INCREMENT=1 I have about 30 tables in my database: table1 table2 table3 table4 table5 etc. I want all tables to use AUTO_INCREMENT=1, how do I modify the tables? Here is the sample DDL of one of the tables. I have never defined AUTO_INCREMENT in any of the tables, i...
TITLE: How do I change all tables in my database to use AUTO_INCREMENT=1 QUESTION: I have about 30 tables in my database: table1 table2 table3 table4 table5 etc. I want all tables to use AUTO_INCREMENT=1, how do I modify the tables? Here is the sample DDL of one of the tables. I have never defined AUTO_INCREMENT in an...
[ "mysql", "database" ]
2
5
1,508
2
0
2011-06-05T11:35:59.347000
2011-06-05T11:38:03.873000
6,242,653
6,242,688
How many disk seeks does it take to write one row to a SQLite database?
I already asked this question here without getting any answers, so I allow myself to repost it here. I will provide references to where an answer was found. As far as I understand, there can be one disk-seek per rotation of a harddisk, therefore I am interested to know how many disk seeks are needed for writing a row t...
By default its one transaction per disk rotation (roughly), http://www.sqlite.org/faq.html#q19 The way to speedier writes is to wrap multiple ones inside a transaction.
How many disk seeks does it take to write one row to a SQLite database? I already asked this question here without getting any answers, so I allow myself to repost it here. I will provide references to where an answer was found. As far as I understand, there can be one disk-seek per rotation of a harddisk, therefore I ...
TITLE: How many disk seeks does it take to write one row to a SQLite database? QUESTION: I already asked this question here without getting any answers, so I allow myself to repost it here. I will provide references to where an answer was found. As far as I understand, there can be one disk-seek per rotation of a hard...
[ "csv", "sqlite" ]
0
4
155
1
0
2011-06-05T11:36:44.410000
2011-06-05T11:44:02.323000
6,242,654
6,242,713
Creating Forms with JS within Canvas
Is it possible to create forms within the CANVAS element im using the processingJS library but cannot find any support for forms?
You can't directly put other HTML elements in a canvas, but nothing's stopping you from positioning HTML elmements over a canvas. Firefox 5 is going to have 4 has a mechanism to allow a canvas (or anything else) to be used as a background for another element, so with a facility like that you could draw into a canvas th...
Creating Forms with JS within Canvas Is it possible to create forms within the CANVAS element im using the processingJS library but cannot find any support for forms?
TITLE: Creating Forms with JS within Canvas QUESTION: Is it possible to create forms within the CANVAS element im using the processingJS library but cannot find any support for forms? ANSWER: You can't directly put other HTML elements in a canvas, but nothing's stopping you from positioning HTML elmements over a canv...
[ "javascript", "canvas" ]
0
1
256
1
0
2011-06-05T11:37:50.623000
2011-06-05T11:50:02.123000
6,242,656
6,242,785
specific divider after posts
I would like to have a specific divider after my posts. I have 3 dividers -> divider1,divider2,divider3 Basicly i would like for them to loop, so after post 1 i get divider1, post 2-> divider2, post3->divider3, post 4 ->divider1 etc... This is my code: so the class should loop from divider1 to divider2 to divider3 to d...
Make a counter and check its modulus to cycle 1 to 3 (actually we'll use 0 to 2) // Start counter at 0 $counter = 0; // This is your loop foreach ($posts as $post) { // Now a switch will determine which divider to use. // We'll select class divider1 divider2 or divider3 based // on the current counter position. This w...
specific divider after posts I would like to have a specific divider after my posts. I have 3 dividers -> divider1,divider2,divider3 Basicly i would like for them to loop, so after post 1 i get divider1, post 2-> divider2, post3->divider3, post 4 ->divider1 etc... This is my code: so the class should loop from divider1...
TITLE: specific divider after posts QUESTION: I would like to have a specific divider after my posts. I have 3 dividers -> divider1,divider2,divider3 Basicly i would like for them to loop, so after post 1 i get divider1, post 2-> divider2, post3->divider3, post 4 ->divider1 etc... This is my code: so the class should ...
[ "php", "wordpress" ]
1
0
334
1
0
2011-06-05T11:37:57.810000
2011-06-05T12:05:14.127000
6,242,658
6,242,711
Random Numbers in C++
I'm creating a BlackJack Program. I want the cards to be randomly dealt. if i use the rand() function and initialize srand() to time(NULL) then all the cards turn out to be same. Any idea what the problem might be? //Cards.h #include #include #include using namespace std; class Cards { private: int val_seed,suit_seed;...
Seed the number generator ONCE. If you run your function in a loop they will be executed faster than the time resolution interval (so all the seeds are the same and therefore the numbers). While developing the app and debugging it it will help if you seed the generator with the same, known value. This means successive ...
Random Numbers in C++ I'm creating a BlackJack Program. I want the cards to be randomly dealt. if i use the rand() function and initialize srand() to time(NULL) then all the cards turn out to be same. Any idea what the problem might be? //Cards.h #include #include #include using namespace std; class Cards { private: i...
TITLE: Random Numbers in C++ QUESTION: I'm creating a BlackJack Program. I want the cards to be randomly dealt. if i use the rand() function and initialize srand() to time(NULL) then all the cards turn out to be same. Any idea what the problem might be? //Cards.h #include #include #include using namespace std; class ...
[ "c++", "class", "random", "numbers", "blackjack" ]
0
11
2,727
5
0
2011-06-05T11:38:17.583000
2011-06-05T11:48:55.610000
6,242,661
6,242,778
Enter data in EditText and respond without pressing enter
I have an editText with a listener. edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { // If the event is a key-down event on the "enter" button if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { // Perform action on key pr...
I think you want to implement functionality like whenever user enter any character you want to check, if this is the case then there is a TextWatcher class for you. In which you can override its 3 methods: afterTextChanged, beforeTextChanged and onTextChanged. mPasswordLength = (EditText)findViewById(R.id.password_leng...
Enter data in EditText and respond without pressing enter I have an editText with a listener. edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { // If the event is a key-down event on the "enter" button if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode ...
TITLE: Enter data in EditText and respond without pressing enter QUESTION: I have an editText with a listener. edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { // If the event is a key-down event on the "enter" button if ((event.getAction() == KeyEvent.ACTION_...
[ "android" ]
3
8
6,291
1
0
2011-06-05T11:39:22.980000
2011-06-05T12:04:00.270000
6,242,663
6,242,679
Javascript Select Option not updating
I have a dropdown which when an option is selected it needs to populate an input value with the value of the option selected only its not working as in nothings changing, Could anybody see and explain why going of my code? 1 2 3 4 5 6 7 8 9 10 function updatecredoff() { if(value == 1) { document.getElementById("corr_se...
You haven't defined value anywhere in your code (at least from what you've shown) before this: if(value == 1) { You could define onchange="updatecredoff(this); with this attached, and then in your function before your first conditional assign the value: function updatecredoff(e) { value = e.value; Example: http://jsfid...
Javascript Select Option not updating I have a dropdown which when an option is selected it needs to populate an input value with the value of the option selected only its not working as in nothings changing, Could anybody see and explain why going of my code? 1 2 3 4 5 6 7 8 9 10 function updatecredoff() { if(value ==...
TITLE: Javascript Select Option not updating QUESTION: I have a dropdown which when an option is selected it needs to populate an input value with the value of the option selected only its not working as in nothings changing, Could anybody see and explain why going of my code? 1 2 3 4 5 6 7 8 9 10 function updatecredo...
[ "javascript" ]
0
2
3,046
3
0
2011-06-05T11:39:25.087000
2011-06-05T11:42:24.493000
6,242,670
6,242,686
Alert return data in jQuery - ajax
I have a php file, process.php which return a number pattern depending on the input string, from $_POST["name"]. I want to alert the return number using jQuery. How can I do this?
How about $.post('/process.php', { input: 'your input' }, function(data) { alert(data); }, 'text');
Alert return data in jQuery - ajax I have a php file, process.php which return a number pattern depending on the input string, from $_POST["name"]. I want to alert the return number using jQuery. How can I do this?
TITLE: Alert return data in jQuery - ajax QUESTION: I have a php file, process.php which return a number pattern depending on the input string, from $_POST["name"]. I want to alert the return number using jQuery. How can I do this? ANSWER: How about $.post('/process.php', { input: 'your input' }, function(data) { ale...
[ "jquery" ]
0
0
1,220
1
0
2011-06-05T11:40:29.230000
2011-06-05T11:43:36.147000
6,242,671
6,242,726
MySQL Sum on matching set of data
This is my first post in this forum. I normally find ans to my problems when search but this is the first time I needed to post this question. Any help would be highly appreciated. I have a table called "gjournal_main" `dateinput` datetime NOT NULL COMMENT 'Input Date', `datepaid` date NOT NULL COMMENT 'Date of Invoice...
Using union to stick a line with totals to the individual lines: select g.inputdate, g.invoiceno, g.bookno, j.accountname, j.debit, j.credit, 1 as recordtype /*invoice line*/ from gjournal_main g inner join general_journal j on j.tid = g.invoiceno union all select null, null, g.invoiceno, '** Total', sum(j.debit), sum(...
MySQL Sum on matching set of data This is my first post in this forum. I normally find ans to my problems when search but this is the first time I needed to post this question. Any help would be highly appreciated. I have a table called "gjournal_main" `dateinput` datetime NOT NULL COMMENT 'Input Date', `datepaid` date...
TITLE: MySQL Sum on matching set of data QUESTION: This is my first post in this forum. I normally find ans to my problems when search but this is the first time I needed to post this question. Any help would be highly appreciated. I have a table called "gjournal_main" `dateinput` datetime NOT NULL COMMENT 'Input Date...
[ "mysql", "select", "sum" ]
0
0
335
1
0
2011-06-05T11:40:59.527000
2011-06-05T11:52:07.810000
6,242,677
6,242,733
Internet Explorer vs soapui in Web Services Test
I have a web services a wsdl/soap. when i Test it in Internet Explorer it show me the entire xml, but when i test it with soapui it show me an error with log error bad request. What is the difference to test a wsdl/soap in soapui and Internet Explorer? thanks for your answer. and how to fix this error please? When i tr...
I assume when you say test in IE you mean just browse to the WS URL with a?WSDL at the end? If that is the case, then this test will simply display in your browser the XML of the WSDL definition - so as long as the WSDL hosted is valid XML IE will display it fine. However, when you try to setup a soapUI project to test...
Internet Explorer vs soapui in Web Services Test I have a web services a wsdl/soap. when i Test it in Internet Explorer it show me the entire xml, but when i test it with soapui it show me an error with log error bad request. What is the difference to test a wsdl/soap in soapui and Internet Explorer? thanks for your an...
TITLE: Internet Explorer vs soapui in Web Services Test QUESTION: I have a web services a wsdl/soap. when i Test it in Internet Explorer it show me the entire xml, but when i test it with soapui it show me an error with log error bad request. What is the difference to test a wsdl/soap in soapui and Internet Explorer? ...
[ "web-services", "soapui" ]
0
0
2,654
1
0
2011-06-05T11:42:19.967000
2011-06-05T11:53:28.260000
6,242,692
6,242,715
Adding title to page with instant jQuery search script
I have a Google Instant style search script written in jQuery. When the user queries, # SEARCHTERM is added onto my page URL. I was wondering how I could add the users query into the title of my page so it would be " SEARCHTERM - My Search Script" Here is my current code: $(document).ready(function(){ $("#search").keyu...
Assign title with: document.title document.title = $(this).val() + " - My Search Script";
Adding title to page with instant jQuery search script I have a Google Instant style search script written in jQuery. When the user queries, # SEARCHTERM is added onto my page URL. I was wondering how I could add the users query into the title of my page so it would be " SEARCHTERM - My Search Script" Here is my curren...
TITLE: Adding title to page with instant jQuery search script QUESTION: I have a Google Instant style search script written in jQuery. When the user queries, # SEARCHTERM is added onto my page URL. I was wondering how I could add the users query into the title of my page so it would be " SEARCHTERM - My Search Script"...
[ "javascript", "jquery", "html" ]
1
1
189
1
0
2011-06-05T11:44:52.463000
2011-06-05T11:50:14.987000
6,242,698
6,243,309
Constructing Objects and Calling Methods Using IL
I wrote following program in order to understand object construction and method call in IL Unfortunately it doesn’t print How are you doing on the console. Do you have any idea? Output of peverify is also given below. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Ref...
You create a dynamic assembly and then do nothing with it. Why should that print anything? Also, peverify won't help you in any way here, because you're not verifying the assembly you generated, you're verifying just the assembly that's generating it. You also don't call typeBuilder.CreateType(), which is necessary and...
Constructing Objects and Calling Methods Using IL I wrote following program in order to understand object construction and method call in IL Unfortunately it doesn’t print How are you doing on the console. Do you have any idea? Output of peverify is also given below. using System; using System.Collections.Generic; usin...
TITLE: Constructing Objects and Calling Methods Using IL QUESTION: I wrote following program in order to understand object construction and method call in IL Unfortunately it doesn’t print How are you doing on the console. Do you have any idea? Output of peverify is also given below. using System; using System.Collect...
[ "c#", "reflection.emit", "il" ]
0
2
187
1
0
2011-06-05T11:45:56.273000
2011-06-05T13:45:25.173000
6,242,709
6,284,691
JIra + Greenhopper - how to do Agile correctly
I am new to the Agile flow in JIRA + Greenhopper. I am trying to understand what is the correct/better way to work Agile in JIRA + GH. I've read on the net for some information - so far, I understand we have Stories and Epics (which are LARGE stories). I wanted to know what is the flow of creating the tasks: First, we ...
How we've been using it is as follows: We create a story to define a feature request (a non-technical task in your verbage) When we plan an iteration, we will prioritize the stories that we want to accomplish. For each story, the team will create tasks (sub-tasks) on how to build the story. These tasks are specific thi...
JIra + Greenhopper - how to do Agile correctly I am new to the Agile flow in JIRA + Greenhopper. I am trying to understand what is the correct/better way to work Agile in JIRA + GH. I've read on the net for some information - so far, I understand we have Stories and Epics (which are LARGE stories). I wanted to know wha...
TITLE: JIra + Greenhopper - how to do Agile correctly QUESTION: I am new to the Agile flow in JIRA + Greenhopper. I am trying to understand what is the correct/better way to work Agile in JIRA + GH. I've read on the net for some information - so far, I understand we have Stories and Epics (which are LARGE stories). I ...
[ "jira", "jira-agile" ]
26
27
20,022
2
0
2011-06-05T11:48:47.330000
2011-06-08T20:14:47.653000
6,242,714
6,261,292
Adding entries to a list dynamically
I am invoking the native camera using intent to capture images and in the activity result i am trying to provide a caption for the image captured and adding it to a list, but i am not successful in doing so i get an error when i add the item to the list. From the device the application force closes and am not able to f...
You do not assign holder a value in case that the convertView is not null. To use this "holder"-technique correctly, save the holder within the convertView (as tag), and retrieve it in case the convertView is not null (it is explained in this video quite nicely, have a look at it!). ViewHolder holder = null; if (mediaD...
Adding entries to a list dynamically I am invoking the native camera using intent to capture images and in the activity result i am trying to provide a caption for the image captured and adding it to a list, but i am not successful in doing so i get an error when i add the item to the list. From the device the applicat...
TITLE: Adding entries to a list dynamically QUESTION: I am invoking the native camera using intent to capture images and in the activity result i am trying to provide a caption for the image captured and adding it to a list, but i am not successful in doing so i get an error when i add the item to the list. From the d...
[ "android" ]
0
1
297
1
0
2011-06-05T11:50:02.920000
2011-06-07T06:20:32.680000
6,242,717
6,242,759
Is foreign key required in my database tables?
I have following two mysql tables for the basic discussion forum. The first table contains the topics, while the second contains the replies to the specific topic. I want to know about the foreign key concept in this database design. Do I need to add foreign key here? How it will be useful and how can I add in followin...
In general MySQL doesn't require you to insert foreign keys. Moreover, as long as you use the MyISAM storage engine you are not able to benefit from defining foreign keys. They accept the foreign key syntax but internally they just ignore those statements, see foreign key entry in MySQL documentation for details. Inste...
Is foreign key required in my database tables? I have following two mysql tables for the basic discussion forum. The first table contains the topics, while the second contains the replies to the specific topic. I want to know about the foreign key concept in this database design. Do I need to add foreign key here? How ...
TITLE: Is foreign key required in my database tables? QUESTION: I have following two mysql tables for the basic discussion forum. The first table contains the topics, while the second contains the replies to the specific topic. I want to know about the foreign key concept in this database design. Do I need to add fore...
[ "foreign-keys" ]
1
3
3,425
3
0
2011-06-05T11:50:42.903000
2011-06-05T11:59:36.277000
6,242,718
6,242,723
Accepting raw HTML in a POST request
I am building an API and I have a method that will accept a POST request with a couple of parameters. One of the parameters will be HTML code. A user can pass in a whole HTML page, how should I accept this? Is it ok to ask the user to base64_encode it? Or is it there a better way? I am worried about parsing invalid cha...
You really want the user to encode their HTML with base64?:) That would be not viable Just put a and accept the HTML. Be careful with XSS and other malicious staff
Accepting raw HTML in a POST request I am building an API and I have a method that will accept a POST request with a couple of parameters. One of the parameters will be HTML code. A user can pass in a whole HTML page, how should I accept this? Is it ok to ask the user to base64_encode it? Or is it there a better way? I...
TITLE: Accepting raw HTML in a POST request QUESTION: I am building an API and I have a method that will accept a POST request with a couple of parameters. One of the parameters will be HTML code. A user can pass in a whole HTML page, how should I accept this? Is it ok to ask the user to base64_encode it? Or is it the...
[ "php", "html", "api", "http" ]
0
4
593
2
0
2011-06-05T11:50:57.510000
2011-06-05T11:51:58.207000
6,242,720
6,242,760
Looking for a non-profit / freeware software license
I am currently looking for license agreement e.g. GNU, that declares a software free for everyone and the software itself will not be used for any monetary gain / profit. Although the software can't be modified. Could someone please point me in the right direction Many thanks
It seems you're looking for a 'Free For non commercial Use' license. You could take a look at the Creative Commons licenses. That's the licence also used for media files on Wikipedia, but I can imagine it can apply to software too.
Looking for a non-profit / freeware software license I am currently looking for license agreement e.g. GNU, that declares a software free for everyone and the software itself will not be used for any monetary gain / profit. Although the software can't be modified. Could someone please point me in the right direction Ma...
TITLE: Looking for a non-profit / freeware software license QUESTION: I am currently looking for license agreement e.g. GNU, that declares a software free for everyone and the software itself will not be used for any monetary gain / profit. Although the software can't be modified. Could someone please point me in the ...
[ "windows", "licensing" ]
1
0
193
1
0
2011-06-05T11:51:25.653000
2011-06-05T11:59:49.133000
6,242,735
6,253,795
Finding a button added to TableRow by id in OnLongClick in Android?
I have a TableLayout with dynamically added TableRows depending on the size of a cursor. To each row I add a Delete-button, which is set to Invisible. Each row and button gets an id on creation that is the same if then belong to the same row. WHen the user LongClicks on the TableRow the visibility is set to Visible ins...
Several solutions Instead of capturing the longclick on the table row, capture it directly on the delete button by doing btndelete.setDuplicateParentStateEnabled(true) Button.setDuplicateParentStateEnabled(boolean) Add a LongClickListener on btnDelete and set the visibility to Visible/invisible, toggle it or whatever y...
Finding a button added to TableRow by id in OnLongClick in Android? I have a TableLayout with dynamically added TableRows depending on the size of a cursor. To each row I add a Delete-button, which is set to Invisible. Each row and button gets an id on creation that is the same if then belong to the same row. WHen the ...
TITLE: Finding a button added to TableRow by id in OnLongClick in Android? QUESTION: I have a TableLayout with dynamically added TableRows depending on the size of a cursor. To each row I add a Delete-button, which is set to Invisible. Each row and button gets an id on creation that is the same if then belong to the s...
[ "android", "tablerow" ]
0
1
1,216
1
0
2011-06-05T11:53:47.823000
2011-06-06T14:47:15.200000
6,242,738
6,242,752
Detecting an IPv6 address in PHP and storing it properly in MySQL. How?
I read a few of the questions already asked, and i found this to be useful, although i have no tried it Working with IPv6 Addresses in PHP Still, say i have a 'bans' table in MySQL. How would i go about storing the IPv6 address? The method must be universal, i.e the field must be able to contain either a ipv4 or ipv6 a...
Still, say i have a 'bans' table in MySQL. How would i go about storing the IPv6 address? You can store it in a simple column of VARCHAR(40). Considering a sample IPv6 max is 40 byte: 2001:0DB8:0000:0000:0000:0000:1428:57ab That coulmn will be able to contain IPv4 too
Detecting an IPv6 address in PHP and storing it properly in MySQL. How? I read a few of the questions already asked, and i found this to be useful, although i have no tried it Working with IPv6 Addresses in PHP Still, say i have a 'bans' table in MySQL. How would i go about storing the IPv6 address? The method must be ...
TITLE: Detecting an IPv6 address in PHP and storing it properly in MySQL. How? QUESTION: I read a few of the questions already asked, and i found this to be useful, although i have no tried it Working with IPv6 Addresses in PHP Still, say i have a 'bans' table in MySQL. How would i go about storing the IPv6 address? T...
[ "php", "ipv6" ]
4
0
2,702
2
0
2011-06-05T11:54:45.133000
2011-06-05T11:58:31.263000
6,242,742
6,243,173
Android Home button on custom title bar
I built home button on custom titlebar (use picture to button). My Problem is every time to click this button. It will go to main. When stay in main page and click the button. It will to main page again and again. How I do?? I want it not go to main when stay main or Can't click this button in main page. Are you unders...
Add flag Intent.FLAG_ACTIVITY_CLEAR_TOP when you navigate from sub page to home. Here's my example code: /* -- Button to HOME -- */ toHome.setOnClickListener(new OnClickListener() { public void onClick(View v) { Intent goHome = new Intent(Intent.ACTION_MAIN); goHome.setClass(CustomTitleBar.this, MainActivity.class); go...
Android Home button on custom title bar I built home button on custom titlebar (use picture to button). My Problem is every time to click this button. It will go to main. When stay in main page and click the button. It will to main page again and again. How I do?? I want it not go to main when stay main or Can't click ...
TITLE: Android Home button on custom title bar QUESTION: I built home button on custom titlebar (use picture to button). My Problem is every time to click this button. It will go to main. When stay in main page and click the button. It will to main page again and again. How I do?? I want it not go to main when stay ma...
[ "android", "title" ]
0
0
3,608
3
0
2011-06-05T11:56:17.700000
2011-06-05T13:21:34.817000
6,242,745
6,242,795
about file io functions IN C
i am dealing with the file io functions,can any one explain me the use & working of the statement 2,in the following code,here i want to enter string,&then want to write it on a disk..... #include #include int main() { FILE *fp; char s[80]; fp=fopen("noname00.cpp","w"); while(strlen(gets(s))>0) /*parenthesis now at cor...
Which one exactly is statement 2? char s[80];? It simply declares and defines a character array of size 80. If you mean statement 2 is while(strlen(gets(s)>0)), it doesn't look correct to me. strlen() accepts a const char * as its argument but you are specifying it an integer instead: gets(s) > 0. Also, never use gets(...
about file io functions IN C i am dealing with the file io functions,can any one explain me the use & working of the statement 2,in the following code,here i want to enter string,&then want to write it on a disk..... #include #include int main() { FILE *fp; char s[80]; fp=fopen("noname00.cpp","w"); while(strlen(gets(s)...
TITLE: about file io functions IN C QUESTION: i am dealing with the file io functions,can any one explain me the use & working of the statement 2,in the following code,here i want to enter string,&then want to write it on a disk..... #include #include int main() { FILE *fp; char s[80]; fp=fopen("noname00.cpp","w"); wh...
[ "c", "file", "input" ]
0
2
127
2
0
2011-06-05T11:56:24.687000
2011-06-05T12:06:32.843000
6,242,750
6,242,765
MySQL AUTO_INCREMENT Counter giving some problem
i have some MySQL tables which uses primary key with auto_increment feature, it all seems while inserting the records for the first time, but when i delete any records in between it does not reset the auto_increment counter but continues to use the last id. for example i have inserted the records with following id's 1,...
That's not how AUTO_INCREMENT works in MySQL or any other database. AUTO_INCREMENT always goes forward. Never re accommodates itself to fill the gaps. If you need the behavior you are describing, you need to write your own code to handle that. In your client program, in the database or wherever you feel it's better. Ju...
MySQL AUTO_INCREMENT Counter giving some problem i have some MySQL tables which uses primary key with auto_increment feature, it all seems while inserting the records for the first time, but when i delete any records in between it does not reset the auto_increment counter but continues to use the last id. for example i...
TITLE: MySQL AUTO_INCREMENT Counter giving some problem QUESTION: i have some MySQL tables which uses primary key with auto_increment feature, it all seems while inserting the records for the first time, but when i delete any records in between it does not reset the auto_increment counter but continues to use the last...
[ "mysql", "database", "auto-increment" ]
0
2
343
1
0
2011-06-05T11:58:22.997000
2011-06-05T12:01:09.757000
6,242,756
6,242,813
How to retrieve inserted id after inserting row in SQLite using Python?
How to retrieve inserted id after inserting row in SQLite using Python? I have table like this: id INT AUTOINCREMENT PRIMARY KEY, username VARCHAR(50), password VARCHAR(50) I insert a new row with example data username="test" and password="test". How do I retrieve the generated id in a transaction safe way? This is for...
You could use cursor.lastrowid (see "Optional DB API Extensions"): connection=sqlite3.connect(':memory:') cursor=connection.cursor() cursor.execute('''CREATE TABLE foo (id integer primary key autoincrement, username varchar(50), password varchar(50))''') cursor.execute('INSERT INTO foo (username,password) VALUES (?,?)'...
How to retrieve inserted id after inserting row in SQLite using Python? How to retrieve inserted id after inserting row in SQLite using Python? I have table like this: id INT AUTOINCREMENT PRIMARY KEY, username VARCHAR(50), password VARCHAR(50) I insert a new row with example data username="test" and password="test". H...
TITLE: How to retrieve inserted id after inserting row in SQLite using Python? QUESTION: How to retrieve inserted id after inserting row in SQLite using Python? I have table like this: id INT AUTOINCREMENT PRIMARY KEY, username VARCHAR(50), password VARCHAR(50) I insert a new row with example data username="test" and ...
[ "python", "sqlite" ]
245
350
202,175
2
0
2011-06-05T11:59:13.783000
2011-06-05T12:09:47.520000
6,242,758
6,242,820
Thread activate with timer int C#
I have a function: void foo() { string a="f"; string b="t"; Console.WriteLine(a+b); } I also have some int(the functioin know it) that is the number of minutes to activate the function (lets call it COUNT). I want to do this function in a thread that will do the initialization part just one time, and then will print a+...
First you create a Timer and set it to fire every minute (60 seconds, 60k ms). Next you add an Event handler to the Elapsed event (using +=). Third, the handler has this signature static void timer_Elapsed(object sender, ElapsedEventArgs e) so you get a reference to the timer from the sender parameter. Fourth, you have...
Thread activate with timer int C# I have a function: void foo() { string a="f"; string b="t"; Console.WriteLine(a+b); } I also have some int(the functioin know it) that is the number of minutes to activate the function (lets call it COUNT). I want to do this function in a thread that will do the initialization part jus...
TITLE: Thread activate with timer int C# QUESTION: I have a function: void foo() { string a="f"; string b="t"; Console.WriteLine(a+b); } I also have some int(the functioin know it) that is the number of minutes to activate the function (lets call it COUNT). I want to do this function in a thread that will do the initi...
[ "c#", "timer" ]
0
1
267
1
0
2011-06-05T11:59:31.987000
2011-06-05T12:11:09.797000
6,242,761
6,242,792
Determine direct shared object dependencies of a Linux binary?
How can I easily find out the direct shared object dependencies of a Linux binary in ELF format? I'm aware of the ldd tool, but that appears to output all dependencies of a binary, including the dependencies of any shared objects that binary is dependent on.
You can use readelf to explore the ELF headers. readelf -d will list the direct dependencies as NEEDED sections. $ readelf -d elfbin Dynamic section at offset 0xe30 contains 22 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.0.0] 0x0000000000000001 (NEEDED) Shared library: [libc.s...
Determine direct shared object dependencies of a Linux binary? How can I easily find out the direct shared object dependencies of a Linux binary in ELF format? I'm aware of the ldd tool, but that appears to output all dependencies of a binary, including the dependencies of any shared objects that binary is dependent on...
TITLE: Determine direct shared object dependencies of a Linux binary? QUESTION: How can I easily find out the direct shared object dependencies of a Linux binary in ELF format? I'm aware of the ldd tool, but that appears to output all dependencies of a binary, including the dependencies of any shared objects that bina...
[ "linux", "elf" ]
203
307
218,235
4
0
2011-06-05T11:59:57.273000
2011-06-05T12:06:04.527000
6,242,768
6,242,777
Is the safe-bool idiom obsolete in C++11?
This answer of @R. Martinho Fernandes shows, that the safe-bool idiom is apperently deprecated in C++11, as it can be replaced by a simple explicit operator bool() const; according to the standard quote in the answer §4 [conv] p3: An expression e can be implicitly converted to a type T if and only if the declaration T ...
Yes. This is the example for problems with only having implicit user-defined conversions and explicit user-defined conversion operators were practically invented because of this problem and to replace all the safe-bool stuff with something a lot cleaner and more logical.
Is the safe-bool idiom obsolete in C++11? This answer of @R. Martinho Fernandes shows, that the safe-bool idiom is apperently deprecated in C++11, as it can be replaced by a simple explicit operator bool() const; according to the standard quote in the answer §4 [conv] p3: An expression e can be implicitly converted to ...
TITLE: Is the safe-bool idiom obsolete in C++11? QUESTION: This answer of @R. Martinho Fernandes shows, that the safe-bool idiom is apperently deprecated in C++11, as it can be replaced by a simple explicit operator bool() const; according to the standard quote in the answer §4 [conv] p3: An expression e can be implic...
[ "c++", "c++11", "deprecated", "c++-faq", "safe-bool-idiom" ]
185
135
21,422
2
0
2011-06-05T12:01:56.493000
2011-06-05T12:03:46.730000
6,242,771
6,242,812
Choosing a Host for websites
Can a wordpress domain and a moodle project be hosted by same provider, and what is important to weigh when comparing hosts?
Both wordpress and moodle uses PHP and MySQL, these are the most important things you would need on your host.
Choosing a Host for websites Can a wordpress domain and a moodle project be hosted by same provider, and what is important to weigh when comparing hosts?
TITLE: Choosing a Host for websites QUESTION: Can a wordpress domain and a moodle project be hosted by same provider, and what is important to weigh when comparing hosts? ANSWER: Both wordpress and moodle uses PHP and MySQL, these are the most important things you would need on your host.
[ "wordpress", "hosting", "moodle" ]
0
0
70
1
0
2011-06-05T12:02:14.420000
2011-06-05T12:09:34.433000
6,242,774
6,246,512
How do you manage LVL unlicensed response?
I'm currently implementing LVL on my app and I thought about making a little joke that'd render the app unusable or very unconfortable to use when the app is unlicensed. What do you think about that? DO you think is better to just notify the user and close the app (or take the user to the market)?
I would highly advise against making it insulting in any way. I implemented LVL in my application with a simple popup and then redirect to to the Android Market. Unfortunately, there were a LOT of false positives (where users who had purchased the application could still not validate). I mentioned in the popup to conta...
How do you manage LVL unlicensed response? I'm currently implementing LVL on my app and I thought about making a little joke that'd render the app unusable or very unconfortable to use when the app is unlicensed. What do you think about that? DO you think is better to just notify the user and close the app (or take the...
TITLE: How do you manage LVL unlicensed response? QUESTION: I'm currently implementing LVL on my app and I thought about making a little joke that'd render the app unusable or very unconfortable to use when the app is unlicensed. What do you think about that? DO you think is better to just notify the user and close th...
[ "android", "android-lvl" ]
2
4
778
3
0
2011-06-05T12:02:55.107000
2011-06-05T23:05:48.530000
6,242,776
6,242,843
SQL: is my syntax correct?
q1: given a table: ID, Date, Status. Write a SQL query which receives @ID @Date and retrieve the status the person with that id on that date or the last status before that date if that date doesn't exist. q2: given a table: ID, Date, Money. Write a SQL query which retrieve the average money amount for the dates that ap...
The syntax, would depend on the rdbms you're using, i'm assuming MSSQL, or possibly sybase, based on the TOP syntax you've used, in which case, you'll need to use @ in front of your variables, and the set keyword: declare @money_sum decimal declare @days_count int set @money_sum = SELECT SUM(MONEY) FROM table_name set...
SQL: is my syntax correct? q1: given a table: ID, Date, Status. Write a SQL query which receives @ID @Date and retrieve the status the person with that id on that date or the last status before that date if that date doesn't exist. q2: given a table: ID, Date, Money. Write a SQL query which retrieve the average money a...
TITLE: SQL: is my syntax correct? QUESTION: q1: given a table: ID, Date, Status. Write a SQL query which receives @ID @Date and retrieve the status the person with that id on that date or the last status before that date if that date doesn't exist. q2: given a table: ID, Date, Money. Write a SQL query which retrieve t...
[ "sql" ]
0
0
75
1
0
2011-06-05T12:03:13.983000
2011-06-05T12:17:42.230000
6,242,780
6,242,787
WPF auto resize elements
When application window is resized I want that the elements in it would resize proportionally too. Is that possible? I tried googling but couldn't really find anyting related to this. My XAML code:
You seem to use a grid without actually utilizing its prime functionality: Rows & Columns Using them you can make the layout allocate space proportially by defining star-sized rows and columns. e.g. If by resizing proportionally you actually mean size rather than allocated layout space then use a Viewbox.
WPF auto resize elements When application window is resized I want that the elements in it would resize proportionally too. Is that possible? I tried googling but couldn't really find anyting related to this. My XAML code:
TITLE: WPF auto resize elements QUESTION: When application window is resized I want that the elements in it would resize proportionally too. Is that possible? I tried googling but couldn't really find anyting related to this. My XAML code: ANSWER: You seem to use a grid without actually utilizing its prime functional...
[ "c#", "wpf", "xaml", "layout", "window" ]
2
3
11,697
2
0
2011-06-05T12:04:08.820000
2011-06-05T12:05:34.593000
6,242,788
6,242,800
Can't include files after moving from CPanel to Plesk
I have a base set of files that are included from lots of other files. This saves me having to update lots of files when I made changes. The issues is, in CPanel my directory structure was: Base: domain/public_html/base_data Subdomain: domain/public_html/subdomain This meant I could just go back one directory and inclu...
Yes use ABSOLUTE path. you can make a $yourLibPath = 'domain/httpdocs/base_data/'; And then include all your libs using this var: include($yourLibPath.'time.lib.php');
Can't include files after moving from CPanel to Plesk I have a base set of files that are included from lots of other files. This saves me having to update lots of files when I made changes. The issues is, in CPanel my directory structure was: Base: domain/public_html/base_data Subdomain: domain/public_html/subdomain T...
TITLE: Can't include files after moving from CPanel to Plesk QUESTION: I have a base set of files that are included from lots of other files. This saves me having to update lots of files when I made changes. The issues is, in CPanel my directory structure was: Base: domain/public_html/base_data Subdomain: domain/publi...
[ "php", "cpanel", "plesk" ]
0
0
645
2
0
2011-06-05T12:05:38.973000
2011-06-05T12:07:27.223000
6,242,790
6,242,847
Add text to QTextEdit using QPushButton
Just a simple program to add text to textedit when button is clicked... anything wrong here?? #include #include #include #include #include #include int main(int argc,char *argv[]) { QApplication app(argc,argv); QHBoxLayout *layout=new QHBoxLayout; QTextEdit *text = new QTextEdit(); QWidget window; QPushButton *button; ...
You can't use connect like that. You cannot pass parameters to the SLOT that are not present in the connected SIGNAL. You will need to connect the clicked() signal to your own slot (with no argument), and call the setPlainText function yourself (or emit a new signal that has a QString parameter). The other option is to...
Add text to QTextEdit using QPushButton Just a simple program to add text to textedit when button is clicked... anything wrong here?? #include #include #include #include #include #include int main(int argc,char *argv[]) { QApplication app(argc,argv); QHBoxLayout *layout=new QHBoxLayout; QTextEdit *text = new QTextEdit(...
TITLE: Add text to QTextEdit using QPushButton QUESTION: Just a simple program to add text to textedit when button is clicked... anything wrong here?? #include #include #include #include #include #include int main(int argc,char *argv[]) { QApplication app(argc,argv); QHBoxLayout *layout=new QHBoxLayout; QTextEdit *tex...
[ "c++", "qt", "qt4" ]
0
1
3,268
3
0
2011-06-05T12:05:48.710000
2011-06-05T12:18:26.847000
6,242,799
6,242,992
Question on sorting.. confused!
There is a question and I have the solution to it also, but I am confused and I am not able to understand it.. Please if anybody can put their thoughts forward.... Question There are 128 placyers participating in a tennis tournament. Assume that the "x beats y" relationship is transitive, i.e., for all players A, B and...
If you run the tournament as a binary tree, you will at the final end up with two players A and B that are the best of their branch in the tree. If A beats B in the final, A is (because of the transitivity) better than every other player. There is however nothing guaranteeing that B thereby is the second best, i.e. bet...
Question on sorting.. confused! There is a question and I have the solution to it also, but I am confused and I am not able to understand it.. Please if anybody can put their thoughts forward.... Question There are 128 placyers participating in a tennis tournament. Assume that the "x beats y" relationship is transitive...
TITLE: Question on sorting.. confused! QUESTION: There is a question and I have the solution to it also, but I am confused and I am not able to understand it.. Please if anybody can put their thoughts forward.... Question There are 128 placyers participating in a tennis tournament. Assume that the "x beats y" relation...
[ "algorithm", "puzzle" ]
0
1
687
1
0
2011-06-05T12:07:21.780000
2011-06-05T12:48:49.783000
6,242,801
6,243,825
making Union for three different entities that implements the same interface
I have 3 entities: RatedPrice, DailyPrice and UtilizePrice. Each entity has Code member. I would like to write a lambda query that returns IQueryable of the three sorted by Code member. I know I need to use somewhere in Union but I don't know how. Moreover, all the 3 entities has diffrences but are implements IPrice. H...
You must use something like this: var data = ctx.RatedPrices.Select(p => new { p.Code, p.Price }).Concat(ctx.DailyPrices.Select(p => new { p.Code, p.Price }).Contact(ctx.UtilizePrices.Select(p => new { p.Code, p.Price })).OrderBy(p => p.Code); Entity framework and linq-to-entities don't know what is the interface. You ...
making Union for three different entities that implements the same interface I have 3 entities: RatedPrice, DailyPrice and UtilizePrice. Each entity has Code member. I would like to write a lambda query that returns IQueryable of the three sorted by Code member. I know I need to use somewhere in Union but I don't know ...
TITLE: making Union for three different entities that implements the same interface QUESTION: I have 3 entities: RatedPrice, DailyPrice and UtilizePrice. Each entity has Code member. I would like to write a lambda query that returns IQueryable of the three sorted by Code member. I know I need to use somewhere in Union...
[ "c#", ".net", "entity-framework", "lambda", "linq-to-entities" ]
2
0
924
2
0
2011-06-05T12:07:29.757000
2011-06-05T15:24:49.427000
6,242,804
6,242,911
writing a conditional insert statement
update A set x = '0' where [condition]; if the where-condition isn't fulfilled no update takes place. depending on this I want to trigger an insert in another table, but only if an update was done - i.e. ROW_COUNT() > 0. how may I do that in one request? I tried this: update A set x = '0' where [condition]; if row_cou...
Create a stored procedure like: DELIMITER $$ CREATE PROCEDURE updateA (c1 varchar) BEGIN declare rows_affected integer; UPDATE a SET x = '0' WHERE col1 = c1; SELECT row_count() INTO rows_affected; IF rows_affected > 0 THEN BEGIN INSERT INTO..... END; END IF; END $$ DELIMITER; Or use an AFTER UPDATE trigger DELIMI...
writing a conditional insert statement update A set x = '0' where [condition]; if the where-condition isn't fulfilled no update takes place. depending on this I want to trigger an insert in another table, but only if an update was done - i.e. ROW_COUNT() > 0. how may I do that in one request? I tried this: update A set...
TITLE: writing a conditional insert statement QUESTION: update A set x = '0' where [condition]; if the where-condition isn't fulfilled no update takes place. depending on this I want to trigger an insert in another table, but only if an update was done - i.e. ROW_COUNT() > 0. how may I do that in one request? I tried ...
[ "mysql" ]
4
4
868
2
0
2011-06-05T12:08:13.747000
2011-06-05T12:30:55.780000
6,242,810
6,243,035
Why is the view model null?
I have the following structure: Controller.cs public ActionResult PageMain(string param) { return View(); } PageMain.cs namespace project1.Models { public class PageMain { public DataTable dtable { get { // some code that returns a DataTable } } } } and finally in the view: @using project1.Models @model PageMain var d...
First, you need to set your logic to reach the database form your model. You could use ORM to achieve that. Then, pass your model to view from your controller. Assume that you have your person model like below: public class Person { public string Name {get;set;} public string SurName {get;set;} public int Age {get;set...
Why is the view model null? I have the following structure: Controller.cs public ActionResult PageMain(string param) { return View(); } PageMain.cs namespace project1.Models { public class PageMain { public DataTable dtable { get { // some code that returns a DataTable } } } } and finally in the view: @using project1.M...
TITLE: Why is the view model null? QUESTION: I have the following structure: Controller.cs public ActionResult PageMain(string param) { return View(); } PageMain.cs namespace project1.Models { public class PageMain { public DataTable dtable { get { // some code that returns a DataTable } } } } and finally in the view:...
[ "c#", "asp.net-mvc", "null" ]
16
13
47,524
4
0
2011-06-05T12:09:26.497000
2011-06-05T13:00:18.410000
6,242,816
6,242,888
How to pass argument in @selector?
How can I pass an argument in the @selector for my code below? [thisIconBtn addTarget:self action:@selector(changeIconState) forControlEvents:UIControlEventTouchUpInside]; -(void)changeIconState:(UITableViewCell*)thisCell { //do something }
First, the colon is part of the selector: @selector(changeIconState:). Second, actions are methods that take a particular set of parameters — you can't just use any method as an action. Usually, actions look like this: - (void)myAction:(id)sender; where sender is a pointer to the object that's sending the action. In yo...
How to pass argument in @selector? How can I pass an argument in the @selector for my code below? [thisIconBtn addTarget:self action:@selector(changeIconState) forControlEvents:UIControlEventTouchUpInside]; -(void)changeIconState:(UITableViewCell*)thisCell { //do something }
TITLE: How to pass argument in @selector? QUESTION: How can I pass an argument in the @selector for my code below? [thisIconBtn addTarget:self action:@selector(changeIconState) forControlEvents:UIControlEventTouchUpInside]; -(void)changeIconState:(UITableViewCell*)thisCell { //do something } ANSWER: First, the colon...
[ "ios", "objective-c", "cocoa-touch", "arguments", "selector" ]
8
6
11,245
3
0
2011-06-05T12:10:32.767000
2011-06-05T12:25:36.053000
6,242,819
6,243,003
Emulating compile-time checks for scripting languages (PHP and JS)
For compiled languages like Java or C, compilation is at the forefront of testing your code. It handles misspellings and enforces interfaces. It has other neat fetures like Java's @Deprecated and @Override to mention a few. Is there a tool which checks your code in similar fashion for interpreted languages like PHP or ...
For some of your required use cases like syntax checking, naming errors, etc this can be done through static code analysis tools, which can also enforce coding conventions (line length, naming conventions, use of deprecated functions, etc). For JavaScript there's JSLint (also check out jslint4java, which can be used fr...
Emulating compile-time checks for scripting languages (PHP and JS) For compiled languages like Java or C, compilation is at the forefront of testing your code. It handles misspellings and enforces interfaces. It has other neat fetures like Java's @Deprecated and @Override to mention a few. Is there a tool which checks ...
TITLE: Emulating compile-time checks for scripting languages (PHP and JS) QUESTION: For compiled languages like Java or C, compilation is at the forefront of testing your code. It handles misspellings and enforces interfaces. It has other neat fetures like Java's @Deprecated and @Override to mention a few. Is there a ...
[ "testing", "scripting", "compiler-errors" ]
2
1
414
1
0
2011-06-05T12:10:58.410000
2011-06-05T12:52:44.527000
6,242,821
6,242,841
Why 'Serialization of 'SplFileInfo' is not allowed?
I'm trying to store an array of SplFileInfo instances in a cache with serialize command but the command throws this exception: Exception' with message 'Serialization of 'SplFileInfo' is not allowed Why is it not allowed? Thanks! Note: I'm just curious. The problem itself can be worked around.
Objects based on Resources can't be serialized. I guess I don't have to explain why (if you need the explanation tell me even if it's OT in this question) Addendum For @Charles that doesn't believe that SplFileInfo doens't store/open a new resource I have made a little test script. If you run this: new SplFileInfo('ind...
Why 'Serialization of 'SplFileInfo' is not allowed? I'm trying to store an array of SplFileInfo instances in a cache with serialize command but the command throws this exception: Exception' with message 'Serialization of 'SplFileInfo' is not allowed Why is it not allowed? Thanks! Note: I'm just curious. The problem its...
TITLE: Why 'Serialization of 'SplFileInfo' is not allowed? QUESTION: I'm trying to store an array of SplFileInfo instances in a cache with serialize command but the command throws this exception: Exception' with message 'Serialization of 'SplFileInfo' is not allowed Why is it not allowed? Thanks! Note: I'm just curiou...
[ "php" ]
4
9
4,209
2
0
2011-06-05T12:11:23.930000
2011-06-05T12:17:41.903000
6,242,823
6,242,877
C# Generics: Explicit restate of inherited constraints in overriden methods could break polymorphism?
Mark Michaelis wrote in his book ( C# 4.0 Essentials ): class EntityBase where T: IComparable { public virtual void Method (T t) where T: IComparable { //... } } class Entity: EntityBase where T: IComparable { public override void Method (T t) // Error: Constraints may not be // repeated on overriding members where T:...
His example is confusing in part because of the (incorrect, IMO) re-use of T for a generic method within a generic type. The two T are not the same! So; let's work with a non-generic type: class EntityBase { public virtual void Method (T t) where T: IComparable { //... } } class Entity: EntityBase { public override vo...
C# Generics: Explicit restate of inherited constraints in overriden methods could break polymorphism? Mark Michaelis wrote in his book ( C# 4.0 Essentials ): class EntityBase where T: IComparable { public virtual void Method (T t) where T: IComparable { //... } } class Entity: EntityBase where T: IComparable { public ...
TITLE: C# Generics: Explicit restate of inherited constraints in overriden methods could break polymorphism? QUESTION: Mark Michaelis wrote in his book ( C# 4.0 Essentials ): class EntityBase where T: IComparable { public virtual void Method (T t) where T: IComparable { //... } } class Entity: EntityBase where T: ICo...
[ "c#", "generics" ]
1
2
1,551
2
0
2011-06-05T12:11:56.840000
2011-06-05T12:23:15.257000
6,242,831
6,242,913
how to capture variables into the window.location.search when submitting a form?
Ok, so I have a form, and here's what I want to do with it: Upon submitting, (provided submission is successful): Capture the value of a specific input field 'x' in the form into a variable 'xval' Append the value of the variable 'xval' to the url And navigate to a specific page... See, I have a few pages which are con...
I'd say: stick to the accepted way of defining form fields in a GET string (?this=that&foo=bar ). This would be a way to load your page with new parameters: var locationstr = location.href.split('?')[0], //URL without params try = document.getElementById('try_inputfield').value, email = document.getElementById('email_i...
how to capture variables into the window.location.search when submitting a form? Ok, so I have a form, and here's what I want to do with it: Upon submitting, (provided submission is successful): Capture the value of a specific input field 'x' in the form into a variable 'xval' Append the value of the variable 'xval' to...
TITLE: how to capture variables into the window.location.search when submitting a form? QUESTION: Ok, so I have a form, and here's what I want to do with it: Upon submitting, (provided submission is successful): Capture the value of a specific input field 'x' in the form into a variable 'xval' Append the value of the ...
[ "javascript", "html", "forms", "variables" ]
0
1
1,566
2
0
2011-06-05T12:13:42.323000
2011-06-05T12:31:28.713000
6,242,849
6,242,862
anyway to delete only part of array?
char myWord[20]; I want to delete last 10 chars of this array, I mean freeing the memory thats being used by last 10 chars. Is there anyway to do this? Heres an example function for substring where it might be useful. str& substring(uint Start, uint Count){ for(uint x=0; x
No, not really. You can really only do it if you obtained a pointer to memory from malloc, and then used realloc to change the size, but I'm quite sure that it's not even guaranteed that it will free the unused bytes.
anyway to delete only part of array? char myWord[20]; I want to delete last 10 chars of this array, I mean freeing the memory thats being used by last 10 chars. Is there anyway to do this? Heres an example function for substring where it might be useful. str& substring(uint Start, uint Count){ for(uint x=0; x
TITLE: anyway to delete only part of array? QUESTION: char myWord[20]; I want to delete last 10 chars of this array, I mean freeing the memory thats being used by last 10 chars. Is there anyway to do this? Heres an example function for substring where it might be useful. str& substring(uint Start, uint Count){ for(uin...
[ "c++", "arrays" ]
1
3
1,451
2
0
2011-06-05T12:18:34.827000
2011-06-05T12:20:25.900000
6,242,856
6,245,460
How does one create a UIActionSheet with a label and a value pair in the button titles
How does one create a UIActionSheet or inherit from it to show label-value pairs in the button titles, as can be seen in the iOs' phone book->detail view for a contact->send text message. For example such a UIActionSheet might look like this: mobile 1(23)555321 iPhone 1(23)555123 home 1(23)555456 cancel Each button ...
The best way for your needs will be to implement the whole thing by yourself. It's not supposed to be that complicated. This if you really want it like UIAlertSheet show up from wherever (bottom, top, center). Take into consideration, that on iPad it will look different. You can use UIAlertView, which is much more simp...
How does one create a UIActionSheet with a label and a value pair in the button titles How does one create a UIActionSheet or inherit from it to show label-value pairs in the button titles, as can be seen in the iOs' phone book->detail view for a contact->send text message. For example such a UIActionSheet might look l...
TITLE: How does one create a UIActionSheet with a label and a value pair in the button titles QUESTION: How does one create a UIActionSheet or inherit from it to show label-value pairs in the button titles, as can be seen in the iOs' phone book->detail view for a contact->send text message. For example such a UIAction...
[ "iphone", "objective-c", "ios", "customization", "uiactionsheet" ]
2
2
808
2
0
2011-06-05T12:19:19.123000
2011-06-05T19:53:56.267000
6,242,857
6,243,071
GWT setCapture works in Firefox too, how?
I have a draggable element in my page. When user starts dragging and then releases mouse button outside of Firefox I need to receive mouseup so that I can stop dragging. IE has setCapture for this but FF doesn't have. GWT has it too which works in FF too. How does it works in FF? How can I do that in my JS code for FF?...
Well the answer is to add mousemove and mouseup event listener to document. Thanks @Jeremy!
GWT setCapture works in Firefox too, how? I have a draggable element in my page. When user starts dragging and then releases mouse button outside of Firefox I need to receive mouseup so that I can stop dragging. IE has setCapture for this but FF doesn't have. GWT has it too which works in FF too. How does it works in F...
TITLE: GWT setCapture works in Firefox too, how? QUESTION: I have a draggable element in my page. When user starts dragging and then releases mouse button outside of Firefox I need to receive mouseup so that I can stop dragging. IE has setCapture for this but FF doesn't have. GWT has it too which works in FF too. How ...
[ "javascript", "firefox", "gwt" ]
0
3
411
1
0
2011-06-05T12:19:19.860000
2011-06-05T13:05:44.553000
6,242,861
6,242,909
Error with executing query in visual studio
I created databese like server exploler / data connection / add connection. Microsoft SQL Server Compact 3.5 (.NET Framework) use Create and create my own MyDatabes.sdf file. Now in server exploler right click on my databese --- and click on new query. Try run this: Create table [student] ( [student_id] Bigint NOT NULL...
varchar(n) is indeed not supported on CE; only unicode nvarchar(n), nchar(n) and ntext. Change to nvarchar(10), nvarchar(5) and nchar(1), etc. Also; start with the simplest operation (table etc) that works - and keep expanding it until it breaks, then you'll know which bits fail.
Error with executing query in visual studio I created databese like server exploler / data connection / add connection. Microsoft SQL Server Compact 3.5 (.NET Framework) use Create and create my own MyDatabes.sdf file. Now in server exploler right click on my databese --- and click on new query. Try run this: Create ta...
TITLE: Error with executing query in visual studio QUESTION: I created databese like server exploler / data connection / add connection. Microsoft SQL Server Compact 3.5 (.NET Framework) use Create and create my own MyDatabes.sdf file. Now in server exploler right click on my databese --- and click on new query. Try r...
[ "c#", ".net", "sql-server-ce" ]
3
7
3,131
1
0
2011-06-05T12:20:15.130000
2011-06-05T12:30:46.207000
6,242,872
6,242,905
Where is the recommended way to put member variables when designing classes in python?
I am trying to get familiar with classes in python. In C++ the structure of a class seems straightforward to me, regarding the member variables. You just declare them at the beginning of the class scope or at the end (as public or private, as desired) and work with them as you need. How is this handled in python? Right...
All of these approaches work, so it's a matter of your own code standards and documentation. Personally, I regard it as good practice to initialise the "public" member attributes in the __init__ function. That makes it obvious what they are, and this should be emphasised by documenting them in the class docstring. You ...
Where is the recommended way to put member variables when designing classes in python? I am trying to get familiar with classes in python. In C++ the structure of a class seems straightforward to me, regarding the member variables. You just declare them at the beginning of the class scope or at the end (as public or pr...
TITLE: Where is the recommended way to put member variables when designing classes in python? QUESTION: I am trying to get familiar with classes in python. In C++ the structure of a class seems straightforward to me, regarding the member variables. You just declare them at the beginning of the class scope or at the en...
[ "python", "class", "member-variables" ]
0
4
298
3
0
2011-06-05T12:21:52.413000
2011-06-05T12:29:41.920000
6,242,873
6,246,069
compiling an open-source iphone app
I want to compile an open source iPhone app( https://github.com/newsyc/newsyc/ ) but since I don't have a Mac, I can't do it using Xcode. Is there any other way to do this? Is there anything on the Cydia appstore that might help?(I already have jailbroken my iPod)
sorry but the only way to compile iOs-apps is XCode. the gcc compiler does support objective-c, but the framwork-technique is only supported by apple's compiler and the newest apple compiler only runs on intel-based Macs. There are ways to make apps with Windows-SDKs which give you limited, but sometimes satisfying, fu...
compiling an open-source iphone app I want to compile an open source iPhone app( https://github.com/newsyc/newsyc/ ) but since I don't have a Mac, I can't do it using Xcode. Is there any other way to do this? Is there anything on the Cydia appstore that might help?(I already have jailbroken my iPod)
TITLE: compiling an open-source iphone app QUESTION: I want to compile an open source iPhone app( https://github.com/newsyc/newsyc/ ) but since I don't have a Mac, I can't do it using Xcode. Is there any other way to do this? Is there anything on the Cydia appstore that might help?(I already have jailbroken my iPod) ...
[ "xcode", "ios", "compilation" ]
2
3
618
1
0
2011-06-05T12:21:52.673000
2011-06-05T21:46:21.847000
6,242,882
6,243,048
Replace using gsub
I'm having some problem replacing a partial of a string with another string. I want this string "this-is-a-string.jpg" to be replaced with "this-is-a-hash.jpg". The string value can be any value. This is what I've so far. str = "this-is-a-string.jpg" str.gsub(/([a-z]+)[^\.]+?$/i, "hash") # => "this-is-a-string.hash"
I played around with rubular and I came up with a regexp which works if you don't mind adding a dot manually to the replacement. Here is what I came up with "this-is-a-string.jpg".gsub(/\w+\./, 'hash.') So I guess you could make a simple function which replaces it like def replace_string(string_to_replace, replacement)...
Replace using gsub I'm having some problem replacing a partial of a string with another string. I want this string "this-is-a-string.jpg" to be replaced with "this-is-a-hash.jpg". The string value can be any value. This is what I've so far. str = "this-is-a-string.jpg" str.gsub(/([a-z]+)[^\.]+?$/i, "hash") # => "this-i...
TITLE: Replace using gsub QUESTION: I'm having some problem replacing a partial of a string with another string. I want this string "this-is-a-string.jpg" to be replaced with "this-is-a-hash.jpg". The string value can be any value. This is what I've so far. str = "this-is-a-string.jpg" str.gsub(/([a-z]+)[^\.]+?$/i, "h...
[ "ruby", "regex" ]
1
2
889
1
0
2011-06-05T12:23:58.147000
2011-06-05T13:02:45.087000
6,242,887
6,249,576
Alter system brightness within a service
Although I am able to set the system brightness within an Activity successfully, it would seem that services don't fair too well. The brightness setting IS being set (I read it back and printed it to Logcat), but the brightness itself is not changing. My issue is very similar to this one: Control screen brightness in a...
Got a solution! GeekYouUp's method here works: Update Display Brightness on Android after changing it programmatically You need to make sure you finish() the activity with a small delay, that was my main issue. Sure it's not 'clean' to have a transparent activity pop up, but what can you do? I'm quite sure that there's...
Alter system brightness within a service Although I am able to set the system brightness within an Activity successfully, it would seem that services don't fair too well. The brightness setting IS being set (I read it back and printed it to Logcat), but the brightness itself is not changing. My issue is very similar to...
TITLE: Alter system brightness within a service QUESTION: Although I am able to set the system brightness within an Activity successfully, it would seem that services don't fair too well. The brightness setting IS being set (I read it back and printed it to Logcat), but the brightness itself is not changing. My issue ...
[ "android", "service", "brightness" ]
1
1
1,597
1
0
2011-06-05T12:25:29.677000
2011-06-06T08:47:26.307000
6,242,893
6,242,912
MySQL Add dots (..) when shorted string
In an MySQL query I have this line in the SELECT statement: IF(LENGTH(adr.klantnaam) > 20, LEFT(CONCAT(adr.klantnaam,'..'),20), adr.klantnaam) AS klantnaam, It shortens the text in the field bit it won't add the dots (..) at the end when the string is shortend. How to change my code?
You need to do CONCAT(LEFT(adr.klantnaam,20),'..') Otherwise you're adding the dots to the name (which you know is over 20 characters) before trimming, so it will always trim the dots off as well. (If you want to end up with 20 characters, you could trim klantnaam to 18 chars, and then add the dots)
MySQL Add dots (..) when shorted string In an MySQL query I have this line in the SELECT statement: IF(LENGTH(adr.klantnaam) > 20, LEFT(CONCAT(adr.klantnaam,'..'),20), adr.klantnaam) AS klantnaam, It shortens the text in the field bit it won't add the dots (..) at the end when the string is shortend. How to change my c...
TITLE: MySQL Add dots (..) when shorted string QUESTION: In an MySQL query I have this line in the SELECT statement: IF(LENGTH(adr.klantnaam) > 20, LEFT(CONCAT(adr.klantnaam,'..'),20), adr.klantnaam) AS klantnaam, It shortens the text in the field bit it won't add the dots (..) at the end when the string is shortend. ...
[ "mysql", "string", "select" ]
1
2
2,537
1
0
2011-06-05T12:26:41.237000
2011-06-05T12:31:14.187000
6,242,894
6,242,997
mysql_connect using proxy
Hii, Is it possible to use mysql_connect() behind a proxy server. I am trying to connect to an external db, which basically is on my hosting servers. I am behind my university proxy.
FWIK and according to the answer in mysql proxy socks, mysql does not offer support to connect via proxies. See the linked answer how you can go around this.
mysql_connect using proxy Hii, Is it possible to use mysql_connect() behind a proxy server. I am trying to connect to an external db, which basically is on my hosting servers. I am behind my university proxy.
TITLE: mysql_connect using proxy QUESTION: Hii, Is it possible to use mysql_connect() behind a proxy server. I am trying to connect to an external db, which basically is on my hosting servers. I am behind my university proxy. ANSWER: FWIK and according to the answer in mysql proxy socks, mysql does not offer support ...
[ "php", "mysql", "proxy" ]
1
1
2,865
1
0
2011-06-05T12:26:47.270000
2011-06-05T12:50:30.043000
6,242,896
6,242,906
C read from Console limit char input.How to do it?
I am trying to build my first Windows TUI Console app and i am facing some problems... Scanf nor fgets prevents user from entering unlimted characters unless hits enter etc.. In a TUI interface thats a problem.. because it can get overwrite the line below... Is there any solution for this apart from getch
No, there isn't, at least not portably. C input is stream based, and doesn't have a concept of a keyboard. If you really want to write a text user interface, use ncurses or pdcurses.
C read from Console limit char input.How to do it? I am trying to build my first Windows TUI Console app and i am facing some problems... Scanf nor fgets prevents user from entering unlimted characters unless hits enter etc.. In a TUI interface thats a problem.. because it can get overwrite the line below... Is there a...
TITLE: C read from Console limit char input.How to do it? QUESTION: I am trying to build my first Windows TUI Console app and i am facing some problems... Scanf nor fgets prevents user from entering unlimted characters unless hits enter etc.. In a TUI interface thats a problem.. because it can get overwrite the line b...
[ "c", "console" ]
0
3
277
1
0
2011-06-05T12:26:56.217000
2011-06-05T12:29:49.240000
6,242,900
6,243,007
Android movement sensor help
I got this code from the site http://www.clingmarks.com/?p=25, and i would like some help with it! This code registers shaking of the phone. It only allows updates every 100 millisecs and the value of the shaking has to be over 800, SHAKE_THRESHOLD. What I have problem with is that if the phone detects a shake, (then v...
The behavior you want is known as a "holdoff". You want to set a certain variable on your Activity object: private long last_shake_time = 0; and then check and update that in the code that registers a shake: if (speed > SHAKE_THRESHOLD) { // yes, this is a shake action! long shake_time = System.currentTimeMillis(); if ...
Android movement sensor help I got this code from the site http://www.clingmarks.com/?p=25, and i would like some help with it! This code registers shaking of the phone. It only allows updates every 100 millisecs and the value of the shaking has to be over 800, SHAKE_THRESHOLD. What I have problem with is that if the p...
TITLE: Android movement sensor help QUESTION: I got this code from the site http://www.clingmarks.com/?p=25, and i would like some help with it! This code registers shaking of the phone. It only allows updates every 100 millisecs and the value of the shaking has to be over 800, SHAKE_THRESHOLD. What I have problem wit...
[ "android", "sensors" ]
0
1
1,288
2
0
2011-06-05T12:27:44.090000
2011-06-05T12:53:22.220000
6,242,902
6,243,121
How to remove a node from a linked list?
Here's my code so far: struct stockRecord { int code; char name[MAXNAMELEN]; struct stockRecord* next; }; struct stockRecord* temp = NULL; struct stockRecord* head = NULL; struct stockRecord* prevptr = NULL; struct stockRecord* resfun(struct stockRecord* list) { temp = list; if (head == NULL) head = list; if (temp ==...
Vega, To remove the first element from a single-linked-list, all you really need to do is "forget" the first element (the head). The general procedure for removing the first node is: if nodes are dynamically allocated (which they almost allways are in a linked-list) then free the memory allocated to this node. "forget"...
How to remove a node from a linked list? Here's my code so far: struct stockRecord { int code; char name[MAXNAMELEN]; struct stockRecord* next; }; struct stockRecord* temp = NULL; struct stockRecord* head = NULL; struct stockRecord* prevptr = NULL; struct stockRecord* resfun(struct stockRecord* list) { temp = list; i...
TITLE: How to remove a node from a linked list? QUESTION: Here's my code so far: struct stockRecord { int code; char name[MAXNAMELEN]; struct stockRecord* next; }; struct stockRecord* temp = NULL; struct stockRecord* head = NULL; struct stockRecord* prevptr = NULL; struct stockRecord* resfun(struct stockRecord* list...
[ "c", "recursion", "linked-list" ]
2
3
1,356
2
0
2011-06-05T12:28:28.803000
2011-06-05T13:14:50.667000
6,242,914
6,242,975
Is it possible to simulate files and directories in a filesystem?
I would like to be able to give the impression of the presence of files and directories (e.g. the ls command should list them, or the cd command should make directory navigation possible), but redirect read, write, delete,... commands to a program which handles them (and for example stores, returns, deletes data of a d...
It's possible if you write your own filesystem driver. The easiest approach would be to use FUSE which allows you to write drivers in userspace (much, much safer and easier than writing a kernel driver). There's a hello world driver example to get you started. There's also a page on their Wiki about Database filesystem...
Is it possible to simulate files and directories in a filesystem? I would like to be able to give the impression of the presence of files and directories (e.g. the ls command should list them, or the cd command should make directory navigation possible), but redirect read, write, delete,... commands to a program which ...
TITLE: Is it possible to simulate files and directories in a filesystem? QUESTION: I would like to be able to give the impression of the presence of files and directories (e.g. the ls command should list them, or the cd command should make directory navigation possible), but redirect read, write, delete,... commands t...
[ "linux", "file", "file-io", "filesystems" ]
6
9
1,555
1
0
2011-06-05T12:31:47.633000
2011-06-05T12:45:22.550000
6,242,915
6,243,283
Windows isn't generating Python Compiled Files
I'm currently on a Windows 7 environment developing a Pyramid web application. I had been developing this app on my Mac, but that's recently died, so I've had to move to my Windows machine. I've set up everything I need; Python 2.7, Pyramid, pyramid_beaker, MongoDB, mongoengine, etc. It seemed to be working while I was...
Sorry, your question is not clear enough. It seems you have some kind of read/write permission problems, and generating *.pyc has nothing to do with it. *.pyc contains Python bytecode, in fact it is there just to load the original *.py files faster. Every time Python successfully reads a *.py file and is able to write(...
Windows isn't generating Python Compiled Files I'm currently on a Windows 7 environment developing a Pyramid web application. I had been developing this app on my Mac, but that's recently died, so I've had to move to my Windows machine. I've set up everything I need; Python 2.7, Pyramid, pyramid_beaker, MongoDB, mongoe...
TITLE: Windows isn't generating Python Compiled Files QUESTION: I'm currently on a Windows 7 environment developing a Pyramid web application. I had been developing this app on my Mac, but that's recently died, so I've had to move to my Windows machine. I've set up everything I need; Python 2.7, Pyramid, pyramid_beake...
[ "python", "windows", "pyramid" ]
1
3
289
1
0
2011-06-05T12:31:50.153000
2011-06-05T13:40:10.290000
6,242,922
6,242,961
complex SQL query, many to many
Complex for me as I am newbie in SQL. I have three tables - Peoples, Interests and Peoples_Interests (many-to-many) - that are connected in the following way: People has many Interests through Peoples_Interests Interest has many Peoples through Peoples_Interests I need to propose suggestions to Peoples with most simila...
Something like this. Select people.id, people.name, count(interest.id) from people left join people_interests on people.id = people_interests.peopleid left join interests on people_interests.interestid = interests.interest.id where interests.id in (select id from interests where interests.peopleid = @inputuserid) group...
complex SQL query, many to many Complex for me as I am newbie in SQL. I have three tables - Peoples, Interests and Peoples_Interests (many-to-many) - that are connected in the following way: People has many Interests through Peoples_Interests Interest has many Peoples through Peoples_Interests I need to propose suggest...
TITLE: complex SQL query, many to many QUESTION: Complex for me as I am newbie in SQL. I have three tables - Peoples, Interests and Peoples_Interests (many-to-many) - that are connected in the following way: People has many Interests through Peoples_Interests Interest has many Peoples through Peoples_Interests I need ...
[ "mysql", "sql" ]
6
3
324
1
0
2011-06-05T12:33:44.280000
2011-06-05T12:42:46.007000
6,242,926
6,245,228
Rails Devise add role based on signup path
I'm building a Rails 3 app, where I need to give users specific roles based on the path they take to sign up on the site. I am using Devise and Cancan. So for instance, the path new-fundraiser (or /users/new/fundraiser ) Needs to set user.fundraiser = true on user creation, and new-charity-user (or /users/new/charity )...
I would set up a route like: match "/users/new/:role",:to => 'users#new' In your user model I'd add an accessor: class User < ActiveRecord::Base def role=(role_name) @role = role_name case role_name when 'charity' self.charity_owner = true when 'fundraiser' self.fundraiser = true else # raise some exception end end de...
Rails Devise add role based on signup path I'm building a Rails 3 app, where I need to give users specific roles based on the path they take to sign up on the site. I am using Devise and Cancan. So for instance, the path new-fundraiser (or /users/new/fundraiser ) Needs to set user.fundraiser = true on user creation, an...
TITLE: Rails Devise add role based on signup path QUESTION: I'm building a Rails 3 app, where I need to give users specific roles based on the path they take to sign up on the site. I am using Devise and Cancan. So for instance, the path new-fundraiser (or /users/new/fundraiser ) Needs to set user.fundraiser = true on...
[ "ruby-on-rails", "ruby-on-rails-3", "devise" ]
7
5
3,880
3
0
2011-06-05T12:34:18.590000
2011-06-05T19:14:56.787000
6,242,927
6,244,943
Transparent Text on Bitmap
I am using the following code to draw a text from the textinput on a Bitmap. It works fine except the problem that instead of drawing just the text, it draws the text inside a box with white background. How can I draw just the text without the box? I guessed its related to transparency so I set the Bitmapdata to be tra...
You're drawing your entire TextInput component with the default TextInputSkin. Since this skin has a border and a white background, they will also be drawn. I see 2 possible solutions: either create a plain ActionScript TextField, copy the text from the TextInput to the TextField and draw that TextField. After drawing ...
Transparent Text on Bitmap I am using the following code to draw a text from the textinput on a Bitmap. It works fine except the problem that instead of drawing just the text, it draws the text inside a box with white background. How can I draw just the text without the box? I guessed its related to transparency so I s...
TITLE: Transparent Text on Bitmap QUESTION: I am using the following code to draw a text from the textinput on a Bitmap. It works fine except the problem that instead of drawing just the text, it draws the text inside a box with white background. How can I draw just the text without the box? I guessed its related to t...
[ "apache-flex", "actionscript-3", "bitmapdata" ]
0
2
510
1
0
2011-06-05T12:34:45.147000
2011-06-05T18:31:25.057000
6,242,932
6,247,829
How to find points in a CCRibbon or CCMotionStreak?
In my game, I need to check collision between an object and a line drawn using CCMotionStreak( or CCRibbon)... For that I need the points in the streak... But, I'm not able to get them... Can somebody please help to retrieve the current points being displayed in a CCMotionStreak or CCRibbon that's not faded yet? Any he...
i'm not sure if you can access it but there is an array available.. Since CCMotionStreak uses CCRibbon.. There is a mutablearray called segments_ It stores all the current visible ribbons.. Hope it helps..
How to find points in a CCRibbon or CCMotionStreak? In my game, I need to check collision between an object and a line drawn using CCMotionStreak( or CCRibbon)... For that I need the points in the streak... But, I'm not able to get them... Can somebody please help to retrieve the current points being displayed in a CCM...
TITLE: How to find points in a CCRibbon or CCMotionStreak? QUESTION: In my game, I need to check collision between an object and a line drawn using CCMotionStreak( or CCRibbon)... For that I need the points in the streak... But, I'm not able to get them... Can somebody please help to retrieve the current points being ...
[ "iphone", "cocos2d-iphone", "collision", "points" ]
0
1
541
1
0
2011-06-05T12:36:00.753000
2011-06-06T04:41:47.497000
6,242,933
6,242,970
MySQL Multiple queries into single one
I have a mysql table like with the following rows: id | event_type | occurance_date | ipaddress I want to get the days, unique visits and total visits / day. This is pretty easy to do with 2 queries but I want to make only one. So i thought To get the days i can SELECT DISTINCT(occurance_date) as day FROM statistics WH...
select count(*) as total_visits, count(distinct(s1.ipaddress)) as unique_visits FROM statistics s1 WHERE event_type = 'visit' GROUP BY occurrence ORDER BY unique_visits; Annotated version: First we do a SELECT count(all rows) select count(*) as total_visits, Plus a count of the distinct ipaddresses count(distinct(s1.ip...
MySQL Multiple queries into single one I have a mysql table like with the following rows: id | event_type | occurance_date | ipaddress I want to get the days, unique visits and total visits / day. This is pretty easy to do with 2 queries but I want to make only one. So i thought To get the days i can SELECT DISTINCT(oc...
TITLE: MySQL Multiple queries into single one QUESTION: I have a mysql table like with the following rows: id | event_type | occurance_date | ipaddress I want to get the days, unique visits and total visits / day. This is pretty easy to do with 2 queries but I want to make only one. So i thought To get the days i can ...
[ "mysql" ]
1
3
3,092
1
0
2011-06-05T12:36:25.137000
2011-06-05T12:44:37.193000
6,242,942
6,243,147
NSKeyedArchiver .plist appending problem
** I am getting data from a form into an array and trying to write that array into a.plist file using NSKeyedArchiver. Writing is successful,however it overwrites to the previous data whenever I run the script. How can I append the new data to.plist file instead of overwriting? ** @implementation Player - (id)init { s...
First of all, the last two methods don't seem to be relevant as you aren't encoding whichever object those methods belong to. Again, the NSCoding protocol includes encodeWithCoder: and initWithCoder: methods. There is no decodeWithCoder: method in the NSCoding protocol. Secondly, you are creating a new NSMutableArray o...
NSKeyedArchiver .plist appending problem ** I am getting data from a form into an array and trying to write that array into a.plist file using NSKeyedArchiver. Writing is successful,however it overwrites to the previous data whenever I run the script. How can I append the new data to.plist file instead of overwriting? ...
TITLE: NSKeyedArchiver .plist appending problem QUESTION: ** I am getting data from a form into an array and trying to write that array into a.plist file using NSKeyedArchiver. Writing is successful,however it overwrites to the previous data whenever I run the script. How can I append the new data to.plist file instea...
[ "objective-c", "cocoa", "nskeyedarchiver" ]
0
1
1,379
1
0
2011-06-05T12:38:19.500000
2011-06-05T13:18:36.210000
6,242,952
6,246,016
SIlverlight encode PCM for uploading
I've developed a recorder in Silverlight and I was able to upload wave/PCM. A recorded audio of 20 seconds is about 3 Mb which is a lot. Is there any library available to encode wave/PCM to minimize file size? I was looking for some library to encode into mp3 format, but those are not available for Silverlight applicat...
You've got two options: do encoding in managed code or use interop with native code (i.e. COM automation for SL4, P/Invoke for SL5). For managed solution you can write your own compression, ADPCM for exaple is very simple and will give 4:1 compression ratio. Check out these too: http://cspeex.codeplex.com/, http://www....
SIlverlight encode PCM for uploading I've developed a recorder in Silverlight and I was able to upload wave/PCM. A recorded audio of 20 seconds is about 3 Mb which is a lot. Is there any library available to encode wave/PCM to minimize file size? I was looking for some library to encode into mp3 format, but those are n...
TITLE: SIlverlight encode PCM for uploading QUESTION: I've developed a recorder in Silverlight and I was able to upload wave/PCM. A recorded audio of 20 seconds is about 3 Mb which is a lot. Is there any library available to encode wave/PCM to minimize file size? I was looking for some library to encode into mp3 forma...
[ "silverlight", "audio", "encoding" ]
0
1
267
1
0
2011-06-05T12:41:24.647000
2011-06-05T21:34:30.413000
6,242,953
6,243,107
How merge two queries from unrelated models
I have two unbound models: class News(models.Model): name = models.CharField(max_length=255, blank=True, null=True) text = models.TextField(blank=True, null=True) country = models.IntegerField(max_length=255, blank=True, null=True) # 1, 2, 3, etc. class Countries(models.Model): name = models.CharField(max_length=255, ...
I understand that News.country refers to Country.id. So you could do something like that: def show_news(request): news_list = News.objects.all() countries_list = Countries.objects.all() countries = dict([(c.id, c.name) for c in countries_list]) for n in news_list: n.country_name = countries.get(n.country, '(no country)...
How merge two queries from unrelated models I have two unbound models: class News(models.Model): name = models.CharField(max_length=255, blank=True, null=True) text = models.TextField(blank=True, null=True) country = models.IntegerField(max_length=255, blank=True, null=True) # 1, 2, 3, etc. class Countries(models.Mode...
TITLE: How merge two queries from unrelated models QUESTION: I have two unbound models: class News(models.Model): name = models.CharField(max_length=255, blank=True, null=True) text = models.TextField(blank=True, null=True) country = models.IntegerField(max_length=255, blank=True, null=True) # 1, 2, 3, etc. class Cou...
[ "django", "django-views" ]
1
2
906
1
0
2011-06-05T12:41:32.873000
2011-06-05T13:13:08.690000
6,242,955
6,243,025
Converting year and month ("yyyy-mm" format) to a date?
I have a dataset that looks like this: Month count 2009-01 12 2009-02 310 2009-03 2379 2009-04 234 2009-05 14 2009-08 1 2009-09 34 2009-10 2386 I want to plot the data (months as x values and counts as y values). Since there are gaps in the data, I want to convert the Information for the Month into a date. I tried: as....
Try this. (Here we use text=Lines to keep the example self contained but in reality we would replace it with the file name.) Lines <- "2009-01 12 2009-02 310 2009-03 2379 2009-04 234 2009-05 14 2009-08 1 2009-09 34 2009-10 2386" library(zoo) z <- read.zoo(text = Lines, FUN = as.yearmon) plot(z) The X axis is not so pr...
Converting year and month ("yyyy-mm" format) to a date? I have a dataset that looks like this: Month count 2009-01 12 2009-02 310 2009-03 2379 2009-04 234 2009-05 14 2009-08 1 2009-09 34 2009-10 2386 I want to plot the data (months as x values and counts as y values). Since there are gaps in the data, I want to convert...
TITLE: Converting year and month ("yyyy-mm" format) to a date? QUESTION: I have a dataset that looks like this: Month count 2009-01 12 2009-02 310 2009-03 2379 2009-04 234 2009-05 14 2009-08 1 2009-09 34 2009-10 2386 I want to plot the data (months as x values and counts as y values). Since there are gaps in the data,...
[ "r", "date", "posix", "zoo", "r-faq" ]
116
67
223,990
9
0
2011-06-05T12:41:40.017000
2011-06-05T12:58:02.803000
6,242,957
6,243,116
CakePHP validation error doesn't show up on file upload field
I have a file upload field in CakePHP which allows images to be uploaded. All is fine. All I need to do is validate the field. I am using the solution from CakePHP – Uploaded File Validation in Models: The function is working and returning the appropriate error. I am using the following code to generate the file upload...
If you're not using FormHelper::input, which outputs the field, label and error, you need to manually output the error as well using $form->error('Game.game_thumbnail_url').
CakePHP validation error doesn't show up on file upload field I have a file upload field in CakePHP which allows images to be uploaded. All is fine. All I need to do is validate the field. I am using the solution from CakePHP – Uploaded File Validation in Models: The function is working and returning the appropriate er...
TITLE: CakePHP validation error doesn't show up on file upload field QUESTION: I have a file upload field in CakePHP which allows images to be uploaded. All is fine. All I need to do is validate the field. I am using the solution from CakePHP – Uploaded File Validation in Models: The function is working and returning ...
[ "php", "cakephp-1.3" ]
0
6
924
1
0
2011-06-05T12:41:59.817000
2011-06-05T13:14:01.827000
6,242,976
6,243,000
JavaScript hide/show element
How could I hide the 'Edit'-link after I press it? and also can I hide the "lorem ipsum" text when I press edit? Edit Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
function showStuff(id, text, btn) { document.getElementById(id).style.display = 'block'; // hide the lorem ipsum text document.getElementById(text).style.display = 'none'; // hide the link btn.style.display = 'none'; } Edit Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
JavaScript hide/show element How could I hide the 'Edit'-link after I press it? and also can I hide the "lorem ipsum" text when I press edit? Edit Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
TITLE: JavaScript hide/show element QUESTION: How could I hide the 'Edit'-link after I press it? and also can I hide the "lorem ipsum" text when I press edit? Edit Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum ANSWER: function showStuff(id, text, btn) { document.getElementById(id).style.display = 'block'; // hide...
[ "javascript" ]
415
597
1,387,544
15
0
2011-06-05T12:45:29.460000
2011-06-05T12:51:41.543000
6,242,977
6,243,297
Basic MaxScript GUI operations: how do I get the Enter key? How do I grey out controls?
Apologies for the kind-of unrelated questions in one, but I would like to make my MaxScript rollout/tool more intuitive by making it behave like any other GUI would be expected to. Could anyone familiar with MaxScript tell me: How do I 'disable' (grey out) a button? How do I get the Enter key pressed event? (I.e. I hav...
the first one would be setting its.enabled property to false. The second one depends on the type of control you are using, if it's the usual rollout control, just use on editTextName entered do... event handler. For a dotnet one you'd have to use on editTextName KeyUp evnt do if evnt.KeyCode == (dotNetClass "System.Win...
Basic MaxScript GUI operations: how do I get the Enter key? How do I grey out controls? Apologies for the kind-of unrelated questions in one, but I would like to make my MaxScript rollout/tool more intuitive by making it behave like any other GUI would be expected to. Could anyone familiar with MaxScript tell me: How d...
TITLE: Basic MaxScript GUI operations: how do I get the Enter key? How do I grey out controls? QUESTION: Apologies for the kind-of unrelated questions in one, but I would like to make my MaxScript rollout/tool more intuitive by making it behave like any other GUI would be expected to. Could anyone familiar with MaxScr...
[ "user-interface", "scripting", "3dsmax", "maxscript" ]
1
2
3,994
3
0
2011-06-05T12:45:33.070000
2011-06-05T13:43:29.993000
6,242,978
6,243,010
mutual distance between each 2 points in 3D
rv=[rx ry rz]; %# [N-by-3] rx, ry, rz are [N-by-1] for i=1:N for j=1:N dx(i,j)=rv(i,1)-rv(j,1); %# dx is x component of distance between each 2 points [N-by-N] dy(i,j)=rv(i,2)-rv(j,2); dz(i,j)=rv(i,3)-rv(j,3); end end d=cat(3,dx,dy,dz); Is there a faster method to construct d? Thanks a lot for any guide. Edit: N= 997 ...
Here's a method that avoids the explicit loops: dx = repmat(rx, 1, N) - repmat(rx.', N, 1); I don't know whether that would work faster; you'd have to try it!
mutual distance between each 2 points in 3D rv=[rx ry rz]; %# [N-by-3] rx, ry, rz are [N-by-1] for i=1:N for j=1:N dx(i,j)=rv(i,1)-rv(j,1); %# dx is x component of distance between each 2 points [N-by-N] dy(i,j)=rv(i,2)-rv(j,2); dz(i,j)=rv(i,3)-rv(j,3); end end d=cat(3,dx,dy,dz); Is there a faster method to construct ...
TITLE: mutual distance between each 2 points in 3D QUESTION: rv=[rx ry rz]; %# [N-by-3] rx, ry, rz are [N-by-1] for i=1:N for j=1:N dx(i,j)=rv(i,1)-rv(j,1); %# dx is x component of distance between each 2 points [N-by-N] dy(i,j)=rv(i,2)-rv(j,2); dz(i,j)=rv(i,3)-rv(j,3); end end d=cat(3,dx,dy,dz); Is there a faster me...
[ "matlab" ]
1
2
1,704
2
0
2011-06-05T12:45:56.947000
2011-06-05T12:53:56.570000
6,242,990
6,243,002
how can i create a programmatically sort order in C# on a grouped collection
i have this code that take a collection and groups by a string field: var groupByIssueType = issues.GroupBy(r => r.IssueType); i now want to loop through each group but i want to do that in a specify order. something like.. foreach (var issueType in groupByIssueType) { } The problem is that the order is not alphabetic ...
You need to write an IComparer that uses your custom sort order. For example: static string[] order = {... }; public int Compare(string x, string y) { return Array.IndexOf(order, x).CompareTo(Array.IndexOf(order, y)); }
how can i create a programmatically sort order in C# on a grouped collection i have this code that take a collection and groups by a string field: var groupByIssueType = issues.GroupBy(r => r.IssueType); i now want to loop through each group but i want to do that in a specify order. something like.. foreach (var issueT...
TITLE: how can i create a programmatically sort order in C# on a grouped collection QUESTION: i have this code that take a collection and groups by a string field: var groupByIssueType = issues.GroupBy(r => r.IssueType); i now want to loop through each group but i want to do that in a specify order. something like.. f...
[ "c#", "linq", "sorting", "collections" ]
0
3
535
2
0
2011-06-05T12:48:08.050000
2011-06-05T12:52:42.330000
6,243,006
6,243,066
The advantage / disadvantage of private variables?
I'm used to make pretty much all of my class variables private and create "wrapper" functions that get / set them: class Something{ private $var; function getVar(){ $return $this->var; } } $smth = new Something(); echo $smth->getVar(); I see that a lot of people do this, so I ended up doing the same:) Is there any a...
It differs from case to case if you want to use private variables with public getters and setters or if you just want to declare a variable as public directly. The reason it might be good to use "getters" and "setters" is if you want to have control over when someone accessess the data. As an example, lets say you got ...
The advantage / disadvantage of private variables? I'm used to make pretty much all of my class variables private and create "wrapper" functions that get / set them: class Something{ private $var; function getVar(){ $return $this->var; } } $smth = new Something(); echo $smth->getVar(); I see that a lot of people do ...
TITLE: The advantage / disadvantage of private variables? QUESTION: I'm used to make pretty much all of my class variables private and create "wrapper" functions that get / set them: class Something{ private $var; function getVar(){ $return $this->var; } } $smth = new Something(); echo $smth->getVar(); I see that a...
[ "php", "class", "variables", "private", "public" ]
7
3
3,545
5
0
2011-06-05T12:53:17.150000
2011-06-05T13:05:13.260000
6,243,011
6,243,115
How can I retrieve SoapEnvelope information just from the URL of web services in C#?
Basically I am trying to make a generic client which will retrieve the Methods Names, Parameters that it takes and Parameter that it returns from the any kind of web service. I thought of parsing the WSDL xml for that, but in that the required information is scattered over different elements. then I saw the SOAP Envelo...
The only valid approach is through WSDL because it is the only real description of the service. Those "help pages" are just a feature of ASMX. WCF for example doesn't have this help page showing examples of SOAP messages. Also examples of SOAP messages don't really cover the whole content of the message - it doesn't co...
How can I retrieve SoapEnvelope information just from the URL of web services in C#? Basically I am trying to make a generic client which will retrieve the Methods Names, Parameters that it takes and Parameter that it returns from the any kind of web service. I thought of parsing the WSDL xml for that, but in that the ...
TITLE: How can I retrieve SoapEnvelope information just from the URL of web services in C#? QUESTION: Basically I am trying to make a generic client which will retrieve the Methods Names, Parameters that it takes and Parameter that it returns from the any kind of web service. I thought of parsing the WSDL xml for that...
[ "c#", "wcf", "web-services", "soap" ]
0
1
325
1
0
2011-06-05T12:53:59.263000
2011-06-05T13:13:52.560000
6,243,014
6,243,029
Quicker way of typing out if statements?
Say i have... if (value1 == 1 || value1 == 3 || value1 == 6) { //Things happen } Since it's referencing value1 each time, is there a quicker way of doing this?
Not really. An alternative is: switch (value1) { case 1: case 3: case 6: // Things happen } But it's not "quicker"!
Quicker way of typing out if statements? Say i have... if (value1 == 1 || value1 == 3 || value1 == 6) { //Things happen } Since it's referencing value1 each time, is there a quicker way of doing this?
TITLE: Quicker way of typing out if statements? QUESTION: Say i have... if (value1 == 1 || value1 == 3 || value1 == 6) { //Things happen } Since it's referencing value1 each time, is there a quicker way of doing this? ANSWER: Not really. An alternative is: switch (value1) { case 1: case 3: case 6: // Things happen } ...
[ "iphone", "objective-c" ]
0
3
89
3
0
2011-06-05T12:55:10.823000
2011-06-05T12:59:12.730000
6,243,015
6,243,058
Working with django and mod_wsgi in Windows
I finished installing django on my Windows machine using Apache 2.2/Python 2.6/Django 1.3/mod_wsgi. It seems like everytime I change my Python code (such as settings.py), I need to restart Apache in order for changes to take effect. I understood that using WSGIRestrictEmbedded should solve this issue but the docs for w...
The answer is: don't use Apache in development. Use the built-in development server, or perhaps gunicorn.
Working with django and mod_wsgi in Windows I finished installing django on my Windows machine using Apache 2.2/Python 2.6/Django 1.3/mod_wsgi. It seems like everytime I change my Python code (such as settings.py), I need to restart Apache in order for changes to take effect. I understood that using WSGIRestrictEmbedde...
TITLE: Working with django and mod_wsgi in Windows QUESTION: I finished installing django on my Windows machine using Apache 2.2/Python 2.6/Django 1.3/mod_wsgi. It seems like everytime I change my Python code (such as settings.py), I need to restart Apache in order for changes to take effect. I understood that using W...
[ "python", "windows", "django", "apache", "mod-wsgi" ]
0
1
582
2
0
2011-06-05T12:55:16.267000
2011-06-05T13:04:26.883000