PostId
int64 13
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 3
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -33
210k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
5.77k
| Title
stringlengths 10
250
| BodyMarkdown
stringlengths 12
30k
| Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 47
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,758,838 | 10/13/2011 18:37:56 | 887,241 | 08/10/2011 05:41:27 | 1 | 0 | How to get every first/second/third/fourth/last week of wednesday of current month | Please help me, I want to compare few events that fall with in first week of tuesday/wednesday in current month.
Please provide stuff for below one,
1. First week of monday in current month
2. Second week of any day in current month
3. third week of any day in current month
4. fourth of any day in current month
5. last week of any day in current month
It can be php or mysql. Please help me waiting for your support. | php | mysql | null | null | null | 10/13/2011 20:24:55 | not a real question | How to get every first/second/third/fourth/last week of wednesday of current month
===
Please help me, I want to compare few events that fall with in first week of tuesday/wednesday in current month.
Please provide stuff for below one,
1. First week of monday in current month
2. Second week of any day in current month
3. third week of any day in current month
4. fourth of any day in current month
5. last week of any day in current month
It can be php or mysql. Please help me waiting for your support. | 1 |
11,013,537 | 06/13/2012 11:04:50 | 1,043,231 | 11/12/2011 14:58:42 | 53 | 2 | UTF8 workflow PHP, MySQL summarized | I am working for international clients who have all very different alphabets and so I am trying to finally get an overview of a complete workflow between PHP and MySQL that would ensure all character encodings to be inserted correctly. I have read a bunch of tutorials on this but still have questions(there is much to lern) and thought I might just put it all together here and ask.
**PHP**
header('Content-Type:text/html; charset=UTF-8');
mb_internal_encoding('UTF-8');
**HTML**
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<form accept-charset="UTF-8"> .. </form>
*(though the later is optional and rather a suggestion but I belief I'd rather suggest as not doing anything)*
**MySQL**
`CREATE database_name DEFAULT CHARACTER SET utf8;` or `ALTER database_name DEFAULT CHARACTER SET utf8;` and/or use `utf8_gerneral_ci` as MySQL connection collation.
*(it is [important to note][1] here that this will increase the database size if it uses varchar)*
**Connection**
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET utf8");
**Businesses logic**
detect if not UTF8 with [`mb_detect_encoding()`][2] and convert with [`ivon()`][3].
validating overly long sequences of UTF8 and UTF16
$body=preg_replace('/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]|(?<=^|[\x00-\x7F])[\x80-\xBF]+|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/','�',$body);
$body=preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]|\xED[\xA0-\xBF][\x80-\xBF]/S','?', $body);
**Questions**
- is `mb_internal_encoding('UTF-8')` necessary in PHP 5.3 and higher and if so does this mean I have to use all multi byte functions instead of its core functions like `mb_substr()` instead of `substr()`?
- is it still necessary to check for malformatted input stings and if so what is a reliable function/class to do so? I possibly do not want to strip bad data and don't know enough about transliteration.
- should it really be `utf8_gerneral_ci` or rather `utf8_bin`?
| php | mysql | unicode | utf-8 | workflow | 06/14/2012 04:02:45 | not a real question | UTF8 workflow PHP, MySQL summarized
===
I am working for international clients who have all very different alphabets and so I am trying to finally get an overview of a complete workflow between PHP and MySQL that would ensure all character encodings to be inserted correctly. I have read a bunch of tutorials on this but still have questions(there is much to lern) and thought I might just put it all together here and ask.
**PHP**
header('Content-Type:text/html; charset=UTF-8');
mb_internal_encoding('UTF-8');
**HTML**
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<form accept-charset="UTF-8"> .. </form>
*(though the later is optional and rather a suggestion but I belief I'd rather suggest as not doing anything)*
**MySQL**
`CREATE database_name DEFAULT CHARACTER SET utf8;` or `ALTER database_name DEFAULT CHARACTER SET utf8;` and/or use `utf8_gerneral_ci` as MySQL connection collation.
*(it is [important to note][1] here that this will increase the database size if it uses varchar)*
**Connection**
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET utf8");
**Businesses logic**
detect if not UTF8 with [`mb_detect_encoding()`][2] and convert with [`ivon()`][3].
validating overly long sequences of UTF8 and UTF16
$body=preg_replace('/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]|(?<=^|[\x00-\x7F])[\x80-\xBF]+|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/','�',$body);
$body=preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]|\xED[\xA0-\xBF][\x80-\xBF]/S','?', $body);
**Questions**
- is `mb_internal_encoding('UTF-8')` necessary in PHP 5.3 and higher and if so does this mean I have to use all multi byte functions instead of its core functions like `mb_substr()` instead of `substr()`?
- is it still necessary to check for malformatted input stings and if so what is a reliable function/class to do so? I possibly do not want to strip bad data and don't know enough about transliteration.
- should it really be `utf8_gerneral_ci` or rather `utf8_bin`?
| 1 |
11,488,227 | 07/14/2012 23:38:25 | 1,236,697 | 02/27/2012 22:57:24 | 47 | 0 | Why does heapify swap the top of the heap with the element at the bottom of the heap? | In a max heap (assuming it's represented by an array), the top of the heap (ie. the largest value in the heap) swaps with the last element in the array (ie. one of the smallest values in the heap), the last element is removed, and then the new top-of-the-heap element swaps with other values to settle back into its proper place.
Instead, why isn't the top element just removed and then other elements can "fill in" for the the heap? | algorithm | heapsort | null | null | null | null | open | Why does heapify swap the top of the heap with the element at the bottom of the heap?
===
In a max heap (assuming it's represented by an array), the top of the heap (ie. the largest value in the heap) swaps with the last element in the array (ie. one of the smallest values in the heap), the last element is removed, and then the new top-of-the-heap element swaps with other values to settle back into its proper place.
Instead, why isn't the top element just removed and then other elements can "fill in" for the the heap? | 0 |
6,932,729 | 08/03/2011 20:16:56 | 600,322 | 02/02/2011 16:43:29 | 188 | 3 | importing large csv into mysql database | im having a really troublesome time trying to import a large csv file into mysql on localhost
the csv is about 55 MB and has about 750,000 rows.
now ive resorted to writing a script that parses the csv and dumps rows 1 by one
heres the code:
$row = 1;
if (($handle = fopen("postal_codes.csv", "r")) !== FALSE)
{
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
{
$num = count($data);
$row++;
for ($c=0; $c < $num; $c++)
{
$arr = explode('|', $data[$c]);
$postcode = mysql_real_escape_string($arr[1]);
$city_name = mysql_real_escape_string($arr[2]);
$city_slug = mysql_real_escape_string(toAscii($city_name));
$prov_name = mysql_real_escape_string($arr[3]);
$prov_slug = mysql_real_escape_string(toAscii($prov_name));
$prov_abbr = mysql_real_escape_string($arr[4]);
$lat = mysql_real_escape_string($arr[6]);
$lng = mysql_real_escape_string($arr[7]);
mysql_query("insert into cities (`postcode`, `city_name`, `city_slug`, `prov_name`, `prov_slug`, `prov_abbr`, `lat`, `lng`)
values ('$postcode', '$city_name', '$city_slug', '$prov_name', '$prov_slug', '$prov_abbr', '$lat', '$lng')") or die(mysql_error());
}
}
fclose($handle);
}
the problem is this is taking forever to execute...any solutions would be great. | php | mysql | csv | null | null | null | open | importing large csv into mysql database
===
im having a really troublesome time trying to import a large csv file into mysql on localhost
the csv is about 55 MB and has about 750,000 rows.
now ive resorted to writing a script that parses the csv and dumps rows 1 by one
heres the code:
$row = 1;
if (($handle = fopen("postal_codes.csv", "r")) !== FALSE)
{
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
{
$num = count($data);
$row++;
for ($c=0; $c < $num; $c++)
{
$arr = explode('|', $data[$c]);
$postcode = mysql_real_escape_string($arr[1]);
$city_name = mysql_real_escape_string($arr[2]);
$city_slug = mysql_real_escape_string(toAscii($city_name));
$prov_name = mysql_real_escape_string($arr[3]);
$prov_slug = mysql_real_escape_string(toAscii($prov_name));
$prov_abbr = mysql_real_escape_string($arr[4]);
$lat = mysql_real_escape_string($arr[6]);
$lng = mysql_real_escape_string($arr[7]);
mysql_query("insert into cities (`postcode`, `city_name`, `city_slug`, `prov_name`, `prov_slug`, `prov_abbr`, `lat`, `lng`)
values ('$postcode', '$city_name', '$city_slug', '$prov_name', '$prov_slug', '$prov_abbr', '$lat', '$lng')") or die(mysql_error());
}
}
fclose($handle);
}
the problem is this is taking forever to execute...any solutions would be great. | 0 |
5,365,431 | 03/19/2011 22:43:04 | 667,752 | 03/19/2011 22:32:21 | 1 | 0 | How can we change the width and height of linear layout during run time in android?? | Guyz... Plz help.. Give the proper code because i use most of examples of this problem and i m not able to solve this problem ... | android | layout | linear | null | null | 02/01/2012 04:04:33 | not a real question | How can we change the width and height of linear layout during run time in android??
===
Guyz... Plz help.. Give the proper code because i use most of examples of this problem and i m not able to solve this problem ... | 1 |
377,375 | 12/18/2008 09:47:05 | 11,236 | 09/16/2008 06:29:28 | 894 | 32 | A noob's guide to SQL database design | Do you know a good source to learn how to design SQL solutions?
Beyond the basic language syntax, I'm looking for something to help me understand:
1. What tables to build and how to link them
2. How to design for different scales (small client APP to a huge distributed website)
3. How to write effective / efficient / elegant SQL queries
| sql | database-design | design | database | scalability | null | open | A noob's guide to SQL database design
===
Do you know a good source to learn how to design SQL solutions?
Beyond the basic language syntax, I'm looking for something to help me understand:
1. What tables to build and how to link them
2. How to design for different scales (small client APP to a huge distributed website)
3. How to write effective / efficient / elegant SQL queries
| 0 |
10,092,144 | 04/10/2012 15:55:37 | 1,324,462 | 04/10/2012 15:39:25 | 1 | 0 | Retrieving and displaying search results from a domain | I want to build a simple app that will retrieve email contact information for Members of the Australian Parliament and allow a user to send them an email. This does already exist in a format [here][1], but I would like it to be sans le crap and easy to access.
I would really appreciate some guidance as to the tools I'll need to do this. I have some basic Javascript, HTML and RoR under my belt but I really don't know what to search for in the order of tutorials and the such to get me on my way.
I imagine a simple search box that enters a postcode and returns a simple result, upon clicking that results in a small email form that has the option of anonymous or not email capability. A suppose it would be embedded in a webpage or something?
I do not really need the code for such things, I'm keen to learn myself out of this hole, but I need some direction as where to start.
I really do appreciate if anyone replies and helps. Thanks
[1]: http://www.aph.gov.au/Senators_and_Members/Parliamentarian_Search_Results?q=&mem=1&par=-1&gen=0&ps=0 | query | search | internet | null | null | null | open | Retrieving and displaying search results from a domain
===
I want to build a simple app that will retrieve email contact information for Members of the Australian Parliament and allow a user to send them an email. This does already exist in a format [here][1], but I would like it to be sans le crap and easy to access.
I would really appreciate some guidance as to the tools I'll need to do this. I have some basic Javascript, HTML and RoR under my belt but I really don't know what to search for in the order of tutorials and the such to get me on my way.
I imagine a simple search box that enters a postcode and returns a simple result, upon clicking that results in a small email form that has the option of anonymous or not email capability. A suppose it would be embedded in a webpage or something?
I do not really need the code for such things, I'm keen to learn myself out of this hole, but I need some direction as where to start.
I really do appreciate if anyone replies and helps. Thanks
[1]: http://www.aph.gov.au/Senators_and_Members/Parliamentarian_Search_Results?q=&mem=1&par=-1&gen=0&ps=0 | 0 |
1,854,304 | 12/06/2009 04:04:22 | 219,509 | 11/26/2009 15:34:24 | 82 | 3 | C++ : How to include boost library header in VC++6? | I used <a href="http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html">this guide</a> to rebuild the boost library in VC++6 under windows XP. But is having problems trying to include the header files. By default, the boost library makes use of point 1 as follows to declare the header files. But if I used point 1, I get "fatal error C1083: Cannot open include file...". I tried using point 2 to declare and it seem to work but all the header files referenced internally by point 2 will have to be changed. This lead to a cascade of header declaration to be changed which is not realistic.
Did I miss something? What is the correct way of including the header file without errors?
1) #include <boost/interprocess/managed_shared_memory.hpp>
2) #include "..\boost\interprocess\managed_shared_memory.hpp" | boost | include | header | c++ | null | null | open | C++ : How to include boost library header in VC++6?
===
I used <a href="http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html">this guide</a> to rebuild the boost library in VC++6 under windows XP. But is having problems trying to include the header files. By default, the boost library makes use of point 1 as follows to declare the header files. But if I used point 1, I get "fatal error C1083: Cannot open include file...". I tried using point 2 to declare and it seem to work but all the header files referenced internally by point 2 will have to be changed. This lead to a cascade of header declaration to be changed which is not realistic.
Did I miss something? What is the correct way of including the header file without errors?
1) #include <boost/interprocess/managed_shared_memory.hpp>
2) #include "..\boost\interprocess\managed_shared_memory.hpp" | 0 |
5,329,206 | 03/16/2011 17:25:48 | 374,916 | 06/24/2010 06:01:22 | 346 | 4 | date calculations using unix time | Looking for help in unix to get the following date stamps using unix date:
today at 12:00am
12:00am - 15 days ago
12:00am - 30 days ago
in Unix epoch time? (`1300295838`)
| unix | unixtime | null | null | null | null | open | date calculations using unix time
===
Looking for help in unix to get the following date stamps using unix date:
today at 12:00am
12:00am - 15 days ago
12:00am - 30 days ago
in Unix epoch time? (`1300295838`)
| 0 |
2,897,722 | 05/24/2010 14:33:06 | 349,038 | 05/24/2010 14:33:06 | 1 | 0 | Two quick Mathematica questions | 1. How do I remove the numbers on the x-axis only not the y-axis?
2. Is it possible to shift the y-axis without shifting the functions? What I mean is, instead of having the y-axis at x = 0, could I have it at x = -5? | mathematica | null | null | null | null | null | open | Two quick Mathematica questions
===
1. How do I remove the numbers on the x-axis only not the y-axis?
2. Is it possible to shift the y-axis without shifting the functions? What I mean is, instead of having the y-axis at x = 0, could I have it at x = -5? | 0 |
9,809,001 | 03/21/2012 16:40:23 | 753,676 | 05/14/2011 14:05:45 | 738 | 101 | Is there a way to combine pdfs in pdf.js? | Well I want to combine existing pdf files in html5 using pdf.js and generate a single pdf out of them
Is this possible and how can I do this? | javascript | html5 | pdf | null | null | null | open | Is there a way to combine pdfs in pdf.js?
===
Well I want to combine existing pdf files in html5 using pdf.js and generate a single pdf out of them
Is this possible and how can I do this? | 0 |
11,086,518 | 06/18/2012 15:54:36 | 301,804 | 03/25/2010 15:13:03 | 381 | 2 | Pixastic desaturate on load and colour on hover | I have a set of images that have to be desaturated on load and in colour on hover. I've tried this but the hover doesn't work, the desaturation on load it does though:
$(window).load(function () {
$(".box img").pixastic("desaturate");
$(".box img").mouseenter(function (e) {
var self = $(this);
Pixastic.revert(self); // make it colour
});
$(".box img").mouseleave(function (e) {
// make it black n white again
$(this).pixastic("desaturate");
});
});
I've seen some other posts here but none seem to work.
What am I doing wrong?
Thanks
Mauro | jquery | canvas | pixastic | null | null | null | open | Pixastic desaturate on load and colour on hover
===
I have a set of images that have to be desaturated on load and in colour on hover. I've tried this but the hover doesn't work, the desaturation on load it does though:
$(window).load(function () {
$(".box img").pixastic("desaturate");
$(".box img").mouseenter(function (e) {
var self = $(this);
Pixastic.revert(self); // make it colour
});
$(".box img").mouseleave(function (e) {
// make it black n white again
$(this).pixastic("desaturate");
});
});
I've seen some other posts here but none seem to work.
What am I doing wrong?
Thanks
Mauro | 0 |
6,281,423 | 06/08/2011 15:36:17 | 145,395 | 07/26/2009 21:18:28 | 1 | 1 | Serialize a Java object to Java code? | Is there an implementation that will serialize a Java object as Java code? For example, if I have the object
Map<String,Integer> m = new Map<String,Integer>();
m.put("foo",new Integer(21));
I could serialize this using
ObjectOutputStream out = new ObjectOutputStream( ... );
out.writeObject( m );
out.flush();
and the output would, for example, be
java.util.Map<String,Integer> m = new java.util.Map<String,Integer>();
m.put("foo",new Integer(21));
Why would you want this? Sometimes it is easier to partially create complex objects programmatically and then complete the creation manually in code. This code can then be included in the source and version controlled with everything else. Note that using external serialized objects is not exceptable.
Thanks for any help you can give.
| java | serialization | code-generation | null | null | null | open | Serialize a Java object to Java code?
===
Is there an implementation that will serialize a Java object as Java code? For example, if I have the object
Map<String,Integer> m = new Map<String,Integer>();
m.put("foo",new Integer(21));
I could serialize this using
ObjectOutputStream out = new ObjectOutputStream( ... );
out.writeObject( m );
out.flush();
and the output would, for example, be
java.util.Map<String,Integer> m = new java.util.Map<String,Integer>();
m.put("foo",new Integer(21));
Why would you want this? Sometimes it is easier to partially create complex objects programmatically and then complete the creation manually in code. This code can then be included in the source and version controlled with everything else. Note that using external serialized objects is not exceptable.
Thanks for any help you can give.
| 0 |
5,051,545 | 02/19/2011 15:08:43 | 310,165 | 04/06/2010 15:28:05 | 1,289 | 39 | Matrix multiplication running times Python < C++ < Matlab - Explain | I have a matrix `M` thats's `16384 x 81`. I want to compute `M * M.t` (the result will be `16384x16384`).
My question is: **could somebody please explain the running time differences**?
Using **OpenCV in C++** the following code takes **18 seconds**
#include <cv.h>
int main(void) {
cv::Mat m(16384, 81, CV_32FC1);
cv::randu(m, cv::Scalar(0), cv::Scalar(1));
cv::Mat result = m * m.t(); // Same problem with cv::gemm, by the way
}
In **Python** the following code takes only **0.9 seconds**
import numpy as np
m = np.random.rand(16384, 81)
result = np.dot(m, m.T)
In **MATLAB** the following code takes **8.3 seconds**
m = rand(16384, 81);
result = m * m';
-----------
My only guess would have been that it's a memory issue, and that somehow Python is able to avoid swap space. When I watch `top`, however, I do not see my `C++ application` using all the memory, and I had expected that `C++` would win the day. Thanks for any insights. | c++ | python | matlab | opencv | matrix-multiplication | null | open | Matrix multiplication running times Python < C++ < Matlab - Explain
===
I have a matrix `M` thats's `16384 x 81`. I want to compute `M * M.t` (the result will be `16384x16384`).
My question is: **could somebody please explain the running time differences**?
Using **OpenCV in C++** the following code takes **18 seconds**
#include <cv.h>
int main(void) {
cv::Mat m(16384, 81, CV_32FC1);
cv::randu(m, cv::Scalar(0), cv::Scalar(1));
cv::Mat result = m * m.t(); // Same problem with cv::gemm, by the way
}
In **Python** the following code takes only **0.9 seconds**
import numpy as np
m = np.random.rand(16384, 81)
result = np.dot(m, m.T)
In **MATLAB** the following code takes **8.3 seconds**
m = rand(16384, 81);
result = m * m';
-----------
My only guess would have been that it's a memory issue, and that somehow Python is able to avoid swap space. When I watch `top`, however, I do not see my `C++ application` using all the memory, and I had expected that `C++` would win the day. Thanks for any insights. | 0 |
3,850,591 | 10/03/2010 16:30:49 | 224,922 | 12/04/2009 16:51:10 | 2,247 | 4 | Why not use object literals to create beautiful DSL in Javascript? | Coming from Ruby to Javascript, creating DSL now seems not as fun as in Ruby where it was very beautiful and elegant.
Ruby Rake:
task :hello do
# do stuff
end
task :hello => [:dep1, :dep2] do
# do stuff
end
Javascript Jake:
task("hello", function() {
// do stuff
});
task("hello", ["deep1", "deep2"], function() {
// do stuff
});
But why don't we use the powerful object literals instead:
Javascript Jake with Json:
task({
name: "hello",
action: function() {
// do stuff
}
});
task({
name: "hello",
dependencies: ["deep1", "deep2"],
action: function() {
// do stuff
}
});
I think this is much more appropriate to create DSL cause it is at the same time a configuration syntax.
When I started to use Sproutcore that is using this kind of configuration design I thought this should be the way Javascript is doing configuration/DSL. Cause now you can save the configurations in the database or send them back and forth between frontend and backend because they are only object literals. Maybe also pass these configuration to frameworks in other languages.
I think it's easier to see what is doing what, than just passing a bunch of arguments, and it's very structural.
With this you could also put all the keys out there in the beginning so the programmer/non-programmer could fill them in:
task({
name: "",
type: "",
dependencies: [],
action: function() {},
callback: function() {}
});
vs:
task("", "", [], function() {}, function() {});
In this way Javascript DSL could be easier to use than Ruby DSL imho. I mean, just look at the above comparison and ask yourself which one would make you understand what is what right away just looking at the code.
Don't you think this is a better DSL syntax that more libraries/frameworks should follow? | javascript | ruby | dsl | null | null | 10/03/2010 17:25:41 | not constructive | Why not use object literals to create beautiful DSL in Javascript?
===
Coming from Ruby to Javascript, creating DSL now seems not as fun as in Ruby where it was very beautiful and elegant.
Ruby Rake:
task :hello do
# do stuff
end
task :hello => [:dep1, :dep2] do
# do stuff
end
Javascript Jake:
task("hello", function() {
// do stuff
});
task("hello", ["deep1", "deep2"], function() {
// do stuff
});
But why don't we use the powerful object literals instead:
Javascript Jake with Json:
task({
name: "hello",
action: function() {
// do stuff
}
});
task({
name: "hello",
dependencies: ["deep1", "deep2"],
action: function() {
// do stuff
}
});
I think this is much more appropriate to create DSL cause it is at the same time a configuration syntax.
When I started to use Sproutcore that is using this kind of configuration design I thought this should be the way Javascript is doing configuration/DSL. Cause now you can save the configurations in the database or send them back and forth between frontend and backend because they are only object literals. Maybe also pass these configuration to frameworks in other languages.
I think it's easier to see what is doing what, than just passing a bunch of arguments, and it's very structural.
With this you could also put all the keys out there in the beginning so the programmer/non-programmer could fill them in:
task({
name: "",
type: "",
dependencies: [],
action: function() {},
callback: function() {}
});
vs:
task("", "", [], function() {}, function() {});
In this way Javascript DSL could be easier to use than Ruby DSL imho. I mean, just look at the above comparison and ask yourself which one would make you understand what is what right away just looking at the code.
Don't you think this is a better DSL syntax that more libraries/frameworks should follow? | 4 |
6,214,308 | 06/02/2011 12:07:35 | 697,053 | 04/07/2011 15:04:26 | 1 | 0 | VOD home server | I would like to setup a Video on Demand server for the building I live in. We have a bunch of old movies that we would like to setup as a Video on Demand. Ideally every apartment would have 2-3 streaming devices and there are about 50 apartments. I am planning to set a UI where users can go and pick the movie they like and start streaming it. more like Netflex but for personal usage on a LAN. I am also assuming that many users would like to watch the same movie at the same time but using Unicase and not multicast.
Can you please help me on where to start? what kind of servers I would need to get? I was also thinking about getting iptv devices that cost around 40-50$ and set them up for every tv in the apartments.
Thank you for your time.
| web-services | streaming | media | iptv | null | 06/02/2011 12:17:23 | off topic | VOD home server
===
I would like to setup a Video on Demand server for the building I live in. We have a bunch of old movies that we would like to setup as a Video on Demand. Ideally every apartment would have 2-3 streaming devices and there are about 50 apartments. I am planning to set a UI where users can go and pick the movie they like and start streaming it. more like Netflex but for personal usage on a LAN. I am also assuming that many users would like to watch the same movie at the same time but using Unicase and not multicast.
Can you please help me on where to start? what kind of servers I would need to get? I was also thinking about getting iptv devices that cost around 40-50$ and set them up for every tv in the apartments.
Thank you for your time.
| 2 |
8,970,280 | 01/23/2012 10:34:37 | 301,804 | 03/25/2010 15:13:03 | 201 | 1 | How to simulate hover effect on touch devices? | I have a web page with some css3 animation on hover and I would like to make it work on iPad (and any touch enabled device) when the user touch these elements.
Here's my code:
html:
<div id="headBlock">
<a id="arm"></a>
<div id="head">
<div id="blink"></div>
<div id="lid"></div>
<div id="man"></div>
<a id="man-arm"></a>
</div>
</div>
js:
//arm
$('#arm').hover(function(){
$(this).removeAttr('style').css('bottom','244px');
$(this).addClass('hover_effect');
}, function(){
$(this).removeClass('hover_effect');
});
//man arm
$('#man').hover(function(){
$('#man-arm').removeAttr('style');
$('#man-arm').addClass('hover_effect');
}, function(){
$('#man-arm').removeClass('hover_effect');
});
You can see that when the mouse enter the elements I remove the style then apply a style and add the css class 'hover_effect' and when the mouse leaves I remove the 'hover_effect' class.
How can I achieve the same thing on touch devices? The click event doesn't have the a callback so I cannot remove the 'hover_effect' class after the click happens. I tried mousedown and mouseup but it didn't work. I searched stackoverflow and I found this http://stackoverflow.com/questions/2851663/how-do-i-simulate-a-hover-with-a-touch-in-touch-enabled-browsers but it didn't have any effect.
Any idea anyone?
Thanks
Mauro | mobile | hover | null | null | null | null | open | How to simulate hover effect on touch devices?
===
I have a web page with some css3 animation on hover and I would like to make it work on iPad (and any touch enabled device) when the user touch these elements.
Here's my code:
html:
<div id="headBlock">
<a id="arm"></a>
<div id="head">
<div id="blink"></div>
<div id="lid"></div>
<div id="man"></div>
<a id="man-arm"></a>
</div>
</div>
js:
//arm
$('#arm').hover(function(){
$(this).removeAttr('style').css('bottom','244px');
$(this).addClass('hover_effect');
}, function(){
$(this).removeClass('hover_effect');
});
//man arm
$('#man').hover(function(){
$('#man-arm').removeAttr('style');
$('#man-arm').addClass('hover_effect');
}, function(){
$('#man-arm').removeClass('hover_effect');
});
You can see that when the mouse enter the elements I remove the style then apply a style and add the css class 'hover_effect' and when the mouse leaves I remove the 'hover_effect' class.
How can I achieve the same thing on touch devices? The click event doesn't have the a callback so I cannot remove the 'hover_effect' class after the click happens. I tried mousedown and mouseup but it didn't work. I searched stackoverflow and I found this http://stackoverflow.com/questions/2851663/how-do-i-simulate-a-hover-with-a-touch-in-touch-enabled-browsers but it didn't have any effect.
Any idea anyone?
Thanks
Mauro | 0 |
10,877,370 | 06/04/2012 06:52:20 | 870,527 | 07/30/2011 09:50:50 | 81 | 18 | complex access control system | I want to build a complex access control system just like facebook.
How should I design my database so that:
A user may select which streams to see (via liking a page) and may further select to see all or only important streams.
Also he get to see posts of a friend, but if a friend changes visibility he may or may not see it. A user may be an owner or member of a group and accordingly he have access.
So for a user there is so many access related information and also for each data point.
I use Perl/MySQL/Apache.
Any help will be appreciated.
| database-design | null | null | null | null | 06/12/2012 11:48:14 | not constructive | complex access control system
===
I want to build a complex access control system just like facebook.
How should I design my database so that:
A user may select which streams to see (via liking a page) and may further select to see all or only important streams.
Also he get to see posts of a friend, but if a friend changes visibility he may or may not see it. A user may be an owner or member of a group and accordingly he have access.
So for a user there is so many access related information and also for each data point.
I use Perl/MySQL/Apache.
Any help will be appreciated.
| 4 |
6,066,316 | 05/20/2011 00:33:33 | 753,726 | 05/14/2011 15:20:16 | 16 | 0 | Why PEAR doesn't working after installation? | I'm using **XAMPP** on my **WINDOWS/XP** local machine. Here are my installation steps:
- Running **xampp\php\go-pear.bat**
- I choose, "**SYSTEM WIDE**" by entering "system"
- Continued with **"default" individual locations** (Pressing "Enter")
- Then, double clicked "**PEAR_ENV.reg**"
<br>After install, while i call "pear" from Command Prompt, it is showing:
'pear' is not recognized as an internal or external command, operable program or batch file.
<br>Here are my "System Environment Variables" and i got all files (and "PEAR" folder) correctly:
- PHP_PEAR_BIN_DIR = C:\Program Files\xampp\php
- PHP_PEAR_DATA_DIR = C:\Program Files\xampp\php\data
- PHP_PEAR_DOC_DIR = C:\Program Files\xampp\php\docs
- PHP_PEAR_INSTALL_DIR = C:\Program Files\xampp\php\pear
- PHP_PEAR_PHP_BIN = C:\Program Files\xampp\php\.\php.exe
- PHP_PEAR_SYSCONF_DIR = C:\Program Files\xampp\php
- PHP_PEAR_TEST_DIR = C:\Program Files\xampp\php\tests
**What did i do wrong?** | php | install | pear | null | null | null | open | Why PEAR doesn't working after installation?
===
I'm using **XAMPP** on my **WINDOWS/XP** local machine. Here are my installation steps:
- Running **xampp\php\go-pear.bat**
- I choose, "**SYSTEM WIDE**" by entering "system"
- Continued with **"default" individual locations** (Pressing "Enter")
- Then, double clicked "**PEAR_ENV.reg**"
<br>After install, while i call "pear" from Command Prompt, it is showing:
'pear' is not recognized as an internal or external command, operable program or batch file.
<br>Here are my "System Environment Variables" and i got all files (and "PEAR" folder) correctly:
- PHP_PEAR_BIN_DIR = C:\Program Files\xampp\php
- PHP_PEAR_DATA_DIR = C:\Program Files\xampp\php\data
- PHP_PEAR_DOC_DIR = C:\Program Files\xampp\php\docs
- PHP_PEAR_INSTALL_DIR = C:\Program Files\xampp\php\pear
- PHP_PEAR_PHP_BIN = C:\Program Files\xampp\php\.\php.exe
- PHP_PEAR_SYSCONF_DIR = C:\Program Files\xampp\php
- PHP_PEAR_TEST_DIR = C:\Program Files\xampp\php\tests
**What did i do wrong?** | 0 |
1,966,577 | 12/27/2009 18:00:17 | 193,619 | 10/21/2009 06:48:23 | 91 | 3 | How to determine architecture in platform neutral way? | I have a C++ app that uses wxWidgets. Certain parts of the app differ for 32 and 64 bit hosts. Currently I use sizeof(void *), but is there a better way that uses conditional compilation and is platform neutral? | c++ | bit | platform | null | null | null | open | How to determine architecture in platform neutral way?
===
I have a C++ app that uses wxWidgets. Certain parts of the app differ for 32 and 64 bit hosts. Currently I use sizeof(void *), but is there a better way that uses conditional compilation and is platform neutral? | 0 |
8,885,390 | 01/16/2012 19:42:02 | 926,895 | 09/03/2011 18:30:15 | 1 | 0 | datetimepicker ui sliders getting disturbed on mutiple ajax requests | I'm having a multiple tab based interface where each section loads on Ajax request. In one tab, I'm adding jquery's datetimepicker which creates a div section on each initialization. It keeps on adding div for slider on each initialization of datetimepicker code. This allows datetime picker to work perfectly only if said tab is loaded first, but gives problems in case of visiting other tabs and coming back on datepicker's tab.
Each initialization of datepicker code adds multiple slider div sections on the page and results in distorted sliders of timepicker section. Datepicker part works fine though.
Any help will be appreciated.
| jquery | datetimepicker | null | null | null | 02/07/2012 19:04:29 | not a real question | datetimepicker ui sliders getting disturbed on mutiple ajax requests
===
I'm having a multiple tab based interface where each section loads on Ajax request. In one tab, I'm adding jquery's datetimepicker which creates a div section on each initialization. It keeps on adding div for slider on each initialization of datetimepicker code. This allows datetime picker to work perfectly only if said tab is loaded first, but gives problems in case of visiting other tabs and coming back on datepicker's tab.
Each initialization of datepicker code adds multiple slider div sections on the page and results in distorted sliders of timepicker section. Datepicker part works fine though.
Any help will be appreciated.
| 1 |
1,545,730 | 10/09/2009 19:50:43 | 168,536 | 09/04/2009 13:37:39 | 6 | 0 | JQuery scrolling issue when submiting a form | I'm building an ASP.NET website and I'm puzzled with the behavior of one page, I've got a long form and a submit button, I've got the piece of javascript below in the page to handle scrolling the page back up upon submiting the form, the first time I click the submit button it works all the sequent clicks don't work at all, any idea why?
<script type="text/javascript">
$(".thebutton").click(function(){
$("html, body").animate({scrollTop: 200}, 1000);
});
</script>
Cheers,
Thi | jquery | asp.net | scrolling | submit | button | null | open | JQuery scrolling issue when submiting a form
===
I'm building an ASP.NET website and I'm puzzled with the behavior of one page, I've got a long form and a submit button, I've got the piece of javascript below in the page to handle scrolling the page back up upon submiting the form, the first time I click the submit button it works all the sequent clicks don't work at all, any idea why?
<script type="text/javascript">
$(".thebutton").click(function(){
$("html, body").animate({scrollTop: 200}, 1000);
});
</script>
Cheers,
Thi | 0 |
7,649,057 | 10/04/2011 13:57:57 | 887,872 | 04/20/2011 06:05:51 | 322 | 11 | How can set the height of two layouts.? | I am working in android. this is my xml:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:focusable="true">
<RelativeLayout
android:layout_width="wrap_content" android:layout_height="140dip" android:id="@+id/rl_for_image_title" >
<ImageView
android:id="@+id/music_player_logo"
android:layout_height="fill_parent"
android:layout_width="100dip"
android:src="@drawable/musicplayer_logo"/>
</RelativeLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="140dip" android:id="@+id/rl_for_texts" android:layout_toRightOf="@+id/rl_for_image_title" >
<TextView
android:id="@+id/music_player_title_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Title :"
android:layout_marginLeft="15dip"/>
<TextView
android:layout_below="@+id/music_player_title_name"
android:id="@+id/music_player_artist_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Artist : "
android:layout_marginLeft="15dp"/>
<TextView
android:layout_below="@+id/music_player_artist_name"
android:id="@+id/music_player_category"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Category : "
android:layout_marginLeft="15dp"/>
<TextView
android:layout_below="@+id/music_player_category"
android:id="@+id/music_player_date"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Date : "
android:layout_marginLeft="15dp"
/>
<TextView
android:layout_below="@+id/music_player_date"
android:id="@+id/music_player_song_price"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Price : "
android:layout_marginLeft="15dp"
/>
</RelativeLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/rl_for_seekbar" android:layout_below="@+id/rl_for_texts" android:layout_marginTop="20dip" >
<ImageButton
android:id="@+id/ButtonTestPlayPause"
android:layout_height="40dip"
android:layout_width="fill_parent"
android:src="@drawable/button_play"/>
<SeekBar
android:layout_below="@+id/ButtonTestPlayPause"
android:id="@+id/SeekBarTestPlay"
android:layout_height="20dip"
android:layout_width="match_parent"
android:thumb="@drawable/thumb_transparent"/>
<TextView
android:layout_below="@+id/SeekBarTestPlay"
android:id="@+id/SeekBarTime"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Time :"
android:layout_marginLeft="15dp"
/>
</RelativeLayout>
</RelativeLayout>
and this is the output of this above xml:-
![enter image description here][1]
[1]: http://i.stack.imgur.com/Enlo7.png
i want to display at the same level as text information. my image top layer is a little bit below than the text view like as Title, artist. please suggest me what should i do make this alignment accurate. ? | android | android-layout | null | null | null | null | open | How can set the height of two layouts.?
===
I am working in android. this is my xml:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:focusable="true">
<RelativeLayout
android:layout_width="wrap_content" android:layout_height="140dip" android:id="@+id/rl_for_image_title" >
<ImageView
android:id="@+id/music_player_logo"
android:layout_height="fill_parent"
android:layout_width="100dip"
android:src="@drawable/musicplayer_logo"/>
</RelativeLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="140dip" android:id="@+id/rl_for_texts" android:layout_toRightOf="@+id/rl_for_image_title" >
<TextView
android:id="@+id/music_player_title_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Title :"
android:layout_marginLeft="15dip"/>
<TextView
android:layout_below="@+id/music_player_title_name"
android:id="@+id/music_player_artist_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Artist : "
android:layout_marginLeft="15dp"/>
<TextView
android:layout_below="@+id/music_player_artist_name"
android:id="@+id/music_player_category"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Category : "
android:layout_marginLeft="15dp"/>
<TextView
android:layout_below="@+id/music_player_category"
android:id="@+id/music_player_date"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Date : "
android:layout_marginLeft="15dp"
/>
<TextView
android:layout_below="@+id/music_player_date"
android:id="@+id/music_player_song_price"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Price : "
android:layout_marginLeft="15dp"
/>
</RelativeLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/rl_for_seekbar" android:layout_below="@+id/rl_for_texts" android:layout_marginTop="20dip" >
<ImageButton
android:id="@+id/ButtonTestPlayPause"
android:layout_height="40dip"
android:layout_width="fill_parent"
android:src="@drawable/button_play"/>
<SeekBar
android:layout_below="@+id/ButtonTestPlayPause"
android:id="@+id/SeekBarTestPlay"
android:layout_height="20dip"
android:layout_width="match_parent"
android:thumb="@drawable/thumb_transparent"/>
<TextView
android:layout_below="@+id/SeekBarTestPlay"
android:id="@+id/SeekBarTime"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Time :"
android:layout_marginLeft="15dp"
/>
</RelativeLayout>
</RelativeLayout>
and this is the output of this above xml:-
![enter image description here][1]
[1]: http://i.stack.imgur.com/Enlo7.png
i want to display at the same level as text information. my image top layer is a little bit below than the text view like as Title, artist. please suggest me what should i do make this alignment accurate. ? | 0 |
11,050,265 | 06/15/2012 12:02:09 | 1,116,573 | 12/26/2011 17:24:10 | 26 | 7 | Remove large .pack file created by git | I checked a load of files in to a branch and merged and then had to remove them and now I'm left with a large .pack file that I don't know how to get rid of.
I deleted all the files using `git rm -rf xxxxxx` and I also ran the `--cached` option as well.
Can someone tell me how I can remove a large .pack file that is currently in the following directory:
`.git/objects/pack/pack-xxxxxxxxxxxxxxxxx.pack`
Do I just need to remove the branch that I still have but am no longer using? Or is there something else I need to run?
I'm not sure how much difference it makes but it shows a padlock against the file.
Thanks | ruby-on-rails-3 | git | branching-and-merging | pack | null | null | open | Remove large .pack file created by git
===
I checked a load of files in to a branch and merged and then had to remove them and now I'm left with a large .pack file that I don't know how to get rid of.
I deleted all the files using `git rm -rf xxxxxx` and I also ran the `--cached` option as well.
Can someone tell me how I can remove a large .pack file that is currently in the following directory:
`.git/objects/pack/pack-xxxxxxxxxxxxxxxxx.pack`
Do I just need to remove the branch that I still have but am no longer using? Or is there something else I need to run?
I'm not sure how much difference it makes but it shows a padlock against the file.
Thanks | 0 |
11,005,207 | 06/12/2012 21:33:17 | 482,325 | 10/20/2010 22:05:41 | 56 | 1 | Minimum Font Size deprecated on ios version 6.0 | I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my xib files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it? Here is an image:
https://skitch.com/hahmadi82/eyk51/cloud | ios | xcode | uilabel | deprecated | fontsize | 06/12/2012 21:43:57 | too localized | Minimum Font Size deprecated on ios version 6.0
===
I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my xib files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it? Here is an image:
https://skitch.com/hahmadi82/eyk51/cloud | 3 |
3,498,773 | 08/17/2010 01:57:04 | 422,350 | 08/17/2010 01:39:25 | 1 | 0 | Which Language Should I Use To Make An App To Calculate My Payment? | I'm Paid By The Hour And I Want To Make An App Which I Will Start At The Beginning Of
My Shift And The Feature Want To Include Are:
-Timer
-Time Of Shift Start And End
-Date Of Shift
-Ability To Save A Full History Of When And For How Much I Worked
Ect..
Maybe C?
But Will I Be Able To Make A GUI Relatively Easily?
BASIC Is Not A Viable Option...
And I Am Obviously A Rookie So Please Be Mercifull... | timer | payment | calculation | null | null | 08/19/2010 02:18:49 | not a real question | Which Language Should I Use To Make An App To Calculate My Payment?
===
I'm Paid By The Hour And I Want To Make An App Which I Will Start At The Beginning Of
My Shift And The Feature Want To Include Are:
-Timer
-Time Of Shift Start And End
-Date Of Shift
-Ability To Save A Full History Of When And For How Much I Worked
Ect..
Maybe C?
But Will I Be Able To Make A GUI Relatively Easily?
BASIC Is Not A Viable Option...
And I Am Obviously A Rookie So Please Be Mercifull... | 1 |
9,377,152 | 02/21/2012 11:54:41 | 315,200 | 03/11/2010 11:14:26 | 553 | 20 | Facebook App Insights user can't see app in dashboard | When I invite people to my insights, they can see that they are invited, but when they go to Developer.facebook.com/apps the list is empty.
If I set them to Developer, they can see the app. What do I do wrong? Thank you in advance. | facebook | null | null | null | null | null | open | Facebook App Insights user can't see app in dashboard
===
When I invite people to my insights, they can see that they are invited, but when they go to Developer.facebook.com/apps the list is empty.
If I set them to Developer, they can see the app. What do I do wrong? Thank you in advance. | 0 |
1,403,064 | 09/10/2009 02:10:50 | 319,274 | 01/13/2009 03:09:04 | 32 | 5 | best C++ book for interview? | what is the best C++ book to prepare a advanced C++ interview.
I would like a book with very good summary on concepts and tricks asked in interviews.
| c++ | interview-questions | null | null | null | 11/29/2011 02:43:35 | not constructive | best C++ book for interview?
===
what is the best C++ book to prepare a advanced C++ interview.
I would like a book with very good summary on concepts and tricks asked in interviews.
| 4 |
5,109,118 | 02/24/2011 18:52:59 | 172,776 | 09/13/2009 16:02:52 | 563 | 13 | How to calculate minimum expected time for a TSP problem. | I have a simple graphing problem where I traverse a graph looking for an item. Each node in the graph has a probability n/100 of the item being there. How can I find the minimum expected time to search for the item in the entire graph?
At first glance it seems like a traveling sales person problem and that is simple. Just get the permutations of the the paths and calculate the path for each and return the minimum.
But then it gets tricky when I need to find the minimum expected time. Is there any mathimatical formula that I could plugin on the minimal path to get the result?
Or is there something more complicated that needs to be done? | algorithm | math | graph | statistics | traveling-salesman | null | open | How to calculate minimum expected time for a TSP problem.
===
I have a simple graphing problem where I traverse a graph looking for an item. Each node in the graph has a probability n/100 of the item being there. How can I find the minimum expected time to search for the item in the entire graph?
At first glance it seems like a traveling sales person problem and that is simple. Just get the permutations of the the paths and calculate the path for each and return the minimum.
But then it gets tricky when I need to find the minimum expected time. Is there any mathimatical formula that I could plugin on the minimal path to get the result?
Or is there something more complicated that needs to be done? | 0 |
5,980,039 | 05/12/2011 15:01:32 | 694,870 | 04/06/2011 13:01:53 | 68 | 0 | fgets inside a loop C | char in[20];
char out[20];
for(int i=0; i < nEdges ;i++){
char str[50];
fgets(str, 50, stdin);
char *result = NULL;
result = strtok(str, " ");
int count = 0;
int i = 0;
char name[2][20];
while(result != NULL){
strncpy(name[i],result,20);
result = strtok( NULL, " ");
count++;
i++;
}
if(count > 2){
errorMsg2();
}else{
i = strlen(name[1]);
for(int x=0; x < i ;x++){
if(name[1][x] == '\n')
name[1][x] = '\0';
strncpy(out,name[0],20);
strncpy(in,name[1],20);
}
Hi, I am trying to read a line and verify rather there is only two element, else error message. This is all inside a for loop, when i execute the program, fgets never asked me for input. does fgets work inside a loop? | c | homework | input-validation | null | null | null | open | fgets inside a loop C
===
char in[20];
char out[20];
for(int i=0; i < nEdges ;i++){
char str[50];
fgets(str, 50, stdin);
char *result = NULL;
result = strtok(str, " ");
int count = 0;
int i = 0;
char name[2][20];
while(result != NULL){
strncpy(name[i],result,20);
result = strtok( NULL, " ");
count++;
i++;
}
if(count > 2){
errorMsg2();
}else{
i = strlen(name[1]);
for(int x=0; x < i ;x++){
if(name[1][x] == '\n')
name[1][x] = '\0';
strncpy(out,name[0],20);
strncpy(in,name[1],20);
}
Hi, I am trying to read a line and verify rather there is only two element, else error message. This is all inside a for loop, when i execute the program, fgets never asked me for input. does fgets work inside a loop? | 0 |
7,431,294 | 09/15/2011 13:02:35 | 909,631 | 08/24/2011 12:39:46 | 1 | 0 | Wireshark / Winpcap breaks network | After installing wireshark with winpcap and running wireshark, my network access is broken. After rebooting and uninstalling winpcap, the problem still exists.
The ethernet adapter says that the interface is connected, and I have an IP, but the network is not accessible.
Any clues on how to restore functionality? | networking | wireshark | winpcap | null | null | 09/15/2011 22:12:55 | off topic | Wireshark / Winpcap breaks network
===
After installing wireshark with winpcap and running wireshark, my network access is broken. After rebooting and uninstalling winpcap, the problem still exists.
The ethernet adapter says that the interface is connected, and I have an IP, but the network is not accessible.
Any clues on how to restore functionality? | 2 |
5,075,255 | 02/22/2011 07:25:43 | 478,478 | 10/17/2010 11:23:21 | 64 | 7 | ASP .Net MVC 3 authenticate user against PhPbb database | Recently I have started implementing a solution which will use a PhPbb database for forms authorization, I have used the class from this below thread:
[PhPbb C# Authentication Port][1]
So i wrote a membership provider using this class in the 'ValidateUser' function:
public override bool ValidateUser(string username, string password)
{
ForumsDataContext db = Root.ForumsDataContext;
PhPbbCryptoServiceProvider phpbbCrypt = new PhPbbCryptoServiceProvider();
string remoteHash = db.Users.Where(u => u.UserName == username).FirstOrDefault().UserPassword;
if (String.IsNullOrEmpty(remoteHash))
return false;
return phpbbCrypt.phpbbCheckHash(password, remoteHash);
}
However this always returns false as the 'phpbbCrypt.phpbbCheckHash' returns false and I do not know enough about PhPbb to determine why the hashes are not matching up.
Any sugestions?
Thanks,
Alex.
[1]: http://www.phpbb.com/community/viewtopic.php?f=71&t=1771165 | c# | asp.net-mvc-3 | phpbb3 | null | null | null | open | ASP .Net MVC 3 authenticate user against PhPbb database
===
Recently I have started implementing a solution which will use a PhPbb database for forms authorization, I have used the class from this below thread:
[PhPbb C# Authentication Port][1]
So i wrote a membership provider using this class in the 'ValidateUser' function:
public override bool ValidateUser(string username, string password)
{
ForumsDataContext db = Root.ForumsDataContext;
PhPbbCryptoServiceProvider phpbbCrypt = new PhPbbCryptoServiceProvider();
string remoteHash = db.Users.Where(u => u.UserName == username).FirstOrDefault().UserPassword;
if (String.IsNullOrEmpty(remoteHash))
return false;
return phpbbCrypt.phpbbCheckHash(password, remoteHash);
}
However this always returns false as the 'phpbbCrypt.phpbbCheckHash' returns false and I do not know enough about PhPbb to determine why the hashes are not matching up.
Any sugestions?
Thanks,
Alex.
[1]: http://www.phpbb.com/community/viewtopic.php?f=71&t=1771165 | 0 |
9,310,477 | 02/16/2012 11:26:55 | 576,108 | 01/14/2011 19:29:55 | 290 | 2 | Client side validations with Devise | I am trying to use the client_side_validations gem with Devise to validate devise registrations form.
Validations work fine with everything else just not the Devise generated form.
I added the relevant :validate => true but the validations only work when I hit submit not on tab like they do on every other form.
<h2>Sign up</h2>
<hr />
<%= form_for(resource, :validate => true, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :username %>
<%= f.text_field :username %></div>
<div><%= f.label :email %>
<%= f.email_field :email %></div>
<div><%= f.label :password %>
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %></div>
<br />
<div><%= f.submit "Sign up", :class => "btn btn-primary btn-large" %></div>
<% end %>
<%= render "links" %> | ruby-on-rails | devise | client-side-validation | null | null | null | open | Client side validations with Devise
===
I am trying to use the client_side_validations gem with Devise to validate devise registrations form.
Validations work fine with everything else just not the Devise generated form.
I added the relevant :validate => true but the validations only work when I hit submit not on tab like they do on every other form.
<h2>Sign up</h2>
<hr />
<%= form_for(resource, :validate => true, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :username %>
<%= f.text_field :username %></div>
<div><%= f.label :email %>
<%= f.email_field :email %></div>
<div><%= f.label :password %>
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %></div>
<br />
<div><%= f.submit "Sign up", :class => "btn btn-primary btn-large" %></div>
<% end %>
<%= render "links" %> | 0 |
6,504,816 | 06/28/2011 10:08:59 | 648,814 | 03/07/2011 20:43:51 | 462 | 28 | Adding table to linq to sql data context | I'm trying to add a table from my database to my linq to sql data context. It wont let me. Looking at the table in the designer in visual studio it seems it isn't recognising the Id as a primary key. I cant see anything wrong with the table. Any ideas would be appreciated.
Here is my table;
USE [fldt_bt_wbc]
GO
/****** Object: Table [dbo].[btRequests] Script Date: 06/28/2011 11:01:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[btRequests](
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [varchar](25) NOT NULL,
[RequestType] [int] NOT NULL,
[DateTime] [datetime] NOT NULL,
[Status] [varchar](20) NULL,
[ConversationID] [varchar](50) NULL,
CONSTRAINT [PK_btRequests] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[btRequests] WITH CHECK ADD CONSTRAINT [FK_btRequests_RequestType] FOREIGN KEY([RequestType])
REFERENCES [dbo].[RequestType] ([ID])
GO
ALTER TABLE [dbo].[btRequests] CHECK CONSTRAINT [FK_btRequests_RequestType]
GO
| c# | sql | linq | linq-to-sql | null | null | open | Adding table to linq to sql data context
===
I'm trying to add a table from my database to my linq to sql data context. It wont let me. Looking at the table in the designer in visual studio it seems it isn't recognising the Id as a primary key. I cant see anything wrong with the table. Any ideas would be appreciated.
Here is my table;
USE [fldt_bt_wbc]
GO
/****** Object: Table [dbo].[btRequests] Script Date: 06/28/2011 11:01:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[btRequests](
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [varchar](25) NOT NULL,
[RequestType] [int] NOT NULL,
[DateTime] [datetime] NOT NULL,
[Status] [varchar](20) NULL,
[ConversationID] [varchar](50) NULL,
CONSTRAINT [PK_btRequests] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[btRequests] WITH CHECK ADD CONSTRAINT [FK_btRequests_RequestType] FOREIGN KEY([RequestType])
REFERENCES [dbo].[RequestType] ([ID])
GO
ALTER TABLE [dbo].[btRequests] CHECK CONSTRAINT [FK_btRequests_RequestType]
GO
| 0 |
6,286,243 | 06/08/2011 22:54:42 | 439,750 | 09/04/2010 19:16:49 | 170 | 9 | FT Web App for iPhone/iPad | If you are unsure of what I am referring to, you can check it out here:
[Can the FT Help Publishers Quit Their Apple Addiction?][1]
[1]: http://www.businessweek.com/technology/content/jun2011/tc2011068_255194.htm
So my question is (if anyone knows), what exact tech did they used to develop this? Did they use jQuery UI, jQuery Mobile, iOS specific stuff?
I'd love to know as I'm in the boat that I'd love an "app" for my site but I don't have the time to learn objective C or Java. So developing this same thing and tweaking it for the different devices seems like the way to go.
If you have any resources talking about the app, or if you answer the question can you please point to resources describing the tech to be more informative to other users like me.
Cheers | jquery | ios | html5 | jquery-mobile | mobile-web | 06/09/2011 17:09:37 | not a real question | FT Web App for iPhone/iPad
===
If you are unsure of what I am referring to, you can check it out here:
[Can the FT Help Publishers Quit Their Apple Addiction?][1]
[1]: http://www.businessweek.com/technology/content/jun2011/tc2011068_255194.htm
So my question is (if anyone knows), what exact tech did they used to develop this? Did they use jQuery UI, jQuery Mobile, iOS specific stuff?
I'd love to know as I'm in the boat that I'd love an "app" for my site but I don't have the time to learn objective C or Java. So developing this same thing and tweaking it for the different devices seems like the way to go.
If you have any resources talking about the app, or if you answer the question can you please point to resources describing the tech to be more informative to other users like me.
Cheers | 1 |
3,219,381 | 07/10/2010 13:36:12 | 325,661 | 04/26/2010 02:47:16 | 312 | 9 | How can i create such a xml hieararcy ? | I want to create dynamic XML hieararchy but still couldn't be successful about it.I tried LinqToXml classes and XML classes but still i couldn't. I want to create such a hierarchy in a loop dynamically.
Create root node
<Root></Root>
Then add child for it.
<Root>
<Biggest></Biggest>
</Root>
Then add child for last added node
<Root>
<Biggest>
<Bigger>
</Bigger>
</Biggest>
</Root>
Then go back add another
<Root>
<Biggest>
<Bigger>
</Bigger>
<Another>
</Another>
</Biggest>
</Root> | c# | .net | xml | linq-to-xml | null | null | open | How can i create such a xml hieararcy ?
===
I want to create dynamic XML hieararchy but still couldn't be successful about it.I tried LinqToXml classes and XML classes but still i couldn't. I want to create such a hierarchy in a loop dynamically.
Create root node
<Root></Root>
Then add child for it.
<Root>
<Biggest></Biggest>
</Root>
Then add child for last added node
<Root>
<Biggest>
<Bigger>
</Bigger>
</Biggest>
</Root>
Then go back add another
<Root>
<Biggest>
<Bigger>
</Bigger>
<Another>
</Another>
</Biggest>
</Root> | 0 |
1,918,255 | 12/16/2009 22:27:18 | 233,344 | 12/16/2009 22:20:20 | 1 | 0 | Usability standards when combining AJAX and regular POST-based form saves | I'm working on a project where on certain pages (e.g. settings pages) we combine AJAX and regular fill-out-the-form-then-submit POST based operations. I'm curious if anyone has advice on improving the usability of such a page. One of my ideas is that when the user enters/modifies a value in a non-ajax part of the page, some sort of div would appear (say in a fashion similar to Growl) indicating that the user needs to save by pressing 'Submit' at the bottom of the page (and possibly putting up a modal dialog if the user navigates away from the page before saving, though that might be a bit too intrusive). I'm sure this type of interaction exists, but I can't find any examples. | usability | ajax | post | forms | null | null | open | Usability standards when combining AJAX and regular POST-based form saves
===
I'm working on a project where on certain pages (e.g. settings pages) we combine AJAX and regular fill-out-the-form-then-submit POST based operations. I'm curious if anyone has advice on improving the usability of such a page. One of my ideas is that when the user enters/modifies a value in a non-ajax part of the page, some sort of div would appear (say in a fashion similar to Growl) indicating that the user needs to save by pressing 'Submit' at the bottom of the page (and possibly putting up a modal dialog if the user navigates away from the page before saving, though that might be a bit too intrusive). I'm sure this type of interaction exists, but I can't find any examples. | 0 |
3,855,193 | 10/04/2010 12:28:01 | 225,537 | 12/05/2009 20:27:17 | 381 | 11 | Why WCF windows authtication? | Why use Windows authentication for WCF service hosted on IIS, if I can limit accessing the IP range to be "localhost", Is there a security hole here.
thanks | wcf | security | wcf-security | null | null | null | open | Why WCF windows authtication?
===
Why use Windows authentication for WCF service hosted on IIS, if I can limit accessing the IP range to be "localhost", Is there a security hole here.
thanks | 0 |
8,697,768 | 01/02/2012 05:42:13 | 592,667 | 01/27/2011 18:10:55 | 459 | 4 | Which Windows partition have I booted from? | So on my machine I have two partitions with windows on them .One of them is faulty and I want to reformat that one.I just want to make sure that I dont reformat the correct one.How can I confirm which one is which?
I tried booting from the safe one and it showed me that other windows was in G: .Now when I boot from the faulty(unsafe one)I see no G: .My doubts:
-1) Is the partition from where you boot always given C:\?
-2) Is the space left on the partition a unique parameter to help uniquely identify partitions? | windows | operating-system | null | null | null | 01/02/2012 06:23:04 | off topic | Which Windows partition have I booted from?
===
So on my machine I have two partitions with windows on them .One of them is faulty and I want to reformat that one.I just want to make sure that I dont reformat the correct one.How can I confirm which one is which?
I tried booting from the safe one and it showed me that other windows was in G: .Now when I boot from the faulty(unsafe one)I see no G: .My doubts:
-1) Is the partition from where you boot always given C:\?
-2) Is the space left on the partition a unique parameter to help uniquely identify partitions? | 2 |
4,137,353 | 11/09/2010 18:55:55 | 207,795 | 11/10/2009 13:37:25 | 87 | 0 | jQuery in Firefox extension | I would like to include jQuery in a Firefox extension.
I add the following line of code to import the jQuery file:
Components.utils.import("resource://js/jquery.js", window.content.document);
Firefox runs the file immediately after importing. The jQuery file looks like this with an anonymous function:
(function( window, undefined ) {
...bunch of code....
_jQuery = window.jQuery,
})(window);
When the extension runs there is an error "window is not defined". What is a way to give jQuery access to the window? | jquery | firefox-addon | null | null | null | null | open | jQuery in Firefox extension
===
I would like to include jQuery in a Firefox extension.
I add the following line of code to import the jQuery file:
Components.utils.import("resource://js/jquery.js", window.content.document);
Firefox runs the file immediately after importing. The jQuery file looks like this with an anonymous function:
(function( window, undefined ) {
...bunch of code....
_jQuery = window.jQuery,
})(window);
When the extension runs there is an error "window is not defined". What is a way to give jQuery access to the window? | 0 |
10,967,865 | 06/10/2012 10:12:21 | 1,447,192 | 06/10/2012 10:01:33 | 1 | 0 | Getting data from JSON array in javascript | [{
"[{\"OrderID\":13,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1339160055797)\\/\",
\"LineItems\":[{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":3,
\"EntryOptions\":[{\"OptionID\":1,\"OptionName\":\"Sugar\",\"OptionDescription\":\"test\"}]},{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":2,
\"EntryOptions\":[{\"OptionID\":2,\"OptionName\":\"Milk\",\"OptionDescription\":\"test1\"}]}]},
{\"OrderID\":12,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1339159357047)\\/\",
\"LineItems\":[{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":1,\"OptionName\":\"Sugar\",\"OptionDescription\":\"test\"}]},{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":2,\"OptionName\":\"Milk\",\"OptionDescription\":\"test1\"}]}]},
{\"OrderID\":2,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1341510175593)\\/\",
\"LineItems\":[]},
{\"OrderID\":3,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1338939775593)\\/\",
\"LineItems\":[]},
{\"OrderID\":1,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1344188575590)\\/\",
\"LineItems\":[{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":1,\"OptionName\":\"Sugar\",\"OptionDescription\":\"test\"}]},{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":2,\"OptionName\":\"Milk\",\"OptionDescription\":\"test1\"}]}]}]":{"silent":true}
}]
I have above array as data, and when I access it as data.OrderID or data.LineItems, it give undefined, I know somebody gona help me get out of this on stackoverflow? | javascript | json | null | null | null | 06/10/2012 22:22:01 | too localized | Getting data from JSON array in javascript
===
[{
"[{\"OrderID\":13,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1339160055797)\\/\",
\"LineItems\":[{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":3,
\"EntryOptions\":[{\"OptionID\":1,\"OptionName\":\"Sugar\",\"OptionDescription\":\"test\"}]},{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":2,
\"EntryOptions\":[{\"OptionID\":2,\"OptionName\":\"Milk\",\"OptionDescription\":\"test1\"}]}]},
{\"OrderID\":12,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1339159357047)\\/\",
\"LineItems\":[{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":1,\"OptionName\":\"Sugar\",\"OptionDescription\":\"test\"}]},{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":2,\"OptionName\":\"Milk\",\"OptionDescription\":\"test1\"}]}]},
{\"OrderID\":2,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1341510175593)\\/\",
\"LineItems\":[]},
{\"OrderID\":3,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1338939775593)\\/\",
\"LineItems\":[]},
{\"OrderID\":1,\"ConsumerID\":1,\"ConsumerName\":\"Test William Shatner\",\"ConsumerEmail\":\"403-828-9456\",\"ConsumerPhone\":\"[email protected]\",\"LocationID\":0,\"LocationEmail\":null,\"PickupDateTime\":\"\\/Date(1344188575590)\\/\",
\"LineItems\":[{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":1,\"OptionName\":\"Sugar\",\"OptionDescription\":\"test\"}]},{\"ItemID\":1,\"ItemName\":\"Coffee\",\"ItemDescription\":\"Box of coffee\",\"itemQuentity\":1,
\"EntryOptions\":[{\"OptionID\":2,\"OptionName\":\"Milk\",\"OptionDescription\":\"test1\"}]}]}]":{"silent":true}
}]
I have above array as data, and when I access it as data.OrderID or data.LineItems, it give undefined, I know somebody gona help me get out of this on stackoverflow? | 3 |
9,039,321 | 01/27/2012 20:00:27 | 219,276 | 11/26/2009 09:44:27 | 133 | 6 | ms access 2010 multiple queries per form | It's not entirely obvious on Access MS 2010, but is it possible for me to (using the IDE) choose a query to populate a label, choose another query to populate a textbox and another to populate a combo?
Thanks,
KS | query | ms-access-2010 | null | null | null | null | open | ms access 2010 multiple queries per form
===
It's not entirely obvious on Access MS 2010, but is it possible for me to (using the IDE) choose a query to populate a label, choose another query to populate a textbox and another to populate a combo?
Thanks,
KS | 0 |
4,230,821 | 11/20/2010 01:59:41 | 124,069 | 06/17/2009 04:10:08 | 5,001 | 314 | If OpenID is dead, what is there to take it's place? | Scott Hanselman suggested in a [twitter tweet][1] yesterday that "OpenID is Dead".
If this is true, what is there to take it's place?
I'm currently involved in a pretty good sized project, and it's public facing log-ins are completely OpenID driven (Using [DotNetOpenAuth][2]). If this is going to be too challenging for users, or become unsupported when OpenID Providers move onto the "next" thing... I'm going to need to know what the next thing is... if there even is one.
Any information would be appreciated.
[1]: http://twitter.com/#!/search/shanselman%20openid%20dead
[2]: http://www.dotnetopenauth.net/ | openid | single-sign-on | null | null | null | 11/22/2010 03:45:28 | not constructive | If OpenID is dead, what is there to take it's place?
===
Scott Hanselman suggested in a [twitter tweet][1] yesterday that "OpenID is Dead".
If this is true, what is there to take it's place?
I'm currently involved in a pretty good sized project, and it's public facing log-ins are completely OpenID driven (Using [DotNetOpenAuth][2]). If this is going to be too challenging for users, or become unsupported when OpenID Providers move onto the "next" thing... I'm going to need to know what the next thing is... if there even is one.
Any information would be appreciated.
[1]: http://twitter.com/#!/search/shanselman%20openid%20dead
[2]: http://www.dotnetopenauth.net/ | 4 |
10,832,097 | 05/31/2012 10:47:37 | 1,428,045 | 05/31/2012 09:42:27 | 1 | 0 | Whats new in Web Designing/ Web Development | I am one of the Web Designer,we have a software company where we develop websites by using "Dot Net" technology and also we provide designs,So now we want to improve our website,So please provide me latest new technology related to Software/web designing/development.
As soon as possible please help me,that you know.
Thank You. | php | html | css | dot | net | 05/31/2012 10:56:13 | not constructive | Whats new in Web Designing/ Web Development
===
I am one of the Web Designer,we have a software company where we develop websites by using "Dot Net" technology and also we provide designs,So now we want to improve our website,So please provide me latest new technology related to Software/web designing/development.
As soon as possible please help me,that you know.
Thank You. | 4 |
4,863,405 | 02/01/2011 13:53:56 | 9,310 | 09/15/2008 18:22:13 | 130 | 4 | subprocess blocks Django view | I have a problem calling subprocess.Popen from a view:
The view that calls subprocess.Popen is not displayed until the subprocess finishes.
My question is: Is this a limitation of Django's development server or am I doing it wrong?
The server does not completely hangs, as other views can be processed in the meantime.
There are already [a few questions on that topic](http://stackoverflow.com/search?q=Django+subprocess) and Google gives [a few other threads](http://www.google.com/#q=django+runserver+subprocess), but I cannot find a clear answer to my question.
## How to reproduce
### Create test project & app:
> cd /tmp
> django-admin.py startproject django_test
> cd django_test
> ./manage.py startapp subprocess_test
### Replace urls.py & subprocess_test/views.py with:
* urls.py:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^hello$', 'subprocess_test.views.hello'),
(r'^start$', 'subprocess_test.views.start'),
)
* subprocess_test/views.py
from django.http import HttpResponse
import subprocess
def hello(request):
return HttpResponse('Hello world!')
def start(request):
subprocess.Popen(["/bin/sleep", "10"])
return HttpResponse('start done')
### Test it:
> ./manage.py runserver 0.0.0.0:8000
Go to http://127.0.0.1:8000/hello and http://127.0.0.1:8000/start
Notice that "start" takes 10s to load and that you can load "hello" during that time.
For example, I get such a log:
> [01/Feb/2011 07:20:57] "GET /hello HTTP/1.1" 200 12
> [01/Feb/2011 07:21:01] "GET /start HTTP/1.1" 200 10
> [01/Feb/2011 07:21:01] "GET /hello HTTP/1.1" 200 12
> [01/Feb/2011 07:21:02] "GET /hello HTTP/1.1" 200 12
Using wget:
> wget http://127.0.0.1:8000/start
> --2011-02-01 14:31:11-- http://127.0.0.1:8000/start
> Connecting to 127.0.0.1:8000... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
> Saving to: `start'
>
> [ <=> ] 10 --.-K/s in 9,5s
>
> 2011-02-01 14:31:21 (1,05 B/s) - « start » saved [10]
| python | django | subprocess | null | null | null | open | subprocess blocks Django view
===
I have a problem calling subprocess.Popen from a view:
The view that calls subprocess.Popen is not displayed until the subprocess finishes.
My question is: Is this a limitation of Django's development server or am I doing it wrong?
The server does not completely hangs, as other views can be processed in the meantime.
There are already [a few questions on that topic](http://stackoverflow.com/search?q=Django+subprocess) and Google gives [a few other threads](http://www.google.com/#q=django+runserver+subprocess), but I cannot find a clear answer to my question.
## How to reproduce
### Create test project & app:
> cd /tmp
> django-admin.py startproject django_test
> cd django_test
> ./manage.py startapp subprocess_test
### Replace urls.py & subprocess_test/views.py with:
* urls.py:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^hello$', 'subprocess_test.views.hello'),
(r'^start$', 'subprocess_test.views.start'),
)
* subprocess_test/views.py
from django.http import HttpResponse
import subprocess
def hello(request):
return HttpResponse('Hello world!')
def start(request):
subprocess.Popen(["/bin/sleep", "10"])
return HttpResponse('start done')
### Test it:
> ./manage.py runserver 0.0.0.0:8000
Go to http://127.0.0.1:8000/hello and http://127.0.0.1:8000/start
Notice that "start" takes 10s to load and that you can load "hello" during that time.
For example, I get such a log:
> [01/Feb/2011 07:20:57] "GET /hello HTTP/1.1" 200 12
> [01/Feb/2011 07:21:01] "GET /start HTTP/1.1" 200 10
> [01/Feb/2011 07:21:01] "GET /hello HTTP/1.1" 200 12
> [01/Feb/2011 07:21:02] "GET /hello HTTP/1.1" 200 12
Using wget:
> wget http://127.0.0.1:8000/start
> --2011-02-01 14:31:11-- http://127.0.0.1:8000/start
> Connecting to 127.0.0.1:8000... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
> Saving to: `start'
>
> [ <=> ] 10 --.-K/s in 9,5s
>
> 2011-02-01 14:31:21 (1,05 B/s) - « start » saved [10]
| 0 |
8,424,320 | 12/07/2011 23:45:19 | 722,294 | 04/24/2011 02:26:47 | 1,258 | 33 | Is a static member function of a function-scoped struct of a function template considered a dependent scope? | MSVC 9 and g++-4.5 disagree over the use of ```typename``` within ```nested::baz``` below. Which is correct?
template<typename T>
struct foo
{
typedef T type;
};
template<typename T>
typename foo<T>::type
bar(T x)
{
struct nested
{
inline static typename foo<T>::type baz(T x)
{
typename foo<T>::type result;
return result;
}
};
return nested::baz(x);
}
int main()
{
int x;
bar(x);
return 0;
}
MSVC's output:
$ cl test.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
test.cpp
test.cpp(15) : error C2899: typename cannot be used outside a template declaration
g++-4.5 issues no error, but if I remove the offending ```typename```, I receive an error message:
$ g++-4.5 test.cpp
test.cpp: In static member function 'static typename foo<T>::type bar(T)::nested::baz(T)':
test.cpp:15:7: error: need 'typename' before 'foo<T>::type' because 'foo<T>' is a dependent scope
test.cpp:15:20: error: expected ';' before 'result'
test.cpp:16:14: error: 'result' was not declared in this scope
test.cpp: In static member function 'static typename foo<T>::type bar(T)::nested::baz(T) [with T = int, typename foo<T>::type = int]':
test.cpp:20:23: instantiated from 'typename foo<T>::type bar(T) [with T = int, typename foo<T>::type = int]'
test.cpp:26:8: instantiated from here
test.cpp:15:7: error: dependent-name 'foo<T>::type' is parsed as a non-type, but instantiation yields a type
test.cpp:15:7: note: say 'typename foo<T>::type' if a type is meant
Which is correct in this instance? | c++ | null | null | null | null | null | open | Is a static member function of a function-scoped struct of a function template considered a dependent scope?
===
MSVC 9 and g++-4.5 disagree over the use of ```typename``` within ```nested::baz``` below. Which is correct?
template<typename T>
struct foo
{
typedef T type;
};
template<typename T>
typename foo<T>::type
bar(T x)
{
struct nested
{
inline static typename foo<T>::type baz(T x)
{
typename foo<T>::type result;
return result;
}
};
return nested::baz(x);
}
int main()
{
int x;
bar(x);
return 0;
}
MSVC's output:
$ cl test.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
test.cpp
test.cpp(15) : error C2899: typename cannot be used outside a template declaration
g++-4.5 issues no error, but if I remove the offending ```typename```, I receive an error message:
$ g++-4.5 test.cpp
test.cpp: In static member function 'static typename foo<T>::type bar(T)::nested::baz(T)':
test.cpp:15:7: error: need 'typename' before 'foo<T>::type' because 'foo<T>' is a dependent scope
test.cpp:15:20: error: expected ';' before 'result'
test.cpp:16:14: error: 'result' was not declared in this scope
test.cpp: In static member function 'static typename foo<T>::type bar(T)::nested::baz(T) [with T = int, typename foo<T>::type = int]':
test.cpp:20:23: instantiated from 'typename foo<T>::type bar(T) [with T = int, typename foo<T>::type = int]'
test.cpp:26:8: instantiated from here
test.cpp:15:7: error: dependent-name 'foo<T>::type' is parsed as a non-type, but instantiation yields a type
test.cpp:15:7: note: say 'typename foo<T>::type' if a type is meant
Which is correct in this instance? | 0 |
9,553,702 | 03/04/2012 09:12:42 | 668,338 | 03/20/2011 15:44:52 | 1 | 1 | Need to permanently start IE9 inprivate mode on win7 64biz | I already found out that the following registry key will (normally) permanently start IE9 inprivate mode
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Safety\PrivacIE]
"FilteringMode"=hex(b):01,00,00,00,00,00,00,00
(I even did not had Safety Key in my registry before and added it manually)
Unfortunately this seems not to work on windows7 64bit
Adding a shortcut with -inprivate is not an option for me as I wanna use IE9 via VBA
Any tips / advice?
| windows | vba | windows-7 | internet-explorer-9 | null | null | open | Need to permanently start IE9 inprivate mode on win7 64biz
===
I already found out that the following registry key will (normally) permanently start IE9 inprivate mode
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Safety\PrivacIE]
"FilteringMode"=hex(b):01,00,00,00,00,00,00,00
(I even did not had Safety Key in my registry before and added it manually)
Unfortunately this seems not to work on windows7 64bit
Adding a shortcut with -inprivate is not an option for me as I wanna use IE9 via VBA
Any tips / advice?
| 0 |
9,616,344 | 03/08/2012 10:41:30 | 1,198,882 | 02/09/2012 05:32:28 | 60 | 5 | Printing Image in Receipts Printer Using C | I have Hengstler C56 Thermal Receipt printer. I have been trying for a long time to print a logo with the printer. but I am not able to figure out How its failing. The Image I am trying to print is of *.bmp type and 50x50.the printer api is written in C. and printer accepts unsigned char byte array as a write buffer. any ideas to get this done.
Thanks in advance...
| c++ | python | c | printing | thermal-printer | 03/08/2012 12:16:19 | not a real question | Printing Image in Receipts Printer Using C
===
I have Hengstler C56 Thermal Receipt printer. I have been trying for a long time to print a logo with the printer. but I am not able to figure out How its failing. The Image I am trying to print is of *.bmp type and 50x50.the printer api is written in C. and printer accepts unsigned char byte array as a write buffer. any ideas to get this done.
Thanks in advance...
| 1 |
3,569,500 | 08/25/2010 19:26:50 | 86,857 | 04/03/2009 18:40:51 | 325 | 1 | Can you optionally serialize a class property through JAXB? | Is it possible to optionally serialize the properties of a class via JAX-B using using some dynamic flag?
e.g. Suppose I Have
@XmlRootElement
public class TodoItem {
private int id;
private String title;
private String note;
// getters, setters
}
and the following web service operatios:
public TodoItem getTodoItemFull(int id) { .... }
public TodoItem getTodoItemMinimal(int id) { .... }
Is there a special annotation I can use so that I can decide at runtime whether property "note" will be serialized? In other words, the getTodoItemFull() method will return the fully serialized class, while the getTodoItemMinimal() method will return that serialized class without the "note" xml element?
Thanks,!
| java | xml | serialization | jaxb | jax-ws | null | open | Can you optionally serialize a class property through JAXB?
===
Is it possible to optionally serialize the properties of a class via JAX-B using using some dynamic flag?
e.g. Suppose I Have
@XmlRootElement
public class TodoItem {
private int id;
private String title;
private String note;
// getters, setters
}
and the following web service operatios:
public TodoItem getTodoItemFull(int id) { .... }
public TodoItem getTodoItemMinimal(int id) { .... }
Is there a special annotation I can use so that I can decide at runtime whether property "note" will be serialized? In other words, the getTodoItemFull() method will return the fully serialized class, while the getTodoItemMinimal() method will return that serialized class without the "note" xml element?
Thanks,!
| 0 |
9,743,627 | 03/16/2012 19:50:00 | 1,274,835 | 03/16/2012 19:44:39 | 1 | 0 | Image sizes (in pixels) for New iPad screen elements | Anyone know the size of screen elements for the New iPad? I'd like to size my images properly to account for Status Bar and/or Navigation Bar, so they don't have to be cropped or compressed when displayed. I know the native screen resolution is widely posted, but I haven't found a reference to these other elements. I'd appreciate the measurement in pixels since I'll be using Photoshop to edit. Thanks!
-Dan | the-new-ipad | null | null | null | null | 03/17/2012 23:49:28 | off topic | Image sizes (in pixels) for New iPad screen elements
===
Anyone know the size of screen elements for the New iPad? I'd like to size my images properly to account for Status Bar and/or Navigation Bar, so they don't have to be cropped or compressed when displayed. I know the native screen resolution is widely posted, but I haven't found a reference to these other elements. I'd appreciate the measurement in pixels since I'll be using Photoshop to edit. Thanks!
-Dan | 2 |
9,596,046 | 03/07/2012 04:55:29 | 1,113,429 | 12/23/2011 12:43:26 | 8 | 0 | how to use sameas property in XML | I am trying to build an application that uses XML Schema to map a keyword with their URIs in XML file. I want to store keyword and their URIs in a fashion so that more than two keywords can be mapped to a set of URIs.
For Ex. - Keyword "is a" is used to map with URI set U and keywords "type" and "a kind of" are using same set of URIs U for mapping. Now I am little confuse about, how to write XML schema for this kind of data where more than one identity(it is a keyword in text format) used to represent set of elements(URI set). If i use different attributes for every keyword then the modification in one(keyword's URI set U) will not be reflected in other(keyword's URI set U which are same as previous). I think the same-as kind of property will help in this case, but i am unaware of use of this property. Can anybody resolve my query. Sorry for the question if it become vague to you. | xml | xml-schema | xml-parsing | null | null | null | open | how to use sameas property in XML
===
I am trying to build an application that uses XML Schema to map a keyword with their URIs in XML file. I want to store keyword and their URIs in a fashion so that more than two keywords can be mapped to a set of URIs.
For Ex. - Keyword "is a" is used to map with URI set U and keywords "type" and "a kind of" are using same set of URIs U for mapping. Now I am little confuse about, how to write XML schema for this kind of data where more than one identity(it is a keyword in text format) used to represent set of elements(URI set). If i use different attributes for every keyword then the modification in one(keyword's URI set U) will not be reflected in other(keyword's URI set U which are same as previous). I think the same-as kind of property will help in this case, but i am unaware of use of this property. Can anybody resolve my query. Sorry for the question if it become vague to you. | 0 |
11,574,048 | 07/20/2012 06:37:29 | 798,843 | 06/15/2011 03:10:04 | 133 | 3 | Exclude Nexus 7 from supported devices | I have an application that currently does not support Nexus 7 very well. So I would like to exclude it from my supported device list. But I do want to make my app available to Galaxy Nexus. But how can I do that? I think both are large display size and hdpi density if I am not mistaken. So how can I filter out Nexus 7 but keep Galaxy Nexus. Any ideas? Thanks! | android | filter | display | nexus | galaxy | 07/22/2012 02:56:13 | off topic | Exclude Nexus 7 from supported devices
===
I have an application that currently does not support Nexus 7 very well. So I would like to exclude it from my supported device list. But I do want to make my app available to Galaxy Nexus. But how can I do that? I think both are large display size and hdpi density if I am not mistaken. So how can I filter out Nexus 7 but keep Galaxy Nexus. Any ideas? Thanks! | 2 |
10,149,599 | 04/13/2012 23:32:52 | 1,332,604 | 04/13/2012 22:49:34 | 1 | 0 | UART and FSK implementation of C8051F996 | I am trying to send a UART signal but FSK encoded. I have the UART working, with baud rate 290. I am sending on P0.7TX. When hooked up to a computer, I get the expected results. However, I would like to generate FSK signals of this UART to send via audio and decode there. For now, I am only focused on sending data.
I have created two functions based on PCA to create zero and one frequencies. Roughly about 1.2kHz and 2.4kHz. I have also figured out that the "loopOne" and "loopZero" have to be done inside an interrupt, otherwise the MCU calls loopOne and loopZero sequentially back to back distorting the wave.
So, my problem is that I cannot figure out how to get the UART's output through an interrupt line, to both call the interrupt, and then have the interrupt call the functions depending on if the TX is low or high.
I can do it with two external interrupts: One for when output is low, and one for when output is high, but I need one of the interrupts for another purpose, so I need to concatenate and use the same interrupt or a separate interrupt and it needs to distinguish between which function to call.
I am working with Silicon Laboratories IDE in c code. The MCU is an SiLabs C8051F996. | frequency | shift | interrupts | 8051 | uart | null | open | UART and FSK implementation of C8051F996
===
I am trying to send a UART signal but FSK encoded. I have the UART working, with baud rate 290. I am sending on P0.7TX. When hooked up to a computer, I get the expected results. However, I would like to generate FSK signals of this UART to send via audio and decode there. For now, I am only focused on sending data.
I have created two functions based on PCA to create zero and one frequencies. Roughly about 1.2kHz and 2.4kHz. I have also figured out that the "loopOne" and "loopZero" have to be done inside an interrupt, otherwise the MCU calls loopOne and loopZero sequentially back to back distorting the wave.
So, my problem is that I cannot figure out how to get the UART's output through an interrupt line, to both call the interrupt, and then have the interrupt call the functions depending on if the TX is low or high.
I can do it with two external interrupts: One for when output is low, and one for when output is high, but I need one of the interrupts for another purpose, so I need to concatenate and use the same interrupt or a separate interrupt and it needs to distinguish between which function to call.
I am working with Silicon Laboratories IDE in c code. The MCU is an SiLabs C8051F996. | 0 |
4,175,826 | 11/14/2010 02:02:36 | 220,935 | 11/29/2009 18:18:37 | 295 | 77 | Redraw issue objective-c | This is my problem:
![Problem][1]
[1]: http://i.stack.imgur.com/zJ49M.png
The background of the progress indicator doesn't appear to be redrawing, and it's certainely not transparent. I'm using core animation to animate the image in the background; when I don't use core animation it looks fine. This is the code I am using:
[[NSAnimationContext currentContext] setDuration:0.25];
[[ViewImage animator] setAlphaValue:0.5f ];
[[statusText animator] setAlphaValue:0.1f ];
[progressIndicator usesThreadedAnimation ];
The progress indicator doesn't use core animation. I have also tried removing `[progressIndicator usesThreadedAnimation];` which doesn't help.
| objective-c | cocoa | null | null | null | null | open | Redraw issue objective-c
===
This is my problem:
![Problem][1]
[1]: http://i.stack.imgur.com/zJ49M.png
The background of the progress indicator doesn't appear to be redrawing, and it's certainely not transparent. I'm using core animation to animate the image in the background; when I don't use core animation it looks fine. This is the code I am using:
[[NSAnimationContext currentContext] setDuration:0.25];
[[ViewImage animator] setAlphaValue:0.5f ];
[[statusText animator] setAlphaValue:0.1f ];
[progressIndicator usesThreadedAnimation ];
The progress indicator doesn't use core animation. I have also tried removing `[progressIndicator usesThreadedAnimation];` which doesn't help.
| 0 |
3,754,208 | 09/20/2010 18:15:54 | 17,980 | 09/18/2008 17:18:39 | 123 | 4 | How to become an expert in WPF? | Yes, indeed. To anybody who's sole goal is to become an expert in WPF (or you already are) what would you recommend doing to achieve this goal?
- What books would you recommend going through?
- What topics to cover in detail?
- What achievements to make to become an expert?
- Would you recommend to become an expert in other areas as well (.net BCL, Silverlight, Direct 2D)?
- Should this person develop communication skills as well?
- Do you think that such a person like "WPF expert" can even exist?
Thank you! | .net | wpf | null | null | null | 09/20/2010 19:20:00 | not a real question | How to become an expert in WPF?
===
Yes, indeed. To anybody who's sole goal is to become an expert in WPF (or you already are) what would you recommend doing to achieve this goal?
- What books would you recommend going through?
- What topics to cover in detail?
- What achievements to make to become an expert?
- Would you recommend to become an expert in other areas as well (.net BCL, Silverlight, Direct 2D)?
- Should this person develop communication skills as well?
- Do you think that such a person like "WPF expert" can even exist?
Thank you! | 1 |
6,815,230 | 07/25/2011 11:17:32 | 361,247 | 06/08/2010 10:30:35 | 488 | 46 | How to preview a coldfusion page in Eclipse? | I have cf installed in ~/Sites and my Eclipse projects are stored into ~/Documents/workspace
How do I preview a page that I've written in Eclipse (I'm using CFEclipse plugin)? | eclipse-plugin | coldfusion-9 | cfeclipse | null | null | null | open | How to preview a coldfusion page in Eclipse?
===
I have cf installed in ~/Sites and my Eclipse projects are stored into ~/Documents/workspace
How do I preview a page that I've written in Eclipse (I'm using CFEclipse plugin)? | 0 |
8,965,152 | 01/22/2012 22:05:18 | 1,040,425 | 11/10/2011 19:17:32 | 1 | 0 | can we use jquery ui with twitter-bootstrap? | can we use jquery ui with twitter-bootstrap ?
or it will lead to css conflicts
[jquery][1]
[twitter-bootstrap][2]
[1]: http://twitter.github.com/bootstrap/#
[2]: http://jqueryui.com/ | jquery | twitter-bootstrap | null | null | null | 01/24/2012 13:33:21 | not a real question | can we use jquery ui with twitter-bootstrap?
===
can we use jquery ui with twitter-bootstrap ?
or it will lead to css conflicts
[jquery][1]
[twitter-bootstrap][2]
[1]: http://twitter.github.com/bootstrap/#
[2]: http://jqueryui.com/ | 1 |
7,239,565 | 08/30/2011 06:43:27 | 919,120 | 08/30/2011 06:43:27 | 1 | 0 | Page of person account on own website | I have created page in my account and I want to use that page in my own website.
So how can I implement that?
Please help us we need this very urgent.
Thanks in advance. | api | facebook-like | null | null | null | 08/30/2011 07:18:14 | not a real question | Page of person account on own website
===
I have created page in my account and I want to use that page in my own website.
So how can I implement that?
Please help us we need this very urgent.
Thanks in advance. | 1 |
3,480,223 | 08/13/2010 19:47:47 | 419,955 | 08/13/2010 19:47:47 | 1 | 0 | INVENTORY CONTROL IN COMPUTER SCIENCE | How can inventory be connected to Computer Science and how can it be controlled. | projects-and-solutions | null | null | null | null | 08/13/2010 19:59:46 | not a real question | INVENTORY CONTROL IN COMPUTER SCIENCE
===
How can inventory be connected to Computer Science and how can it be controlled. | 1 |
458,303 | 01/19/2009 16:55:07 | 29,860 | 10/21/2008 05:44:13 | 41 | 1 | Lightweight Anti Virus | I have Windows XP installed on an older system. Any suggestions for a free, lightweight anti virus program?
| antivirus | null | null | null | null | 01/19/2009 17:02:09 | off topic | Lightweight Anti Virus
===
I have Windows XP installed on an older system. Any suggestions for a free, lightweight anti virus program?
| 2 |
6,098,783 | 05/23/2011 14:42:35 | 765,582 | 05/23/2011 07:22:48 | 1 | 0 | android programming | M preparing a game on android,consisting of 6 game levels which have over ridden ,and overloaded methods in it....
till Gamelevel3 everything was fine,but in gamelevel4 m using the same methods which i have used before in gamelevel 1,2 & 3,but its giving an error that i cant use the same methods name ,defined earlier in my gamelevels.
The weird thing is in gamelevel 5 again m using the same methods n redefining them as per my requirements and there its all right, no issues with the method names...
I dont understand this weird behaviour...
M using Eclipse helios...
Help.. | android | null | null | null | null | 05/23/2011 14:47:26 | not a real question | android programming
===
M preparing a game on android,consisting of 6 game levels which have over ridden ,and overloaded methods in it....
till Gamelevel3 everything was fine,but in gamelevel4 m using the same methods which i have used before in gamelevel 1,2 & 3,but its giving an error that i cant use the same methods name ,defined earlier in my gamelevels.
The weird thing is in gamelevel 5 again m using the same methods n redefining them as per my requirements and there its all right, no issues with the method names...
I dont understand this weird behaviour...
M using Eclipse helios...
Help.. | 1 |
9,146,007 | 02/05/2012 00:52:35 | 1,053,081 | 11/18/2011 04:01:46 | 1 | 0 | RewriteCond: bad flag delimiter - .htaccess failing to password protect my directory | So I'm trying to password protect my directory, /admin/ but something is conflicting with it in my primary public_html `.htaccess` file. When I try to access the `protected directory`, it just loads and times out, or gives me an inaccessible file error.
I have my primary .htaccess file set up to redirect users who go to mydomain.com/theirusername to mydomain.com/profile/user.php?name=theirusername. This rewrite rule seems to be the problem, because when I comment it out the password protected directory works fine.
I have also discovered this error in my Apache error logs: "RewriteCond: bad flag delimiter"
Here is the code in my `.htaccess` file:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^fireviews.com [NC]
RewriteRule ^(.*)$ http://www.fireviews.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#added this one line to try to fix the problem, to no avail:
RewriteCond %{REQUEST_URI} !/admin/?
RewriteRule .+ profile/user.php?name=$0 [L]
Options All -Indexes
#to prevent unauthorized people from accessing .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
| .htaccess | mod-rewrite | passwords | rewrite | null | 02/05/2012 03:14:20 | off topic | RewriteCond: bad flag delimiter - .htaccess failing to password protect my directory
===
So I'm trying to password protect my directory, /admin/ but something is conflicting with it in my primary public_html `.htaccess` file. When I try to access the `protected directory`, it just loads and times out, or gives me an inaccessible file error.
I have my primary .htaccess file set up to redirect users who go to mydomain.com/theirusername to mydomain.com/profile/user.php?name=theirusername. This rewrite rule seems to be the problem, because when I comment it out the password protected directory works fine.
I have also discovered this error in my Apache error logs: "RewriteCond: bad flag delimiter"
Here is the code in my `.htaccess` file:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^fireviews.com [NC]
RewriteRule ^(.*)$ http://www.fireviews.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#added this one line to try to fix the problem, to no avail:
RewriteCond %{REQUEST_URI} !/admin/?
RewriteRule .+ profile/user.php?name=$0 [L]
Options All -Indexes
#to prevent unauthorized people from accessing .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
| 2 |
1,547,179 | 10/10/2009 06:00:09 | 3,957 | 09/01/2008 02:50:44 | 4,718 | 158 | How to use AverageTimer32 and AverageBase performance counters with System.Diagnostics.Stopwatch? | When I execute the following program and look at the performance counter the results don't make sense to me. The average value is zero and the min/max values are ~0.4 when I would expect ~0.1 or ~100.
What is my problem?
**Code**
class Program
{
const string CategoryName = "____Test Category";
const string CounterName = "Average Operation Time";
const string BaseCounterName = "Average Operation Time Base";
static void Main(string[] args)
{
if (PerformanceCounterCategory.Exists(CategoryName))
PerformanceCounterCategory.Delete(CategoryName);
var counterDataCollection = new CounterCreationDataCollection();
var avgOpTimeCounter = new CounterCreationData()
{
CounterName = CounterName,
CounterHelp = "Average Operation Time Help",
CounterType = PerformanceCounterType.AverageTimer32
};
counterDataCollection.Add(avgOpTimeCounter);
var avgOpTimeBaseCounter = new CounterCreationData()
{
CounterName = BaseCounterName,
CounterHelp = "Average Operation Time Base Help",
CounterType = PerformanceCounterType.AverageBase
};
counterDataCollection.Add(avgOpTimeBaseCounter);
PerformanceCounterCategory.Create(CategoryName, "Test Perf Counters", PerformanceCounterCategoryType.SingleInstance, counterDataCollection);
var counter = new PerformanceCounter(CategoryName, CounterName, false);
var baseCounter = new PerformanceCounter(CategoryName, BaseCounterName, false);
for (int i = 0; i < 500; i++)
{
var sw = Stopwatch.StartNew();
Thread.Sleep(100);
sw.Stop();
Console.WriteLine(string.Format("t({0}) ms({1})", sw.Elapsed.Ticks, sw.Elapsed.TotalMilliseconds));
counter.IncrementBy(sw.Elapsed.Ticks);
baseCounter.Increment();
}
Console.Read();
}
}
**Performance Counter Screenshot**
![Performance Counter Screenshot][1]
[1]: http://friendfeed-media.com/50028bb6a0016931a3af5122774b56f93741bb5c | c# | .net | performancecounter | null | null | null | open | How to use AverageTimer32 and AverageBase performance counters with System.Diagnostics.Stopwatch?
===
When I execute the following program and look at the performance counter the results don't make sense to me. The average value is zero and the min/max values are ~0.4 when I would expect ~0.1 or ~100.
What is my problem?
**Code**
class Program
{
const string CategoryName = "____Test Category";
const string CounterName = "Average Operation Time";
const string BaseCounterName = "Average Operation Time Base";
static void Main(string[] args)
{
if (PerformanceCounterCategory.Exists(CategoryName))
PerformanceCounterCategory.Delete(CategoryName);
var counterDataCollection = new CounterCreationDataCollection();
var avgOpTimeCounter = new CounterCreationData()
{
CounterName = CounterName,
CounterHelp = "Average Operation Time Help",
CounterType = PerformanceCounterType.AverageTimer32
};
counterDataCollection.Add(avgOpTimeCounter);
var avgOpTimeBaseCounter = new CounterCreationData()
{
CounterName = BaseCounterName,
CounterHelp = "Average Operation Time Base Help",
CounterType = PerformanceCounterType.AverageBase
};
counterDataCollection.Add(avgOpTimeBaseCounter);
PerformanceCounterCategory.Create(CategoryName, "Test Perf Counters", PerformanceCounterCategoryType.SingleInstance, counterDataCollection);
var counter = new PerformanceCounter(CategoryName, CounterName, false);
var baseCounter = new PerformanceCounter(CategoryName, BaseCounterName, false);
for (int i = 0; i < 500; i++)
{
var sw = Stopwatch.StartNew();
Thread.Sleep(100);
sw.Stop();
Console.WriteLine(string.Format("t({0}) ms({1})", sw.Elapsed.Ticks, sw.Elapsed.TotalMilliseconds));
counter.IncrementBy(sw.Elapsed.Ticks);
baseCounter.Increment();
}
Console.Read();
}
}
**Performance Counter Screenshot**
![Performance Counter Screenshot][1]
[1]: http://friendfeed-media.com/50028bb6a0016931a3af5122774b56f93741bb5c | 0 |
1,601,220 | 10/21/2009 14:32:02 | 193,863 | 10/21/2009 14:32:02 | 1 | 0 | Vim omnicompletion for Java | I've read heaps of blogs on Vim's supposedly great omnicompletion, and yet no matter what I do I can't get it to work satisfactorily. It took me ages to figure discover that the version of ctags that is preinstalled on my system was the emacs one, and didn't have the --recurse option, but now that I've run ctags-exuberant on my copy of the OpenJDK sources to attempt to get some kind of code completion going, Vim hangs whenever I try to invoke it with <C-n> or <C-p>.
All I really want is something that works like the code completion in Eclipse; I like Vim as an editor, but Eclipse just has those extra features out-of-the-box which Vim seems to fail with. Eclipse with a vi-mode plugin wasn't particularly useful to me, and it is too much of a memory and CPU hog to be of any use; eclim doesn't quite like me either.
Can anyone suggest a simpler way to get some kind of code completion working in Vim that actually works? | vim | java | omnicomplete | autocomplete | null | null | open | Vim omnicompletion for Java
===
I've read heaps of blogs on Vim's supposedly great omnicompletion, and yet no matter what I do I can't get it to work satisfactorily. It took me ages to figure discover that the version of ctags that is preinstalled on my system was the emacs one, and didn't have the --recurse option, but now that I've run ctags-exuberant on my copy of the OpenJDK sources to attempt to get some kind of code completion going, Vim hangs whenever I try to invoke it with <C-n> or <C-p>.
All I really want is something that works like the code completion in Eclipse; I like Vim as an editor, but Eclipse just has those extra features out-of-the-box which Vim seems to fail with. Eclipse with a vi-mode plugin wasn't particularly useful to me, and it is too much of a memory and CPU hog to be of any use; eclim doesn't quite like me either.
Can anyone suggest a simpler way to get some kind of code completion working in Vim that actually works? | 0 |
1,089,101 | 07/06/2009 20:36:54 | 96,175 | 04/26/2009 10:40:29 | 206 | 13 | Associate scheme (eg. cms://) to a Windows program | Is there a way to associate a scheme, like cms:// to a Windows program?
So when an user types cms://user:[email protected], it opens the program and can automatically connect using the given credentials. | windows | credentials | null | null | null | null | open | Associate scheme (eg. cms://) to a Windows program
===
Is there a way to associate a scheme, like cms:// to a Windows program?
So when an user types cms://user:[email protected], it opens the program and can automatically connect using the given credentials. | 0 |
11,141,183 | 06/21/2012 15:10:30 | 789,555 | 06/08/2011 16:23:43 | 14 | 1 | Unique Integer ID for a non primary key field for Entities in Google App Engine | I have an Entity type say URLInfo which keeps info about URLs. The primary key of this entity is URL itself ( that makes sure that I always have unique URLs in the datastore). I also want unique integer id for each url so that sharing the id becomes easier. Though, I can use GUIDs, but that is not a preferred thing for me. How can I achieve this requirement? Integer Ids need not be sequential ( preferred, if they are). Entities can be generated at a faster rate (that means I can't keep a common counter to update each time I generate a new URL record). This is what I have tried so far - In the URLInfo class, I defined a field - Long Id and annotate it with @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) in the hope that it will get automatically generated with the unique value. But when I save the new entity (with id set as null), it saves the entity in the datastore but doesn't assign any value to this field.
I am trying all this on a local machine.
Thanks
| google-app-engine | unique | null | null | null | null | open | Unique Integer ID for a non primary key field for Entities in Google App Engine
===
I have an Entity type say URLInfo which keeps info about URLs. The primary key of this entity is URL itself ( that makes sure that I always have unique URLs in the datastore). I also want unique integer id for each url so that sharing the id becomes easier. Though, I can use GUIDs, but that is not a preferred thing for me. How can I achieve this requirement? Integer Ids need not be sequential ( preferred, if they are). Entities can be generated at a faster rate (that means I can't keep a common counter to update each time I generate a new URL record). This is what I have tried so far - In the URLInfo class, I defined a field - Long Id and annotate it with @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) in the hope that it will get automatically generated with the unique value. But when I save the new entity (with id set as null), it saves the entity in the datastore but doesn't assign any value to this field.
I am trying all this on a local machine.
Thanks
| 0 |
5,745,858 | 04/21/2011 14:57:56 | 639,914 | 03/01/2011 18:49:58 | 24 | 0 | help creating a complicated stored procedure | So I am not even sure if this is possible but it really would be awesome to learn and to be able to do this.
What I am trying to do is run 3 seperate queries that return a single row of data and create a single table that can then be used in a gridview in asp.net
query 1
SELECT dbo.BOOKINGS.USERID, SUM(dbo.BOOKINGS.APRICE) AS total, COUNT
(dbo.BOOKINGS.USERID) AS bookingcount
FROM dbo.BOOKINGS INNER JOIN
dbo.TOURS ON dbo.BOOKINGS.TOUR = dbo.TOURS.TOUR INNER JOIN
dbo.MAJOR ON dbo.TOURS.MAJOR = dbo.MAJOR.MAJOR
WHERE (dbo.BOOKINGS.BOOKED BETWEEN CONVERT(int, @startdate) AND CONVERT(int,
@enddate)) AND (dbo.MAJOR.SDESCR = 'Cruises') AND
(dbo.BOOKINGS.USERID = @USER) AND (dbo.MAJOR.DIVISION = 'A')
GROUP BY dbo.BOOKINGS.USERID
query 2
SELECT dbo.BOOKINGS.USERID, SUM(dbo.BOOKINGS.APRICE) AS total, COUNT
(dbo.BOOKINGS.USERID) AS bookingcount
FROM dbo.BOOKINGS INNER JOIN
dbo.TOURS ON dbo.BOOKINGS.TOUR = dbo.TOURS.TOUR INNER JOIN
dbo.MAJOR ON dbo.TOURS.MAJOR = dbo.MAJOR.MAJOR
WHERE (dbo.BOOKINGS.BOOKED BETWEEN CONVERT(int, @startdate) AND CONVERT(int,
@enddate)) AND (dbo.MAJOR.SDESCR <> 'Cruises') AND
(dbo.BOOKINGS.USERID = @USER) AND (dbo.MAJOR.DIVISION = 'A')
GROUP BY dbo.BOOKINGS.USERID
query 3
SELECT SUM(dbo.SUBS.AMOUNT) AS total, COUNT(dbo.SUBS.AMOUNT) AS Memberships,
dbo.HOMES.USERID
FROM dbo.HOMES INNER JOIN
dbo.SUBS ON dbo.HOMES.HOME = dbo.SUBS.HOME AND dbo.HOMES.JOINED
= dbo.SUBS.PAIDON
WHERE (dbo.HOMES.JOINED BETWEEN CONVERT(int, @startdate) AND CONVERT(int,
@enddate)) AND (dbo.HOMES.USERID =
@USER)
GROUP BY dbo.HOMES.USERID
all thre queries return a single row with 3 columns
so i figure this could work the only other difficult part is i want to add a new column
query1 userid total1 bookingcount
query2 userid total2 bookingcount
query3 userid total3 memberships
| sql | sql-server-2005 | stored-procedures | null | null | null | open | help creating a complicated stored procedure
===
So I am not even sure if this is possible but it really would be awesome to learn and to be able to do this.
What I am trying to do is run 3 seperate queries that return a single row of data and create a single table that can then be used in a gridview in asp.net
query 1
SELECT dbo.BOOKINGS.USERID, SUM(dbo.BOOKINGS.APRICE) AS total, COUNT
(dbo.BOOKINGS.USERID) AS bookingcount
FROM dbo.BOOKINGS INNER JOIN
dbo.TOURS ON dbo.BOOKINGS.TOUR = dbo.TOURS.TOUR INNER JOIN
dbo.MAJOR ON dbo.TOURS.MAJOR = dbo.MAJOR.MAJOR
WHERE (dbo.BOOKINGS.BOOKED BETWEEN CONVERT(int, @startdate) AND CONVERT(int,
@enddate)) AND (dbo.MAJOR.SDESCR = 'Cruises') AND
(dbo.BOOKINGS.USERID = @USER) AND (dbo.MAJOR.DIVISION = 'A')
GROUP BY dbo.BOOKINGS.USERID
query 2
SELECT dbo.BOOKINGS.USERID, SUM(dbo.BOOKINGS.APRICE) AS total, COUNT
(dbo.BOOKINGS.USERID) AS bookingcount
FROM dbo.BOOKINGS INNER JOIN
dbo.TOURS ON dbo.BOOKINGS.TOUR = dbo.TOURS.TOUR INNER JOIN
dbo.MAJOR ON dbo.TOURS.MAJOR = dbo.MAJOR.MAJOR
WHERE (dbo.BOOKINGS.BOOKED BETWEEN CONVERT(int, @startdate) AND CONVERT(int,
@enddate)) AND (dbo.MAJOR.SDESCR <> 'Cruises') AND
(dbo.BOOKINGS.USERID = @USER) AND (dbo.MAJOR.DIVISION = 'A')
GROUP BY dbo.BOOKINGS.USERID
query 3
SELECT SUM(dbo.SUBS.AMOUNT) AS total, COUNT(dbo.SUBS.AMOUNT) AS Memberships,
dbo.HOMES.USERID
FROM dbo.HOMES INNER JOIN
dbo.SUBS ON dbo.HOMES.HOME = dbo.SUBS.HOME AND dbo.HOMES.JOINED
= dbo.SUBS.PAIDON
WHERE (dbo.HOMES.JOINED BETWEEN CONVERT(int, @startdate) AND CONVERT(int,
@enddate)) AND (dbo.HOMES.USERID =
@USER)
GROUP BY dbo.HOMES.USERID
all thre queries return a single row with 3 columns
so i figure this could work the only other difficult part is i want to add a new column
query1 userid total1 bookingcount
query2 userid total2 bookingcount
query3 userid total3 memberships
| 0 |
5,762,330 | 04/23/2011 05:11:58 | 536,116 | 12/09/2010 08:20:58 | 197 | 4 | Magento hosting | where can I host my Magento website without problems, with a good price :)
Thanks. | magento | null | null | null | null | 04/23/2011 07:25:20 | off topic | Magento hosting
===
where can I host my Magento website without problems, with a good price :)
Thanks. | 2 |
5,379,767 | 03/21/2011 15:23:37 | 526,712 | 12/01/2010 14:51:30 | 13 | 1 | Can you see a list of applications a company in the app store on the iphone? | Can you see a list of applications a company in the app store on the iphone? | iphone | null | null | null | null | 03/21/2011 16:20:08 | off topic | Can you see a list of applications a company in the app store on the iphone?
===
Can you see a list of applications a company in the app store on the iphone? | 2 |
10,162,072 | 04/15/2012 12:38:17 | 966,709 | 09/27/2011 09:36:20 | 46 | 1 | What is the basic difference between the 2 approaches to exception handling | I am trying to get when we should use which approach to handle exception.
When we should use try catch block and when we should use throws clause in method.
Below is my understanding.
If I am going to create library for user who will use that library and use provided method by that library in programming then I will declare all exceptions in throws clause in method and user should use try catch for catching exceptions like IOException.
Please share your opinion. | java | exception-handling | null | null | null | 04/15/2012 12:57:27 | not constructive | What is the basic difference between the 2 approaches to exception handling
===
I am trying to get when we should use which approach to handle exception.
When we should use try catch block and when we should use throws clause in method.
Below is my understanding.
If I am going to create library for user who will use that library and use provided method by that library in programming then I will declare all exceptions in throws clause in method and user should use try catch for catching exceptions like IOException.
Please share your opinion. | 4 |
7,399,016 | 09/13/2011 08:40:44 | 939,902 | 09/12/2011 05:08:08 | 1 | 0 | HTML5: Where to start? | I wanted to learn and start serious commercial working on HTML5. But I am not getting where to start with. Can somebody give links that can serve as the starting point for starting serious use and development of HTML5? | html5 | null | null | null | null | 01/16/2012 15:32:12 | not constructive | HTML5: Where to start?
===
I wanted to learn and start serious commercial working on HTML5. But I am not getting where to start with. Can somebody give links that can serve as the starting point for starting serious use and development of HTML5? | 4 |
5,025,235 | 02/17/2011 05:02:38 | 200,349 | 11/01/2009 00:58:11 | 336 | 33 | Which are new features added into sqlserver 2008 over 2005? | Main idea to put these question is get exact features of sqlserver 2008 and how can i use it in my project.
So, please help to understand or explain me about sql server 2008. | asp.net | sql-server-2005 | ssms | null | null | 02/17/2011 14:54:53 | off topic | Which are new features added into sqlserver 2008 over 2005?
===
Main idea to put these question is get exact features of sqlserver 2008 and how can i use it in my project.
So, please help to understand or explain me about sql server 2008. | 2 |
11,581,727 | 07/20/2012 14:51:11 | 193,882 | 10/21/2009 14:59:40 | 83 | 3 | OutlookDD with Adobe Air Native Extension? | Is it possible to develope something like javaoutlookdd (http://sourceforge.net/projects/javaoutlookdd/) for air with adobe air native extension? Or are there restrictions?
regards
Cyrill
| flex | air | adobe | air-native-extension | null | 07/24/2012 02:35:21 | not a real question | OutlookDD with Adobe Air Native Extension?
===
Is it possible to develope something like javaoutlookdd (http://sourceforge.net/projects/javaoutlookdd/) for air with adobe air native extension? Or are there restrictions?
regards
Cyrill
| 1 |
11,588,402 | 07/21/2012 00:07:09 | 391,648 | 07/14/2010 13:56:48 | 163 | 1 | parse string with java | I have a question to make.
I 'm calling a web service and the returned result is the following:
anyType{x=4;y=5;z=acq}
how would you get the values of x, y and z?
thanks in advance | java | string | parsing | null | null | null | open | parse string with java
===
I have a question to make.
I 'm calling a web service and the returned result is the following:
anyType{x=4;y=5;z=acq}
how would you get the values of x, y and z?
thanks in advance | 0 |
5,537,336 | 04/04/2011 10:41:10 | 690,933 | 04/04/2011 10:41:10 | 1 | 0 | Estimating the rate of convergence, finite difference scheme | I'm trying to estimate the rate of convergence of a sequence.
background:
u^n+1 = G u_n, where G is a iteration matrix (coming from heat equation).
Fixing dx = 0.1, and setting dt = dx*dx/2.0 to satisfy the a stability constraint
I then do a number of iterations up to time T = 0.1, and calculate the error (analytical solution is known) using max-norm.
This gives me a sequence of global errors, which from the theory should be of the form O(dt) + O(dx^2).
Now, I want to confirm that we have O(dt).
How should I do this?
| math | null | null | null | null | 04/06/2011 10:07:41 | off topic | Estimating the rate of convergence, finite difference scheme
===
I'm trying to estimate the rate of convergence of a sequence.
background:
u^n+1 = G u_n, where G is a iteration matrix (coming from heat equation).
Fixing dx = 0.1, and setting dt = dx*dx/2.0 to satisfy the a stability constraint
I then do a number of iterations up to time T = 0.1, and calculate the error (analytical solution is known) using max-norm.
This gives me a sequence of global errors, which from the theory should be of the form O(dt) + O(dx^2).
Now, I want to confirm that we have O(dt).
How should I do this?
| 2 |
9,973,611 | 04/02/2012 09:08:40 | 876,428 | 08/03/2011 10:48:24 | 193 | 5 | Multilevel Users in the Database table | I am having one table users in which I have one field 'id' and another field is 'parent id'. Also I have expected target field in the users table.
I am having list of users till the 8th level hierarchy. Where A is parent of B and B is parent of C and so on.
e.g
A level 0
|
B level 1
|
c level 2
Now when I am looking for user A. I want to get the all the sub users using sql query 'expected target'.
i.e. When I use id = id of A then I can see the expected target of A,B,C etc.
| mysql | sql | postgresql | null | null | null | open | Multilevel Users in the Database table
===
I am having one table users in which I have one field 'id' and another field is 'parent id'. Also I have expected target field in the users table.
I am having list of users till the 8th level hierarchy. Where A is parent of B and B is parent of C and so on.
e.g
A level 0
|
B level 1
|
c level 2
Now when I am looking for user A. I want to get the all the sub users using sql query 'expected target'.
i.e. When I use id = id of A then I can see the expected target of A,B,C etc.
| 0 |
4,041,783 | 10/28/2010 10:08:33 | 206,446 | 11/08/2009 22:19:26 | 2,277 | 6 | Update all IE6 to IE8? | This has always confused me.
Everyone says that IE6 dies slowly. But what is preventing Microsoft to update all IE6 to IE8?
When a user open the IE6, if it says "Update to a newer version" then I guess 9/10 users will just click on it.
What are the obstacles from updating all IE6 so it can just die? | javascript | html | internet-explorer | browser | null | 10/28/2010 13:35:57 | off topic | Update all IE6 to IE8?
===
This has always confused me.
Everyone says that IE6 dies slowly. But what is preventing Microsoft to update all IE6 to IE8?
When a user open the IE6, if it says "Update to a newer version" then I guess 9/10 users will just click on it.
What are the obstacles from updating all IE6 so it can just die? | 2 |
6,848,214 | 07/27/2011 16:53:07 | 678,672 | 03/27/2011 05:55:21 | 81 | 1 | Use of DSL? Worth Reading It? | What Is the exact use of DSL? Is it worth time spending on reading DSL's? | dsl | null | null | null | null | 07/27/2011 18:31:32 | not constructive | Use of DSL? Worth Reading It?
===
What Is the exact use of DSL? Is it worth time spending on reading DSL's? | 4 |
10,644,342 | 05/17/2012 22:27:48 | 1,402,118 | 05/17/2012 22:21:28 | 1 | 0 | managing anothers account | I have a family member who passed away recently and her parents would like to access her account to remove some people and things that are being placed on her page that are negative about her, but they do not have her contace information is there anyway to get that info or some way else to take care of it | facebook | hotmail | null | null | null | null | open | managing anothers account
===
I have a family member who passed away recently and her parents would like to access her account to remove some people and things that are being placed on her page that are negative about her, but they do not have her contace information is there anyway to get that info or some way else to take care of it | 0 |
8,755,924 | 01/06/2012 09:43:02 | 1,103,284 | 10/08/2011 11:20:54 | 14 | 7 | how to set password lock for screen programatically in android? | hi i need to know whether we can set password to our lock my phone programmatic-ally in Android.that is we set a password inside the code and when press a button the screen will lock.i need to use because i need to find an simple method without taking (setting-security-password).if there is a way to make this possible.then how? | android | security | passwords | locking | null | 01/07/2012 03:56:11 | not a real question | how to set password lock for screen programatically in android?
===
hi i need to know whether we can set password to our lock my phone programmatic-ally in Android.that is we set a password inside the code and when press a button the screen will lock.i need to use because i need to find an simple method without taking (setting-security-password).if there is a way to make this possible.then how? | 1 |
7,185,895 | 08/25/2011 06:16:38 | 911,291 | 08/25/2011 06:08:22 | 1 | 0 | modiImage.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, false, false);The meaning of the behind two parameters | modiImage.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, false, false);
The meaning of the behind two parameters? | c# | null | null | null | null | 08/25/2011 06:58:14 | not a real question | modiImage.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, false, false);The meaning of the behind two parameters
===
modiImage.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, false, false);
The meaning of the behind two parameters? | 1 |
6,859,880 | 07/28/2011 13:40:08 | 867,599 | 07/28/2011 13:40:08 | 1 | 0 | Crossing to Desktop Apllication Development | Am a web developer, i use PHP(but with no idea in PHP OOP) for dynamic pages, but I want to go into application development such as developing desktop application that can be used by institutions. But i have no clue on how to get around it, in fact i am confuse.
My first question is that can PHP OOP be used to write desktop application?(because that will make my transition more easier). If not, which programming language is handy that i can learn quite easily.
Thanks. | desktop-application | null | null | null | null | 07/28/2011 17:45:43 | not constructive | Crossing to Desktop Apllication Development
===
Am a web developer, i use PHP(but with no idea in PHP OOP) for dynamic pages, but I want to go into application development such as developing desktop application that can be used by institutions. But i have no clue on how to get around it, in fact i am confuse.
My first question is that can PHP OOP be used to write desktop application?(because that will make my transition more easier). If not, which programming language is handy that i can learn quite easily.
Thanks. | 4 |
8,326,673 | 11/30/2011 13:26:29 | 381,211 | 07/01/2010 14:38:07 | 2,087 | 24 | Apache LoadBalancer 'crashes' under the load | I have configured an Apache HTTP server + load balancer (utilizing the mod_proxy_balancer)
When I execute load testing the balancer don't pass most of the load to the backend servers(simple Java App over Tomcat)
I'm not sure if the apache httpd can't handle the load, or is it the load balancer configuration..
This is how my conf file looks like:
<Proxy balancer://mycluster>
BalancerMember http://xxxxx.amazonaws.com connectiontimeout=200000 max=50000 timeout=200000 ping=200000
BalancerMember http://yyyy.amazonaws.com connectiontimeout=200000 max=50000 timeout=200000 ping=200000
</Proxy>
ProxyPass /a balancer://mycluster timeout=200000
any ideas? | apache | load-balancing | mod-proxy | web-server | null | 12/10/2011 17:20:37 | off topic | Apache LoadBalancer 'crashes' under the load
===
I have configured an Apache HTTP server + load balancer (utilizing the mod_proxy_balancer)
When I execute load testing the balancer don't pass most of the load to the backend servers(simple Java App over Tomcat)
I'm not sure if the apache httpd can't handle the load, or is it the load balancer configuration..
This is how my conf file looks like:
<Proxy balancer://mycluster>
BalancerMember http://xxxxx.amazonaws.com connectiontimeout=200000 max=50000 timeout=200000 ping=200000
BalancerMember http://yyyy.amazonaws.com connectiontimeout=200000 max=50000 timeout=200000 ping=200000
</Proxy>
ProxyPass /a balancer://mycluster timeout=200000
any ideas? | 2 |
9,221,309 | 02/10/2012 00:57:44 | 25,702 | 10/07/2008 03:24:59 | 2,030 | 53 | Extending log4net's PatternString with a custom converter via configuration | How do you add custom converters to log4net's [PatternString][1] via the configuration file?
The SDK documentation hints that this is possible via the fact that [one of the AddConverter methods][2] says it is used by the configurator.
[1]: http://logging.apache.org/log4net/release/sdk/log4net.Util.PatternString.html
[2]: http://logging.apache.org/log4net/release/sdk/log4net.Util.PatternString.AddConverter_overload_1.html | configuration | log4net | null | null | null | null | open | Extending log4net's PatternString with a custom converter via configuration
===
How do you add custom converters to log4net's [PatternString][1] via the configuration file?
The SDK documentation hints that this is possible via the fact that [one of the AddConverter methods][2] says it is used by the configurator.
[1]: http://logging.apache.org/log4net/release/sdk/log4net.Util.PatternString.html
[2]: http://logging.apache.org/log4net/release/sdk/log4net.Util.PatternString.AddConverter_overload_1.html | 0 |
6,223,765 | 06/03/2011 06:34:08 | 780,153 | 06/01/2011 20:27:56 | 8 | 0 | Start a java process (using Runtime.exec / ProcessBuilder.start) with low priority? | I'm trying to start an external process via java using the ProcessBuilder class, and that much works. Currently running using the command:
new ProcessBuilder("java", "-jar", jarfile, args);
What I would like to do is just this, but to start the process with low priority. My program is currently only running on windows, so a window-specific solution is fine by me. Some research suggests I use the "start" command, but when I try doing this from java it gives an exception saying it is an unrecognized command (the same command works from cmd.exe).
Does anyone know how to launch a process from java (windows-specific if need be), with belownormal priority? | java | windows | priority | processbuilder | null | null | open | Start a java process (using Runtime.exec / ProcessBuilder.start) with low priority?
===
I'm trying to start an external process via java using the ProcessBuilder class, and that much works. Currently running using the command:
new ProcessBuilder("java", "-jar", jarfile, args);
What I would like to do is just this, but to start the process with low priority. My program is currently only running on windows, so a window-specific solution is fine by me. Some research suggests I use the "start" command, but when I try doing this from java it gives an exception saying it is an unrecognized command (the same command works from cmd.exe).
Does anyone know how to launch a process from java (windows-specific if need be), with belownormal priority? | 0 |
7,274,856 | 09/01/2011 18:35:17 | 534,147 | 12/07/2010 19:40:07 | 36 | 7 | Looking for javascript techniques | I'm trying to learn some fresh and hacky javascript techniques and on my quest to do so, here is a function I mocked up:
function doAction(index) {
for(var a = Array.prototype.slice.call(arguments, 1),
i = 0, r = [], l = a.length; i < l; i++)
r.push(a[i][index]);
return r;
}
doAction(2, ['a','b','c'],['a','b','c'],['a','b','c']) //==> ["c", "c", "c"]
This is basically what it does: get every nth element from a number of arrays and return them in a new one.
I would like to improve this function with freaky ninja-style ideas, not necessarily shorten the code, but rather optimize it. (You most probably already noticed the infamous `Array.prototype.slice` thingy);
As English is not my native tongue, I would also like a decent name for the action performed by this function. Thanks in advance guys (and women!)
Oh, here's a Fiddle: [http://jsfiddle.net/Exv7Z/][1]
[1]: http://jsfiddle.net/Exv7Z/ | javascript | fun | hack | null | null | 09/02/2011 07:47:24 | not constructive | Looking for javascript techniques
===
I'm trying to learn some fresh and hacky javascript techniques and on my quest to do so, here is a function I mocked up:
function doAction(index) {
for(var a = Array.prototype.slice.call(arguments, 1),
i = 0, r = [], l = a.length; i < l; i++)
r.push(a[i][index]);
return r;
}
doAction(2, ['a','b','c'],['a','b','c'],['a','b','c']) //==> ["c", "c", "c"]
This is basically what it does: get every nth element from a number of arrays and return them in a new one.
I would like to improve this function with freaky ninja-style ideas, not necessarily shorten the code, but rather optimize it. (You most probably already noticed the infamous `Array.prototype.slice` thingy);
As English is not my native tongue, I would also like a decent name for the action performed by this function. Thanks in advance guys (and women!)
Oh, here's a Fiddle: [http://jsfiddle.net/Exv7Z/][1]
[1]: http://jsfiddle.net/Exv7Z/ | 4 |
9,723,600 | 03/15/2012 16:05:42 | 346,063 | 05/20/2010 11:57:51 | 11,112 | 874 | cursor jumps to start of body when deleting a content node | I am using the tinymce real time editor. I insert a span (like a bookmark) which i use as a marker in the content (code in own plugin):
var rng = ed.selection.getRng();
rng.collapse(true);
ed.marker_id += 1;
rng.insertNode(ed.selection.dom.create('span', {'data-mce-type' : "bookmark", id : 'ir_marker_span'+ed.marker_id , style : ''}, '\uFEFF'));
Deleting this marker works as expected using a non-iPad system:
$(ed.getBody()).find('#ir_marker_span'+ed.marker_id).remove();
On iPad the cursor jumps to the start of the body in this case.
It is crucial for me to be able to remove those spans.
**How can i do this without loosing my caret position?** | javascript | jquery | ipad | tinymce | null | null | open | cursor jumps to start of body when deleting a content node
===
I am using the tinymce real time editor. I insert a span (like a bookmark) which i use as a marker in the content (code in own plugin):
var rng = ed.selection.getRng();
rng.collapse(true);
ed.marker_id += 1;
rng.insertNode(ed.selection.dom.create('span', {'data-mce-type' : "bookmark", id : 'ir_marker_span'+ed.marker_id , style : ''}, '\uFEFF'));
Deleting this marker works as expected using a non-iPad system:
$(ed.getBody()).find('#ir_marker_span'+ed.marker_id).remove();
On iPad the cursor jumps to the start of the body in this case.
It is crucial for me to be able to remove those spans.
**How can i do this without loosing my caret position?** | 0 |
11,578,372 | 07/20/2012 11:26:01 | 1,540,399 | 07/20/2012 09:53:25 | 1 | 0 | mysql query for calculating total time in column wise | There is a table where job_name,start_date_time,end_date_time,total_time these number of column available,In job_name column different job names are there but some of them are repeated no of times,and also for each job_name different start_date_time,end_date_time and total_time is there,My required Output is I Have inserted the demo picture please any body give the solution![enter image description here][1]
Please help me how to find the output like this..?
| mysql | null | null | null | null | 08/01/2012 14:14:24 | not constructive | mysql query for calculating total time in column wise
===
There is a table where job_name,start_date_time,end_date_time,total_time these number of column available,In job_name column different job names are there but some of them are repeated no of times,and also for each job_name different start_date_time,end_date_time and total_time is there,My required Output is I Have inserted the demo picture please any body give the solution![enter image description here][1]
Please help me how to find the output like this..?
| 4 |
4,753,993 | 01/20/2011 23:48:02 | 98,050 | 04/29/2009 22:27:21 | 1,642 | 31 | Passing arguments to a command in Bash script with spaces | I'm trying to pass 2 arguments to a command and each argument contains spaces, I've tried escaping the spaces in the args, I've tried wrapping in single quotes, I've tried escaping \" but nothing will work.
Here's a simple example.
#!/bin/bash -xv
ARG="/tmp/a b/1.txt"
ARG2="/tmp/a b/2.txt"
ARG_BOTH="\"$ARG\" \"$ARG2\""
cat $ARG_BOTH
I'm getting the following when it runs:
ARG_BOTH="$ARG $ARG2"
+ ARG_BOTH='/tmp/a\ b/1.txt /tmp/a\ b/2.txt'
cat $ARG_BOTH
+ cat '/tmp/a\' b/1.txt '/tmp/a\' b/2.txt
cat: /tmp/a\: No such file or directory
cat: b/1.txt: No such file or directory
cat: /tmp/a\: No such file or directory
cat: b/2.txt: No such file or directory
| bash | shell | unix | scripting | escaping | null | open | Passing arguments to a command in Bash script with spaces
===
I'm trying to pass 2 arguments to a command and each argument contains spaces, I've tried escaping the spaces in the args, I've tried wrapping in single quotes, I've tried escaping \" but nothing will work.
Here's a simple example.
#!/bin/bash -xv
ARG="/tmp/a b/1.txt"
ARG2="/tmp/a b/2.txt"
ARG_BOTH="\"$ARG\" \"$ARG2\""
cat $ARG_BOTH
I'm getting the following when it runs:
ARG_BOTH="$ARG $ARG2"
+ ARG_BOTH='/tmp/a\ b/1.txt /tmp/a\ b/2.txt'
cat $ARG_BOTH
+ cat '/tmp/a\' b/1.txt '/tmp/a\' b/2.txt
cat: /tmp/a\: No such file or directory
cat: b/1.txt: No such file or directory
cat: /tmp/a\: No such file or directory
cat: b/2.txt: No such file or directory
| 0 |
8,100,103 | 11/11/2011 21:19:43 | 920,304 | 08/30/2011 18:32:28 | 34 | 2 | Restoring lost backgrounds | So, I've got this friend. He's one of those people that everyone wants to screw with, and so his background on his computer is constantly being changed to lewd pictures. Well, his birthday is coming up, so I figured I'd write him a program that he can run that'll just instantly restore it to whatever it was, cycling back through the last couple ones (because it's not uncommon for it to be changed 5-6 times in a night). That being said, after much googling, I have yet to find a single person who seems to know where the heck your computer stores a cache of old backgrounds. Does such a wondrous place even exist? I know it stores the LAST one, but I'm not sure where it might store ones before that. | caching | background | null | null | null | 11/13/2011 01:03:26 | off topic | Restoring lost backgrounds
===
So, I've got this friend. He's one of those people that everyone wants to screw with, and so his background on his computer is constantly being changed to lewd pictures. Well, his birthday is coming up, so I figured I'd write him a program that he can run that'll just instantly restore it to whatever it was, cycling back through the last couple ones (because it's not uncommon for it to be changed 5-6 times in a night). That being said, after much googling, I have yet to find a single person who seems to know where the heck your computer stores a cache of old backgrounds. Does such a wondrous place even exist? I know it stores the LAST one, but I'm not sure where it might store ones before that. | 2 |
7,771,017 | 10/14/2011 17:00:47 | 994,193 | 10/13/2011 19:24:00 | 6 | 0 | Suggestions on online resources available to learn mysql? | Your suggestions will be much appreciated.
I'm looking for dependable online resources to learn MYSQL.
Look forward to hear from all. Thanks.
| mysql | null | null | null | null | 10/15/2011 00:49:29 | off topic | Suggestions on online resources available to learn mysql?
===
Your suggestions will be much appreciated.
I'm looking for dependable online resources to learn MYSQL.
Look forward to hear from all. Thanks.
| 2 |
7,711,388 | 10/10/2011 10:22:17 | 887,262 | 08/10/2011 05:55:41 | 1 | 0 | unmanaged code with managed code | I am calling c programming dll from C sharp.Net. When I am declaring constant string array like this:
char *argv[]={"F:\\SVN\\Encrypted Box\\Rdiff For DLL\\RDIFF\\rdiff.dll","signature","c:\\abc.txt","c:\\abcdsig"};
Then my function is working fine, but when I am using arguments to initialize "argv" variable, like this:
char *argv[]={dllPath,commandName,sourceFile,destFile};
Then it's not working, please help me to resolve it.
Thanks | c# | c | null | null | null | 10/10/2011 11:09:09 | not a real question | unmanaged code with managed code
===
I am calling c programming dll from C sharp.Net. When I am declaring constant string array like this:
char *argv[]={"F:\\SVN\\Encrypted Box\\Rdiff For DLL\\RDIFF\\rdiff.dll","signature","c:\\abc.txt","c:\\abcdsig"};
Then my function is working fine, but when I am using arguments to initialize "argv" variable, like this:
char *argv[]={dllPath,commandName,sourceFile,destFile};
Then it's not working, please help me to resolve it.
Thanks | 1 |
5,976,048 | 05/12/2011 09:37:44 | 469,173 | 06/03/2010 10:13:58 | 43 | 2 | objective c audio player option | i'm building an iphone application that base on playing some audio file. all thing are going ok but i need to add new idea.i want to add slider, play and pause button similar to ipod.
play, pause, volume slider, and the most important on is the duration indicator with it's slider | objective-c | avaudioplayer | ipod | null | null | 07/30/2012 03:28:56 | not a real question | objective c audio player option
===
i'm building an iphone application that base on playing some audio file. all thing are going ok but i need to add new idea.i want to add slider, play and pause button similar to ipod.
play, pause, volume slider, and the most important on is the duration indicator with it's slider | 1 |
7,964,168 | 11/01/2011 08:44:40 | 1,023,311 | 11/01/2011 08:35:12 | 1 | 0 | How to equal Browser capability between Ie8 & Ie7? | How to equal Browser capability between Ie8 & Ie7? and how is solve the problem? | html | css | null | null | null | 11/02/2011 08:38:38 | not a real question | How to equal Browser capability between Ie8 & Ie7?
===
How to equal Browser capability between Ie8 & Ie7? and how is solve the problem? | 1 |
4,551,517 | 12/29/2010 04:39:49 | 510,435 | 11/17/2010 06:31:53 | 106 | 7 | What is the Procedure for SELLING a Script through Online ? | I developed some scripts in PHP and i want to SELL those through ONLINE. So my doubts are
1. What is the process for **Selling** the scripts **through online**.
2. What are the **Legal Issues** i have to follow for selling scripts.
3. What might be **Problems may** encounter **from the Buyer** if any in future.
Thank You | legal | online | marketing | selling-software | null | 12/29/2010 05:36:14 | off topic | What is the Procedure for SELLING a Script through Online ?
===
I developed some scripts in PHP and i want to SELL those through ONLINE. So my doubts are
1. What is the process for **Selling** the scripts **through online**.
2. What are the **Legal Issues** i have to follow for selling scripts.
3. What might be **Problems may** encounter **from the Buyer** if any in future.
Thank You | 2 |
5,217,070 | 03/07/2011 07:40:16 | 544,140 | 12/16/2010 01:12:59 | 131 | 2 | Image Button To Upload Files CSS | I want to upload files using an image as a button. The image is a square 150x150. When I click the square, the file dialog should open up. How do I do this? | jquery | css | file | null | null | null | open | Image Button To Upload Files CSS
===
I want to upload files using an image as a button. The image is a square 150x150. When I click the square, the file dialog should open up. How do I do this? | 0 |
5,698,919 | 04/18/2011 05:36:33 | 712,848 | 04/18/2011 05:36:33 | 1 | 0 | Is there any mistake in sorting code... | Thanks to Everyone who helped me to do this.
i need suggestion,,,, Why sorting is not happening.
Here is the code what i tried
module ListHotel
require 'csv'
@@secarr=Array.new;
CSV.open('Restaurant.csv','r').each { |x| @@secarr << x }
def self.cls
system('cls')
end # end of cls function
def self.sortedorder(order)
case order
when "name"
@@secarrr=@@secarr.sort_by{ |hotelname, location, cuisine, price| hotelname.to_s}
return @@secarr
when "price"
@@secarr=@@secarr.sort_by{ |hotelname, location, cuisine, price| price.to_f }
return @@secarr
when "cuisine"
@@secarrr=@@secarr.sort_by{ |hotelname, location, cuisine, price| cuisine.to_s }
return @@secarr
when "location"
@@secarr=@@secarr.sort_by{ |hotelname, location, cuisine, price| location.to_s }
return @@secarrr
when "location, price"
@@secarr=@@secarr.sort_by{|hotelname, location, cuisine, price| [location.to_s, price.to_f] }
return @@secarr
else
puts "You Entered A Wrong Choice"
end #end of the case
end #end of the method
def ListHotel::listing
display #calling display method
print "You want to change the sorting order[y/n]:"
again=gets.chomp
if again=='y' || again =='Y'
puts %q{
:By Name => name
:By Location => location
:By Price => price
:By Cuisine => cusine
:By Location And Price => location, price
}
print "\n\nEnter your Filter Order : "
order=gets.downcase.chomp
cls
sortedorder(order)
ListHotel::listing
@@secarr.clear
end # end of again choce selection
end #end of method
def self.display
puts '-'*78
puts %q{| Hotel Name | Location | Cuisines | Price |}
puts '-'*78;puts "\n" ;i=0;j=0
while i<=@@secarr.length
while j<=3
print "#{@@secarr[i][j].collect { |x| x.chomp + " " } rescue nil}" ;j+=1
end
puts "\n"
j=0;i+=1
end #while Ends
puts "\n";puts '-'*78;puts "\n"
end #end of display method
end #end of module
please suggest me what i have to.My editing is blocked so .i am not able to comment or edit
To sawa, Will,Tim Post
its not working i am still not able to do comment or edit.
Some message is comming like "Too many of your edits were rejected, try again in 7 days."
| ruby | sorting | null | null | null | 04/18/2011 16:48:54 | not a real question | Is there any mistake in sorting code...
===
Thanks to Everyone who helped me to do this.
i need suggestion,,,, Why sorting is not happening.
Here is the code what i tried
module ListHotel
require 'csv'
@@secarr=Array.new;
CSV.open('Restaurant.csv','r').each { |x| @@secarr << x }
def self.cls
system('cls')
end # end of cls function
def self.sortedorder(order)
case order
when "name"
@@secarrr=@@secarr.sort_by{ |hotelname, location, cuisine, price| hotelname.to_s}
return @@secarr
when "price"
@@secarr=@@secarr.sort_by{ |hotelname, location, cuisine, price| price.to_f }
return @@secarr
when "cuisine"
@@secarrr=@@secarr.sort_by{ |hotelname, location, cuisine, price| cuisine.to_s }
return @@secarr
when "location"
@@secarr=@@secarr.sort_by{ |hotelname, location, cuisine, price| location.to_s }
return @@secarrr
when "location, price"
@@secarr=@@secarr.sort_by{|hotelname, location, cuisine, price| [location.to_s, price.to_f] }
return @@secarr
else
puts "You Entered A Wrong Choice"
end #end of the case
end #end of the method
def ListHotel::listing
display #calling display method
print "You want to change the sorting order[y/n]:"
again=gets.chomp
if again=='y' || again =='Y'
puts %q{
:By Name => name
:By Location => location
:By Price => price
:By Cuisine => cusine
:By Location And Price => location, price
}
print "\n\nEnter your Filter Order : "
order=gets.downcase.chomp
cls
sortedorder(order)
ListHotel::listing
@@secarr.clear
end # end of again choce selection
end #end of method
def self.display
puts '-'*78
puts %q{| Hotel Name | Location | Cuisines | Price |}
puts '-'*78;puts "\n" ;i=0;j=0
while i<=@@secarr.length
while j<=3
print "#{@@secarr[i][j].collect { |x| x.chomp + " " } rescue nil}" ;j+=1
end
puts "\n"
j=0;i+=1
end #while Ends
puts "\n";puts '-'*78;puts "\n"
end #end of display method
end #end of module
please suggest me what i have to.My editing is blocked so .i am not able to comment or edit
To sawa, Will,Tim Post
its not working i am still not able to do comment or edit.
Some message is comming like "Too many of your edits were rejected, try again in 7 days."
| 1 |
7,696,326 | 10/08/2011 10:54:15 | 982,439 | 10/06/2011 15:08:50 | 16 | 0 | elapsed photography camera effect | Does anyone know what people are using when filming elapsed photography when the camera actually slides along whilst taking the photographs? You can see the effect I'm taking about here! http://vimeo.com/17231766 @ 44 seconds?
Many thanks! | photo | photography | filmstrip | null | null | 10/08/2011 16:32:01 | off topic | elapsed photography camera effect
===
Does anyone know what people are using when filming elapsed photography when the camera actually slides along whilst taking the photographs? You can see the effect I'm taking about here! http://vimeo.com/17231766 @ 44 seconds?
Many thanks! | 2 |
396,983 | 12/29/2008 02:03:40 | 46,695 | 12/16/2008 14:56:06 | 28 | 0 | Has anyone ever attempted to re-imagine Vim? | Firstly, I want to state for the record that I am not attempting to be a troll, and I do not intend this question to be flamebait.
I asked an [earlier question][1] in an attempt to discover what other modal editors existed besides Vi/Vim. I was fully expecting that there would be at least a couple of other general-purpose editors that were similar to (or inspired by) Vim. To my surprise, I discovered that the only other modal editors out there are either specific to a particular language or restricted to some ancient legacy platform.
My question is: has anyone ever considered re-imagining the commands and keyboard layout of Vim, ignoring all of the history inherited from vi and [other earlier programs][2]? Also, would this be a good idea? For example, are there any little-used features in Vim with their own alphabetic key that could be reassigned, freeing up a prominent key for something more useful? I think that the recently released version 3.0 of Python has shown that there can sometimes be value in breaking reverse compatibility. Would a similar process benefit Vim?
(Note: Yes, I do realize that changing Vim's commands around would cause a lot of problems for those that have used Vim for a long time, and have built up muscle-memory for the current layout, so my analogy with Python 3.0 isn't really valid. Still, I hope that the analogy at least helps a little with getting my point across.)
[1]: http://stackoverflow.com/questions/371618/what-modal-editors-are-available-aside-from-vivim
[2]: http://developers.slashdot.org/comments.pl?sid=237333&cid=19391249 | vi | vim | editor | software | null | 04/05/2012 13:41:50 | not constructive | Has anyone ever attempted to re-imagine Vim?
===
Firstly, I want to state for the record that I am not attempting to be a troll, and I do not intend this question to be flamebait.
I asked an [earlier question][1] in an attempt to discover what other modal editors existed besides Vi/Vim. I was fully expecting that there would be at least a couple of other general-purpose editors that were similar to (or inspired by) Vim. To my surprise, I discovered that the only other modal editors out there are either specific to a particular language or restricted to some ancient legacy platform.
My question is: has anyone ever considered re-imagining the commands and keyboard layout of Vim, ignoring all of the history inherited from vi and [other earlier programs][2]? Also, would this be a good idea? For example, are there any little-used features in Vim with their own alphabetic key that could be reassigned, freeing up a prominent key for something more useful? I think that the recently released version 3.0 of Python has shown that there can sometimes be value in breaking reverse compatibility. Would a similar process benefit Vim?
(Note: Yes, I do realize that changing Vim's commands around would cause a lot of problems for those that have used Vim for a long time, and have built up muscle-memory for the current layout, so my analogy with Python 3.0 isn't really valid. Still, I hope that the analogy at least helps a little with getting my point across.)
[1]: http://stackoverflow.com/questions/371618/what-modal-editors-are-available-aside-from-vivim
[2]: http://developers.slashdot.org/comments.pl?sid=237333&cid=19391249 | 4 |
10,688,930 | 05/21/2012 16:25:53 | 1,403,468 | 05/18/2012 13:26:48 | 8 | 0 | HTML5 Audio player works on safari/Chrome, but not iPhone | I've got an HTML5 audio player that works on Safari on the PC, but doesn't seem to work on (my) iPhone (4). Here's the code:
`
function loadPlayer() {
var audioPlayer = new Audio();
audioPlayer.controls="controls";
audioPlayer.addEventListener('ended',nextSong,false);
audioPlayer.addEventListener('error',errorFallback,true);
document.getElementById("player").appendChild(audioPlayer);
nextSong();
}
function nextSong() {
if(urls[next]!=undefined) {
var audioPlayer = document.getElementsByTagName('audio')[0];
if(audioPlayer!=undefined) {
audioPlayer.src=urls[next];
audioPlayer.load();
audioPlayer.play();
next++;
} else {
loadPlayer();
}
} else {
alert('the end!');
}
}
function errorFallback() {
nextSong();
}
function playPause() {
var audioPlayer = document.getElementsByTagName('audio')[0];
if(audioPlayer!=undefined) {
if (audioPlayer.paused) {
audioPlayer.play();
} else {
audioPlayer.pause();
}
} else {
loadPlayer();
}
}
function stop() {
var audioPlayer = document.getElementsByTagName('audio')[0];
audioPlayer.pause();
audioPlayer.currentTime = 0;
}
function pickSong(num) {
next = num;
nextSong();
}
var urls = new Array();
urls[0] = '01_horses_mouth/mp3/01. Let The Dog See The Rabbit preface.mp3';
urls[1] = '01_horses_mouth/mp3/02. The Other Horse\'s Tale.mp3';
urls[2] = '01_horses_mouth/mp3/03. Caged Tango.mp3';
urls[3] = '01_horses_mouth/mp3/04. Crumbs.mp3';
urls[4] = '01_horses_mouth/mp3/05. Mood Elevator Reprise.mp3';
urls[5] = '01_horses_mouth/mp3/06. Mood Elevator.mp3';
urls[6] = '02_dub_project/mp3/01. Fearless Dub.mp3';
urls[7] = '02_dub_project/mp3/02. Original Sound Dub.mp3';
urls[8] = '02_dub_project/mp3/03. Rhok Shok Dub.mp3';
urls[9] = '02_dub_project/mp3/04. Tron Dub.mp3';
urls[10] = '02_dub_project/mp3/05. Eastern Fire Dub.mp3';
urls[11] = '02_dub_project/mp3/06. Mary Jane Dub.mp3';
var next = 0;
`
Can anyone see anything obvious that would make this not work on iPhone?
There's also code for a canvas element, but I've hidden that on the iPhone version - the canvas at any rate. I commented out the code but that didn't seem to make a difference, so I'm guessing it's not a conflict. Here's the site:
http://lisadearaujo.com/clientaccess/wot-sound/indexiPad.html | iphone | html5 | audio | null | null | null | open | HTML5 Audio player works on safari/Chrome, but not iPhone
===
I've got an HTML5 audio player that works on Safari on the PC, but doesn't seem to work on (my) iPhone (4). Here's the code:
`
function loadPlayer() {
var audioPlayer = new Audio();
audioPlayer.controls="controls";
audioPlayer.addEventListener('ended',nextSong,false);
audioPlayer.addEventListener('error',errorFallback,true);
document.getElementById("player").appendChild(audioPlayer);
nextSong();
}
function nextSong() {
if(urls[next]!=undefined) {
var audioPlayer = document.getElementsByTagName('audio')[0];
if(audioPlayer!=undefined) {
audioPlayer.src=urls[next];
audioPlayer.load();
audioPlayer.play();
next++;
} else {
loadPlayer();
}
} else {
alert('the end!');
}
}
function errorFallback() {
nextSong();
}
function playPause() {
var audioPlayer = document.getElementsByTagName('audio')[0];
if(audioPlayer!=undefined) {
if (audioPlayer.paused) {
audioPlayer.play();
} else {
audioPlayer.pause();
}
} else {
loadPlayer();
}
}
function stop() {
var audioPlayer = document.getElementsByTagName('audio')[0];
audioPlayer.pause();
audioPlayer.currentTime = 0;
}
function pickSong(num) {
next = num;
nextSong();
}
var urls = new Array();
urls[0] = '01_horses_mouth/mp3/01. Let The Dog See The Rabbit preface.mp3';
urls[1] = '01_horses_mouth/mp3/02. The Other Horse\'s Tale.mp3';
urls[2] = '01_horses_mouth/mp3/03. Caged Tango.mp3';
urls[3] = '01_horses_mouth/mp3/04. Crumbs.mp3';
urls[4] = '01_horses_mouth/mp3/05. Mood Elevator Reprise.mp3';
urls[5] = '01_horses_mouth/mp3/06. Mood Elevator.mp3';
urls[6] = '02_dub_project/mp3/01. Fearless Dub.mp3';
urls[7] = '02_dub_project/mp3/02. Original Sound Dub.mp3';
urls[8] = '02_dub_project/mp3/03. Rhok Shok Dub.mp3';
urls[9] = '02_dub_project/mp3/04. Tron Dub.mp3';
urls[10] = '02_dub_project/mp3/05. Eastern Fire Dub.mp3';
urls[11] = '02_dub_project/mp3/06. Mary Jane Dub.mp3';
var next = 0;
`
Can anyone see anything obvious that would make this not work on iPhone?
There's also code for a canvas element, but I've hidden that on the iPhone version - the canvas at any rate. I commented out the code but that didn't seem to make a difference, so I'm guessing it's not a conflict. Here's the site:
http://lisadearaujo.com/clientaccess/wot-sound/indexiPad.html | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.