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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,170,140 |
11/13/2010 00:15:31
| 425,458 |
08/19/2010 15:56:13
| 127 | 1 |
I'm trying to learn C, but what I am missing? or God damn these books are old
|
I'm a physicist by degree, and I'm working in a computational biophysics lab where everything is written in old school C, so I've been furiously scrambling (with my mind) to keep up and learn some C. I've been working my way through K&R, and it's good, and I think that now, after I have had my mind blown several times, I'm finally starting to understand pointers.
Thing is, the latest edition of K&R is 22 years old. And I get that C itself is more than 30 years old, but I still feel like I'm missing some stuff here. Have there been any significant advances in C coding in the intervening time that I should be aware of? Or am I just being paranoid?
Especially relevant to what I'm doing now would be anything about parallel computing. I've gotten the impression from various places that C has at least some capabilities in that regard, but I haven't come across any really good books or resources on the topic.
So yeah, I think that I've already got the best C book there is, but what's the best _modern_ C book out there? Anyone have any good suggestions?
|
c
|
books
|
parallel-processing
|
kr-c
|
old-school
| null |
open
|
I'm trying to learn C, but what I am missing? or God damn these books are old
===
I'm a physicist by degree, and I'm working in a computational biophysics lab where everything is written in old school C, so I've been furiously scrambling (with my mind) to keep up and learn some C. I've been working my way through K&R, and it's good, and I think that now, after I have had my mind blown several times, I'm finally starting to understand pointers.
Thing is, the latest edition of K&R is 22 years old. And I get that C itself is more than 30 years old, but I still feel like I'm missing some stuff here. Have there been any significant advances in C coding in the intervening time that I should be aware of? Or am I just being paranoid?
Especially relevant to what I'm doing now would be anything about parallel computing. I've gotten the impression from various places that C has at least some capabilities in that regard, but I haven't come across any really good books or resources on the topic.
So yeah, I think that I've already got the best C book there is, but what's the best _modern_ C book out there? Anyone have any good suggestions?
| 0 |
11,420,379 |
07/10/2012 19:21:06
| 568,214 |
01/08/2011 17:54:28
| 88 | 4 |
Play Framework 2.0: use pom.xml with SBT
|
I am evaluating Play 2.x for Java for my org, and would like to use a pom.xml (or if it comes to that, an ivy.xml) file in conjunction with my Build.scala, as this makes for far easier IDE integration.
I looked both at https://github.com/playframework/Play20/wiki/SBTDependencies and at https://github.com/harrah/xsbt/wiki/Library-Management, and I unfortunately couldn't figure out where I should add the ```externalPom()``` call.
So the structure of my project is as follows:
projectname
-pom.xml
-project
- Build.scala
and this is my Build.scala file:
object ApplicationBuild extends Build {
val appName = "Siddhu Warrier"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
// Add your own project settings here
)
}
How do I get it to use my pom.xml?
Thanks in advance!
|
playframework
|
playframework-2.0
|
sbt
| null | null | null |
open
|
Play Framework 2.0: use pom.xml with SBT
===
I am evaluating Play 2.x for Java for my org, and would like to use a pom.xml (or if it comes to that, an ivy.xml) file in conjunction with my Build.scala, as this makes for far easier IDE integration.
I looked both at https://github.com/playframework/Play20/wiki/SBTDependencies and at https://github.com/harrah/xsbt/wiki/Library-Management, and I unfortunately couldn't figure out where I should add the ```externalPom()``` call.
So the structure of my project is as follows:
projectname
-pom.xml
-project
- Build.scala
and this is my Build.scala file:
object ApplicationBuild extends Build {
val appName = "Siddhu Warrier"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
// Add your own project settings here
)
}
How do I get it to use my pom.xml?
Thanks in advance!
| 0 |
5,310,638 |
03/15/2011 10:53:21
| 660,416 |
03/15/2011 10:53:21
| 1 | 0 |
Get output from Telnet
|
does anybody know how to read output from telnet with Java? I'm able to connect to
the server and execute some commands, but I need output from that commands.
For example, command ls gives a list of all files and directory so I want to get that
list and do something with it in my Java code.
I had tried 3rd party libraries for Telnet like apache-commons and sinetfactory(www.jscape.com
) but with no results for my case...
Igor
|
java
|
telnet
| null | null | null | null |
open
|
Get output from Telnet
===
does anybody know how to read output from telnet with Java? I'm able to connect to
the server and execute some commands, but I need output from that commands.
For example, command ls gives a list of all files and directory so I want to get that
list and do something with it in my Java code.
I had tried 3rd party libraries for Telnet like apache-commons and sinetfactory(www.jscape.com
) but with no results for my case...
Igor
| 0 |
9,716,613 |
03/15/2012 09:01:23
| 1,271,085 |
03/15/2012 08:50:14
| 1 | 0 |
Accessing User Details in a Facebook Application that is developed in ASP.NET and is showing as an Iframe in Facebook
|
I created a Facebook Application, i set the canvas url domain to the website hosted on some server.
The website worked perfectly inside the facebook page.
The problem is i want to track which user is accessing this application as when it do some activity on this page and then comes back i will show that you are here last time, track his scores etc.
I have App secret etc with me, so how can i achieve this.
Any help is appreciated
Thank You.
|
facebook
| null | null | null | null | null |
open
|
Accessing User Details in a Facebook Application that is developed in ASP.NET and is showing as an Iframe in Facebook
===
I created a Facebook Application, i set the canvas url domain to the website hosted on some server.
The website worked perfectly inside the facebook page.
The problem is i want to track which user is accessing this application as when it do some activity on this page and then comes back i will show that you are here last time, track his scores etc.
I have App secret etc with me, so how can i achieve this.
Any help is appreciated
Thank You.
| 0 |
8,371,768 |
12/03/2011 23:04:55
| 1,079,513 |
12/03/2011 23:00:26
| 1 | 0 |
Chrome Extension : Tab issues
|
The code below attempts to open a new tab for the corresponding post object, when its image is clicked in popup.html. For some reason, the new tab is blank and isn't going to the right page as specified by this.Link in the Post singleton. Any help would be appreciated!
<html>
<head>
<style>
body {
min-width:357px;
overflow-x:hidden;
}
img {
margin:5px;
border:2px solid black;
vertical-align:middle;
width:75px;
height:75px;
}
</style>
<script>
var req = new XMLHttpRequest();
req.open(
"GET",
"http://thekollection.com/feed/",
true);
req.onload = showPosts;
req.send(null);
function showPosts() {
var elements = req.responseXML.getElementsByTagName("item");
for (var i = 0, item; item = elements[i]; i++) {
var description = item.getElementsByTagName("description")[0].childNodes[0].nodeValue;
var link = item.getElementsByTagName("link")[0].childNodes[0].nodeValue;
var txtLink = link.toString();
var txtDesc = description.toString();
var start = txtDesc.indexOf("\"") + 1;
var end = txtDesc.indexOf(".jpg") + 4;
var imgURL = txtDesc.substring(start, end);
var post = new function(){
this.Link = txtLink;
this.Description = txtDesc;
this.ImageURL = imgURL;
this.imgElement = document.createElement("image");
this.displayTab = function(){
chrome.tabs.create({'url' : this.Link}, function(tab){});
}
}
post.imgElement.addEventListener("click", post.displayTab, false)
post.imgElement.src = post.ImageURL;
document.body.appendChild(post.imgElement);
}
}
</script>
</head>
<body>
</body>
</html>
|
javascript
|
xml
|
google-chrome
|
extension
|
reader
| null |
open
|
Chrome Extension : Tab issues
===
The code below attempts to open a new tab for the corresponding post object, when its image is clicked in popup.html. For some reason, the new tab is blank and isn't going to the right page as specified by this.Link in the Post singleton. Any help would be appreciated!
<html>
<head>
<style>
body {
min-width:357px;
overflow-x:hidden;
}
img {
margin:5px;
border:2px solid black;
vertical-align:middle;
width:75px;
height:75px;
}
</style>
<script>
var req = new XMLHttpRequest();
req.open(
"GET",
"http://thekollection.com/feed/",
true);
req.onload = showPosts;
req.send(null);
function showPosts() {
var elements = req.responseXML.getElementsByTagName("item");
for (var i = 0, item; item = elements[i]; i++) {
var description = item.getElementsByTagName("description")[0].childNodes[0].nodeValue;
var link = item.getElementsByTagName("link")[0].childNodes[0].nodeValue;
var txtLink = link.toString();
var txtDesc = description.toString();
var start = txtDesc.indexOf("\"") + 1;
var end = txtDesc.indexOf(".jpg") + 4;
var imgURL = txtDesc.substring(start, end);
var post = new function(){
this.Link = txtLink;
this.Description = txtDesc;
this.ImageURL = imgURL;
this.imgElement = document.createElement("image");
this.displayTab = function(){
chrome.tabs.create({'url' : this.Link}, function(tab){});
}
}
post.imgElement.addEventListener("click", post.displayTab, false)
post.imgElement.src = post.ImageURL;
document.body.appendChild(post.imgElement);
}
}
</script>
</head>
<body>
</body>
</html>
| 0 |
1,146,495 |
07/18/2009 02:12:39
| 32,484 |
10/29/2008 17:48:46
| 1,965 | 107 |
How to impress my line manager with some interesting programming projects
|
My line manager (who isn't all that great a programmer at all) frequently says he expects more from me, given my CV.
My cv focuses on c#/asp.net, and he has seen some examples of my work on my site. I haven't coded yet in my job, but what coding exercises could I do at home which are short and hard enough to impress my line manager?
I am nearing completion of a Project Euler problem, anything else?
Thanks
|
career-development
| null | null | null | null |
02/01/2012 04:10:39
|
not constructive
|
How to impress my line manager with some interesting programming projects
===
My line manager (who isn't all that great a programmer at all) frequently says he expects more from me, given my CV.
My cv focuses on c#/asp.net, and he has seen some examples of my work on my site. I haven't coded yet in my job, but what coding exercises could I do at home which are short and hard enough to impress my line manager?
I am nearing completion of a Project Euler problem, anything else?
Thanks
| 4 |
6,493,058 |
06/27/2011 12:47:44
| 386,764 |
07/08/2010 14:31:32
| 50 | 0 |
Read text from a website in C
|
I'm trying to read a simple text string from a website into my C program. I'm using LabWindows CVI, which is basically just C.
Here's the text:
http://www.swpc.noaa.gov/ftpdir/latest/wwv.txt
|
c
|
http
|
text
| null | null |
06/27/2011 13:57:54
|
not a real question
|
Read text from a website in C
===
I'm trying to read a simple text string from a website into my C program. I'm using LabWindows CVI, which is basically just C.
Here's the text:
http://www.swpc.noaa.gov/ftpdir/latest/wwv.txt
| 1 |
9,300,993 |
02/15/2012 20:41:05
| 270,559 |
02/10/2010 19:34:20
| 54 | 1 |
what is vextern used for in this code?
|
I have some c code that uses vextern as shown below and would like to know what the purpose of this is:
file1.c:
#define FILE1_G_
file1.h:
#ifdef FILE1_G_
# define vextern
#else
# define vextern extern
#endif
|
c
|
linux
|
gcc
| null | null | null |
open
|
what is vextern used for in this code?
===
I have some c code that uses vextern as shown below and would like to know what the purpose of this is:
file1.c:
#define FILE1_G_
file1.h:
#ifdef FILE1_G_
# define vextern
#else
# define vextern extern
#endif
| 0 |
18,783 |
08/20/2008 20:45:15
| 357 |
08/05/2008 01:29:23
| 725 | 47 |
SQL - What are your favorite performance tricks?
|
When you have a query or stored procedure that needs performance tuning, what are some of the first things you try?
|
sql
|
sql-server
|
performance
| null | null |
11/28/2011 01:23:55
|
not constructive
|
SQL - What are your favorite performance tricks?
===
When you have a query or stored procedure that needs performance tuning, what are some of the first things you try?
| 4 |
6,215,350 |
06/02/2011 13:43:14
| 502,556 |
11/09/2010 23:28:04
| 68 | 1 |
Cygwin as native 64-bit in the future?
|
Does anyone know if there will ever be a true 64-bit version of Cygwin? The FAQ says "as far as we know nobody is working on a 64-bit version" or something like that. Is cygwin forever to be a 32-bit application (or family of apps if you prefer)?
A 64-bit version would be nice. For the most part I can do what I need with the 32-bit version of cygwin on 64-bit windows. But every now and then a 64-bit program I launch from cygwin will recognize the fact that it was launched by a 32-bit parent and behave incorrectly, or not run at all. I must open a cmd.exe or powershell session to run these few commands. One example you can reproduce for yourelf on Windows 2003 64-bit with IIS installed is to run the following command from cygwin then from a cmd.exe that was not opened from within cygwin. (Double backslashes obviously aren't necessary in cmd.exe, but they work ok in both shells.)
cscript c:\\\\windows\\\\system32\\\\iisApp.vbs
So, I can live with opening a cmd.exe session when I need to run something that behaves this way. But being a huge fan of Cygwin I would really like to see an indication that someday someone will produce a 64-bit version.
|
cygwin
| null | null | null | null |
04/30/2012 13:01:47
|
not constructive
|
Cygwin as native 64-bit in the future?
===
Does anyone know if there will ever be a true 64-bit version of Cygwin? The FAQ says "as far as we know nobody is working on a 64-bit version" or something like that. Is cygwin forever to be a 32-bit application (or family of apps if you prefer)?
A 64-bit version would be nice. For the most part I can do what I need with the 32-bit version of cygwin on 64-bit windows. But every now and then a 64-bit program I launch from cygwin will recognize the fact that it was launched by a 32-bit parent and behave incorrectly, or not run at all. I must open a cmd.exe or powershell session to run these few commands. One example you can reproduce for yourelf on Windows 2003 64-bit with IIS installed is to run the following command from cygwin then from a cmd.exe that was not opened from within cygwin. (Double backslashes obviously aren't necessary in cmd.exe, but they work ok in both shells.)
cscript c:\\\\windows\\\\system32\\\\iisApp.vbs
So, I can live with opening a cmd.exe session when I need to run something that behaves this way. But being a huge fan of Cygwin I would really like to see an indication that someday someone will produce a 64-bit version.
| 4 |
9,227,974 |
02/10/2012 12:43:16
| 1,202,059 |
02/10/2012 12:39:57
| 1 | 0 |
Best way to learn Iphone Development
|
Hope all of you doing great. I am new in Iphone development using xcode and want to know the best way of learning?
thanks
|
xcode
| null | null | null | null |
02/11/2012 04:30:30
|
off topic
|
Best way to learn Iphone Development
===
Hope all of you doing great. I am new in Iphone development using xcode and want to know the best way of learning?
thanks
| 2 |
10,504,556 |
05/08/2012 18:44:38
| 1,382,859 |
05/08/2012 18:36:49
| 1 | 0 |
I have paid my account but my google maps api doesn't works
|
I'm using richfaces in my app, and recently I'm working with map framework!
The configuration is correct, I just set up the api in Google APIs Console, put my credit card number in checkout account, the billing is resolved but, my api doesn't works.
It works just for one month, 30 days after, I had to put my credit card number again, and after that, the google maps api doesn't works ever.
What have I do in this case???
Please help me...
|
java
| null | null | null | null |
05/08/2012 20:17:40
|
off topic
|
I have paid my account but my google maps api doesn't works
===
I'm using richfaces in my app, and recently I'm working with map framework!
The configuration is correct, I just set up the api in Google APIs Console, put my credit card number in checkout account, the billing is resolved but, my api doesn't works.
It works just for one month, 30 days after, I had to put my credit card number again, and after that, the google maps api doesn't works ever.
What have I do in this case???
Please help me...
| 2 |
6,503,584 |
06/28/2011 08:21:33
| 557,176 |
12/29/2010 13:23:19
| 91 | 4 |
JQuery & PHP Lookup Field
|
I have followed a tutorial on how to create a look up field which dynamically searches a table in the MySQL database - the purpose is to process a contact lookup by postcode. I have the search working and the value (on the page) is inserted into the field however I need to get the id of the record selected into the value="idhere" parameter of the input field. I have added both the PHP and the HTML below can anyone take a look and help resolve my problem.
Javascript & CSS
<script type="text/javascript">
function getSuggestions(value) {
if(value != ""){
$.post("lookup.php", {contactPart:value}, function(data) {
$("#suggestions").html(data);
runCSS();
});
}else{
removeSuggestions();
}
}
function removeSuggestions() {
$("#suggestions").html("");
stopCSS();
}
function addText(value) {
$("#inputContact").val(value);
$("#inputContact").val() {
$(this).val()
}
}
function runCSS() {
$("#suggestions").css({
'border' : 'solid',
'border-width' : '1px'
});
}
function stopCSS() {
$("#suggestions").css({
'border' : '',
'border-width' : ''
});
}
</script>
<style type="text/css">
#suggestions {
text-align: left;
padding-left: 3px;
}
#link:hover {
background-color: #f0f0f0;
cursor: default;
}
</style>
HTML
<input type="text" name="userA" id="inputContact" onblur="setTimeout('removeSuggestions()', 200)" onkeyup="getSuggestions(this.value);" value="" />
<div id="suggestions"></div>
PHP
<?php
mysql_connect("127.0.0.1", "root", "root")or die(mysql_error());
mysql_select_db("gEntry")or die(mysql_error());
$contactPart = mysql_real_escape_string(addslashes($_POST['contactPart']));
$result = mysql_query("SELECT id, title, firstname, lastname, postcode FROM contact WHERE postcode LIKE '%".$contactPart."%'")or die (mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo "<div id='link' onClick='addText(\"".$row['id']. ' - ' .$row['title']. ' ' .$row['firstname']. ' '.$row['lastname']."\");'>" . $row['id'] . ' - ' . $row['title'] . ' ' . $row['firstname'] . ' ' . $row['lastname'] . ' - ' . $row['postcode'] . "</div>";
}
?>
I am using standard mysql syntax as mysqli will not work on my server.
Thanks in advance
|
php
|
javascript
|
jquery
|
mysql
|
html
| null |
open
|
JQuery & PHP Lookup Field
===
I have followed a tutorial on how to create a look up field which dynamically searches a table in the MySQL database - the purpose is to process a contact lookup by postcode. I have the search working and the value (on the page) is inserted into the field however I need to get the id of the record selected into the value="idhere" parameter of the input field. I have added both the PHP and the HTML below can anyone take a look and help resolve my problem.
Javascript & CSS
<script type="text/javascript">
function getSuggestions(value) {
if(value != ""){
$.post("lookup.php", {contactPart:value}, function(data) {
$("#suggestions").html(data);
runCSS();
});
}else{
removeSuggestions();
}
}
function removeSuggestions() {
$("#suggestions").html("");
stopCSS();
}
function addText(value) {
$("#inputContact").val(value);
$("#inputContact").val() {
$(this).val()
}
}
function runCSS() {
$("#suggestions").css({
'border' : 'solid',
'border-width' : '1px'
});
}
function stopCSS() {
$("#suggestions").css({
'border' : '',
'border-width' : ''
});
}
</script>
<style type="text/css">
#suggestions {
text-align: left;
padding-left: 3px;
}
#link:hover {
background-color: #f0f0f0;
cursor: default;
}
</style>
HTML
<input type="text" name="userA" id="inputContact" onblur="setTimeout('removeSuggestions()', 200)" onkeyup="getSuggestions(this.value);" value="" />
<div id="suggestions"></div>
PHP
<?php
mysql_connect("127.0.0.1", "root", "root")or die(mysql_error());
mysql_select_db("gEntry")or die(mysql_error());
$contactPart = mysql_real_escape_string(addslashes($_POST['contactPart']));
$result = mysql_query("SELECT id, title, firstname, lastname, postcode FROM contact WHERE postcode LIKE '%".$contactPart."%'")or die (mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo "<div id='link' onClick='addText(\"".$row['id']. ' - ' .$row['title']. ' ' .$row['firstname']. ' '.$row['lastname']."\");'>" . $row['id'] . ' - ' . $row['title'] . ' ' . $row['firstname'] . ' ' . $row['lastname'] . ' - ' . $row['postcode'] . "</div>";
}
?>
I am using standard mysql syntax as mysqli will not work on my server.
Thanks in advance
| 0 |
3,378,644 |
07/31/2010 15:01:26
| 395,717 |
07/19/2010 10:15:44
| 23 | 0 |
PHP Error, what did i do wrong?
|
<?php
$stap2 = $_POST['stap2'];
$stap3 = $_POST['stap3'];
$stap4 = $_POST['stap4'];
$klaar = $_POST['klaar'];
if(isset($klaar)){
$cijfer1 = $_POST['cijfer1'];
$cijfer2 = $_POST['cijfer2'];
$cijfer3 = $_POST['cijfer3'];
$cijfer4 = $_POST['cijfer4'];
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
$vooruitgang = $_POST['vooruitgang'];
$inspiratie = $_POST['inspiratie'];
}
elseif(isset(stap4)){
$cijfer1 = $_POST['cijfer1'];
$cijfer2 = $_POST['cijfer2'];
$cijfer3 = $_POST['cijfer3'];
$cijfer4 = $_POST['cijfer4'];
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
$vooruitgang = $_POST['vooruitgang'];
?>
<form>
Bent u <strong>geinspireerd</strong> door deze vragen? <em> Ja / Nee </em> <br />
<input type="text" name="inspiratie" />
<input type="hidden" name="een" value="<?php echo $een; ?>" />
<input type="hidden" name="twee" value="<?php echo $twee; ?>" />
<input type="hidden" name="drie" value="<?php echo $drie; ?>" />
<input type="hidden" name="vier" value="<?php echo $vier; ?>" />
<input type="hidden" name="cijfer1" value="<?php echo $cijfer1; ?>" />
<input type="hidden" name="cijfer2" value="<?php echo $cijfer2; ?>" />
<input type="hidden" name="cijfer3" value="<?php echo $cijfer3; ?>" />
<input type="hidden" name="cijfer4" value="<?php echo $cijfer4; ?>" />
<input type="hidden" name="vooruitgang" value="<?php echo $vooruitgang ?>" />
<input type="submit" name="klaar" value="Klaar!" />
</form>
<?php
}
elseif(isset($stap3)){
$cijfer1 = $_POST['cijfer1'];
$cijfer2 = $_POST['cijfer2'];
$cijfer3 = $_POST['cijfer3'];
$cijfer4 = $_POST['cijfer4'];
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
?>
Op welk levensgebied zou u het liefst <strong>vooruitgang </strong> willen zien? <br />
<form action="" method="post">
<?php echo "$een"; ?> <input type="radio" name="vooruitgang" value="1" /> <br />
<?php echo "$twee";?> <input type="radio" name="vooruitgang" value="2"/> <br />
<?php echo "$drie";?> <input type="radio" name="vooruitgang" value="3" /><br />
<?php echo "$vier";?> <input type="radio" name="vooruitgang" value="4" /><br />
<input type="hidden" name="een" value="<?php echo $een; ?>" />
<input type="hidden" name="twee" value="<?php echo $twee; ?>" />
<input type="hidden" name="drie" value="<?php echo $drie; ?>" />
<input type="hidden" name="vier" value="<?php echo $vier; ?>" />
<input type="hidden" name="cijfer1" value="<?php echo $cijfer1; ?>" />
<input type="hidden" name="cijfer2" value="<?php echo $cijfer2; ?>" />
<input type="hidden" name="cijfer3" value="<?php echo $cijfer3; ?>" />
<input type="hidden" name="cijfer4" value="<?php echo $cijfer4; ?>" />
<input type="submit" name="stap4" value="Laatste stap" />
</form>
<?php
}
elseif(isset($stap2)) {
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
?>
<form action="" method="post">
Kunt u nu een cijfer geven <strong> per levensgebied </strong> ? <br />
<?php echo "$een"; ?> <br />
<input type="text" name="cijfer1" /> <br />
<?php echo "$twee"; ?> <br />
<input type="text" name="cijfer2" /> <br />
<?php echo "$drie"; ?> <br />
<input type="text" name="cijfer3" /> <br />
<?php echo "$vier"; ?> <br />
<input type="text" name="cijfer4" /> <br />
<input type="hidden" name="een" value="<?php echo $een; ?>" />
<input type="hidden" name="twee" value="<?php echo $twee; ?>" />
<input type="hidden" name="drie" value="<?php echo $drie; ?>" />
<input type="hidden" name="vier" value="<?php echo $vier; ?>" />
<input type="submit" name="stap3" value="Volgende stap" />
<?php
}
else {
?>
<form action="" method="post">
Welke <strong> 4 </strong> levensgebieden vindt u belangrijk? <br />
<input type="text" name="een" /><br />
<input type="text" name="twee" /><br />
<input type="text" name="drie" /><br />
<input type="text" name="vier" /><br />
<input type="submit" name="stap2" value="Volgende stap" />
</form>
<?php
}
?>
?>
What is wrong? I get this error:
syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in C:\xampp\htdocs\WEBSITES\index.php on line 20
Don't know, could you help?
|
php
| null | null | null | null |
07/31/2010 15:16:07
|
not a real question
|
PHP Error, what did i do wrong?
===
<?php
$stap2 = $_POST['stap2'];
$stap3 = $_POST['stap3'];
$stap4 = $_POST['stap4'];
$klaar = $_POST['klaar'];
if(isset($klaar)){
$cijfer1 = $_POST['cijfer1'];
$cijfer2 = $_POST['cijfer2'];
$cijfer3 = $_POST['cijfer3'];
$cijfer4 = $_POST['cijfer4'];
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
$vooruitgang = $_POST['vooruitgang'];
$inspiratie = $_POST['inspiratie'];
}
elseif(isset(stap4)){
$cijfer1 = $_POST['cijfer1'];
$cijfer2 = $_POST['cijfer2'];
$cijfer3 = $_POST['cijfer3'];
$cijfer4 = $_POST['cijfer4'];
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
$vooruitgang = $_POST['vooruitgang'];
?>
<form>
Bent u <strong>geinspireerd</strong> door deze vragen? <em> Ja / Nee </em> <br />
<input type="text" name="inspiratie" />
<input type="hidden" name="een" value="<?php echo $een; ?>" />
<input type="hidden" name="twee" value="<?php echo $twee; ?>" />
<input type="hidden" name="drie" value="<?php echo $drie; ?>" />
<input type="hidden" name="vier" value="<?php echo $vier; ?>" />
<input type="hidden" name="cijfer1" value="<?php echo $cijfer1; ?>" />
<input type="hidden" name="cijfer2" value="<?php echo $cijfer2; ?>" />
<input type="hidden" name="cijfer3" value="<?php echo $cijfer3; ?>" />
<input type="hidden" name="cijfer4" value="<?php echo $cijfer4; ?>" />
<input type="hidden" name="vooruitgang" value="<?php echo $vooruitgang ?>" />
<input type="submit" name="klaar" value="Klaar!" />
</form>
<?php
}
elseif(isset($stap3)){
$cijfer1 = $_POST['cijfer1'];
$cijfer2 = $_POST['cijfer2'];
$cijfer3 = $_POST['cijfer3'];
$cijfer4 = $_POST['cijfer4'];
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
?>
Op welk levensgebied zou u het liefst <strong>vooruitgang </strong> willen zien? <br />
<form action="" method="post">
<?php echo "$een"; ?> <input type="radio" name="vooruitgang" value="1" /> <br />
<?php echo "$twee";?> <input type="radio" name="vooruitgang" value="2"/> <br />
<?php echo "$drie";?> <input type="radio" name="vooruitgang" value="3" /><br />
<?php echo "$vier";?> <input type="radio" name="vooruitgang" value="4" /><br />
<input type="hidden" name="een" value="<?php echo $een; ?>" />
<input type="hidden" name="twee" value="<?php echo $twee; ?>" />
<input type="hidden" name="drie" value="<?php echo $drie; ?>" />
<input type="hidden" name="vier" value="<?php echo $vier; ?>" />
<input type="hidden" name="cijfer1" value="<?php echo $cijfer1; ?>" />
<input type="hidden" name="cijfer2" value="<?php echo $cijfer2; ?>" />
<input type="hidden" name="cijfer3" value="<?php echo $cijfer3; ?>" />
<input type="hidden" name="cijfer4" value="<?php echo $cijfer4; ?>" />
<input type="submit" name="stap4" value="Laatste stap" />
</form>
<?php
}
elseif(isset($stap2)) {
$een = $_POST['een'];
$twee = $_POST['twee'];
$drie = $_POST['drie'];
$vier = $_POST['vier'];
?>
<form action="" method="post">
Kunt u nu een cijfer geven <strong> per levensgebied </strong> ? <br />
<?php echo "$een"; ?> <br />
<input type="text" name="cijfer1" /> <br />
<?php echo "$twee"; ?> <br />
<input type="text" name="cijfer2" /> <br />
<?php echo "$drie"; ?> <br />
<input type="text" name="cijfer3" /> <br />
<?php echo "$vier"; ?> <br />
<input type="text" name="cijfer4" /> <br />
<input type="hidden" name="een" value="<?php echo $een; ?>" />
<input type="hidden" name="twee" value="<?php echo $twee; ?>" />
<input type="hidden" name="drie" value="<?php echo $drie; ?>" />
<input type="hidden" name="vier" value="<?php echo $vier; ?>" />
<input type="submit" name="stap3" value="Volgende stap" />
<?php
}
else {
?>
<form action="" method="post">
Welke <strong> 4 </strong> levensgebieden vindt u belangrijk? <br />
<input type="text" name="een" /><br />
<input type="text" name="twee" /><br />
<input type="text" name="drie" /><br />
<input type="text" name="vier" /><br />
<input type="submit" name="stap2" value="Volgende stap" />
</form>
<?php
}
?>
?>
What is wrong? I get this error:
syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in C:\xampp\htdocs\WEBSITES\index.php on line 20
Don't know, could you help?
| 1 |
8,221,819 |
11/22/2011 04:00:12
| 1,059,046 |
11/22/2011 03:58:58
| 1 | 0 |
Most of my Facebook Likes have disappeared from my website
|
Until two days ago, I had 417 Facebook Likes on my website http://www.ridiculouslife.net/ Now i have just 33. Even when I input my url into the Facebook developers Get the Like Button website (http://developers.facebook.com/docs/reference/plugins/like/) it still comes up as 33. Does anyone know what happened and how I may fix it? Thanks A
|
facebook-like
|
like
| null | null | null |
11/23/2011 05:00:44
|
off topic
|
Most of my Facebook Likes have disappeared from my website
===
Until two days ago, I had 417 Facebook Likes on my website http://www.ridiculouslife.net/ Now i have just 33. Even when I input my url into the Facebook developers Get the Like Button website (http://developers.facebook.com/docs/reference/plugins/like/) it still comes up as 33. Does anyone know what happened and how I may fix it? Thanks A
| 2 |
10,490,563 |
05/07/2012 23:35:01
| 747,090 |
05/10/2011 15:06:17
| 15 | 0 |
how to set the scala compiler when the scala file has chinese char for comments
|
i comment the code line of the Rational.scala file in chinese like this:
var a = new Rational(-4,6)
var b = new Rational(3,-9)
var c = a + a * b //满足运算符的优先级别
when i run the command:
> scala Rational.scala
it throws a exception. whereas i leave the comment off or comment in English,it's ok!
Somewhat do i config?
very thanks
fyi: this is the exception:
java.lang.ClassNotFoundException: Main (args = , classpath = d:\DOCUME~1\LUJUNM~1\LOCALS~1\Temp\scalascript3969467400078546162.tmp;C:\Program%20Files\
Java\jdk1.6.0_20\jre\lib\resources.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\rt.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\jsse.jar;C:\Prog
ram%20Files\Java\jdk1.6.0_20\jre\lib\jce.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\charsets.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\
dnsns.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\localedata.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunjce_provider.jar;C:\Progra
m%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunmscapi.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar;C:\SCALA-~1.FIN\bin\..\lib\jline.ja
r;C:\SCALA-~1.FIN\bin\..\lib\scala-compiler.jar;C:\SCALA-~1.FIN\bin\..\lib\scala-dbc.jar;C:\SCALA-~1.FIN\bin\..\lib\scala-library.jar;C:\SCALA-~1.FIN\
bin\..\lib\scala-swing.jar;C:\SCALA-~1.FIN\bin\..\lib\scalap.jar;C:\Program%20Files\Java\jdk1.6.0_20\bin;C:\Program%20Files\Java\jdk1.6.0_20\lib)
at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:103)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:40)
at scala.tools.nsc.ScriptRunner.scala$tools$nsc$ScriptRunner$$runCompiled(ScriptRunner.scala:171)
at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply$mcZ$sp(ScriptRunner.scala:157)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
at scala.tools.nsc.util.package$.waitingForThreads(package.scala:26)
at scala.tools.nsc.ScriptRunner.withCompiledScript(ScriptRunner.scala:130)
at scala.tools.nsc.ScriptRunner.runScript(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner.runScriptAndCatch(ScriptRunner.scala:201)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:58)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
|
scala
| null | null | null | null | null |
open
|
how to set the scala compiler when the scala file has chinese char for comments
===
i comment the code line of the Rational.scala file in chinese like this:
var a = new Rational(-4,6)
var b = new Rational(3,-9)
var c = a + a * b //满足运算符的优先级别
when i run the command:
> scala Rational.scala
it throws a exception. whereas i leave the comment off or comment in English,it's ok!
Somewhat do i config?
very thanks
fyi: this is the exception:
java.lang.ClassNotFoundException: Main (args = , classpath = d:\DOCUME~1\LUJUNM~1\LOCALS~1\Temp\scalascript3969467400078546162.tmp;C:\Program%20Files\
Java\jdk1.6.0_20\jre\lib\resources.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\rt.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\jsse.jar;C:\Prog
ram%20Files\Java\jdk1.6.0_20\jre\lib\jce.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\charsets.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\
dnsns.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\localedata.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunjce_provider.jar;C:\Progra
m%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunmscapi.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar;C:\SCALA-~1.FIN\bin\..\lib\jline.ja
r;C:\SCALA-~1.FIN\bin\..\lib\scala-compiler.jar;C:\SCALA-~1.FIN\bin\..\lib\scala-dbc.jar;C:\SCALA-~1.FIN\bin\..\lib\scala-library.jar;C:\SCALA-~1.FIN\
bin\..\lib\scala-swing.jar;C:\SCALA-~1.FIN\bin\..\lib\scalap.jar;C:\Program%20Files\Java\jdk1.6.0_20\bin;C:\Program%20Files\Java\jdk1.6.0_20\lib)
at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:103)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:40)
at scala.tools.nsc.ScriptRunner.scala$tools$nsc$ScriptRunner$$runCompiled(ScriptRunner.scala:171)
at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply$mcZ$sp(ScriptRunner.scala:157)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
at scala.tools.nsc.util.package$.waitingForThreads(package.scala:26)
at scala.tools.nsc.ScriptRunner.withCompiledScript(ScriptRunner.scala:130)
at scala.tools.nsc.ScriptRunner.runScript(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner.runScriptAndCatch(ScriptRunner.scala:201)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:58)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
| 0 |
6,031,818 |
05/17/2011 13:52:40
| 62,009 |
02/03/2009 16:18:52
| 1,131 | 39 |
ActiveRecord for core data
|
i use this library: https://github.com/jwang/activerecord-fetching-for-core-data
- (NSManagedObjectModel *)managedObjectModel {
if (managedObjectModel != nil) {
return managedObjectModel;
}
NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"BranchData" ofType:@"momd"];
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return managedObjectModel;
}
///////
[NSManagedObjectModel setDefaultManagedObjectModel:self.managedObjectModel];
[ActiveRecordHelpers setupCoreDataStackWithStoreNamed:@"BranchData.sqlite"];
NSManagedObjectContext *context = [NSManagedObjectContext context];
[NSManagedObjectContext setDefaultContext:context];
NSLog(@"%i", [[DataBranch findAll] count]);
DataBranch *branch = [DataBranch createEntity];
NSLog(@"%i", [[DataBranch findAll] count]);
[[NSManagedObjectContext context] save];
It works the logs prints out 0 and then 1
But if i restart my application it is not saved into the sqlite. and all data is lost
what do i do wrong ?
|
iphone
|
ios
|
core-data
|
activerecord
| null | null |
open
|
ActiveRecord for core data
===
i use this library: https://github.com/jwang/activerecord-fetching-for-core-data
- (NSManagedObjectModel *)managedObjectModel {
if (managedObjectModel != nil) {
return managedObjectModel;
}
NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"BranchData" ofType:@"momd"];
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return managedObjectModel;
}
///////
[NSManagedObjectModel setDefaultManagedObjectModel:self.managedObjectModel];
[ActiveRecordHelpers setupCoreDataStackWithStoreNamed:@"BranchData.sqlite"];
NSManagedObjectContext *context = [NSManagedObjectContext context];
[NSManagedObjectContext setDefaultContext:context];
NSLog(@"%i", [[DataBranch findAll] count]);
DataBranch *branch = [DataBranch createEntity];
NSLog(@"%i", [[DataBranch findAll] count]);
[[NSManagedObjectContext context] save];
It works the logs prints out 0 and then 1
But if i restart my application it is not saved into the sqlite. and all data is lost
what do i do wrong ?
| 0 |
7,281,934 |
09/02/2011 10:06:48
| 581,328 |
01/19/2011 11:19:46
| 81 | 4 |
Which IDE should be used for Java Application development?
|
I want to develop applications for Nokia Mobile. I googled and found that J2ME is the language in which app can be developed for the mobile phone. Please suggest any IDE in which i can develop application for Android, Blackberry, Nokia(platforms nokia commonly use) etc. Is it possible to have a single IDE for all type of development described above.
I work on Microsoft.NET technology. New in Java Development.
Please help.. Thankxxx :)
|
java
|
android
|
blackberry
|
java-me
|
nokia
|
09/05/2011 15:11:38
|
not constructive
|
Which IDE should be used for Java Application development?
===
I want to develop applications for Nokia Mobile. I googled and found that J2ME is the language in which app can be developed for the mobile phone. Please suggest any IDE in which i can develop application for Android, Blackberry, Nokia(platforms nokia commonly use) etc. Is it possible to have a single IDE for all type of development described above.
I work on Microsoft.NET technology. New in Java Development.
Please help.. Thankxxx :)
| 4 |
11,624,863 |
07/24/2012 05:47:57
| 1,481,690 |
06/26/2012 05:03:07
| 44 | 12 |
Executing EXE from Command line
|
I have a EXE and i have executed from Command line with Elevated Previlages. Exe is executed fine and in the middle it freezes. Now i want to open other Exe from Command prompt how can i Stop the Previous EXE from Executing.
PS: I don't want to re-open the command prompt or kill process in task manager. Any command i can do it from command prompt itself ?
|
c#
|
windows
|
command-line
| null | null |
07/24/2012 06:40:13
|
off topic
|
Executing EXE from Command line
===
I have a EXE and i have executed from Command line with Elevated Previlages. Exe is executed fine and in the middle it freezes. Now i want to open other Exe from Command prompt how can i Stop the Previous EXE from Executing.
PS: I don't want to re-open the command prompt or kill process in task manager. Any command i can do it from command prompt itself ?
| 2 |
8,352,549 |
12/02/2011 06:26:49
| 1,074,979 |
12/01/2011 08:13:24
| 2 | 0 |
facebook for android
|
I have used facebook application for one of my android application. But i need to implement as such as a native facebook application.
I have used Webview to display feeds and messages in FB application. I need to create a native FB application. I am using JSON as web service. I need to make my FB application as it looks as a native FB application for android application. There is a vast difference of what i have done and the native application.
Any sample working code will be a great help for me.
Thanks in Advance.
|
android
|
facebook
| null | null | null |
12/02/2011 16:31:18
|
not a real question
|
facebook for android
===
I have used facebook application for one of my android application. But i need to implement as such as a native facebook application.
I have used Webview to display feeds and messages in FB application. I need to create a native FB application. I am using JSON as web service. I need to make my FB application as it looks as a native FB application for android application. There is a vast difference of what i have done and the native application.
Any sample working code will be a great help for me.
Thanks in Advance.
| 1 |
1,490,115 |
09/29/2009 01:20:09
| 50,859 |
01/02/2009 11:16:29
| 135 | 5 |
Is a "Virus Free" or "Spyware Free" Certification Standard Practice For New Businesses?
|
I have seen several shareware sites that feature "virus free", and "spyware free" certified logos. I am planning on marketing my software for profit, but would it be worthwhile to get some sort of certification logo on the download page for my software?
A company called [International Charter][1] offers something called a ["safe download" certification][2]. Do you think something like this would actually increase download numbers?
[1]: http://www.icharter.org
[2]: http://www.icharter.org/certification/software/safedownload_faq.html
|
certification
|
spyware
|
virus
| null | null |
08/25/2011 21:28:12
|
off topic
|
Is a "Virus Free" or "Spyware Free" Certification Standard Practice For New Businesses?
===
I have seen several shareware sites that feature "virus free", and "spyware free" certified logos. I am planning on marketing my software for profit, but would it be worthwhile to get some sort of certification logo on the download page for my software?
A company called [International Charter][1] offers something called a ["safe download" certification][2]. Do you think something like this would actually increase download numbers?
[1]: http://www.icharter.org
[2]: http://www.icharter.org/certification/software/safedownload_faq.html
| 2 |
11,734,166 |
07/31/2012 06:12:34
| 1,459,420 |
06/15/2012 17:45:15
| 59 | 3 |
How to apply multy style to single control in wpf?
|
<Window.Resources>
<Style TargetType="Button" x:Key="style_1">
<Setter Property="Foreground" Value="Green" />
</Style>
<Style TargetType="Button" x:Key="style_2">
<Setter Property="Background" Value="Blue" />
</Style>
</Window.Resources>
<Button x:Name="btn_1" Content="Button" HorizontalAlignment="Left" Height="40" Margin="153,95,0,0" VerticalAlignment="Top" Width="89" Style="{StaticResource style_1}" Click="Button_Click" />
<Button x:Name="btn_2" Content="Button" Height="40" Margin="281,95,262,0" VerticalAlignment="Top" Style="{StaticResource style_2}"/>
Now i want to apply style_1 and style_2 to **btn_1** what should i do for that.
|
wpf
|
styles
| null | null | null | null |
open
|
How to apply multy style to single control in wpf?
===
<Window.Resources>
<Style TargetType="Button" x:Key="style_1">
<Setter Property="Foreground" Value="Green" />
</Style>
<Style TargetType="Button" x:Key="style_2">
<Setter Property="Background" Value="Blue" />
</Style>
</Window.Resources>
<Button x:Name="btn_1" Content="Button" HorizontalAlignment="Left" Height="40" Margin="153,95,0,0" VerticalAlignment="Top" Width="89" Style="{StaticResource style_1}" Click="Button_Click" />
<Button x:Name="btn_2" Content="Button" Height="40" Margin="281,95,262,0" VerticalAlignment="Top" Style="{StaticResource style_2}"/>
Now i want to apply style_1 and style_2 to **btn_1** what should i do for that.
| 0 |
10,093,011 |
04/10/2012 16:53:31
| 1,297,960 |
03/28/2012 10:55:57
| 1 | 0 |
How concise should I make my ruby?
|
In ruby or programming in general is the best practice to be as concise as the language allows or to be concise while still readable? For example:
animals = %w{ cat dog bird }
chosen_animal = rand(animals.length)
random_animal = animals[chosen_animal]
Or
animals = %w{ cat dog bird }
random_animal = animals[rand(animals.length)]
I have a feeling the second one is better code. Is there any benefit of using the first one? Which would you use and why?
|
ruby
| null | null | null | null |
04/12/2012 02:58:03
|
not constructive
|
How concise should I make my ruby?
===
In ruby or programming in general is the best practice to be as concise as the language allows or to be concise while still readable? For example:
animals = %w{ cat dog bird }
chosen_animal = rand(animals.length)
random_animal = animals[chosen_animal]
Or
animals = %w{ cat dog bird }
random_animal = animals[rand(animals.length)]
I have a feeling the second one is better code. Is there any benefit of using the first one? Which would you use and why?
| 4 |
9,855,209 |
03/24/2012 20:15:46
| 24,875 |
10/03/2008 15:03:34
| 729 | 29 |
How can I describe a table in Oracle without using the DESCRIBE command?
|
I'm having a hard time with a class I am taking. We need to write an Oracle script that will act just like the DESCRIBE command. The book we are using describes how to work with the Data Dictionary very poorly. Not looking for answers, but a point in the correct direction.
|
oracle
|
oracle11g
|
sql-scripts
|
data-dictionary
| null | null |
open
|
How can I describe a table in Oracle without using the DESCRIBE command?
===
I'm having a hard time with a class I am taking. We need to write an Oracle script that will act just like the DESCRIBE command. The book we are using describes how to work with the Data Dictionary very poorly. Not looking for answers, but a point in the correct direction.
| 0 |
9,646,943 |
03/10/2012 13:48:10
| 1,121,506 |
12/29/2011 15:59:05
| 18 | 0 |
Check if each item in an array is identical in javascript
|
I need to test whether each item in an array is identical. For example:
`var list = ["l","r","b"]`
Should evaluate as false, because each item is not identical. On the other hand this;
`var list = ["b", "b", "b"]`
Should evaluate as true because they are all identical. What would be the most effecient (in speed/resources) way of achieving this?
|
javascript
|
arrays
|
identical
| null | null | null |
open
|
Check if each item in an array is identical in javascript
===
I need to test whether each item in an array is identical. For example:
`var list = ["l","r","b"]`
Should evaluate as false, because each item is not identical. On the other hand this;
`var list = ["b", "b", "b"]`
Should evaluate as true because they are all identical. What would be the most effecient (in speed/resources) way of achieving this?
| 0 |
11,581,906 |
07/20/2012 15:01:56
| 1,166,981 |
01/24/2012 12:31:34
| 206 | 1 |
How to create something similar to Youtube's playlist bar?
|
www.youtube.com/disco, at the very bottom of the page is a cool playlist bar, does anyone know of anything open source which does a similar job?
|
jquery
|
asp.net
|
html
|
ajax
| null |
07/20/2012 21:38:59
|
not a real question
|
How to create something similar to Youtube's playlist bar?
===
www.youtube.com/disco, at the very bottom of the page is a cool playlist bar, does anyone know of anything open source which does a similar job?
| 1 |
11,602,313 |
07/22/2012 17:11:47
| 1,544,238 |
07/22/2012 17:03:43
| 1 | 0 |
Total number of times a certain letter or test appear in a column for openoffice calc
|
i am trying to get openoffice cal to calculate the total number of times 'G', 'S', 'P' which were type in one column. e.g total 'G' which were typed = 10, total 'S' which were type = 8. Anyone can help?....
|
openoffice-calc
| null | null | null | null |
07/22/2012 21:51:59
|
off topic
|
Total number of times a certain letter or test appear in a column for openoffice calc
===
i am trying to get openoffice cal to calculate the total number of times 'G', 'S', 'P' which were type in one column. e.g total 'G' which were typed = 10, total 'S' which were type = 8. Anyone can help?....
| 2 |
5,232,688 |
03/08/2011 12:50:31
| 649,820 |
03/08/2011 12:50:31
| 1 | 0 |
GitHub.com (ruby on rails 3)
|
https://github.com/arenum19/Survey#readme
How I can run this project on my pc?! Download it, and what is next steps?
|
ruby-on-rails
| null | null | null | null |
03/08/2011 14:51:36
|
not a real question
|
GitHub.com (ruby on rails 3)
===
https://github.com/arenum19/Survey#readme
How I can run this project on my pc?! Download it, and what is next steps?
| 1 |
11,185,372 |
06/25/2012 07:51:18
| 949,571 |
09/16/2011 21:08:50
| 1 | 0 |
How to render unicode right-to-left text using OpenGL in C#
|
Is there any c# opengl library to render unicode (or some opengl techniques)?
I'm working on a multi-language application,
It should support unicode and right-to-left languages,
thanks in advance,
|
c#
|
opengl
|
utf-8
|
utf
|
right-to-left
|
06/26/2012 18:52:35
|
not constructive
|
How to render unicode right-to-left text using OpenGL in C#
===
Is there any c# opengl library to render unicode (or some opengl techniques)?
I'm working on a multi-language application,
It should support unicode and right-to-left languages,
thanks in advance,
| 4 |
7,036,442 |
08/12/2011 06:35:17
| 872,930 |
08/01/2011 14:21:46
| -1 | 0 |
I want to create a excel file dynamically using MS API from VB.NET
|
Can anybody help me in creation of excel file dynamically from vb.net.
I want to use Micorosoft API to do this funccaitonality.
Thank you
Ramesh.T.
|
.net
|
excel
| null | null | null |
08/12/2011 07:29:03
|
not a real question
|
I want to create a excel file dynamically using MS API from VB.NET
===
Can anybody help me in creation of excel file dynamically from vb.net.
I want to use Micorosoft API to do this funccaitonality.
Thank you
Ramesh.T.
| 1 |
11,063,314 |
06/16/2012 12:14:34
| 1,460,559 |
06/16/2012 11:45:03
| 1 | 0 |
OAuth 2.0 for distributable web applications
|
I'm trying to figure out, how to use OAuth 2.0 to access Google APIs from my web app. The problem is, that the protocol require developer to register **redirect_uri** (URL of page receiving access token). But my application can be distributed to many customers and can be hosted on endless number of servers. There is no way to know **redirect_uri** beforehand.
Google offers another option for installed applications, but I cannot use this variant neither. Auth server returns access code in window title and this information cannot be accessed from javascript of our page (JS cannot access content of window opened using window.open(); if that content comes from different server).
To conclude:
1. Cannot use method for web applications, because I don't know all URLs where will our app run in the future.
2. Cannot use method for installed applications, because window title is not accessible from our JavaScript code.
Is there any recommendation, how to use Google's OAuth 2.0 from **distributable** web application running on a lots of servers? Thank you.
|
api
|
google
|
application
|
oauth
|
web
| null |
open
|
OAuth 2.0 for distributable web applications
===
I'm trying to figure out, how to use OAuth 2.0 to access Google APIs from my web app. The problem is, that the protocol require developer to register **redirect_uri** (URL of page receiving access token). But my application can be distributed to many customers and can be hosted on endless number of servers. There is no way to know **redirect_uri** beforehand.
Google offers another option for installed applications, but I cannot use this variant neither. Auth server returns access code in window title and this information cannot be accessed from javascript of our page (JS cannot access content of window opened using window.open(); if that content comes from different server).
To conclude:
1. Cannot use method for web applications, because I don't know all URLs where will our app run in the future.
2. Cannot use method for installed applications, because window title is not accessible from our JavaScript code.
Is there any recommendation, how to use Google's OAuth 2.0 from **distributable** web application running on a lots of servers? Thank you.
| 0 |
11,678,317 |
07/26/2012 21:30:53
| 1,556,053 |
07/26/2012 21:11:34
| 1 | 0 |
jQuery slider inside jQuery tabs
|
It's about 2 weeks I'm trying to put a jquery slider in jquery tabs but none of the samples I downloaded worked for me. they have conflict with each other.
**What I need :**
I need a slider like this : http://tympanus.net/Development/ParallaxContentSlider/index4.html
or any other jquery slider which has the same features ( like active page, ability to change slides, next/prev, etc )
and a jquery tab like this : http://www.webdesign-bulgaria.com/opensource/jquery-smooth-fading-tabs-demo.php to put the slider in each tab !!
short explain : I need 5 tabs and a slider in each of them ...
I tried thousands of the samples of each of them. my knowledge about jquery is not enough to debug the errors. anybody has anything like this ?! or can anybody make it for me ?! I really need ...
|
jquery
|
tabs
|
slider
|
inside
| null |
07/26/2012 21:43:43
|
not a real question
|
jQuery slider inside jQuery tabs
===
It's about 2 weeks I'm trying to put a jquery slider in jquery tabs but none of the samples I downloaded worked for me. they have conflict with each other.
**What I need :**
I need a slider like this : http://tympanus.net/Development/ParallaxContentSlider/index4.html
or any other jquery slider which has the same features ( like active page, ability to change slides, next/prev, etc )
and a jquery tab like this : http://www.webdesign-bulgaria.com/opensource/jquery-smooth-fading-tabs-demo.php to put the slider in each tab !!
short explain : I need 5 tabs and a slider in each of them ...
I tried thousands of the samples of each of them. my knowledge about jquery is not enough to debug the errors. anybody has anything like this ?! or can anybody make it for me ?! I really need ...
| 1 |
7,906,492 |
10/26/2011 17:30:04
| 361,902 |
06/08/2010 23:31:28
| 412 | 22 |
On Android's Support Package, use it or not?
|
I've been thinking about the pros and cons of using Android's Support Package when targeting the latest API and setting the min SDK to 7, for example.
The [Android documentation][1] states "The goal is to simplify your development by offering more APIs that you can bundle with your application so you can worry less about platform versions"; however, I'm having some doubt on whether it will make it simpler.
Consider the TabActivity, which has been deprecated. The alternative to using TabActivity is through Fragments and by looking at the [example][2] to get a tabular view working, it doesn't look simpler. Besides, I have to use reflection anyways when deciding on to use the Fragments class versus the FragmentActivity class, so why not just use TabActivity. I was hoping to get your opinion on this. I'm leaning towards not using it, but I would like to know if I'm missing out on any benefits.
[1]: http://developer.android.com/sdk/compatibility-library.html
[2]: http://developer.android.com/reference/android/app/TabActivity.html
|
android
| null | null | null | null | null |
open
|
On Android's Support Package, use it or not?
===
I've been thinking about the pros and cons of using Android's Support Package when targeting the latest API and setting the min SDK to 7, for example.
The [Android documentation][1] states "The goal is to simplify your development by offering more APIs that you can bundle with your application so you can worry less about platform versions"; however, I'm having some doubt on whether it will make it simpler.
Consider the TabActivity, which has been deprecated. The alternative to using TabActivity is through Fragments and by looking at the [example][2] to get a tabular view working, it doesn't look simpler. Besides, I have to use reflection anyways when deciding on to use the Fragments class versus the FragmentActivity class, so why not just use TabActivity. I was hoping to get your opinion on this. I'm leaning towards not using it, but I would like to know if I'm missing out on any benefits.
[1]: http://developer.android.com/sdk/compatibility-library.html
[2]: http://developer.android.com/reference/android/app/TabActivity.html
| 0 |
10,067,814 |
04/09/2012 00:50:21
| 1,310,730 |
04/03/2012 14:46:36
| 6 | 0 |
why do strings have pointers as there return type?
|
I know what pointers are but when it comes to strings/arrays I get really confused. If someone has an answer or a website that explains it that would be great. For example:
char * strncopy (char*dest, char * source, size_t);
Why the pointer? what is it pointing to? Does it a pointer usually store an address?
It says in my textbook that each string building function is the pointer type char*, ???
Also I was trying to see if I could write a program that would clear things up, but it didn't work, can someone tell me how to fix it, or what I'm doing wrong.
#include <stdio.h>
#include <string.h>
char * getname ()
{
char name [10];
scanf ("%s", name);
return (name);
}
int main (void)
{
char name[10];
printf ("Enter your name\n");
name[] = getname();
printf ("Hi %s", name);
return (0);
}
|
pointers
| null | null | null | null | null |
open
|
why do strings have pointers as there return type?
===
I know what pointers are but when it comes to strings/arrays I get really confused. If someone has an answer or a website that explains it that would be great. For example:
char * strncopy (char*dest, char * source, size_t);
Why the pointer? what is it pointing to? Does it a pointer usually store an address?
It says in my textbook that each string building function is the pointer type char*, ???
Also I was trying to see if I could write a program that would clear things up, but it didn't work, can someone tell me how to fix it, or what I'm doing wrong.
#include <stdio.h>
#include <string.h>
char * getname ()
{
char name [10];
scanf ("%s", name);
return (name);
}
int main (void)
{
char name[10];
printf ("Enter your name\n");
name[] = getname();
printf ("Hi %s", name);
return (0);
}
| 0 |
4,811,136 |
01/26/2011 23:03:09
| 428,862 |
08/23/2010 21:29:45
| 100 | 4 |
How to convert a MATLAB file to PYTHON?
|
On someone's blog, I found some code that I want to modify with python.
But I dont known Matlab syntax or code or have MATLAB to test...
Can anyone help re-write with python, less comments.
The Yahoo symbols I would be interested in would MSFT, IBM, and SPY. The Output as CSV works well.
function DataOut = Get_Yahoo_Options_Data(symbolid)
%Get_Yahoo_Options_Data get Option Chain Data from Yahoo
% Get Options Chain Data from Yahoo
% DataOut = Get_Yahoo_Options_Data(symbol)
% Inputs: Symbol name as a character String
% Output: A structure with the following fields
% data : A 1xN cell where N is the number of Expiries available
% ExpDates : A 1xN cell array of Expiry Dates
% Calls : A 1xN cell array of Call Option data for each expiry
% Puts : A 1xN cell array of Put Option data
% CPHeaders : Headers for the calls and puts option data
% Headers: Headers for the data
% FullOptionData : A combined cell array of DataOut.data
% Last : Last Price
% Example:
% DataOut = Get_Yahoo_Options_Data('LVS');
% (c)tradingwithmatlab.blogspot.com
DataOut = struct;
% Construct and read the URL from Yahoo Finance Website
urlText = urlread(['http://finance.yahoo.com/q/os?s=' symbolid]);
% Try getting the Table Data from URL Text
TableData = getTableData();
% If Empty return
if(isempty(TableData))
return
else
DataOut.data{1} = TableData;
end
% Get the Expiry Date for later use
DataOut.ExpDates{1} = Get_Exp_Dates();
% Get Expiry Dates that are listed in the website to construct separate
% URLS for each month
NextExpiryURL = Get_Next_Expiry_URL();
if(isempty(NextExpiryURL))
return
end
% Now read Option Tables of each Expiry month
for ik = 1:length(NextExpiryURL)
urlText = urlread(NextExpiryURL{ik});
DataOut.ExpDates{ik+1} = Get_Exp_Dates();
DataOut.data{ik+1} = getTableData();
end
% Clean Up
% Convert the strings into numbers
f = @(x)[x(:,1) num2cell(str2double(x(:,[2:8]))) x(:,9) num2cell(str2double(x(:,10:end)))];
DataOut.data = cellfun(f,DataOut.data,'uni',false);
% Separate the data into Calls, Puts, Headers
DataOut.Calls = cellfun(@(x) x(:,[1 8 2:7]),DataOut.data,'uni',false);
DataOut.Puts = cellfun(@(x) x(:,[9 8 10:end]),DataOut.data,'uni',false);
DataOut.CPHeaders = {'Symbol','Strike','Last','Change','Bid','Ask','Volume','Open Int'};
DataOut.Headers = {'Symbol','Last','Change','Bid','Ask','Volume','Open Int','Strike',...
'Symbol','Last','Change','Bid','Ask','Volume','Open Int'};
DataOut.FullOptionData = [DataOut.Headers ; cat(1,DataOut.data{:})];
% Get the Last Price
DataOut.Last = str2num(urlread(['http://download.finance.yahoo.com/d/quotes.csv?s=' symbolid '&f=l1&e=.csv']));
%% Get_Next_Expiry_URL
function NextExpiry = Get_Next_Expiry_URL()
% Get the start and end indices and look for a particular text
Start = regexp(urlText,'View By Expiration:','end');
end1 = regexp(urlText,'Return to Stacked View...','start');
Data = urlText(Start:end1);
Data=Data(2:end);
% Trim the data
Data=strtrim(Data);
% Split the data into new lines
newlines = regexp(Data, '[^\n]*', 'match');
expr = '<(\w+).*?>.*?</\1>';
if(isempty(newlines))
NextExpiry = {};
return
end
% Get the matches of particular expression
[tok mat] = regexp(newlines{1}, expr, 'tokens', 'match');
id1= regexp(mat{1},'</b>','start')-1;
month{1} = mat{1}(4:id1);
%Month and Next Expiries
for j = 2:length(mat)-1
id2 = regexp(mat{j},'">','end');
id3 = regexp(mat{j},'</a','start');
if(isempty(id3))
return
end
month{j} = mat{j}(id2+1:id3-1);
id4 = regexp(mat{j},'"','start');
NextExpiry{j-1} = ['http://finance.yahoo.com' mat{j}(id4(1)+1:id4(2)-1)]; %#ok<*AGROW>
NextExpiry{j-1} = regexprep(NextExpiry{j-1},'amp;','');
end
end
%% Get_Exp_Dates
function ExpDates = Get_Exp_Dates()
id1 = regexp(urlText,'Options Expiring','end');
id2 = regexp((urlText(id1+1:id1+51)),'</b>','start');
ExpDates = strtrim(urlText(id1+1:id1+1+id2-2));
ExpDates=datestr(datenum(ExpDates,'dddd, mmmm dd,yyyy'));
end
%% getTableData
function out = getTableData()
Main_Pattern = '.*?</table><table[^>]*>(.*?)</table';
Tables = regexp(urlText, Main_Pattern, 'tokens');
out = {};
if(isempty(Tables))
return
end
try
for TableIdx = 1 : length(Tables)
%Establish a row index
rowind = 0;
% Build cell aray of table data
rows = regexpi(Tables{TableIdx}{:}, '<tr.*?>(.*?)</tr>', 'tokens');
for rowsIdx = 1:numel(rows)
colind = 0;
if (isempty(regexprep(rows{rowsIdx}{1}, '<.*?>', '')))
continue
else
rowind = rowind + 1;
end
headers = regexpi(rows{rowsIdx}{1}, '<th.*?>(.*?)</th>', 'tokens');
if ~isempty(headers)
for headersIdx = 1:numel(headers)
colind = colind + 1;
data = regexprep(headers{headersIdx}{1}, '<.*?>', '');
if (~strcmpi(data,' '))
out{rowind,colind} = strtrim(data);
end
end
continue
end
cols = regexpi(rows{rowsIdx}{1}, '<td.*?>(.*?)</td>', 'tokens');
for colsIdx = 1:numel(cols)
if(rowind==1)
if(isempty(cols{colsIdx}{1}))
continue
else
colind = colind + 1;
end
else
colind = colsIdx;
end
% The following code is required to get the sign
% of the change in Bid ask prices
data = regexprep(cols{colsIdx}{1}, ' ', ' ');
down=false;
% If Down is found then it is negative
if(~isempty(regexp(data,'"Down"', 'once')))
down=true;
end
data = regexprep(data, '<.*?>', '');
if(down)
data = ['-' strtrim(data)];
end
if (~isempty(data))
out{rowind,colind} = strtrim(data) ;
end
end % colsIdx
end
end
out = out(3:end,:);
catch %M %#ok<CTCH> This depends on which version of matlab you are using
%M.stack
end
end
end
Get_Yahoo_Options_Data.m
http://tradingwithmatlab.blogspot.com/
|
python
|
matlab
|
cvs
| null | null |
01/27/2011 20:15:38
|
off topic
|
How to convert a MATLAB file to PYTHON?
===
On someone's blog, I found some code that I want to modify with python.
But I dont known Matlab syntax or code or have MATLAB to test...
Can anyone help re-write with python, less comments.
The Yahoo symbols I would be interested in would MSFT, IBM, and SPY. The Output as CSV works well.
function DataOut = Get_Yahoo_Options_Data(symbolid)
%Get_Yahoo_Options_Data get Option Chain Data from Yahoo
% Get Options Chain Data from Yahoo
% DataOut = Get_Yahoo_Options_Data(symbol)
% Inputs: Symbol name as a character String
% Output: A structure with the following fields
% data : A 1xN cell where N is the number of Expiries available
% ExpDates : A 1xN cell array of Expiry Dates
% Calls : A 1xN cell array of Call Option data for each expiry
% Puts : A 1xN cell array of Put Option data
% CPHeaders : Headers for the calls and puts option data
% Headers: Headers for the data
% FullOptionData : A combined cell array of DataOut.data
% Last : Last Price
% Example:
% DataOut = Get_Yahoo_Options_Data('LVS');
% (c)tradingwithmatlab.blogspot.com
DataOut = struct;
% Construct and read the URL from Yahoo Finance Website
urlText = urlread(['http://finance.yahoo.com/q/os?s=' symbolid]);
% Try getting the Table Data from URL Text
TableData = getTableData();
% If Empty return
if(isempty(TableData))
return
else
DataOut.data{1} = TableData;
end
% Get the Expiry Date for later use
DataOut.ExpDates{1} = Get_Exp_Dates();
% Get Expiry Dates that are listed in the website to construct separate
% URLS for each month
NextExpiryURL = Get_Next_Expiry_URL();
if(isempty(NextExpiryURL))
return
end
% Now read Option Tables of each Expiry month
for ik = 1:length(NextExpiryURL)
urlText = urlread(NextExpiryURL{ik});
DataOut.ExpDates{ik+1} = Get_Exp_Dates();
DataOut.data{ik+1} = getTableData();
end
% Clean Up
% Convert the strings into numbers
f = @(x)[x(:,1) num2cell(str2double(x(:,[2:8]))) x(:,9) num2cell(str2double(x(:,10:end)))];
DataOut.data = cellfun(f,DataOut.data,'uni',false);
% Separate the data into Calls, Puts, Headers
DataOut.Calls = cellfun(@(x) x(:,[1 8 2:7]),DataOut.data,'uni',false);
DataOut.Puts = cellfun(@(x) x(:,[9 8 10:end]),DataOut.data,'uni',false);
DataOut.CPHeaders = {'Symbol','Strike','Last','Change','Bid','Ask','Volume','Open Int'};
DataOut.Headers = {'Symbol','Last','Change','Bid','Ask','Volume','Open Int','Strike',...
'Symbol','Last','Change','Bid','Ask','Volume','Open Int'};
DataOut.FullOptionData = [DataOut.Headers ; cat(1,DataOut.data{:})];
% Get the Last Price
DataOut.Last = str2num(urlread(['http://download.finance.yahoo.com/d/quotes.csv?s=' symbolid '&f=l1&e=.csv']));
%% Get_Next_Expiry_URL
function NextExpiry = Get_Next_Expiry_URL()
% Get the start and end indices and look for a particular text
Start = regexp(urlText,'View By Expiration:','end');
end1 = regexp(urlText,'Return to Stacked View...','start');
Data = urlText(Start:end1);
Data=Data(2:end);
% Trim the data
Data=strtrim(Data);
% Split the data into new lines
newlines = regexp(Data, '[^\n]*', 'match');
expr = '<(\w+).*?>.*?</\1>';
if(isempty(newlines))
NextExpiry = {};
return
end
% Get the matches of particular expression
[tok mat] = regexp(newlines{1}, expr, 'tokens', 'match');
id1= regexp(mat{1},'</b>','start')-1;
month{1} = mat{1}(4:id1);
%Month and Next Expiries
for j = 2:length(mat)-1
id2 = regexp(mat{j},'">','end');
id3 = regexp(mat{j},'</a','start');
if(isempty(id3))
return
end
month{j} = mat{j}(id2+1:id3-1);
id4 = regexp(mat{j},'"','start');
NextExpiry{j-1} = ['http://finance.yahoo.com' mat{j}(id4(1)+1:id4(2)-1)]; %#ok<*AGROW>
NextExpiry{j-1} = regexprep(NextExpiry{j-1},'amp;','');
end
end
%% Get_Exp_Dates
function ExpDates = Get_Exp_Dates()
id1 = regexp(urlText,'Options Expiring','end');
id2 = regexp((urlText(id1+1:id1+51)),'</b>','start');
ExpDates = strtrim(urlText(id1+1:id1+1+id2-2));
ExpDates=datestr(datenum(ExpDates,'dddd, mmmm dd,yyyy'));
end
%% getTableData
function out = getTableData()
Main_Pattern = '.*?</table><table[^>]*>(.*?)</table';
Tables = regexp(urlText, Main_Pattern, 'tokens');
out = {};
if(isempty(Tables))
return
end
try
for TableIdx = 1 : length(Tables)
%Establish a row index
rowind = 0;
% Build cell aray of table data
rows = regexpi(Tables{TableIdx}{:}, '<tr.*?>(.*?)</tr>', 'tokens');
for rowsIdx = 1:numel(rows)
colind = 0;
if (isempty(regexprep(rows{rowsIdx}{1}, '<.*?>', '')))
continue
else
rowind = rowind + 1;
end
headers = regexpi(rows{rowsIdx}{1}, '<th.*?>(.*?)</th>', 'tokens');
if ~isempty(headers)
for headersIdx = 1:numel(headers)
colind = colind + 1;
data = regexprep(headers{headersIdx}{1}, '<.*?>', '');
if (~strcmpi(data,' '))
out{rowind,colind} = strtrim(data);
end
end
continue
end
cols = regexpi(rows{rowsIdx}{1}, '<td.*?>(.*?)</td>', 'tokens');
for colsIdx = 1:numel(cols)
if(rowind==1)
if(isempty(cols{colsIdx}{1}))
continue
else
colind = colind + 1;
end
else
colind = colsIdx;
end
% The following code is required to get the sign
% of the change in Bid ask prices
data = regexprep(cols{colsIdx}{1}, ' ', ' ');
down=false;
% If Down is found then it is negative
if(~isempty(regexp(data,'"Down"', 'once')))
down=true;
end
data = regexprep(data, '<.*?>', '');
if(down)
data = ['-' strtrim(data)];
end
if (~isempty(data))
out{rowind,colind} = strtrim(data) ;
end
end % colsIdx
end
end
out = out(3:end,:);
catch %M %#ok<CTCH> This depends on which version of matlab you are using
%M.stack
end
end
end
Get_Yahoo_Options_Data.m
http://tradingwithmatlab.blogspot.com/
| 2 |
7,786,938 |
10/16/2011 20:05:07
| 219,814 |
11/27/2009 04:41:52
| 58 | 5 |
How to get alert notifications to function with Phonegap 1.1.0 and iOS5
|
I am upgrading a Phonegap App to Phonegap 1.1.0 (from 9.4) and building with the new iOS5 SDK and Xcode 4.2.
The app has an about button that launches a notification dialog, but it is not firing after upgrading.
Here is the HTML from the Phonegap App
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" charset="utf-8" src="phonegap.1.1.0.min.js"></script>
<script type="text/javascript" charset="utf-8">
function onDeviceReady(){
//do something
}
function OnPageLoad(){
document.addEventListener("deviceready",onDeviceReady,false);
}
function alertDismissed() {
// do something
}
function onAlertBtn()
{
navigator.notification.alert("Test Alert Message", alertDismissed, "Test Alert", "Done");
}
</script>
</head>
<body onload="OnPageLoad()">
<div align="center">
<FORM>
<INPUT type="button" style="font-size: 18px;" value="About" onClick="onAlertBtn();" >
</FORM> </div>
</body>
</html>
Any assistance would be appreciated.
Thanks
|
javascript
|
html
|
ios
|
phonegap
|
ios5
| null |
open
|
How to get alert notifications to function with Phonegap 1.1.0 and iOS5
===
I am upgrading a Phonegap App to Phonegap 1.1.0 (from 9.4) and building with the new iOS5 SDK and Xcode 4.2.
The app has an about button that launches a notification dialog, but it is not firing after upgrading.
Here is the HTML from the Phonegap App
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" charset="utf-8" src="phonegap.1.1.0.min.js"></script>
<script type="text/javascript" charset="utf-8">
function onDeviceReady(){
//do something
}
function OnPageLoad(){
document.addEventListener("deviceready",onDeviceReady,false);
}
function alertDismissed() {
// do something
}
function onAlertBtn()
{
navigator.notification.alert("Test Alert Message", alertDismissed, "Test Alert", "Done");
}
</script>
</head>
<body onload="OnPageLoad()">
<div align="center">
<FORM>
<INPUT type="button" style="font-size: 18px;" value="About" onClick="onAlertBtn();" >
</FORM> </div>
</body>
</html>
Any assistance would be appreciated.
Thanks
| 0 |
8,304,182 |
11/29/2011 00:11:48
| 634,042 |
02/25/2011 11:39:47
| 145 | 8 |
How should I implement a thread pool in C++?
|
I'm trying to port a C# thread pool into C++ but have encountered some serious problems. Some of the features of the C# thread pool are:
1. Define the maximum number of concurrent threads explicitly
2. Each thread is defined using a AutoResetEvent
3. Each workitem in the thread are overloaded so that it can have delegate functions as its private members.
For example,
private static void RunOrBlock(WorkItem workitem) {
workItem.ThreadIndex = WaitHandle.WaitAny(threadUnoccupied);
ThreadPool.QueueUserWorkItem(threadWorker, workItem);
}
private static void threadWorker(object o) {
WorkItem workItem = (workItem) o;
workItem.Run();
threadUnoccupied[workItem.ThreadIndex].Set();
}
WorkItem is defined as:
public abstract class WorkItem {
protected int threadIndex;
public abstract void Run();
public int ThreadIndex {
get { return threadIndex; }
set { threadIndex = value; }
}
Does someone know if there exists a open-source threading pool that has similar functionalities? If not, what will be the correct way to implement such a threading pool? Thanks!
|
c++
|
multithreading
| null | null | null | null |
open
|
How should I implement a thread pool in C++?
===
I'm trying to port a C# thread pool into C++ but have encountered some serious problems. Some of the features of the C# thread pool are:
1. Define the maximum number of concurrent threads explicitly
2. Each thread is defined using a AutoResetEvent
3. Each workitem in the thread are overloaded so that it can have delegate functions as its private members.
For example,
private static void RunOrBlock(WorkItem workitem) {
workItem.ThreadIndex = WaitHandle.WaitAny(threadUnoccupied);
ThreadPool.QueueUserWorkItem(threadWorker, workItem);
}
private static void threadWorker(object o) {
WorkItem workItem = (workItem) o;
workItem.Run();
threadUnoccupied[workItem.ThreadIndex].Set();
}
WorkItem is defined as:
public abstract class WorkItem {
protected int threadIndex;
public abstract void Run();
public int ThreadIndex {
get { return threadIndex; }
set { threadIndex = value; }
}
Does someone know if there exists a open-source threading pool that has similar functionalities? If not, what will be the correct way to implement such a threading pool? Thanks!
| 0 |
9,565,003 |
03/05/2012 10:22:45
| 1,214,053 |
02/16/2012 14:28:21
| 34 | 0 |
use of object class instances and (void*)
|
Can someone also point out the use of object class ? i mean using instances of object class did it allocate all the memory gone for all sub classes ? i.e int float etc. etc
I wish to know some of the cases where we must be in need of Object and some cases where we be in need of void pointer ,thanks
|
c++
|
pointers
|
void-pointers
| null | null |
03/05/2012 13:15:38
|
not a real question
|
use of object class instances and (void*)
===
Can someone also point out the use of object class ? i mean using instances of object class did it allocate all the memory gone for all sub classes ? i.e int float etc. etc
I wish to know some of the cases where we must be in need of Object and some cases where we be in need of void pointer ,thanks
| 1 |
1,526,072 |
10/06/2009 14:49:43
| 58,843 |
01/25/2009 19:13:26
| 71 | 4 |
SmartGWT Calendar Width and Height
|
I've tried setting an explicit width and height to the calendar widget in the SmartGWT library using calendar.setWidth(500) and calendar.setHeight(400) to no avail.
Any ideas why this wouldn't work? Thanks!
|
gwt
|
smartgwt
|
calendar
| null | null | null |
open
|
SmartGWT Calendar Width and Height
===
I've tried setting an explicit width and height to the calendar widget in the SmartGWT library using calendar.setWidth(500) and calendar.setHeight(400) to no avail.
Any ideas why this wouldn't work? Thanks!
| 0 |
9,332,397 |
02/17/2012 17:00:20
| 1,215,027 |
02/16/2012 23:05:47
| 1 | 0 |
SP 2010 will not crawl an HTTPS site
|
To all.... I have been working at this for 3 weeks. I turn to you on Stack to free me from this.
I have a single WFE and Single SQL 2008 R2 server in this farm. The site collection is up and working fine as an HTTPS://portal.domain.com. I configure my search app to crawl this HTTPS address using a defined Client Cerficate that is listed in the Crawl Rules. This cert is the same one that is used to provide the HTTPS capabilities for when users connect to the site. I get error messages back in the crawl log stating "requires client certificate to access this repository". I gave it a cert.
If I change SSL setting is IIS to Ignore, then the crawl works fine, so I know search is working. But it wont crawl when set to SSL\Required.
I have one simple my cert is assigned to portal.domain.com and FQDN is different at server.domain.com.
NOBODY, even Microsoft support which I have been on a ticket with for the last 3 days has figured it out. They agree that SP should be able to crawl of HTTPS without an extending the service app, without getting involved with Federation Services in AD...
Does anyone have an answer for this or am I the only one crawling over HTTPS.
Patrick
Denver
|
sharepoint
|
https
|
crawl
| null | null |
02/20/2012 05:56:34
|
off topic
|
SP 2010 will not crawl an HTTPS site
===
To all.... I have been working at this for 3 weeks. I turn to you on Stack to free me from this.
I have a single WFE and Single SQL 2008 R2 server in this farm. The site collection is up and working fine as an HTTPS://portal.domain.com. I configure my search app to crawl this HTTPS address using a defined Client Cerficate that is listed in the Crawl Rules. This cert is the same one that is used to provide the HTTPS capabilities for when users connect to the site. I get error messages back in the crawl log stating "requires client certificate to access this repository". I gave it a cert.
If I change SSL setting is IIS to Ignore, then the crawl works fine, so I know search is working. But it wont crawl when set to SSL\Required.
I have one simple my cert is assigned to portal.domain.com and FQDN is different at server.domain.com.
NOBODY, even Microsoft support which I have been on a ticket with for the last 3 days has figured it out. They agree that SP should be able to crawl of HTTPS without an extending the service app, without getting involved with Federation Services in AD...
Does anyone have an answer for this or am I the only one crawling over HTTPS.
Patrick
Denver
| 2 |
10,417,972 |
05/02/2012 16:36:13
| 767,761 |
05/24/2011 12:54:21
| 174 | 6 |
IE7 issue - spacing too large on floated, padded elements
|
Having IE7 only issues with spacing on this page: http://chantalorganics.co.nz/wordpress/newsletter/
The image below shows the large space above and below the feature boxes, and above the footer content.
I can see that many people have issues with margins in IE7, but I am using padding. I am also using Eric Meyer's reset.css. However, the content is floated which seems part of the problem.
Appreciate any guidance!
![enter image description here][1]
[1]: http://i.stack.imgur.com/qVr4W.jpg
|
css
|
internet-explorer-7
|
css-float
| null | null |
05/03/2012 18:50:17
|
too localized
|
IE7 issue - spacing too large on floated, padded elements
===
Having IE7 only issues with spacing on this page: http://chantalorganics.co.nz/wordpress/newsletter/
The image below shows the large space above and below the feature boxes, and above the footer content.
I can see that many people have issues with margins in IE7, but I am using padding. I am also using Eric Meyer's reset.css. However, the content is floated which seems part of the problem.
Appreciate any guidance!
![enter image description here][1]
[1]: http://i.stack.imgur.com/qVr4W.jpg
| 3 |
8,335,518 |
12/01/2011 01:32:53
| 686,654 |
03/31/2011 22:55:13
| 124 | 1 |
Can I rely on a CDN to permanently store photos?
|
I'm working on a photo heavy site and don't have a lot of storage available at my hosting location.
If I use a CDN like CloudFront can I rely on them to permanently store the photos so I can delete them from my servers?
Or should I first transfer them to a service like S3 for long term storage and then have the CDN pull from that location?
Are there any options?
|
amazon-s3
|
cdn
|
amazon-cloudfront
| null | null |
12/01/2011 04:02:17
|
off topic
|
Can I rely on a CDN to permanently store photos?
===
I'm working on a photo heavy site and don't have a lot of storage available at my hosting location.
If I use a CDN like CloudFront can I rely on them to permanently store the photos so I can delete them from my servers?
Or should I first transfer them to a service like S3 for long term storage and then have the CDN pull from that location?
Are there any options?
| 2 |
9,162,940 |
02/06/2012 15:55:46
| 240,993 |
12/30/2009 15:59:03
| 114 | 0 |
Jquery: can't fire handlers with live
|
This is what I have
$('#launcher').live('click',function(){
Results()
Count()
})
But when i try to add a third function it breaks:
$('#launcher').live('click',function(){
Results()
THirdDOntWOrk()
Count()
})
and the third isn't fired, same if i was to have it like so:
$('#launcher').live('click',Count, Results)
I have about 6 handlers i need attached
|
javascript
|
jquery
| null | null | null | null |
open
|
Jquery: can't fire handlers with live
===
This is what I have
$('#launcher').live('click',function(){
Results()
Count()
})
But when i try to add a third function it breaks:
$('#launcher').live('click',function(){
Results()
THirdDOntWOrk()
Count()
})
and the third isn't fired, same if i was to have it like so:
$('#launcher').live('click',Count, Results)
I have about 6 handlers i need attached
| 0 |
4,082,051 |
11/02/2010 20:59:11
| 401,995 |
07/24/2010 03:40:57
| 482 | 3 |
is there any irc chat room for directx 9 c++?
|
is there any active irc chat room that have people to talk to?
|
c++
|
visual-c++
|
irc
|
directx-9
| null |
11/03/2010 03:34:39
|
off topic
|
is there any irc chat room for directx 9 c++?
===
is there any active irc chat room that have people to talk to?
| 2 |
6,446,676 |
06/22/2011 21:16:21
| 130,204 |
06/29/2009 00:57:25
| 564 | 14 |
Ideas & Suggestions for AJAX/Flash Streaming Radio
|
I had the idea to make something similar to google music (before their idea was public) but instead of just letting the user play the music they could also "publish" it and stream it. Then they could link their friends to their channel.
I was wanting the interface to be ran by JQuery and very basic. Allow for uploading of their music and then they can create a "to be played list" where the backend radio streamer plays right from the list. It should be noted the streaming upload is actually from my server, and not their comp (unless this is doable?) They could also record their voice over/sound effects from a flash "record" button that would just record their voice via mic on flash, make a mp3 file and add it to the "to be played" list.
So my question is this, what's the best way to accomplish this? Are there already similar open source JQuery projects that I could go from? What streaming back-end radio streamer is the best?
The last one I checked out was icecast and their was a specific version (not official) I had to get that would let me do both ogg and mp3, because normally the versions did one or the other. How would I give it ability to stop/skip to the next song and simulate that streaming live. Change up a internal playlist and send some sort of linux signal?
PS: things to note. I have average experience with javascript/Jquery. Limited with flash. above average with PHP. I have my own dedicated linux server so any open-source, freeware or relative cheap software is an option.
|
javascript
|
jquery
|
flash
|
streaming
|
radio
|
06/30/2011 08:05:18
|
off topic
|
Ideas & Suggestions for AJAX/Flash Streaming Radio
===
I had the idea to make something similar to google music (before their idea was public) but instead of just letting the user play the music they could also "publish" it and stream it. Then they could link their friends to their channel.
I was wanting the interface to be ran by JQuery and very basic. Allow for uploading of their music and then they can create a "to be played list" where the backend radio streamer plays right from the list. It should be noted the streaming upload is actually from my server, and not their comp (unless this is doable?) They could also record their voice over/sound effects from a flash "record" button that would just record their voice via mic on flash, make a mp3 file and add it to the "to be played" list.
So my question is this, what's the best way to accomplish this? Are there already similar open source JQuery projects that I could go from? What streaming back-end radio streamer is the best?
The last one I checked out was icecast and their was a specific version (not official) I had to get that would let me do both ogg and mp3, because normally the versions did one or the other. How would I give it ability to stop/skip to the next song and simulate that streaming live. Change up a internal playlist and send some sort of linux signal?
PS: things to note. I have average experience with javascript/Jquery. Limited with flash. above average with PHP. I have my own dedicated linux server so any open-source, freeware or relative cheap software is an option.
| 2 |
10,392,317 |
05/01/2012 00:55:50
| 465,546 |
10/04/2010 05:32:30
| 4,691 | 234 |
relative paths and pushstates
|
If I'm about to call a `pushState` but I want to preserve all the relative links, images, stylesheets, ect, I do something like this so far:
$('[href]').each(function() {
if (!/^#/.test(this.href)) this.href = this.href;
});
$('[src]').each(function() { this.src = this.src });
My question is: will this work cross browser? Do I need to do `$(this).attr('href') = this.href` ?
Is this necessary? Is there another way to do this? Is this the best way to do it? And is it always going to work?
|
javascript
|
jquery
|
html
|
pushstate
| null | null |
open
|
relative paths and pushstates
===
If I'm about to call a `pushState` but I want to preserve all the relative links, images, stylesheets, ect, I do something like this so far:
$('[href]').each(function() {
if (!/^#/.test(this.href)) this.href = this.href;
});
$('[src]').each(function() { this.src = this.src });
My question is: will this work cross browser? Do I need to do `$(this).attr('href') = this.href` ?
Is this necessary? Is there another way to do this? Is this the best way to do it? And is it always going to work?
| 0 |
10,297,382 |
04/24/2012 11:58:16
| 1,343,552 |
04/19/2012 09:21:41
| 11 | 1 |
How can I clone an WPF object in Ironpython but with a different name
|
I have a tabitem in XAML code:
<!-- language: lang-xml -->
<TabItem
Name="contactTemplate"
Header="New Contact">
I need to create an exact copy of this in Ironpython but with a different name, can anyone help with this, the parent tabcontrol of this tabitem is this:
<!-- language: lang-xml -->
<TabControl
x:Name="AddContactTab"
HorizontalAlignment="Left"
Grid.Row="0"
Grid.Column="0"
Width="1090"
Margin="0,0,0,23.75">
<TabControl.Background>
<SolidColorBrush
Color="Green"
Opacity="0.30" />
</TabControl.Background>
Can anyone give me an idea on how should I tackle this from python code?
|
.net
|
wpf
|
xaml
|
clone
|
ironpython
|
04/25/2012 11:19:03
|
not a real question
|
How can I clone an WPF object in Ironpython but with a different name
===
I have a tabitem in XAML code:
<!-- language: lang-xml -->
<TabItem
Name="contactTemplate"
Header="New Contact">
I need to create an exact copy of this in Ironpython but with a different name, can anyone help with this, the parent tabcontrol of this tabitem is this:
<!-- language: lang-xml -->
<TabControl
x:Name="AddContactTab"
HorizontalAlignment="Left"
Grid.Row="0"
Grid.Column="0"
Width="1090"
Margin="0,0,0,23.75">
<TabControl.Background>
<SolidColorBrush
Color="Green"
Opacity="0.30" />
</TabControl.Background>
Can anyone give me an idea on how should I tackle this from python code?
| 1 |
11,353,839 |
07/05/2012 23:18:52
| 1,248,879 |
03/05/2012 01:41:22
| 23 | 0 |
How can I properly use hidden_fields with ruby on rails to pass information to the controller?
|
I am attempting to allow the user to press a button create a new entry into the database using a hidden_field. However, the one bit of information I do want passed to the database is not making it there.
form on the view
<%= form_for(current_user.rounds.build(:round_id => '201202)) do |f| %>
<div><%= f.hidden_field :round_id %></div>
<%= f.submit "Register", class: "btn btn-large" %>
<% end %>
controller
def create
@register = current_user.rounds.build(params[:round_id])
if @register.save
redirect_to root_path, :flash => { :success => "Registered" }
end
end
This code however creates a new entry in the database with a user_id but no round_id.
Can someone show me where my mistake is?
Thanks
|
ruby-on-rails
|
hidden-field
| null | null | null | null |
open
|
How can I properly use hidden_fields with ruby on rails to pass information to the controller?
===
I am attempting to allow the user to press a button create a new entry into the database using a hidden_field. However, the one bit of information I do want passed to the database is not making it there.
form on the view
<%= form_for(current_user.rounds.build(:round_id => '201202)) do |f| %>
<div><%= f.hidden_field :round_id %></div>
<%= f.submit "Register", class: "btn btn-large" %>
<% end %>
controller
def create
@register = current_user.rounds.build(params[:round_id])
if @register.save
redirect_to root_path, :flash => { :success => "Registered" }
end
end
This code however creates a new entry in the database with a user_id but no round_id.
Can someone show me where my mistake is?
Thanks
| 0 |
10,313,611 |
04/25/2012 10:13:19
| 201,242 |
11/02/2009 21:47:46
| 4,492 | 399 |
jquery timepicker value always invalid
|
I'm using unobtrusive validation on my view, and applying a jquery-ui [timepicker][1] to a textbox.
If I pick a proper hour and minute value in the picker, the unobtrusive validation is not triggered. However, if I tab through my fields, after entering and leaving the timepicker textbox, it is highlights red. The input-validation message says that my control "must have a valid date."
I know that the TimePicker is part of the DatePicker, however it is looking like the unobtrusive JS thinks this is a DatePicker.
Is there a way I can disable the validation for this control only? Or perhaps make an adjustment so the value is not marked as invalid?
Thanks in advance
[1]: http://trentrichardson.com/examples/timepicker/
|
jquery
|
asp.net-mvc
|
jquery-ui
|
timepicker
| null |
04/25/2012 16:16:01
|
not a real question
|
jquery timepicker value always invalid
===
I'm using unobtrusive validation on my view, and applying a jquery-ui [timepicker][1] to a textbox.
If I pick a proper hour and minute value in the picker, the unobtrusive validation is not triggered. However, if I tab through my fields, after entering and leaving the timepicker textbox, it is highlights red. The input-validation message says that my control "must have a valid date."
I know that the TimePicker is part of the DatePicker, however it is looking like the unobtrusive JS thinks this is a DatePicker.
Is there a way I can disable the validation for this control only? Or perhaps make an adjustment so the value is not marked as invalid?
Thanks in advance
[1]: http://trentrichardson.com/examples/timepicker/
| 1 |
7,643,785 |
10/04/2011 05:52:00
| 544,193 |
12/16/2010 02:35:51
| 327 | 8 |
LINQ: Group by aggregate but still get information from the most recent row?
|
Let's say I have a table that holds shipping history. I'd like to write a query that counts the amount of shipments per user and gets the shipping name from the most recent entry in the table for that user.
Table structure for simplicity:
ShipmentID
MemberID
ShippingName
ShippingDate
How do I write a LINQ C# query to do this?
|
c#
|
linq
| null | null | null | null |
open
|
LINQ: Group by aggregate but still get information from the most recent row?
===
Let's say I have a table that holds shipping history. I'd like to write a query that counts the amount of shipments per user and gets the shipping name from the most recent entry in the table for that user.
Table structure for simplicity:
ShipmentID
MemberID
ShippingName
ShippingDate
How do I write a LINQ C# query to do this?
| 0 |
1,922,170 |
12/17/2009 14:30:46
| 233,842 |
12/17/2009 14:30:46
| 1 | 0 |
Tom extension Java.What diploma theme should I choose?
|
I need to choose a theme for my diploma thesis...and I don't know exactly what application to develop using Tom pattern matching extension for Java. I thought about transforming XML documents, but I need an idea of a project to use this. Any idea is welcome.
Thanks in advance.
|
java
| null | null | null | null |
12/17/2009 14:44:17
|
not a real question
|
Tom extension Java.What diploma theme should I choose?
===
I need to choose a theme for my diploma thesis...and I don't know exactly what application to develop using Tom pattern matching extension for Java. I thought about transforming XML documents, but I need an idea of a project to use this. Any idea is welcome.
Thanks in advance.
| 1 |
10,049,856 |
04/06/2012 22:14:20
| 693,642 |
04/05/2011 19:33:28
| 468 | 6 |
Use HTML editor in a Worpdress theme options
|
I have a `<textarea>` in my wp theme settings. How can I convert this to use the wordpress HTML editor instead?
|
wordpress
|
themes
| null | null | null | null |
open
|
Use HTML editor in a Worpdress theme options
===
I have a `<textarea>` in my wp theme settings. How can I convert this to use the wordpress HTML editor instead?
| 0 |
9,623,391 |
03/08/2012 19:09:42
| 230,018 |
12/11/2009 23:03:41
| 380 | 4 |
does Etherpad Lite transfer entire documents or only the diff?
|
I guess the question says it all. When working with very large documents, would it basically overwhelm the connection and ground to a halt or successfully manage using diffs?
|
node.js
|
etherpad
|
socket-server
| null | null | null |
open
|
does Etherpad Lite transfer entire documents or only the diff?
===
I guess the question says it all. When working with very large documents, would it basically overwhelm the connection and ground to a halt or successfully manage using diffs?
| 0 |
8,416,453 |
12/07/2011 13:56:24
| 1,085,114 |
12/07/2011 07:35:19
| 1 | 0 |
How to refresh the chat without removing the scroll to the top location
|
Code:
<?php
include "connect.php";
$getnummessages="SELECT COUNT(*) as messagecount from chatmessages";
$getnummessages2=mysql_query($getnummessages) or die("blah");
$getnummessages3= mysql_result($getnummessages2, 0);
if($getnummessages3>21)
{
$startrow=$getmessages3-20;
}
else
{
$startrow=1;
}
$getmsg="SELECT name, message from chatmessages order by postime ASC limit $startrow,$getnummessages3";
$getmsg2=mysql_query($getmsg) or die(mysql_error());
while($getmsg3=mysql_fetch_array($getmsg2))
{
$message=Smiley($message); //Smiley faces
print "<font color='red'><b>$getmsg3[name]:</b></font> $getmsg3[message]<br>";
}
function Smiley($texttoreplace)
{
$smilies=array(
':)' => "smile"
);
$texttoreplace=str_replace(array_keys($smilies), array_values($smilies), $texttoreplace);
return $texttoreplace;
}
?>
<script>
setTimeout("window.location.replace('chatlog.php')",2000);
</script>
|
php
|
javascript
|
mysql
|
ajax
|
time
|
12/08/2011 14:10:02
|
too localized
|
How to refresh the chat without removing the scroll to the top location
===
Code:
<?php
include "connect.php";
$getnummessages="SELECT COUNT(*) as messagecount from chatmessages";
$getnummessages2=mysql_query($getnummessages) or die("blah");
$getnummessages3= mysql_result($getnummessages2, 0);
if($getnummessages3>21)
{
$startrow=$getmessages3-20;
}
else
{
$startrow=1;
}
$getmsg="SELECT name, message from chatmessages order by postime ASC limit $startrow,$getnummessages3";
$getmsg2=mysql_query($getmsg) or die(mysql_error());
while($getmsg3=mysql_fetch_array($getmsg2))
{
$message=Smiley($message); //Smiley faces
print "<font color='red'><b>$getmsg3[name]:</b></font> $getmsg3[message]<br>";
}
function Smiley($texttoreplace)
{
$smilies=array(
':)' => "smile"
);
$texttoreplace=str_replace(array_keys($smilies), array_values($smilies), $texttoreplace);
return $texttoreplace;
}
?>
<script>
setTimeout("window.location.replace('chatlog.php')",2000);
</script>
| 3 |
8,050,438 |
11/08/2011 12:35:47
| 11,333 |
09/16/2008 07:13:03
| 7,271 | 112 |
Installshield template?
|
In our company we regularly create MSI's with Installshield(latest).
These setups adhere to a set of rules and name schemes so they work with our deployment system and autobuilds etc.
Is there a way to eliminate the repetitive overhead of going through all the boilerplate stuff (setting the company meta data, basic folder structures, a few events, including some default helper files etc) for each setup?
|
installshield
| null | null | null | null | null |
open
|
Installshield template?
===
In our company we regularly create MSI's with Installshield(latest).
These setups adhere to a set of rules and name schemes so they work with our deployment system and autobuilds etc.
Is there a way to eliminate the repetitive overhead of going through all the boilerplate stuff (setting the company meta data, basic folder structures, a few events, including some default helper files etc) for each setup?
| 0 |
7,086,299 |
08/16/2011 23:23:52
| 382,307 |
07/02/2010 18:13:38
| 697 | 50 |
help with jquery selector for child nodes
|
I'm develop a menu, which have levels, each level of menus have it's own styles and from the third level forward all levels have the same style called `subMenRight` my problem it's that if you're in the level two called with the style `subMenu` open all the follow div that have the class called `subMenuRight` i know that the problem it's the selector, so my question it's how can i modify the selector??
[my live example][1]
**my html**
<div id="menuContainer">
<div class = "menu ui-accordion-header ui-state-default ui-corner-all">
<label class="formatText">Cliente</label><span class="ui-icon ui-icon-triangle-1-e menuIcon" style="float: right"></span>
<div class = "subMenu ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li>
<label class="formatText">Ver Cliente</label><span class="ui-icon ui-icon-triangle-1-e" style="float: right"></span>
<div class = "subMenuRight ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li>
<label class="formatText">Por Nombre</label><span class="ui-icon ui-icon-triangle-1-e" style="float: right"></span>
<div class = "subMenuRight ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li><label class="formatText">sub sub menu</label></li>
<li><label class="formatText">prueba</label></li>
</ul>
</div>
</li>
<li>
<label class="formatText">Por Campana</label>
</li>
</ul>
</div>
</li>
<li>
<label class="formatText">Reportes para Cliente</label>
</li>
</ul>
</div>
</div>
<div class = "menu ui-accordion-header ui-state-default ui-corner-all">
<label class="formatText">Departamento</label><span class="ui-icon ui-icon-triangle-1-e menuIcon" style="float: right"></span>
<div class = "subMenu ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li>
<label class="formatText">Por Nombre</label>
</li>
<li>
<label class="formatText">Por Cliente</label>
</li>
</ul>
</div>
</div>
</div>
**my css**
#menuContainer
{
position: absolute;
}
#menuAtento
{
height: 23px;
padding-left: 8px;
padding-top: 12px;
}
.menu
{
/*min-width: 100px;
max-width: 155px;*/
width: 155px;
height: 17px;
float: left;
}
.subMenu
{
display: none;
width: 155px;
}
.subMenuRight
{
display: none;
width: 155px;
position: absolute;
left: 100%;
top: 0px;
}
.options li
{
position: relative;
padding: 0px 2px 0px 0px;
}
.menu .ui-state-hover
{
border-width: 0;
margin-right: 2px;
}
.subMenu .ui-state-hover
{
border-width: 0;
}
**my js**
$(document).ready(initialize);
function initialize() {
$(".menu").hover(mouseIn, mouseOut);
$(".options li").hover(overOption, outOption);
$(".subMenu li").hover(openRightMenu, closeRightMenu);
$(".menu").css('border', '0px');
$(".menu").css('margin-right', '5px');
$(".subMenu").css('margin-top', '4px').css('border', '1px solid #DDDDDD').css('padding', '6px');
$(".subMenuRight").css('padding', '6px');
}
function mouseIn() {
$(this).find('span:first').attr('class', '');
$(this).find('span:first').attr('class', 'ui-icon ui-icon-triangle-1-s');
$(".subMenu", this).slideDown(100);
}
function mouseOut() {
$(this).find('span:first').attr('class', '');
$(this).find('span:first').attr('class', 'ui-icon ui-icon-triangle-1-e');
$(".subMenu", this).slideUp(100);
}
function overOption() {
$(this).attr('class', 'ui-state-hover ui-corner-all');
}
function outOption() {
$(this).attr('class', '');
}
function openRightMenu() {
$(".subMenuRight", this).slideDown(10);
}
function closeRightMenu() {
$(".subMenuRight", this).slideUp(10);
}
[1]: http://jsfiddle.net/wp34r/
|
jquery
|
jquery-selectors
| null | null | null | null |
open
|
help with jquery selector for child nodes
===
I'm develop a menu, which have levels, each level of menus have it's own styles and from the third level forward all levels have the same style called `subMenRight` my problem it's that if you're in the level two called with the style `subMenu` open all the follow div that have the class called `subMenuRight` i know that the problem it's the selector, so my question it's how can i modify the selector??
[my live example][1]
**my html**
<div id="menuContainer">
<div class = "menu ui-accordion-header ui-state-default ui-corner-all">
<label class="formatText">Cliente</label><span class="ui-icon ui-icon-triangle-1-e menuIcon" style="float: right"></span>
<div class = "subMenu ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li>
<label class="formatText">Ver Cliente</label><span class="ui-icon ui-icon-triangle-1-e" style="float: right"></span>
<div class = "subMenuRight ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li>
<label class="formatText">Por Nombre</label><span class="ui-icon ui-icon-triangle-1-e" style="float: right"></span>
<div class = "subMenuRight ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li><label class="formatText">sub sub menu</label></li>
<li><label class="formatText">prueba</label></li>
</ul>
</div>
</li>
<li>
<label class="formatText">Por Campana</label>
</li>
</ul>
</div>
</li>
<li>
<label class="formatText">Reportes para Cliente</label>
</li>
</ul>
</div>
</div>
<div class = "menu ui-accordion-header ui-state-default ui-corner-all">
<label class="formatText">Departamento</label><span class="ui-icon ui-icon-triangle-1-e menuIcon" style="float: right"></span>
<div class = "subMenu ui-accordion-header ui-state-default ui-corner-all">
<ul class="options">
<li>
<label class="formatText">Por Nombre</label>
</li>
<li>
<label class="formatText">Por Cliente</label>
</li>
</ul>
</div>
</div>
</div>
**my css**
#menuContainer
{
position: absolute;
}
#menuAtento
{
height: 23px;
padding-left: 8px;
padding-top: 12px;
}
.menu
{
/*min-width: 100px;
max-width: 155px;*/
width: 155px;
height: 17px;
float: left;
}
.subMenu
{
display: none;
width: 155px;
}
.subMenuRight
{
display: none;
width: 155px;
position: absolute;
left: 100%;
top: 0px;
}
.options li
{
position: relative;
padding: 0px 2px 0px 0px;
}
.menu .ui-state-hover
{
border-width: 0;
margin-right: 2px;
}
.subMenu .ui-state-hover
{
border-width: 0;
}
**my js**
$(document).ready(initialize);
function initialize() {
$(".menu").hover(mouseIn, mouseOut);
$(".options li").hover(overOption, outOption);
$(".subMenu li").hover(openRightMenu, closeRightMenu);
$(".menu").css('border', '0px');
$(".menu").css('margin-right', '5px');
$(".subMenu").css('margin-top', '4px').css('border', '1px solid #DDDDDD').css('padding', '6px');
$(".subMenuRight").css('padding', '6px');
}
function mouseIn() {
$(this).find('span:first').attr('class', '');
$(this).find('span:first').attr('class', 'ui-icon ui-icon-triangle-1-s');
$(".subMenu", this).slideDown(100);
}
function mouseOut() {
$(this).find('span:first').attr('class', '');
$(this).find('span:first').attr('class', 'ui-icon ui-icon-triangle-1-e');
$(".subMenu", this).slideUp(100);
}
function overOption() {
$(this).attr('class', 'ui-state-hover ui-corner-all');
}
function outOption() {
$(this).attr('class', '');
}
function openRightMenu() {
$(".subMenuRight", this).slideDown(10);
}
function closeRightMenu() {
$(".subMenuRight", this).slideUp(10);
}
[1]: http://jsfiddle.net/wp34r/
| 0 |
5,926,713 |
05/08/2011 09:48:53
| 743,768 |
05/08/2011 09:48:53
| 1 | 0 |
[mysql] How to prevent a user from accessing a specific schema?
|
Quite new to mysql, so bare with me :)
I have a server, that was created for me.
On it there is a schema called "test".
I've logged in with root user, and created a new schema called "WEB".
* create schema WEB;
What I want to do now, is to have a user, that can only see that new schema.
So I created a user like so:
* create user webtestuser identified by 'webtestuser';
* grant select, insert, update, delete on WEB.* to webtestuser;
The problem is that when I log in with the new user, I can still see the "test" schema. Even when I 'revoke all' on the user, that schema is still visable.
Anything I'm missing here?
Thanks !
|
mysql
|
user
|
schema
|
privileges
| null | null |
open
|
[mysql] How to prevent a user from accessing a specific schema?
===
Quite new to mysql, so bare with me :)
I have a server, that was created for me.
On it there is a schema called "test".
I've logged in with root user, and created a new schema called "WEB".
* create schema WEB;
What I want to do now, is to have a user, that can only see that new schema.
So I created a user like so:
* create user webtestuser identified by 'webtestuser';
* grant select, insert, update, delete on WEB.* to webtestuser;
The problem is that when I log in with the new user, I can still see the "test" schema. Even when I 'revoke all' on the user, that schema is still visable.
Anything I'm missing here?
Thanks !
| 0 |
4,178,202 |
11/14/2010 15:43:01
| 197,606 |
10/27/2009 19:49:00
| 942 | 33 |
Do I need to backup my Amazon S3 stuff?
|
My understanding is that Amazon S3 is on a cloud like system and doesn't need to be backed up because they have all of that in place. Am I understanding this correctly or should I still back it up? I'm considering moving all my images to Amazon S3 instead of hosted locally on my server.
|
amazon-s3
| null | null | null | null |
02/06/2011 06:08:04
|
off topic
|
Do I need to backup my Amazon S3 stuff?
===
My understanding is that Amazon S3 is on a cloud like system and doesn't need to be backed up because they have all of that in place. Am I understanding this correctly or should I still back it up? I'm considering moving all my images to Amazon S3 instead of hosted locally on my server.
| 2 |
10,961,400 |
06/09/2012 13:21:11
| 654,203 |
03/10/2011 19:54:48
| 211 | 0 |
Book/Resource on application of algorithms and data-structures
|
I understand that lot of questions related to book suggestions get closed but I didn't know other best place to ask this.
I was reading palantirs blog post about [algorithms interview][1]. It says:
> Given X, figure out an efficient way to do Y [using algorithms/datastructures].
I am wondering if there are any books/resources out there that concentrate on problem solving as it relates to the application of basic data-structures and algorithms. I'm currently going through [The Practice of Programming][2] book which has a good chapter on data-structures and their application.
I'm looking for a book/resource that just has random problems stated and then goes through how a particular algorithm comes in handy in solving it. Also, which data structures usually go hand in hand with certain algorithms.
[1]: http://blog.palantir.com/2011/09/26/how-to-rock-an-algorithms-interview/
[2]: http://www.amazon.com/The-Practice-Programming-Brian-Kernighan/dp/020161586X
|
algorithm
|
data-structures
|
books
| null | null |
08/01/2012 03:22:04
|
off topic
|
Book/Resource on application of algorithms and data-structures
===
I understand that lot of questions related to book suggestions get closed but I didn't know other best place to ask this.
I was reading palantirs blog post about [algorithms interview][1]. It says:
> Given X, figure out an efficient way to do Y [using algorithms/datastructures].
I am wondering if there are any books/resources out there that concentrate on problem solving as it relates to the application of basic data-structures and algorithms. I'm currently going through [The Practice of Programming][2] book which has a good chapter on data-structures and their application.
I'm looking for a book/resource that just has random problems stated and then goes through how a particular algorithm comes in handy in solving it. Also, which data structures usually go hand in hand with certain algorithms.
[1]: http://blog.palantir.com/2011/09/26/how-to-rock-an-algorithms-interview/
[2]: http://www.amazon.com/The-Practice-Programming-Brian-Kernighan/dp/020161586X
| 2 |
9,353,022 |
02/19/2012 20:40:33
| 441,799 |
09/07/2010 20:20:36
| 11 | 1 |
Is it possible to create Static extention Methods
|
Is it possible to create extention methods that will be static.
|
c#
| null | null | null | null |
02/19/2012 21:13:28
|
not a real question
|
Is it possible to create Static extention Methods
===
Is it possible to create extention methods that will be static.
| 1 |
1,096,667 |
07/08/2009 07:49:56
| 14,139 |
09/16/2008 22:08:04
| 863 | 69 |
What are good resources for learning the Zend framework?
|
What's an efficient way for someone who knows PHP and Ruby on Rails to quickly pick up the Zend framework?
|
php
|
zend-framework
| null | null | null |
11/10/2011 22:41:30
|
not constructive
|
What are good resources for learning the Zend framework?
===
What's an efficient way for someone who knows PHP and Ruby on Rails to quickly pick up the Zend framework?
| 4 |
11,553,158 |
07/19/2012 02:35:58
| 1,072,579 |
11/30/2011 03:09:25
| 11 | 0 |
Does Linux x86 64 have both 2M and 4K page together?
|
My kernel is
Linux localhost.localdomain 2.6.30 #5 SMP Tue Aug 10 00:56:36 CST 2010 x86_64 x86_64 x86_64 GNU/Linux
My kernel module find a 2M page while nr_hugepages is disabled.
[root@localhost ~]# cat /proc/sys/vm/nr_hugepages
0
I wonder whether linux64 kernel can have both 2M and 4K page together? And what's the condition?
|
linux
|
kernel
| null | null | null | null |
open
|
Does Linux x86 64 have both 2M and 4K page together?
===
My kernel is
Linux localhost.localdomain 2.6.30 #5 SMP Tue Aug 10 00:56:36 CST 2010 x86_64 x86_64 x86_64 GNU/Linux
My kernel module find a 2M page while nr_hugepages is disabled.
[root@localhost ~]# cat /proc/sys/vm/nr_hugepages
0
I wonder whether linux64 kernel can have both 2M and 4K page together? And what's the condition?
| 0 |
5,062,850 |
02/21/2011 06:01:42
| 436,493 |
12/15/2009 16:58:55
| 208 | 10 |
perspective tabs
|
can anyone provide the link to this mootools plugin? i can't find it anywhere!
|
javascript
|
css
| null | null | null |
02/21/2011 11:39:46
|
too localized
|
perspective tabs
===
can anyone provide the link to this mootools plugin? i can't find it anywhere!
| 3 |
7,608,429 |
09/30/2011 09:27:44
| 329,121 |
04/29/2010 16:47:34
| 18 | 0 |
Identify js script on site
|
Trying to work out the script behind the http://slaveryfootprint.org/ (as you scroll down the page elements appear from left, right etc)
Source says 'aniscroll' but can't find this anywhere online?
Do you think it's custom or could anybody point me in the right direction of where to achieve a similar effect?
Cheers & have a good weekend!
|
javascript
|
jquery-animation
| null | null | null |
10/02/2011 08:44:57
|
too localized
|
Identify js script on site
===
Trying to work out the script behind the http://slaveryfootprint.org/ (as you scroll down the page elements appear from left, right etc)
Source says 'aniscroll' but can't find this anywhere online?
Do you think it's custom or could anybody point me in the right direction of where to achieve a similar effect?
Cheers & have a good weekend!
| 3 |
9,184,067 |
02/07/2012 21:17:11
| 948,660 |
09/16/2011 11:00:53
| 20 | 0 |
Classes for Sudoku
|
I've got weird task in college. I need to write "client-server Sudoku program with three-tier architecture". It's OK, but one of the requirements is to create FOUR persistent classes (for storing in DB). I've invented only two: User and Puzzle. And I have no idea what else to guess for this task... So basically I need your help to come up with two more persistent classes.
|
class
|
sudoku
| null | null | null |
02/07/2012 21:47:12
|
too localized
|
Classes for Sudoku
===
I've got weird task in college. I need to write "client-server Sudoku program with three-tier architecture". It's OK, but one of the requirements is to create FOUR persistent classes (for storing in DB). I've invented only two: User and Puzzle. And I have no idea what else to guess for this task... So basically I need your help to come up with two more persistent classes.
| 3 |
8,470,388 |
12/12/2011 05:47:13
| 1,093,150 |
12/12/2011 05:38:08
| 1 | 0 |
Crazy IE7 Horiztonal Scrollbar
|
I'm using HTML5 boilerplate and have a **header** tag going the full width across the top of the page, with position:fixed. It works properly everywhere except IE7 (of course). In IE7 it creates a horizontal scrollbar that looks to have about the same width as the main content area...
Removing position:fixed from the **header** will remove the scrollbar and fix the issue, but I want to keep that position:fixed to have the whole **header** area overlap the main content as users scroll...
Anyone willing to take a look: http://www.capitaldesign.ca/sanction3/index.html
|
css
|
internet-explorer
|
internet-explorer-7
|
position
|
bugs
| null |
open
|
Crazy IE7 Horiztonal Scrollbar
===
I'm using HTML5 boilerplate and have a **header** tag going the full width across the top of the page, with position:fixed. It works properly everywhere except IE7 (of course). In IE7 it creates a horizontal scrollbar that looks to have about the same width as the main content area...
Removing position:fixed from the **header** will remove the scrollbar and fix the issue, but I want to keep that position:fixed to have the whole **header** area overlap the main content as users scroll...
Anyone willing to take a look: http://www.capitaldesign.ca/sanction3/index.html
| 0 |
9,750,026 |
03/17/2012 12:34:31
| 1,172,716 |
01/27/2012 03:29:39
| 1 | 0 |
C++ Double Array Initialization Error
|
int box[9][9];
box = { {solution[0][0],solution[0][1],solution[0][2],solution[1][0],solution[1][1],solution[1][2],solution[2][0],solution[2][1],solution[2][2]},
{solution[0][3],solution[0][4],solution[0][5],solution[1][3],solution[1][4],solution[1][5],solution[2][3],solution[2][4],solution[2][5]},
{solution[0][6],solution[0][7],solution[0][8],solution[1][6],solution[1][7],solution[1][8],solution[2][6],solution[2][7],solution[2][8]},
{solution[3][0],solution[3][1],solution[3][2],solution[4][0],solution[4][1],solution[4][2],solution[5][0],solution[5][1],solution[5][2]},
{solution[3][3],solution[3][4],solution[3][5],solution[4][3],solution[4][4],solution[4][5],solution[5][3],solution[5][4],solution[5][5]},
{solution[3][6],solution[3][7],solution[3][8],solution[4][6],solution[4][7],solution[4][8],solution[5][6],solution[5][7],solution[5][8]},
{solution[6][0],solution[6][1],solution[6][2],solution[7][0],solution[7][1],solution[7][2],solution[8][0],solution[8][1],solution[8][2]},
{solution[6][3],solution[6][4],solution[6][5],solution[7][3],solution[7][4],solution[7][5],solution[8][3],solution[8][4],solution[8][5]},
{solution[6][6],solution[6][7],solution[6][8],solution[7][6],solution[7][7],solution[7][8],solution[8][6],solution[8][7],solution[8][8]}};
This works properly on windows but not on linux and I couldn't find a proper loop to do it other way. The error is : assigning to an array from an initializer list.
|
c++
|
multidimensional-array
|
2d
| null | null | null |
open
|
C++ Double Array Initialization Error
===
int box[9][9];
box = { {solution[0][0],solution[0][1],solution[0][2],solution[1][0],solution[1][1],solution[1][2],solution[2][0],solution[2][1],solution[2][2]},
{solution[0][3],solution[0][4],solution[0][5],solution[1][3],solution[1][4],solution[1][5],solution[2][3],solution[2][4],solution[2][5]},
{solution[0][6],solution[0][7],solution[0][8],solution[1][6],solution[1][7],solution[1][8],solution[2][6],solution[2][7],solution[2][8]},
{solution[3][0],solution[3][1],solution[3][2],solution[4][0],solution[4][1],solution[4][2],solution[5][0],solution[5][1],solution[5][2]},
{solution[3][3],solution[3][4],solution[3][5],solution[4][3],solution[4][4],solution[4][5],solution[5][3],solution[5][4],solution[5][5]},
{solution[3][6],solution[3][7],solution[3][8],solution[4][6],solution[4][7],solution[4][8],solution[5][6],solution[5][7],solution[5][8]},
{solution[6][0],solution[6][1],solution[6][2],solution[7][0],solution[7][1],solution[7][2],solution[8][0],solution[8][1],solution[8][2]},
{solution[6][3],solution[6][4],solution[6][5],solution[7][3],solution[7][4],solution[7][5],solution[8][3],solution[8][4],solution[8][5]},
{solution[6][6],solution[6][7],solution[6][8],solution[7][6],solution[7][7],solution[7][8],solution[8][6],solution[8][7],solution[8][8]}};
This works properly on windows but not on linux and I couldn't find a proper loop to do it other way. The error is : assigning to an array from an initializer list.
| 0 |
6,168,333 |
05/29/2011 14:36:57
| 335,717 |
05/07/2010 18:23:01
| 584 | 11 |
POP3/IMAP direct implementation in Javascript
|
Is there any way, how to communicate with POP3/IMAP server.
For example for build a pure-JavaScript e-mail notifier?
I've found this:
ftp://ftp.activexperts-labs.com/samples/aemail/HTML/POP3/index.htm
Unfortunately it uses the ActiveX objects, which really doesn't work in many modern browsers.
It would be nice to have ability to send a packet through any protocol (= not only HTTP/S) in HTML5.
|
javascript
|
imap
|
pop3
| null | null | null |
open
|
POP3/IMAP direct implementation in Javascript
===
Is there any way, how to communicate with POP3/IMAP server.
For example for build a pure-JavaScript e-mail notifier?
I've found this:
ftp://ftp.activexperts-labs.com/samples/aemail/HTML/POP3/index.htm
Unfortunately it uses the ActiveX objects, which really doesn't work in many modern browsers.
It would be nice to have ability to send a packet through any protocol (= not only HTTP/S) in HTML5.
| 0 |
9,222,259 |
02/10/2012 03:21:55
| 1,200,940 |
02/09/2012 23:52:37
| 1 | 0 |
How to make this Javascript appear in a different way?
|
Okay so what I want to do is have the code below be shown in a different way. For example when it says 0.135731974 I want it to really say 13.5731974%, but still count up at the same pace. If you know what I mean could you Please show me how! Thanks!
Here is code:
<script>
var timer;
var stop;
function startCount()
{
stop = false;
timer = setInterval(count,1);
}
function stopCount()
{
stop = true;
}
function count()
{
if(stop == false)
{
var el = document.getElementById('counter');
var currentNumber = parseFloat(el.innerHTML);
el.innerHTML = currentNumber+0.00000003831417624521;
}
}
</script>
</head>
<body>
<div id="counter">0</div>
<input type="button" value="reset" id="reset" onclick="document.getElementById('counter').innerHTML = 0;" />
<input type="button" value="start" id="start" onclick="startCount();" />
<input type="button" value="stop" id="stop" onclick="stopCount();" />
</body>
</html>
|
javascript
| null | null | null | null |
02/11/2012 15:20:24
|
too localized
|
How to make this Javascript appear in a different way?
===
Okay so what I want to do is have the code below be shown in a different way. For example when it says 0.135731974 I want it to really say 13.5731974%, but still count up at the same pace. If you know what I mean could you Please show me how! Thanks!
Here is code:
<script>
var timer;
var stop;
function startCount()
{
stop = false;
timer = setInterval(count,1);
}
function stopCount()
{
stop = true;
}
function count()
{
if(stop == false)
{
var el = document.getElementById('counter');
var currentNumber = parseFloat(el.innerHTML);
el.innerHTML = currentNumber+0.00000003831417624521;
}
}
</script>
</head>
<body>
<div id="counter">0</div>
<input type="button" value="reset" id="reset" onclick="document.getElementById('counter').innerHTML = 0;" />
<input type="button" value="start" id="start" onclick="startCount();" />
<input type="button" value="stop" id="stop" onclick="stopCount();" />
</body>
</html>
| 3 |
3,566,935 |
08/25/2010 14:32:05
| 113,748 |
05/28/2009 13:40:59
| 728 | 28 |
How to make make syntax highlighting and keyboard behavior identical for VB.NET and C# in Visual Studio 2008?
|
**C#**
* Types have their own color (cyan by default).
* Enter completes the auto-complete suggestion.
**Visual Basic**
* Types use Identifier color (black by default).
* Enter completes the auto-complete suggestion and adds a "()" and a newline.
These and other seemingly minor differences are so enraging I can't get any work done. How do I make Visual Studio behave consistently? Failing that, any other solutions/suggestions?
Edit: I don't care which way, I just want it to be consistent.
|
c#
|
vb.net
|
visual-studio
|
keyboard-shortcuts
|
syntax-highlighting
| null |
open
|
How to make make syntax highlighting and keyboard behavior identical for VB.NET and C# in Visual Studio 2008?
===
**C#**
* Types have their own color (cyan by default).
* Enter completes the auto-complete suggestion.
**Visual Basic**
* Types use Identifier color (black by default).
* Enter completes the auto-complete suggestion and adds a "()" and a newline.
These and other seemingly minor differences are so enraging I can't get any work done. How do I make Visual Studio behave consistently? Failing that, any other solutions/suggestions?
Edit: I don't care which way, I just want it to be consistent.
| 0 |
2,780,855 |
05/06/2010 11:57:43
| 287,047 |
03/05/2010 10:59:39
| 1,156 | 96 |
My textarea won't accept any width attributes.
|
for some odd reason the text area I have in my site won't accept the width I tell it to, I've tried to select it three times in the `CSS` just to make sure!
[Here is a jsfiddle][1] example that shows what I want, and [here is the page][2] where it doesn't want to work. I have searched through the `CSS` to find any conflicting `textarea` properties, but there are none.
Thanks for the help!
[1]: http://jsfiddle.net/DbU4V/
[2]: http://www.euroworker.no/Target-7050CC-Duo-UNC.7
|
css
|
textarea
|
html
| null | null | null |
open
|
My textarea won't accept any width attributes.
===
for some odd reason the text area I have in my site won't accept the width I tell it to, I've tried to select it three times in the `CSS` just to make sure!
[Here is a jsfiddle][1] example that shows what I want, and [here is the page][2] where it doesn't want to work. I have searched through the `CSS` to find any conflicting `textarea` properties, but there are none.
Thanks for the help!
[1]: http://jsfiddle.net/DbU4V/
[2]: http://www.euroworker.no/Target-7050CC-Duo-UNC.7
| 0 |
1,059,923 |
06/29/2009 19:05:28
| 53,740 |
01/10/2009 18:52:56
| 405 | 5 |
Best tools for AJAX
|
What are the best tools for AJAX development? I know of firebug for firefox, what other great tools are there for AJAX development?
|
ajax
| null | null | null | null |
09/12/2011 11:51:11
|
not constructive
|
Best tools for AJAX
===
What are the best tools for AJAX development? I know of firebug for firefox, what other great tools are there for AJAX development?
| 4 |
8,648,008 |
12/27/2011 18:34:38
| 979,387 |
10/04/2011 21:57:56
| 7 | 3 |
Making listbox display messages sent on all peers
|
Thanks to help from D... I was able to get most of the scoping problems and such figured out. But now I am having troubles getting the peers to display the messages that are being sent.
Here is my code
Imports System
Imports System.Configuration
Imports System.ServiceModel
Imports System.ServiceModel.PeerResolvers
Public Class Form2
Private ChatApp As ATA.ChatApp
Public Sub New(ByVal ChatApplication As ATA.ChatApp)
Me.InitializeComponent()
Me.ChatApp = ChatApplication
End Sub
Private Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
ChatApp.Chat(ChatApp.MemberName, txtboxMsg.Text)
End Sub
End Class
Namespace Test
' Chat service contract
' Applying [PeerBehavior] attribute on the service contract enables retrieval of PeerNode from IClientChannel.
<ServiceContract([Namespace]:="http://Microsoft.ServiceModel.Samples", CallbackContract:=GetType(IChat))> _
Public Interface IChat
<OperationContract(IsOneWay:=True)> _
Sub Join(ByVal member As String)
<OperationContract(IsOneWay:=True)> _
Sub Chat(ByVal member As String, ByVal msg As String)
<OperationContract(IsOneWay:=True)> _
Sub Leave(ByVal member As String)
End Interface
Public Interface IChatChannel
Inherits IChat
Inherits IClientChannel
End Interface
Public Class ChatApp
Implements IChat
' member id for this instance
Private member As String
Private frm2 As Form2
Private Participant As IChatChannel
Private factory As DuplexChannelFactory(Of IChatChannel)
Private ostat As IOnlineStatus
Public Sub New(ByVal member As String)
Me.member = member
End Sub
Shared Sub Main()
Dim member As String = System.Environment.MachineName
Dim App As New ChatApp(member)
App.frm2 = New Form2(App)
' Construct InstanceContext to handle messages on callback interface.
' An instance of ChatApp is created and passed to the InstanceContext.
Dim instanceContext As New InstanceContext(App)
' Create the participant with the given endpoint configuration
' Each participant opens a duplex channel to the mesh
' participant is an instance of the chat application that has opened a channel to the mesh
App.factory = New DuplexChannelFactory(Of IChatChannel)(instanceContext, "ChatEndpoint")
App.Participant = App.factory.CreateChannel()
' Retrieve the PeerNode associated with the participant and register for online/offline events
' PeerNode represents a node in the mesh. Mesh is the named collection of connected nodes.
App.ostat = App.Participant.GetProperty(Of IOnlineStatus)()
App.AddHandlers()
'Try
'App.Participant.Open()
'Catch generatedExceptionName As CommunicationException
' Console.WriteLine("Could not find resolver. If you are using a custom resolver, please ensure")
' Console.WriteLine("that the service is running before executing this sample. Refer to the readme")
' Console.WriteLine("for more details.")
'Return
'End Try
'Console.WriteLine("{0} is ready", member)
'Console.WriteLine("Type chat messages after going Online")
'Console.WriteLine("Press q<ENTER> to terminate this instance.")
' Announce self to other participants
App.Participant.Join(member)
Application.Run(App.frm2)
App.Participant.Leave(member)
App.Participant.Close()
App.factory.Close()
End Sub
Public Sub Chat(ByVal member As String, ByVal msg As String) Implements IChat.Chat
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - [" & member & "]" & " " & msg)
End Sub
Public Sub Join(ByVal member As String) Implements IChat.Join
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - [" & member & "]" & " Joined")
End Sub
Public Sub Leave(ByVal member As String) Implements IChat.Leave
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - [" & member & "]" & " Left")
End Sub
' PeerNode event handlers
Private Sub OnOnline(ByVal sender As Object, ByVal e As EventArgs)
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - ONLINE")
End Sub
Private Sub OnOffline(ByVal sender As Object, ByVal e As EventArgs)
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - OFFLINE")
End Sub
Public ReadOnly Property MemberName As String
Get
Return member
End Get
End Property
Private Sub AddHandlers()
AddHandler ostat.Online, AddressOf OnOnline
AddHandler ostat.Offline, AddressOf OnOffline
End Sub
End Class
End Namespace
|
vb.net
|
winforms
|
wcf
|
p2p
| null |
12/28/2011 19:57:51
|
too localized
|
Making listbox display messages sent on all peers
===
Thanks to help from D... I was able to get most of the scoping problems and such figured out. But now I am having troubles getting the peers to display the messages that are being sent.
Here is my code
Imports System
Imports System.Configuration
Imports System.ServiceModel
Imports System.ServiceModel.PeerResolvers
Public Class Form2
Private ChatApp As ATA.ChatApp
Public Sub New(ByVal ChatApplication As ATA.ChatApp)
Me.InitializeComponent()
Me.ChatApp = ChatApplication
End Sub
Private Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
ChatApp.Chat(ChatApp.MemberName, txtboxMsg.Text)
End Sub
End Class
Namespace Test
' Chat service contract
' Applying [PeerBehavior] attribute on the service contract enables retrieval of PeerNode from IClientChannel.
<ServiceContract([Namespace]:="http://Microsoft.ServiceModel.Samples", CallbackContract:=GetType(IChat))> _
Public Interface IChat
<OperationContract(IsOneWay:=True)> _
Sub Join(ByVal member As String)
<OperationContract(IsOneWay:=True)> _
Sub Chat(ByVal member As String, ByVal msg As String)
<OperationContract(IsOneWay:=True)> _
Sub Leave(ByVal member As String)
End Interface
Public Interface IChatChannel
Inherits IChat
Inherits IClientChannel
End Interface
Public Class ChatApp
Implements IChat
' member id for this instance
Private member As String
Private frm2 As Form2
Private Participant As IChatChannel
Private factory As DuplexChannelFactory(Of IChatChannel)
Private ostat As IOnlineStatus
Public Sub New(ByVal member As String)
Me.member = member
End Sub
Shared Sub Main()
Dim member As String = System.Environment.MachineName
Dim App As New ChatApp(member)
App.frm2 = New Form2(App)
' Construct InstanceContext to handle messages on callback interface.
' An instance of ChatApp is created and passed to the InstanceContext.
Dim instanceContext As New InstanceContext(App)
' Create the participant with the given endpoint configuration
' Each participant opens a duplex channel to the mesh
' participant is an instance of the chat application that has opened a channel to the mesh
App.factory = New DuplexChannelFactory(Of IChatChannel)(instanceContext, "ChatEndpoint")
App.Participant = App.factory.CreateChannel()
' Retrieve the PeerNode associated with the participant and register for online/offline events
' PeerNode represents a node in the mesh. Mesh is the named collection of connected nodes.
App.ostat = App.Participant.GetProperty(Of IOnlineStatus)()
App.AddHandlers()
'Try
'App.Participant.Open()
'Catch generatedExceptionName As CommunicationException
' Console.WriteLine("Could not find resolver. If you are using a custom resolver, please ensure")
' Console.WriteLine("that the service is running before executing this sample. Refer to the readme")
' Console.WriteLine("for more details.")
'Return
'End Try
'Console.WriteLine("{0} is ready", member)
'Console.WriteLine("Type chat messages after going Online")
'Console.WriteLine("Press q<ENTER> to terminate this instance.")
' Announce self to other participants
App.Participant.Join(member)
Application.Run(App.frm2)
App.Participant.Leave(member)
App.Participant.Close()
App.factory.Close()
End Sub
Public Sub Chat(ByVal member As String, ByVal msg As String) Implements IChat.Chat
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - [" & member & "]" & " " & msg)
End Sub
Public Sub Join(ByVal member As String) Implements IChat.Join
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - [" & member & "]" & " Joined")
End Sub
Public Sub Leave(ByVal member As String) Implements IChat.Leave
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - [" & member & "]" & " Left")
End Sub
' PeerNode event handlers
Private Sub OnOnline(ByVal sender As Object, ByVal e As EventArgs)
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - ONLINE")
End Sub
Private Sub OnOffline(ByVal sender As Object, ByVal e As EventArgs)
frm2.lstboxMsgs.Items.Add(TimeOfDay & " - OFFLINE")
End Sub
Public ReadOnly Property MemberName As String
Get
Return member
End Get
End Property
Private Sub AddHandlers()
AddHandler ostat.Online, AddressOf OnOnline
AddHandler ostat.Offline, AddressOf OnOffline
End Sub
End Class
End Namespace
| 3 |
7,473,824 |
09/19/2011 15:58:54
| 614,285 |
02/12/2011 15:01:52
| 437 | 40 |
Is there any problem with Android Market today?
|
I have an application on the Android market and I have provided a link for the users to rate my app which will direct them to my market application page directly using [market-publishing](http://developer.android.com/guide/publishing/publishing.html#marketintent) link provided.
This was working perfectly well for some time now. Suddenly, today I'm not able to access the market page like that. I'm sure I haven't changed the code, and it does conform to the link given above.
Need help.
|
android
|
uri
|
android-market
| null | null |
09/19/2011 17:54:33
|
too localized
|
Is there any problem with Android Market today?
===
I have an application on the Android market and I have provided a link for the users to rate my app which will direct them to my market application page directly using [market-publishing](http://developer.android.com/guide/publishing/publishing.html#marketintent) link provided.
This was working perfectly well for some time now. Suddenly, today I'm not able to access the market page like that. I'm sure I haven't changed the code, and it does conform to the link given above.
Need help.
| 3 |
4,505,261 |
12/22/2010 00:39:15
| 184,773 |
10/06/2009 06:16:54
| 2,309 | 37 |
How to query a column with an awkward date format
|
Here is how the date is formatted:
XXXXXX001221
This date is for Dec 21
If I want to get yesterdays entries using the CURDATE() function how would I do this?
|
sql
|
pervasive-sql
| null | null | null | null |
open
|
How to query a column with an awkward date format
===
Here is how the date is formatted:
XXXXXX001221
This date is for Dec 21
If I want to get yesterdays entries using the CURDATE() function how would I do this?
| 0 |
5,872,121 |
05/03/2011 15:47:33
| 416,012 |
08/10/2010 10:03:02
| 11 | 0 |
What minimum precautions to take on IP
|
While i understand one should not spend to much time dwelling on this area as you are definetly p** against the wind i would like your input on deciding what bare mimimum precautions i should put in place for my c# / asp apps to stop the chancers?
should one always obfusicate...apply a liscence..seal classes etc etc etc?
many thanks
Barbloke
|
c#
|
copyright
|
intellectual-property
| null | null |
05/03/2011 23:12:58
|
off topic
|
What minimum precautions to take on IP
===
While i understand one should not spend to much time dwelling on this area as you are definetly p** against the wind i would like your input on deciding what bare mimimum precautions i should put in place for my c# / asp apps to stop the chancers?
should one always obfusicate...apply a liscence..seal classes etc etc etc?
many thanks
Barbloke
| 2 |
6,905,238 |
08/01/2011 22:26:55
| 844,925 |
07/14/2011 15:38:54
| 10 | 0 |
Storing something as unsigned tinyint in php
|
Is there a way to explicitly store my numbers in php as tinyint (1 byte instead of 4).
Or could i only enforce this by storing them 4 by 4 in an int? (using a few binary operations)
I generate these values by breaking a string using str_split and interpretting these bytes as ints via unpack( 'C' , .. ).
Currently i store these values in an array as invdividual integers but it could save alot of space if i could store them somehow as tinyints.
|
php
|
types
|
int
|
tinyint
| null | null |
open
|
Storing something as unsigned tinyint in php
===
Is there a way to explicitly store my numbers in php as tinyint (1 byte instead of 4).
Or could i only enforce this by storing them 4 by 4 in an int? (using a few binary operations)
I generate these values by breaking a string using str_split and interpretting these bytes as ints via unpack( 'C' , .. ).
Currently i store these values in an array as invdividual integers but it could save alot of space if i could store them somehow as tinyints.
| 0 |
2,807,740 |
05/11/2010 02:38:04
| 26,196 |
10/08/2008 15:50:21
| 727 | 24 |
Validating an Autocomplete field in Django
|
I have models similar to the following:
class Band(models.Model):
name = models.CharField(unique=True)
class Event(models.Model):
name = models.CharField(max_length=50, unique=True)
bands = models.ManyToManyField(Band)
and essentially I want to use the validation capability offered by a ModelForm that already exists for Event, but I *do not* want to show the default Multi-Select list (for 'bands') on the page, because the potential length of the related models is extremely long.
I have the following form defined:
class AddEventForm(ModelForm):
class Meta:
model = Event
fields = ('name', )
Which does what is expected for the Model, but of course, validation could care less about the 'bands' field. I've got it working enough to add bands correctly, but there's no correct validation, and it will simply drop bad band IDs.
**What should I do so that I can ensure that at least one (correct) band ID has been sent along with my form?**
For how I'm sending the band-IDs with auto-complete, see this related question: http://stackoverflow.com/questions/1528059/
|
django
|
django-forms
|
validation
| null | null | null |
open
|
Validating an Autocomplete field in Django
===
I have models similar to the following:
class Band(models.Model):
name = models.CharField(unique=True)
class Event(models.Model):
name = models.CharField(max_length=50, unique=True)
bands = models.ManyToManyField(Band)
and essentially I want to use the validation capability offered by a ModelForm that already exists for Event, but I *do not* want to show the default Multi-Select list (for 'bands') on the page, because the potential length of the related models is extremely long.
I have the following form defined:
class AddEventForm(ModelForm):
class Meta:
model = Event
fields = ('name', )
Which does what is expected for the Model, but of course, validation could care less about the 'bands' field. I've got it working enough to add bands correctly, but there's no correct validation, and it will simply drop bad band IDs.
**What should I do so that I can ensure that at least one (correct) band ID has been sent along with my form?**
For how I'm sending the band-IDs with auto-complete, see this related question: http://stackoverflow.com/questions/1528059/
| 0 |
10,334,852 |
04/26/2012 13:50:13
| 1,349,630 |
04/22/2012 14:25:11
| 13 | 0 |
C++ pointers passing values into a function and ignoring cin operations
|
I was experimenting with pointers and created this example and I don't understand why this doesn't work. Could someone explain why the function does not perform the cin operations when I pass the values without referencing?
#included proper headers and stuff
...
int main()
{
int a, b;
swap(a,b);
cout << "A: " << a << endl;
cout << "B: " << b << endl;
return 0;
}
void swap(int * p1, int *p2)
{
cin >> *p1;
cin >> *p2;
int temp = *p1;
*p1 = *p2;
*p2 = temp;
}
Result
cin is skipped
A: 0
B: 0
|
c++
|
function
|
pointers
|
cin
| null |
04/26/2012 19:59:26
|
too localized
|
C++ pointers passing values into a function and ignoring cin operations
===
I was experimenting with pointers and created this example and I don't understand why this doesn't work. Could someone explain why the function does not perform the cin operations when I pass the values without referencing?
#included proper headers and stuff
...
int main()
{
int a, b;
swap(a,b);
cout << "A: " << a << endl;
cout << "B: " << b << endl;
return 0;
}
void swap(int * p1, int *p2)
{
cin >> *p1;
cin >> *p2;
int temp = *p1;
*p1 = *p2;
*p2 = temp;
}
Result
cin is skipped
A: 0
B: 0
| 3 |
7,942,621 |
10/30/2011 00:43:06
| 287,084 |
03/05/2010 11:44:13
| 38 | 4 |
MVC3 modifying model validation metadata and error messages
|
I need a solution for ASP.NET MVC3 model validation logic. I have a custom localization solution and i'm passing all strings through a method for translating, something like that:
@Localizer.Translate("Hello world!")
Note: I'm not sure but i think this approach comes from QT localizastion logic. WordPress is using smillar technique also.
When i try to apply this solution for model validation attributes like that:
[Required(ErrorMessage = Localizer.Translate( "Please enter detail text!"))]
[DisplayName(Localizer.Translate( "Detail"))]
public string Details { get; set; }
compiler gives me this error:
Error 1 An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type...
So, i tried to modify error messages and DisplayName attributes on the fly, but i couldn't.
Is there a any way to do this? If there is, it could be life saver for me :)
|
c#
|
asp.net
|
asp.net-mvc-3
|
localization
|
model-validation
| null |
open
|
MVC3 modifying model validation metadata and error messages
===
I need a solution for ASP.NET MVC3 model validation logic. I have a custom localization solution and i'm passing all strings through a method for translating, something like that:
@Localizer.Translate("Hello world!")
Note: I'm not sure but i think this approach comes from QT localizastion logic. WordPress is using smillar technique also.
When i try to apply this solution for model validation attributes like that:
[Required(ErrorMessage = Localizer.Translate( "Please enter detail text!"))]
[DisplayName(Localizer.Translate( "Detail"))]
public string Details { get; set; }
compiler gives me this error:
Error 1 An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type...
So, i tried to modify error messages and DisplayName attributes on the fly, but i couldn't.
Is there a any way to do this? If there is, it could be life saver for me :)
| 0 |
7,317,169 |
09/06/2011 08:44:04
| 574,686 |
01/13/2011 18:15:25
| 541 | 65 |
is there a way to uncompress zip data without ByteArray.inflate()
|
Is there a way to uncompress ziped data without inflate()?
thank you in advance!
|
flash
|
actionscript-3
|
zip
| null | null | null |
open
|
is there a way to uncompress zip data without ByteArray.inflate()
===
Is there a way to uncompress ziped data without inflate()?
thank you in advance!
| 0 |
1,953,252 |
12/23/2009 14:56:23
| 45,066 |
12/10/2008 17:13:23
| 1,015 | 73 |
What is the meaning of ∃?
|
Reading a book on algorithm. Can someone explain the meaning of ∃?
|
math
|
symbols
|
algorithm
| null | null |
09/12/2011 17:06:26
|
off topic
|
What is the meaning of ∃?
===
Reading a book on algorithm. Can someone explain the meaning of ∃?
| 2 |
292,499 |
11/15/2008 12:45:56
| 2,974 |
08/26/2008 09:39:16
| 3,377 | 201 |
What to do when asked to fake or fudge a demo to the customer?
|
Consider having an unstable, incomplete, and not completely tested system and needed to demo it to the customer. The system being unstable, incomplete and not completely tested because a supplier were not delivering what they promiised and when it is delivered it is really bad code.
After pushing back, and pushing back on demoing the system to the customer, the customer finally insists that they **must** see a demo of the system.
What do you do if your boss comes up to you and tells you to just fudge and fake the demo?
This recently happened to a friend and I was completely at a loss at to what he should do. My first reaction would have been to push back and say no way, "you're just postponing the inevitable pain!" Not to mention the fact that it is not ethical!
I was wondering what the StackOverflowers would do, or have done?
BTW My friend has now worked for six weeks straight, including weekends, without a day off from 8 in the morning to 9 at night!
And colleagues of his are being told that they **must** work next Saturday and Sunday. Being told and not asked! 8-O
TIA
cheers,
Rob
|
project-management
|
ethics
|
demonstration
|
customer-relationship
| null |
05/03/2012 08:08:41
|
off topic
|
What to do when asked to fake or fudge a demo to the customer?
===
Consider having an unstable, incomplete, and not completely tested system and needed to demo it to the customer. The system being unstable, incomplete and not completely tested because a supplier were not delivering what they promiised and when it is delivered it is really bad code.
After pushing back, and pushing back on demoing the system to the customer, the customer finally insists that they **must** see a demo of the system.
What do you do if your boss comes up to you and tells you to just fudge and fake the demo?
This recently happened to a friend and I was completely at a loss at to what he should do. My first reaction would have been to push back and say no way, "you're just postponing the inevitable pain!" Not to mention the fact that it is not ethical!
I was wondering what the StackOverflowers would do, or have done?
BTW My friend has now worked for six weeks straight, including weekends, without a day off from 8 in the morning to 9 at night!
And colleagues of his are being told that they **must** work next Saturday and Sunday. Being told and not asked! 8-O
TIA
cheers,
Rob
| 2 |
11,114,340 |
06/20/2012 06:56:02
| 108,207 |
05/16/2009 17:51:55
| 3,014 | 195 |
Why is my JQuery DIV transparent?
|
My Jquery ajax page loads and shows up in the DIV that lays itself over the other page elements but the DIV is transparent or it is in fact behind the other components and just looking like it is transparent and neds to render on top. How do I achieve a normal DIV over the other pages with a white background? Why is it difficult making an element not transparent? How can this be deafult behavior for a page element?
![enter image description here][1]
Javascript
function popup() {
alert('opening popup');
var popup = $('.newpopup');
$.ajax({url:'/PandoraArendeWeb/popup.jsp',
error: function() {
alert('Error');
},
success: function(data) {
popup.html(data);
popup.show('fast');
}
}
);
/*
popup.html("test");
popup.show('fast');
*/
var screen_width = $(document).width();
var screen_height = $(document).height();
var box_width = popup.width();
var box_height = popup.height();
var top = (screen_height - box_height) / 2; // you might like to subtract a little to position it slightly higher than half way
var left = (screen_width - box_width) / 2;
popup.css({ 'position': 'absolute', 'top':top, 'left':left });
}
$(document).ready(function(){
$('button').click(function(){
popup();
});
})
I tried creating a jsfiddle to reproduce the problem but it seems jsfiddle can't do `.get`or `.ajax`since it couldn't load a page from the internet to the DIV.
What can you propose? There should be a clear solution to this and transparancy really should not be a default state for an element so how come the element renders with transparency?
The HTML is trivial
<div class="newpopup">
</div>
<button id="mypopup">popup</button>
My CSS which is like it is never reached is this
.newpopup {
z-index:100;
position: absolute;
top:50%;
left:50%;
background-color:#ffffff; //not working
}
And the HTML that is the actual popup / div is this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><link href="css_js/styles.css" rel="stylesheet" type="text/css">
<title>popup</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="TB_nb">
<tr>
<td colspan="3" class="pusher TB_nb"><h2>Sök person/företag</h2>
</td>
<td><a href="javascript:void(0)" onclick="document.getElementById('popupSokNamn').style.display = 'none';" >X</a></td>
</tr>
</table>
<br><br>
<h2 class="pusher">Sök person/företag</h2>
<div id="Vsok">
<div style="text-align: right; width: 100%; padding-right: 5%; padding-top: 5px;">
<span onClick="getElementById('sokF').style.display='', getElementById('bottomA').style.display='none', getElementById('bottomV').style.display='', getElementById('Vsok').style.display='none'" class="link_sm">Visa sökformulär</span>
</div>
</div>
<div id="sokF">
<div style="text-align: right; width: 100%; padding-right: 5%; padding-top: 5px;; padding-bottom: 5px;">
<span onClick="getElementById('sokF').style.display='none', getElementById('bottomA').style.display='none', getElementById('bottomV').style.display='', getElementById('Vsok').style.display=''" class="link_sm">Dölj sökformulär</span>
</div>
<div style="width: 100%; margin-left: 15px; margin-right: 80px;" class="fontS80">
<fieldset style="border: 1px solid Grey; display:inline;"><legend class="small">Fysisk</legend>
<div class="fl30"> Förnamn:</div>
<div class="fl50"><input type="text" size="60" name="searchFornamn" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
<div class="clear"></div>
<div class="fl30"> Efternamn:</div>
<div class="fl50"><input type="text" size="60" name="searchEfternamn" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
</fieldset>
<fieldset style="border: 1px solid Grey; display:inline;"><legend class="small">Juridisk</legend>
<div class="fl30"> Företag:</div>
<div class="fl50"><input type="text" size="60" name="searchForetag" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
<div class="clear"></div>
<div class="fl30"> Organisationsnummer:</div>
<div class="fl50"><input type="text" size="60" name="searchOrgNummer" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
</fieldset> <br><br>
<!-- <div class="fl30">Attention, c/o etc.:</div>
<div class="fl50"><input type="text" size="60"></div>
<div class="clear"></div>
<div class="fl30">Postadress:</div>
<div class="fl50"><input type="text" size="60"></div>
<div class="clear"></div>
<div class="fl30">Postnummer:</div>
<div class="fl50"><input type="text" size="30"></div>
<div class="clear"></div> -->
<div class="fl30">Postort:</div>
<div class="fl50"><input type="text" size="40" name="searchPostort" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
<div class="clear"></div>
<div class="fl30">Land:</div>
<div class="fl50"><input type="text" size="2" name="searchLandKod" onkeyup="doSubmitByEnter('Namnsokning', 'search')">
<select name="searchLand" onkeyup="doSubmitByEnter('Namnsokning', 'search')">
<option value="1" SELECTED></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5">---------------------------------</option>
</select></div>
<div class="clear"></div>
<!-- <div class="fl30">Region:</div>
<div class="fl20"><select name="">
<option value="1" SELECTED></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5">-----------------------------------------------</option>
</select></div>
<div class="clear"></div>
<div class="fl30">Tel:</div>
<div class="fl50"><input type="text" size="40"></div>
<div class="clear"></div>
<div class="fl30">Fax:</div>
<div class="fl50"><input type="text" size="40"></div>
<div class="clear"></div>
<div class="fl30">E-post:</div>
<div class="fl50"><input type="text" size="60"></div>
<div class="clear"></div>
-->
<div class="fl50"> </div>
<div class="fl5"><input type="button" value="Rensa"></div>
<div class="fl10"><input type="button" value=" Sök " onclick="javascript:doSubmit('Namnsokning', 'search')"></div>
<div class="clear"> </div>
<div class="clear"> </div>
</div>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>
<td><h3>Sökresultat:</h3></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4">En massa text <span class="link">Hjälp!</span> </td>
</tr>
<tr>
<td><input type="button" value="Visa alla"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="smallb">
<td>Antal ärenden: 527</td>
<td> </td>
<td>Visa ärenden: << 1-200 201-400 401-527 >> </td>
<td> </td>
</tr>
</table>
<table width="100%" cellspacing="0" align="center" class="sortable" id="unique_id">
<tr>
<th class="thkant">Förnamn</th>
<th class="thkant">Efternamn</th>
<th class="thkant">Adress</th>
<th class="thkant">Postnr</th>
<th class="thkant">Postort</th>
<th class="thkant">Region</th>
<th class="thkant">Land</th>
<th class="thkant">Telefonnummer</th>
</tr>
</table>
<div id="bottomV">
<table width="100%" align="center">
<tr>
<td align="left"><input type="button" id="visaknapp" value="Visa" disabled style="width:150px;" onClick="getElementById('sokR').style.display='', getElementById('bottomA').style.display='', getElementById('bottomV').style.display='none', getElementById('Vsok').style.display='', getElementById('sokF').style.display='none'"></td>
<td align="right"><input type="button" value="Avbryt" style="width:150px;" class="checkmargin"><input type="button" value="Infoga" disabled style="width:150px;"></td>
</tr>
</table>
</div>
<div id="bottomA" style="display: none">
<table width="100%" align="center">
<tr>
<td align="left"><input type="button" value="Ändra i register" style="width:150px;"></td>
<td align="right"><input type="button" value="Avbryt" style="width:150px;" class="checkmargin"><input type="button" value="Infoga" style="width:150px;"></td>
</tr>
</table>
</body>
</html>
[1]: http://i.stack.imgur.com/MwghY.png
|
javascript
|
jquery
|
html
|
css
| null | null |
open
|
Why is my JQuery DIV transparent?
===
My Jquery ajax page loads and shows up in the DIV that lays itself over the other page elements but the DIV is transparent or it is in fact behind the other components and just looking like it is transparent and neds to render on top. How do I achieve a normal DIV over the other pages with a white background? Why is it difficult making an element not transparent? How can this be deafult behavior for a page element?
![enter image description here][1]
Javascript
function popup() {
alert('opening popup');
var popup = $('.newpopup');
$.ajax({url:'/PandoraArendeWeb/popup.jsp',
error: function() {
alert('Error');
},
success: function(data) {
popup.html(data);
popup.show('fast');
}
}
);
/*
popup.html("test");
popup.show('fast');
*/
var screen_width = $(document).width();
var screen_height = $(document).height();
var box_width = popup.width();
var box_height = popup.height();
var top = (screen_height - box_height) / 2; // you might like to subtract a little to position it slightly higher than half way
var left = (screen_width - box_width) / 2;
popup.css({ 'position': 'absolute', 'top':top, 'left':left });
}
$(document).ready(function(){
$('button').click(function(){
popup();
});
})
I tried creating a jsfiddle to reproduce the problem but it seems jsfiddle can't do `.get`or `.ajax`since it couldn't load a page from the internet to the DIV.
What can you propose? There should be a clear solution to this and transparancy really should not be a default state for an element so how come the element renders with transparency?
The HTML is trivial
<div class="newpopup">
</div>
<button id="mypopup">popup</button>
My CSS which is like it is never reached is this
.newpopup {
z-index:100;
position: absolute;
top:50%;
left:50%;
background-color:#ffffff; //not working
}
And the HTML that is the actual popup / div is this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><link href="css_js/styles.css" rel="stylesheet" type="text/css">
<title>popup</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="TB_nb">
<tr>
<td colspan="3" class="pusher TB_nb"><h2>Sök person/företag</h2>
</td>
<td><a href="javascript:void(0)" onclick="document.getElementById('popupSokNamn').style.display = 'none';" >X</a></td>
</tr>
</table>
<br><br>
<h2 class="pusher">Sök person/företag</h2>
<div id="Vsok">
<div style="text-align: right; width: 100%; padding-right: 5%; padding-top: 5px;">
<span onClick="getElementById('sokF').style.display='', getElementById('bottomA').style.display='none', getElementById('bottomV').style.display='', getElementById('Vsok').style.display='none'" class="link_sm">Visa sökformulär</span>
</div>
</div>
<div id="sokF">
<div style="text-align: right; width: 100%; padding-right: 5%; padding-top: 5px;; padding-bottom: 5px;">
<span onClick="getElementById('sokF').style.display='none', getElementById('bottomA').style.display='none', getElementById('bottomV').style.display='', getElementById('Vsok').style.display=''" class="link_sm">Dölj sökformulär</span>
</div>
<div style="width: 100%; margin-left: 15px; margin-right: 80px;" class="fontS80">
<fieldset style="border: 1px solid Grey; display:inline;"><legend class="small">Fysisk</legend>
<div class="fl30"> Förnamn:</div>
<div class="fl50"><input type="text" size="60" name="searchFornamn" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
<div class="clear"></div>
<div class="fl30"> Efternamn:</div>
<div class="fl50"><input type="text" size="60" name="searchEfternamn" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
</fieldset>
<fieldset style="border: 1px solid Grey; display:inline;"><legend class="small">Juridisk</legend>
<div class="fl30"> Företag:</div>
<div class="fl50"><input type="text" size="60" name="searchForetag" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
<div class="clear"></div>
<div class="fl30"> Organisationsnummer:</div>
<div class="fl50"><input type="text" size="60" name="searchOrgNummer" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
</fieldset> <br><br>
<!-- <div class="fl30">Attention, c/o etc.:</div>
<div class="fl50"><input type="text" size="60"></div>
<div class="clear"></div>
<div class="fl30">Postadress:</div>
<div class="fl50"><input type="text" size="60"></div>
<div class="clear"></div>
<div class="fl30">Postnummer:</div>
<div class="fl50"><input type="text" size="30"></div>
<div class="clear"></div> -->
<div class="fl30">Postort:</div>
<div class="fl50"><input type="text" size="40" name="searchPostort" onkeyup="doSubmitByEnter('Namnsokning', 'search')"></div>
<div class="clear"></div>
<div class="fl30">Land:</div>
<div class="fl50"><input type="text" size="2" name="searchLandKod" onkeyup="doSubmitByEnter('Namnsokning', 'search')">
<select name="searchLand" onkeyup="doSubmitByEnter('Namnsokning', 'search')">
<option value="1" SELECTED></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5">---------------------------------</option>
</select></div>
<div class="clear"></div>
<!-- <div class="fl30">Region:</div>
<div class="fl20"><select name="">
<option value="1" SELECTED></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5">-----------------------------------------------</option>
</select></div>
<div class="clear"></div>
<div class="fl30">Tel:</div>
<div class="fl50"><input type="text" size="40"></div>
<div class="clear"></div>
<div class="fl30">Fax:</div>
<div class="fl50"><input type="text" size="40"></div>
<div class="clear"></div>
<div class="fl30">E-post:</div>
<div class="fl50"><input type="text" size="60"></div>
<div class="clear"></div>
-->
<div class="fl50"> </div>
<div class="fl5"><input type="button" value="Rensa"></div>
<div class="fl10"><input type="button" value=" Sök " onclick="javascript:doSubmit('Namnsokning', 'search')"></div>
<div class="clear"> </div>
<div class="clear"> </div>
</div>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>
<td><h3>Sökresultat:</h3></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4">En massa text <span class="link">Hjälp!</span> </td>
</tr>
<tr>
<td><input type="button" value="Visa alla"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="smallb">
<td>Antal ärenden: 527</td>
<td> </td>
<td>Visa ärenden: << 1-200 201-400 401-527 >> </td>
<td> </td>
</tr>
</table>
<table width="100%" cellspacing="0" align="center" class="sortable" id="unique_id">
<tr>
<th class="thkant">Förnamn</th>
<th class="thkant">Efternamn</th>
<th class="thkant">Adress</th>
<th class="thkant">Postnr</th>
<th class="thkant">Postort</th>
<th class="thkant">Region</th>
<th class="thkant">Land</th>
<th class="thkant">Telefonnummer</th>
</tr>
</table>
<div id="bottomV">
<table width="100%" align="center">
<tr>
<td align="left"><input type="button" id="visaknapp" value="Visa" disabled style="width:150px;" onClick="getElementById('sokR').style.display='', getElementById('bottomA').style.display='', getElementById('bottomV').style.display='none', getElementById('Vsok').style.display='', getElementById('sokF').style.display='none'"></td>
<td align="right"><input type="button" value="Avbryt" style="width:150px;" class="checkmargin"><input type="button" value="Infoga" disabled style="width:150px;"></td>
</tr>
</table>
</div>
<div id="bottomA" style="display: none">
<table width="100%" align="center">
<tr>
<td align="left"><input type="button" value="Ändra i register" style="width:150px;"></td>
<td align="right"><input type="button" value="Avbryt" style="width:150px;" class="checkmargin"><input type="button" value="Infoga" style="width:150px;"></td>
</tr>
</table>
</body>
</html>
[1]: http://i.stack.imgur.com/MwghY.png
| 0 |
8,387,600 |
12/05/2011 15:24:04
| 989,955 |
10/11/2011 16:39:26
| 6 | 0 |
Shared hosting and page generation with PHP
|
I've got a website on a shared hosting and I'm using PHP to generate the pages.
As of now, from the management system the admin can modify the database, which is stored in an XML file (SQL is not available). The pages that need to display the content of the database take a look at the content every time they are opened and the script in PHP generates the appropriate page.It's fast for me to code and it's easy for the admin to maintain.
I'm making my first steps in web-oriented programming and today I thought of another idea: what if the management system updates the database AND generates the pages as HTML pages so that the server doesn't have to execute a script every time a page is requested? Isn't it strictly better in terms of performance? A lot of work a single time instead of a bit of work every time.
|
php
|
page
|
shared
|
generation
| null | null |
open
|
Shared hosting and page generation with PHP
===
I've got a website on a shared hosting and I'm using PHP to generate the pages.
As of now, from the management system the admin can modify the database, which is stored in an XML file (SQL is not available). The pages that need to display the content of the database take a look at the content every time they are opened and the script in PHP generates the appropriate page.It's fast for me to code and it's easy for the admin to maintain.
I'm making my first steps in web-oriented programming and today I thought of another idea: what if the management system updates the database AND generates the pages as HTML pages so that the server doesn't have to execute a script every time a page is requested? Isn't it strictly better in terms of performance? A lot of work a single time instead of a bit of work every time.
| 0 |
7,879,691 |
10/24/2011 17:53:17
| 1,011,388 |
10/24/2011 17:47:01
| 1 | 0 |
Curl multiple sources
|
i need something that will run multiple URLs multiple times. Something like:
for ($i=0; $i<4; $i++)
{
for ($j=0; $j<5; $j++)
// run source
// wait
}
I cannot use fork since the host is a Windows environment.
|
php
|
curl
|
run
|
multiple
|
sources
|
10/24/2011 18:31:18
|
not a real question
|
Curl multiple sources
===
i need something that will run multiple URLs multiple times. Something like:
for ($i=0; $i<4; $i++)
{
for ($j=0; $j<5; $j++)
// run source
// wait
}
I cannot use fork since the host is a Windows environment.
| 1 |
7,234,115 |
08/29/2011 18:19:29
| 601,148 |
02/03/2011 08:07:33
| 11 | 2 |
How to get started with LAMP?
|
I have 1 year exp in web development field. I have only worked in windows environment. Recently I got an offer to attend an interview at a MNC for the post of PHP developer, but they are working in LAMP platform. So they told me to expect some questions from that area. Acually I know nothing regarding LAMP. My belief was that php development in any platform is same. So, anyone please tell me, how to get aware in LAMP. Please tell me also the technical difference between WAMP and LAMP.
|
php
|
lamp
| null | null | null |
08/29/2011 18:48:54
|
off topic
|
How to get started with LAMP?
===
I have 1 year exp in web development field. I have only worked in windows environment. Recently I got an offer to attend an interview at a MNC for the post of PHP developer, but they are working in LAMP platform. So they told me to expect some questions from that area. Acually I know nothing regarding LAMP. My belief was that php development in any platform is same. So, anyone please tell me, how to get aware in LAMP. Please tell me also the technical difference between WAMP and LAMP.
| 2 |
11,328,866 |
07/04/2012 12:11:58
| 1,225,273 |
02/22/2012 08:16:09
| 1 | 0 |
re: disabled editing JavaScript code "on the fly" in the Chrome debugger.
|
re: disabled editing JavaScript code "on the fly" in the Chrome debugger.
You can edit Javascript on the fly.
(for a demo/explanation - see here:
https://www.youtube.com/watch?v=nOEw9iiopwI#t=3m12s
Google Chrome Developer Tools: 12 Tricks to Develop Quicker )
But sometimes the editting is disabled.
I am trying to understand why.
( I know editing is disabled if you select "Pretty Print" option. )
For example this site:
http://www.cepstral.com/demos/
Some scripts are editable, but not the main page script.
Please help figure it out.
|
javascript
|
debugging
|
google-chrome
|
google-chrome-devtools
|
javascript-debugger
|
07/05/2012 16:00:46
|
not a real question
|
re: disabled editing JavaScript code "on the fly" in the Chrome debugger.
===
re: disabled editing JavaScript code "on the fly" in the Chrome debugger.
You can edit Javascript on the fly.
(for a demo/explanation - see here:
https://www.youtube.com/watch?v=nOEw9iiopwI#t=3m12s
Google Chrome Developer Tools: 12 Tricks to Develop Quicker )
But sometimes the editting is disabled.
I am trying to understand why.
( I know editing is disabled if you select "Pretty Print" option. )
For example this site:
http://www.cepstral.com/demos/
Some scripts are editable, but not the main page script.
Please help figure it out.
| 1 |
8,249,945 |
11/23/2011 22:28:01
| 335,597 |
05/07/2010 15:37:44
| 135 | 0 |
What is "object" in "object file" and why is it called this way?
|
I was asked a question: "What is an 'object file'?".
After looking at <a href="http://en.wikipedia.org/wiki/Object_file"> Wiki</a>, I only know that it contains **objects**.
But what are those objects and why someone called them that way?
|
c++
|
c
|
object
|
compilation
|
linker
| null |
open
|
What is "object" in "object file" and why is it called this way?
===
I was asked a question: "What is an 'object file'?".
After looking at <a href="http://en.wikipedia.org/wiki/Object_file"> Wiki</a>, I only know that it contains **objects**.
But what are those objects and why someone called them that way?
| 0 |
2,394,522 |
03/06/2010 23:42:51
| 1,470 |
08/15/2008 18:09:52
| 1,036 | 38 |
What english words can be created using hexadecimal?
|
I'm setting up an old wireless router for a friend which uses WEP (Yeah, very old, not actually very secure, but enough to keep the non-technical people in her apartment complex from sucking bandwidth) and I need to have a 10 digit hexadecimal key as the password.
So the question is, what english words can be made using the hexadecimal character set:
1 2 3 4 5 6 7 8 9 0 A B C D E F
BEEF is an example. I think that leet character would be allowed as well, So the number 0 could be used for the letter o. This lets you make the word BEA7.
|
hex
| null | null | null | null |
03/06/2010 23:48:36
|
off topic
|
What english words can be created using hexadecimal?
===
I'm setting up an old wireless router for a friend which uses WEP (Yeah, very old, not actually very secure, but enough to keep the non-technical people in her apartment complex from sucking bandwidth) and I need to have a 10 digit hexadecimal key as the password.
So the question is, what english words can be made using the hexadecimal character set:
1 2 3 4 5 6 7 8 9 0 A B C D E F
BEEF is an example. I think that leet character would be allowed as well, So the number 0 could be used for the letter o. This lets you make the word BEA7.
| 2 |
7,830,205 |
10/20/2011 01:37:56
| 409,858 |
08/03/2010 15:53:28
| 3 | 0 |
SSH unzip AND change the filename (or get the filename contained therein)
|
/usr/bin/curl http://somewebsite.com/foo.zip -o 4232.zip
unzip -o -q -L 4232.zip
chown 508 /home/me/www/inbound/data/??????.xml
rm -f 4232.zip
I am using this SSH script to download a zip file called foo.zip, rename the file to 4232.zip, the extract the contents.
My problem is that the zip file contains a single file whose name is constantly changing. I cannot see a flag for unzip that lets me rename the file(s) inside the zip.
How can I rename the mystery file inside. There is really only ever one file in my immediate project.
-or-
How can I get that filename so I can change ownership and use it in a PHP script that will process it later on...
Any help would be appreciated.
|
ssh
|
unzip
| null | null | null | null |
open
|
SSH unzip AND change the filename (or get the filename contained therein)
===
/usr/bin/curl http://somewebsite.com/foo.zip -o 4232.zip
unzip -o -q -L 4232.zip
chown 508 /home/me/www/inbound/data/??????.xml
rm -f 4232.zip
I am using this SSH script to download a zip file called foo.zip, rename the file to 4232.zip, the extract the contents.
My problem is that the zip file contains a single file whose name is constantly changing. I cannot see a flag for unzip that lets me rename the file(s) inside the zip.
How can I rename the mystery file inside. There is really only ever one file in my immediate project.
-or-
How can I get that filename so I can change ownership and use it in a PHP script that will process it later on...
Any help would be appreciated.
| 0 |
456,535 |
01/19/2009 04:36:51
| 45,211 |
12/11/2008 01:52:39
| 12 | 2 |
Algorithm Questions Website
|
Has anyone seen or know of a website which gives you a varying degree of difficulty algorithm to solve(time based or not doesn't matter). Preferably in a multitude of languages.
What I am looking for and not sure if it exists is a place which would give me a algorithm to try to solve in any language I specify, such as some factorial algorithm and I choose c#.
I have heard whispers of such a thing but haven't been able to find something.
Thanks for any leads
|
algorithm
| null | null | null | null |
07/17/2012 12:12:46
|
not constructive
|
Algorithm Questions Website
===
Has anyone seen or know of a website which gives you a varying degree of difficulty algorithm to solve(time based or not doesn't matter). Preferably in a multitude of languages.
What I am looking for and not sure if it exists is a place which would give me a algorithm to try to solve in any language I specify, such as some factorial algorithm and I choose c#.
I have heard whispers of such a thing but haven't been able to find something.
Thanks for any leads
| 4 |
4,663,672 |
01/11/2011 23:01:45
| 133,932 |
07/06/2009 22:22:12
| 145 | 24 |
Referring to a delete solr question from here
|
Just wanted to know if there are any good examples for doing solr documents deletion from DIH when doing delta imports. The documentation links provided were awesome, but some concrete examples may be nice.
http://stackoverflow.com/questions/1555610/solr-dih-how-to-handle-deleted-documents/1557604#1557604
Thanks!
Joyce
|
solr
| null | null | null | null |
03/31/2011 05:00:41
|
not a real question
|
Referring to a delete solr question from here
===
Just wanted to know if there are any good examples for doing solr documents deletion from DIH when doing delta imports. The documentation links provided were awesome, but some concrete examples may be nice.
http://stackoverflow.com/questions/1555610/solr-dih-how-to-handle-deleted-documents/1557604#1557604
Thanks!
Joyce
| 1 |
8,400,502 |
12/06/2011 13:15:14
| 1,020,656 |
10/30/2011 12:36:30
| 1 | 0 |
unable to find bzr on centos 5.3 for install
|
i am running centos on my client machine and the output of the commands below is showing that my system can't find bazaar
yum install bzr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.net.cen.ct.gov
* extras: mirror.net.cen.ct.gov
* updates: centos.mirror.nac.net
Setting up Install Process
No package bzr available.
Nothing to do
[root@localhost ~]# yum search bzr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.choopa.net
* extras: mirror.net.cen.ct.gov
* updates: centos.mirror.nac.net
Warning: No matches found for: bzr
No Matches found
|
java
|
linux
| null | null | null |
12/07/2011 03:14:48
|
off topic
|
unable to find bzr on centos 5.3 for install
===
i am running centos on my client machine and the output of the commands below is showing that my system can't find bazaar
yum install bzr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.net.cen.ct.gov
* extras: mirror.net.cen.ct.gov
* updates: centos.mirror.nac.net
Setting up Install Process
No package bzr available.
Nothing to do
[root@localhost ~]# yum search bzr
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.choopa.net
* extras: mirror.net.cen.ct.gov
* updates: centos.mirror.nac.net
Warning: No matches found for: bzr
No Matches found
| 2 |
1,067,662 |
07/01/2009 07:04:03
| 105,973 |
05/13/2009 04:51:51
| 8 | 3 |
.Net & Jave which one is better?
|
My company is doing the future planing at the moment. One of important things is to decide which framework we should build our company IT on? .Net or Java? It seems both frameworks have it advantage and disadvantage. Just want to hear how you guys think about this issue.
Cheers
|
.net
|
java
| null | null | null |
07/01/2009 07:09:01
|
not constructive
|
.Net & Jave which one is better?
===
My company is doing the future planing at the moment. One of important things is to decide which framework we should build our company IT on? .Net or Java? It seems both frameworks have it advantage and disadvantage. Just want to hear how you guys think about this issue.
Cheers
| 4 |
7,690,298 |
10/07/2011 16:44:59
| 935,453 |
09/08/2011 17:58:22
| 28 | 2 |
Trying to filter a row from master sheet that doesn't get copied to individual during macro
|
So I have my master sheet that I run a macro on to copy a template and then populate with certain rows based off of values in one column. I need to add a check in so that I can tell it not to pull the row if the value in another column matches a specified criteria. For example, row x would get pulled if the value in column Y matches 1234, but only if the value in column Z does not match 456. This is the code I am using right now:
Option Explicit
Sub Report()
CreateDeptReport "Report"
End Sub
Sub CreateDeptReport(Report As String)
Dim shtRpt As Excel.Worksheet, shtMaster As Excel.Worksheet
Dim LCopyToRow As Long
Dim LCopyToCol As Long
Dim arrColsToCopy
Dim c As Range, X As Integer
On Error GoTo Err_Execute
arrColsToCopy = Array(1, 3, 4, 8, 25, 16, 17, 15, 31, 7, 26) 'which columns to copy ?
Set shtMaster = ThisWorkbook.Sheets("RawData")
Set c = shtMaster.Range("Y5") 'Start search in Row 5
LCopyToRow = 10 'Start copying data to row 10 in Mental
While Len(c.Value) > 0
'If value in column Y ends with "2135", copy to report sheet
If c.Value Like "*2135" Then
'only create the new sheet if any records are found
If shtRpt Is Nothing Then
'delete any existing sheet
On Error Resume Next
Application.DisplayAlerts = False
ThisWorkbook.Sheets("NewSheetName").Delete
Application.DisplayAlerts = True
On Error GoTo 0
ThisWorkbook.Sheets("Template").Copy After:=shtMaster
Set shtRpt = ThisWorkbook.Sheets(shtMaster.Index + 1)
shtRpt.Name = "NewSheetName" 'rename new sheet to NewSheetName
Range("F1").Value = "XXXX"
Range("F2").Value = "XXXX"
Range("B3").Value = Date
Range("B4").Value = "XXXX"
End If
LCopyToCol = 1
shtRpt.Cells(LCopyToRow, LCopyToCol).EntireRow.Insert shift:=xlDown
For X = LBound(arrColsToCopy) To UBound(arrColsToCopy)
shtRpt.Cells(LCopyToRow, LCopyToCol).Value = _
c.EntireRow.Cells(arrColsToCopy(X)).Value
LCopyToCol = LCopyToCol + 1
Next X
LCopyToRow = LCopyToRow + 1 'next row
End If
Set c = c.Offset(1, 0)
Wend
ThisWorkbook.Worksheets("NewSheetName").Rows("9:9").Delete
Range("A9").Select 'Position on cell A9
MsgBox "All matching data has been copied."
Exit Sub
Err_Execute:
MsgBox "An error occurred."
End Sub
This is what I've got; I'd like to do as little restructuring as possible since I know this does exactly what I want save this one stupid wrinkle. I've tried adding in conditions around the c.Value line but I'm not getting anywhere. Thanks for any advice!
|
excel
|
vba
|
excel-2007
| null | null | null |
open
|
Trying to filter a row from master sheet that doesn't get copied to individual during macro
===
So I have my master sheet that I run a macro on to copy a template and then populate with certain rows based off of values in one column. I need to add a check in so that I can tell it not to pull the row if the value in another column matches a specified criteria. For example, row x would get pulled if the value in column Y matches 1234, but only if the value in column Z does not match 456. This is the code I am using right now:
Option Explicit
Sub Report()
CreateDeptReport "Report"
End Sub
Sub CreateDeptReport(Report As String)
Dim shtRpt As Excel.Worksheet, shtMaster As Excel.Worksheet
Dim LCopyToRow As Long
Dim LCopyToCol As Long
Dim arrColsToCopy
Dim c As Range, X As Integer
On Error GoTo Err_Execute
arrColsToCopy = Array(1, 3, 4, 8, 25, 16, 17, 15, 31, 7, 26) 'which columns to copy ?
Set shtMaster = ThisWorkbook.Sheets("RawData")
Set c = shtMaster.Range("Y5") 'Start search in Row 5
LCopyToRow = 10 'Start copying data to row 10 in Mental
While Len(c.Value) > 0
'If value in column Y ends with "2135", copy to report sheet
If c.Value Like "*2135" Then
'only create the new sheet if any records are found
If shtRpt Is Nothing Then
'delete any existing sheet
On Error Resume Next
Application.DisplayAlerts = False
ThisWorkbook.Sheets("NewSheetName").Delete
Application.DisplayAlerts = True
On Error GoTo 0
ThisWorkbook.Sheets("Template").Copy After:=shtMaster
Set shtRpt = ThisWorkbook.Sheets(shtMaster.Index + 1)
shtRpt.Name = "NewSheetName" 'rename new sheet to NewSheetName
Range("F1").Value = "XXXX"
Range("F2").Value = "XXXX"
Range("B3").Value = Date
Range("B4").Value = "XXXX"
End If
LCopyToCol = 1
shtRpt.Cells(LCopyToRow, LCopyToCol).EntireRow.Insert shift:=xlDown
For X = LBound(arrColsToCopy) To UBound(arrColsToCopy)
shtRpt.Cells(LCopyToRow, LCopyToCol).Value = _
c.EntireRow.Cells(arrColsToCopy(X)).Value
LCopyToCol = LCopyToCol + 1
Next X
LCopyToRow = LCopyToRow + 1 'next row
End If
Set c = c.Offset(1, 0)
Wend
ThisWorkbook.Worksheets("NewSheetName").Rows("9:9").Delete
Range("A9").Select 'Position on cell A9
MsgBox "All matching data has been copied."
Exit Sub
Err_Execute:
MsgBox "An error occurred."
End Sub
This is what I've got; I'd like to do as little restructuring as possible since I know this does exactly what I want save this one stupid wrinkle. I've tried adding in conditions around the c.Value line but I'm not getting anywhere. Thanks for any advice!
| 0 |
3,842,116 |
10/01/2010 18:40:42
| 463,130 |
09/30/2010 17:57:21
| 1 | 0 |
jquery plugin extend defaults problem
|
this is my first post so I hope I am posting to the right place.
I am trying to develop a dialog/modal plugin. this is my first plugin and I'm not sure if I have produced it in the correct way. The problem I am having is that the $.extend is not updating the settings object. I've got 2 elements using the plugin. the #dialog element is not extending the plugins settings object. I've been trying for a couple of days to learn how plugins work and its killing me from the inside :)
$("#icon_menu").Dialog();
$("#dialog").Dialog({closeable:false,clear_on_close : true});
Any help you can give me would be greatly appreciated
Thanks
Mac :)
here is the code
(function( $ ){
$.fn.Dialog = function( method ) {
var elem = this;
var settings = {
'mask' : '#mask',
'closeable' : true,
'clear_on_close' : false
};
var methods = {
init : function( options ) {
if ( options ) {
$.extend( settings, options );
}
console.log(settings);
},
open : function( options ) {
var window_width = $(window).width();
var window_height = $(window).height();
var modal_height = "";
var modal_width = "";
var top = "";
var left = "";
if(!settings.set_width)
{
modal_width = elem.outerWidth();
}else{
modal_width = settings.set_width;
}
if(!settings.set_height)
{
modal_height = elem.outerHeight();
}else{
modal_height = settings.set_height;
}
if(!settings.set_y_pos)
{
top = (window_height-modal_height)/2;
}else{
top = settings.set_y_pos;
}
if(!settings.set_x_pos)
{
left = (window_width-modal_width)/2;
}else{
left = settings.set_x_pos;
}
elem.addClass('active').css({'top': top + 'px', 'left': left + 'px'});
$(settings.mask).css({ 'display' : 'block', opacity : 0}).fadeTo(500,0.8);
elem.css({ 'display' : 'block', opacity : 0}).fadeTo(500,1);
if(settings.closeable){$(settings.mask).bind('click.Dialog', methods.close );}
$(window).bind('scroll.Dialog', methods.reposition);
},
open_ajax : function(options)
{
$.get(options.page, function(data){
elem.html(data);
methods.open();
});//$.get("sign_in.html",
},
close : function( options ) {
$(settings.mask).fadeOut(500);
elem.fadeOut(500);
//alert(settings.clear_on_close)
console.log(settings.clear_on_close)
if(settings.clear_on_close)
{
elem.html("");
}
$(window).unbind('scroll.Dialog');
$(settings.mask).unbind('click.Dialog');
},
reposition : function( options )
{
$(settings.mask).css({"marginTop": ($(window).scrollTop()) + "px"});
elem.stop().animate({"marginTop": ($(window).scrollTop()) + "px"},1000);
}
};
if ( methods[method] ) {
return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if ( typeof method === 'object' || ! method ) {
return methods.init.apply( this, arguments );
} else {
$.error( 'Method ' + method + ' does not exist on jQuery.tooltip' );
}
};
})( jQuery );
|
javascript
|
jquery
|
jquery-plugins
|
extend
| null | null |
open
|
jquery plugin extend defaults problem
===
this is my first post so I hope I am posting to the right place.
I am trying to develop a dialog/modal plugin. this is my first plugin and I'm not sure if I have produced it in the correct way. The problem I am having is that the $.extend is not updating the settings object. I've got 2 elements using the plugin. the #dialog element is not extending the plugins settings object. I've been trying for a couple of days to learn how plugins work and its killing me from the inside :)
$("#icon_menu").Dialog();
$("#dialog").Dialog({closeable:false,clear_on_close : true});
Any help you can give me would be greatly appreciated
Thanks
Mac :)
here is the code
(function( $ ){
$.fn.Dialog = function( method ) {
var elem = this;
var settings = {
'mask' : '#mask',
'closeable' : true,
'clear_on_close' : false
};
var methods = {
init : function( options ) {
if ( options ) {
$.extend( settings, options );
}
console.log(settings);
},
open : function( options ) {
var window_width = $(window).width();
var window_height = $(window).height();
var modal_height = "";
var modal_width = "";
var top = "";
var left = "";
if(!settings.set_width)
{
modal_width = elem.outerWidth();
}else{
modal_width = settings.set_width;
}
if(!settings.set_height)
{
modal_height = elem.outerHeight();
}else{
modal_height = settings.set_height;
}
if(!settings.set_y_pos)
{
top = (window_height-modal_height)/2;
}else{
top = settings.set_y_pos;
}
if(!settings.set_x_pos)
{
left = (window_width-modal_width)/2;
}else{
left = settings.set_x_pos;
}
elem.addClass('active').css({'top': top + 'px', 'left': left + 'px'});
$(settings.mask).css({ 'display' : 'block', opacity : 0}).fadeTo(500,0.8);
elem.css({ 'display' : 'block', opacity : 0}).fadeTo(500,1);
if(settings.closeable){$(settings.mask).bind('click.Dialog', methods.close );}
$(window).bind('scroll.Dialog', methods.reposition);
},
open_ajax : function(options)
{
$.get(options.page, function(data){
elem.html(data);
methods.open();
});//$.get("sign_in.html",
},
close : function( options ) {
$(settings.mask).fadeOut(500);
elem.fadeOut(500);
//alert(settings.clear_on_close)
console.log(settings.clear_on_close)
if(settings.clear_on_close)
{
elem.html("");
}
$(window).unbind('scroll.Dialog');
$(settings.mask).unbind('click.Dialog');
},
reposition : function( options )
{
$(settings.mask).css({"marginTop": ($(window).scrollTop()) + "px"});
elem.stop().animate({"marginTop": ($(window).scrollTop()) + "px"},1000);
}
};
if ( methods[method] ) {
return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if ( typeof method === 'object' || ! method ) {
return methods.init.apply( this, arguments );
} else {
$.error( 'Method ' + method + ' does not exist on jQuery.tooltip' );
}
};
})( jQuery );
| 0 |
128,150 |
09/24/2008 16:17:28
| 556 |
08/06/2008 16:48:23
| 1,215 | 15 |
Finding a partner for a for-profit software project
|
It's great when you have friends that have the skills necessary to do a project with you. But what if all the ones with skills are too busy, and the ones that have free time and want to work with you don't have the skills?
Where would you start looking for partners?
|
business
| null | null | null | null |
05/06/2012 23:09:04
|
off topic
|
Finding a partner for a for-profit software project
===
It's great when you have friends that have the skills necessary to do a project with you. But what if all the ones with skills are too busy, and the ones that have free time and want to work with you don't have the skills?
Where would you start looking for partners?
| 2 |
884,534 |
05/19/2009 19:16:38
| 5,287 |
09/08/2008 21:29:47
| 4,638 | 223 |
Copying large amounts of data into a SQL CE database
|
If I have a large amount of data in memory, what is the best way to copy it into a SQL CE table? The current technology stack is C#, ADO.net, and SQL CE.
My initial idea was to do one INSERT statement for each row of data, but this is time-consuming. Is there an easier way?
|
sql-ce
|
bcp
|
.net
|
c#
|
ado.net
| null |
open
|
Copying large amounts of data into a SQL CE database
===
If I have a large amount of data in memory, what is the best way to copy it into a SQL CE table? The current technology stack is C#, ADO.net, and SQL CE.
My initial idea was to do one INSERT statement for each row of data, but this is time-consuming. Is there an easier way?
| 0 |
6,228,425 |
06/03/2011 14:31:43
| 758,411 |
05/18/2011 01:45:08
| 1 | 0 |
How to setup oracle pl/sql server on local machine?
|
Okay, here's one for you. I have a pl/sql website on a local machine. It's running on Oracle 10gXE server. So, question is - How do i open it to public? Don't want to use a hosting coz I'm a poor student and it's very unlikely to find free oracle hosting with a pl/sql mod(Not sure if any exist even). It's unlikely that the answer is short, so if you have a link to a tutorial, i'll gladly accept that. Thanks in advance.
|
oracle
|
plsql
| null | null | null |
06/03/2011 16:05:20
|
off topic
|
How to setup oracle pl/sql server on local machine?
===
Okay, here's one for you. I have a pl/sql website on a local machine. It's running on Oracle 10gXE server. So, question is - How do i open it to public? Don't want to use a hosting coz I'm a poor student and it's very unlikely to find free oracle hosting with a pl/sql mod(Not sure if any exist even). It's unlikely that the answer is short, so if you have a link to a tutorial, i'll gladly accept that. Thanks in advance.
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.