unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How to compute min and max for 2d functions?
===
I have many functions with two variables x and y, for which I need
to compute min and max to see if they are in the range I want them.
For example:
z = 0.5 - 0.25*(cos(pi*x)) - 0.25*(cos(pi*y))
x=[0,1]
y=[0,1]
The conditions or constraints, are that x and y go 0 to 1 only.
I tried Wolfram Alpha but for some reason it does not compute
the min and max.
Thanks | 2 | [
2,
184,
20,
23909,
4232,
17,
2049,
26,
172,
43,
3719,
60,
800,
3726,
3726,
31,
57,
151,
3719,
29,
81,
12157,
993,
17,
13,
93,
15,
26,
56,
31,
376,
20,
23909,
4232,
17,
2049,
20,
196,
100,
59,
50,
19,
14,
978,
31,
259,
105,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery: master select box to apply values
===
I have the following select boxes:
<select class="actionList" name="masterBox">
<option value="0">No Action</option>
<option value="1">Move</option>
<option value="2">Terminate</option>
</select>
============================================================
<select class="actionList" name="action_ISI00222">
<option value="0">No Action</option>
<option value="1">Move</option>
<option value="2">Terminate</option>
</select>
<select class="actionList" name="action_ISI00223">
<option value="0">No Action</option>
<option value="1">Move</option>
<option value="2">Terminate</option>
</select>
I am trying to put a jQuery action, so that when a value is selected in the `masterBox`, it is also applied on the other select boxes.
All help is appreciated | 0 | [
2,
487,
8190,
93,
45,
1129,
5407,
1649,
20,
5645,
4070,
800,
3726,
3726,
31,
57,
14,
249,
5407,
8120,
45,
13,
1,
18,
16964,
718,
3726,
7,
8645,
5739,
7,
204,
3726,
7,
4594,
5309,
7,
1,
13,
1,
2594,
3309,
1923,
3726,
7,
387,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why does "mapView.userLocation.location.coordinate.latitude" return 0.000?(Xcode)
===
I'm trying to get user's current latitude from mapView on Xcode. I set custom lat. and long. to simulator but it did not work. It always returns 0.0000. What should i try? any suggestion? | 0 | [
2,
483,
630,
13,
7,
15022,
4725,
9,
16704,
19032,
9,
19032,
9,
716,
23239,
9,
8927,
16731,
7,
788,
713,
9,
3993,
60,
5,
396,
9375,
6,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
4155,
22,
18,
866,
16337,
37,
2942,
4725,
27,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to reduce binary footprint when using Haskell package 'plugins'?
===
I have implemented a simple-minded loader for haskell plugins to my Main.hs module. The only function I use right now is `load` from
http://hackage.haskell.org/packages/archive/plugins/1.5.2.1/doc/html/System-Plugins-Load.html
Looking at my compiled application size shows me an over 53 MB executable on the x86 architecture. I understand that big parts of GHC are linked in (due to the haskell-source-to-binary-plugin feature) but this is overkill for my purposes. Is there an officially sanctioned way to shave off the extra features and only keep `(dyn-)load`? | 0 | [
2,
184,
20,
4136,
14171,
18511,
76,
568,
63,
16507,
6030,
13,
22,
18527,
17040,
22,
60,
800,
3726,
3726,
31,
57,
6807,
21,
1935,
8,
12693,
6305,
106,
26,
63,
16507,
10922,
108,
18,
20,
51,
407,
9,
252,
18,
12613,
9,
14,
104,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
branch and trunk code mixed up
===
We are using Eclipse with Subversive.
We have have created a branch (the only one), where I've been working on for a couple of weeks. My colleagues are still working on the trunk. We noticed that some files commited in the branch are present in the trunk and some files commited in the trunk are present in the branch (but not all of it).
Now we are facing a blocking problem because I've got errors on my code: some of the trunk code I updated is referecing some other piece of code I don't have.
Obviously we did something wrong when commiting. It is bizarre since I'm only working on the branch and they are only working on the trunk.
So first, do you have an idea how we ended up in this situation? Secondly, how could we fix it? Merging?
Thank you for your help. | 0 | [
2,
1686,
17,
6436,
1797,
2198,
71,
800,
3726,
3726,
95,
50,
568,
11652,
29,
972,
5498,
1284,
9,
95,
57,
57,
679,
21,
1686,
13,
5,
124,
104,
53,
6,
15,
113,
31,
22,
195,
74,
638,
27,
26,
21,
1335,
16,
1342,
9,
51,
8493,
50,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UITableViewCell appearance in IB different than during run time
===
iPhone dev question!
So i have a custom UITableViewCell class, and i have configured it in Interface Builder with a height of 79. My problem is that once i run the app, the cells have a height of only 20. I can't figure out why the two are different.
If anyone has encountered this before, any help would be appreciated! | 0 | [
2,
13,
11193,
579,
4725,
9725,
1468,
19,
13,
4598,
421,
119,
112,
485,
85,
800,
3726,
3726,
21024,
9664,
1301,
187,
86,
31,
57,
21,
5816,
13,
11193,
579,
4725,
9725,
718,
15,
17,
31,
57,
28895,
32,
19,
6573,
14960,
29,
21,
2947,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
input into javascript function
===
I cant figure out how to have a javascript function which accepts a parameter correctly.
I can get the function working perfectly if I dont use a input parameter because I can do this:
var x = MyFunction;
but the moment I have to do this
var x = MyFunction(e);
then it breaks.
I tried to work around this by setting the input parameter afterwards, but I can't get anything to work, please help, thank you
http://jsfiddle.net/TxMmG/
var MyFunction = function(){
var otherResult = function (){
alert("Hi");
},
input,
objToAlert= function(){
return input;
};
return { objToAlert: objToAlert, input:input, otherResult: otherResult}
} ();
var e = {
"employees": [
{ "firstName": "John", "lastName": "Doe" },
{ "firstName": "Anna", "lastName": "Smith" },
{ "firstName": "Peter", "lastName": "Jones" }
]
};
var e1= "test";
//var y = MyFunction(e); //this does not work if i add a parameter to function - moment i put parenthesis i get problems
var x = MyFunction;
x.input = e1;
x.objToAlert();
alert(x.otherResult()); // weird thing, If i comment out this line then nothing happens, if i uncomment it then the otherResult() alert gets fired as well as alert("underfined")
| 0 | [
2,
6367,
77,
8247,
8741,
1990,
800,
3726,
3726,
31,
2973,
1465,
70,
184,
20,
57,
21,
8247,
8741,
1990,
56,
16548,
21,
18906,
12044,
9,
31,
92,
164,
14,
1990,
638,
5759,
100,
31,
1049,
275,
21,
6367,
18906,
185,
31,
92,
107,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
java regular expression split pattern
===
I want to split the following string:
String line ="DOB,1234567890,11,07/05/12,\"first,last\",100,\"is,a,good,boy\"";
into following tokens:
DOB
1234567890
11
07/05/12
first,last
100
is,a,good,boy
I tried using following regular expression:
import java.util.*;
import java.lang.*;
import java.util.regex.*;
import org.apache.commons.lang.StringUtils;
class SplitString{
public static final String quotes = "\".[[((a-z)|(A-Z))]+( ((a-z)|(A-Z)).,)*.((a-z)|(A-Z))].\"" ;
public static final String ISSUE_UPLOAD_FILE_PATTERN = "((a-z)|(A-Z))+ [(((a-z)|(A-Z)).,)* + ("+quotes+".,) ].((a-z)|(A-Z)) + ("+quotes+")";
public static void main(String[] args){
String line ="DOB,1234567890,11,07/05/12,\"first,last\",100,\"is,a,good,boy\"";
String delimiter = ",";
Pattern p = Pattern.compile(ISSUE_UPLOAD_FILE_PATTERN);
Pattern pattern = Pattern.compile(ISSUE_UPLOAD_FILE_PATTERN);
String[] output = pattern.split(line);
System.out.println(" pattern: "+pattern);
for(String a:output){
System.out.println(" output: "+a);
}
}
}
Am I missing anything in the regular expression?
| 0 | [
2,
8247,
1290,
1803,
2132,
3732,
800,
3726,
3726,
31,
259,
20,
2132,
14,
249,
3724,
45,
3724,
293,
800,
7,
537,
220,
15,
918,
21997,
4167,
27330,
15,
1306,
15,
2984,
118,
4071,
118,
918,
15,
1,
7,
3552,
15,
8558,
1,
7,
15,
403... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
get text from attribute and format it
===
I have a div elements with `data-seat` and `data-row` property:
<div class='selected' data-seat='1' data-row='1'></div>
<div class='selected' data-seat='2' data-row='1'></div>
<div class='selected' data-seat='3' data-row='1'></div>
<div class='selected' data-seat='1' data-row='2'></div>
<div class='selected' data-seat='2' data-row='2'></div>
I want print friendly message for selected seats:
var selectedPlaceTextFormated ='';
$(".selected").each(function () {
var selectedPlace = $(this);
selectedPlaceTextFormated += "Row " + selectedPlace.attr("data-row") + " (seat " + selectedPlace.attr("data-seat") + ")\n";
});
alert(selectedPlaceTextFormated);
This code works well and shows the following:
Row 1 (seat 1)
Row 1 (seat 2)
Row 1 (seat 3)
Row 2 (seat 1)
Row 2 (seat 2)
But, I want group seats by row, i.e I want the following:
Row 1(seats: 1,2,3)
Row 2(seats: 1,2)
also, order by row number. How can I do this?
Thanks. [DEMO][1]
[1]: http://jsfiddle.net/gJFJW/1/ | 0 | [
2,
164,
1854,
37,
35,
14755,
17,
2595,
32,
800,
3726,
3726,
31,
57,
21,
13,
12916,
2065,
29,
13,
1,
18768,
8,
8324,
1,
17,
13,
1,
18768,
8,
5417,
1,
1354,
45,
13,
1,
12916,
718,
3726,
22,
18,
7138,
22,
1054,
8,
8324,
3726,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Add two collections in clojure
===
How to add two collections efficiently in clojure ?
I tried following one. I want to know is there any other method efficient than this.
(reduce #(conj %1 %2) collection01 collection02) | 0 | [
2,
3547,
81,
5721,
19,
7383,
2142,
99,
800,
3726,
3726,
184,
20,
3547,
81,
5721,
20519,
19,
7383,
2142,
99,
13,
60,
31,
794,
249,
53,
9,
31,
259,
20,
143,
25,
80,
186,
89,
2109,
8243,
119,
48,
9,
13,
5,
99,
16041,
6926,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
Qt Creator - Cannot find -llib
===
"tic.so.1" library, C library, is added to Qt Creator project by "adding library" in Qt Creator options,
Qt Creator make .pro file this way:
#-------------------------------------------------
#
# Project created by QtCreator 2012-07-10T00:12:00
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = test_lib
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
LIBS += -L$$PWD/../Desktop/c_2/so/ -lkpt
INCLUDEPATH += $$PWD/../Desktop/c_2/src
DEPENDPATH += $$PWD/../Desktop/c_2/src
which the .pro file has used other name for the added library(-lkpt)!!!
now when i running it has error such these:
error: cannot find -lkpt
error: collect2: ld returned 1 exit status
,
please help me, i cannot understand errors to solve,
Thanks in advance | 0 | [
2,
2593,
38,
9247,
13,
8,
1967,
477,
13,
8,
211,
4598,
800,
3726,
3726,
13,
7,
1786,
9,
656,
9,
165,
7,
1248,
15,
272,
1248,
15,
25,
905,
20,
2593,
38,
9247,
669,
34,
13,
7,
58,
11365,
1248,
7,
19,
2593,
38,
9247,
6368,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Linq to entities parametrized constructor Datetime
===
i know that Ling to entities does not support parametrized constructors, but how to do this pls ?:
date = new DateTime(int.Parse(SqlFunctions.StringConvert(l.rok).Trim()),int.Parse(SqlFunctions.StringConvert(l.mesic).Trim()),1)
Whole example: `var objects = from object in GetObjects()
select new MyObject{
name = object.name;
date = new DateTime(object.rok,object.month,object.day)
}`
How to do this?
| 0 | [
2,
6294,
1251,
20,
12549,
2258,
5909,
139,
1333,
6960,
248,
1231,
891,
800,
3726,
3726,
31,
143,
30,
13,
802,
20,
12549,
630,
52,
555,
2258,
5909,
139,
1333,
6960,
248,
18,
15,
47,
184,
20,
107,
48,
12443,
18,
13,
60,
45,
1231,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Disable autoscroll in ListBox in mfc application
===
So, in my MFC application there is a Listbox, where sometimes calls method AddString. In properties of Listbox - Scroll is true, and it works fine. And when added strings are many, scrollbar appears, but slider is always below. When I raise it to look previous strings, it goes down after calling Addstring method.
How can I bring slider don't movie after calling Addstring?
Thanks. | 0 | [
2,
1460,
579,
3108,
3862,
8694,
19,
968,
5309,
19,
307,
7061,
3010,
800,
3726,
3726,
86,
15,
19,
51,
307,
7061,
3010,
80,
25,
21,
968,
5309,
15,
113,
1030,
3029,
2109,
3547,
11130,
9,
19,
3704,
16,
968,
5309,
13,
8,
12159,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
node.js + express + boilerplate + jquery module doesn't work
===
After struggling for 2 days i am still not able to integrate node+express+boilerplate and a simple JQuery module (Date Picker).
As a final check, i cloned the fresh copy of this project and added the below 4 lines. It failed to show the date prompt which confirmed that the problem isn't at my end. The same 4 lines of code on normal html project works.
I decided to give up on this but there should be a reason why it is not working. I am still not able to figure it out.
Project to clone: https://github.com/mape/node-express-boilerplate
Add these 4 lines to layout.ejs under view directory to head element.
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/smoothness/jquery-ui.css" media="all">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<p>Date: <input type="text" id="datepick"></p>
<script type="text/javascript">
$(function() {
$("#datepick").datepicker();
});
</script>
| 0 | [
2,
15421,
9,
728,
18,
2754,
2999,
2754,
11755,
13095,
2754,
487,
8190,
93,
12613,
1437,
22,
38,
170,
800,
3726,
3726,
75,
7587,
26,
172,
509,
31,
589,
174,
52,
777,
20,
18399,
15421,
2430,
21230,
2430,
1192,
49,
1252,
13095,
17,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MSHTML: Is there a way to attach events or behaviors to an element after Drag/Drop or Paste?
===
I'm working with the WebBrowser control, using the DesignMode function for editing HTML. I'm using the MSHTML interfaces in order to look at and modify the DOM.
Take for example an input text box - I can attach an event sink using the connection point, or add a custom rendering behavior, but when I move this input box to another part of the document, I lose both the connection point hook, and the behavior that was added.
Is there any kind of event I can hook up to in which I can connect the event sink and re-add the behavior? | 0 | [
2,
4235,
15895,
45,
25,
80,
21,
161,
20,
19514,
963,
54,
3257,
18,
20,
40,
4520,
75,
5501,
118,
12361,
54,
640,
62,
60,
800,
3726,
3726,
31,
22,
79,
638,
29,
14,
10192,
5417,
4104,
569,
15,
568,
14,
704,
15570,
1990,
26,
9510,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Extending the maximum length of MATLAB function names
===
I have a written a MATLAB program that creates custom MATLAB functions on the fly and launches them in other MATLAB instances using `unix` command. I use this program for automatizing fMRI neuroimaging analyses (using SPM8 for MATLAB), and everything works fine. However, MATLAB imposes a function name length maximum of 63 characters (`namelengthmax`). As I need to save two different timestamps in each function name together with the name of the function that created it (I have several different functions that create these new functions that are used for multithreaded fMRI analysis), 63 characters is quite limiting for filenames like:
`atf_2012_07_05_18_01_02_specify_1st_level_2012_07_05_18_10_15.m`
In this example `atf` means 'analysis thread function' (to separate it from other files with similar filenames), the first timestamp identifies the run (a global timestamp, it this case 5th of July 2012 at 18:01:02), then there's a string `specify_1st_level` that identifies the function (in this case `specify_1st_level.m`) that created this new 'analysis thread function', and then the second time stamp identifies this specific new 'analysis thread function' from other new 'analysis thread functions' created to be run in other threads (and for different analysis subjects, or for different analyses) and that are run simultaneously.
**My problem is the character limit of 63 characters for function names.**
I'm aware that I could write my timestamps without underscores (`_`), or compress them, and I can make my function names shorter (eg. `specify_1st_level.m` -> `sp1st.m`), and also I could divide my functions created on the fly in different subfolders also created on the fly named eg. with global timestamps. However, I plan to add more data in the names of 'analysis thread functions' (one or more hash values of different analysis parameter sets used in this run to identify identical analyses of different times) and I would like to keep it nice and simple.
**So, is there any way to extend** `namelengthmax` **?** I'm running MATLAB R2012a in Linux. I'm also happy to hear any other ways to solve this issue. | 0 | [
2,
8176,
14,
2979,
1476,
16,
4277,
9086,
1990,
1817,
800,
3726,
3726,
31,
57,
21,
642,
21,
4277,
9086,
625,
30,
9695,
5816,
4277,
9086,
3719,
27,
14,
2855,
17,
22933,
105,
19,
89,
4277,
9086,
13946,
568,
13,
1,
1020,
4028,
1,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JQuery: .live() vs .delegate for ajax:complete event on replaced elements
===
I'm using jQuery 1.6.2 in a Ruby on Rails 3.0.7 app and wanting to switch from `.live()` to `.delegate()` (with plans to upgrade to jQuery 1.7 and use `.on()`). I'm using the `:remote => true` option in Rails to send ajax requests and trying to set up a handler for the responses using the `ajax:complete` event. These ajax requests will often remove/replace the element that actually triggered the request.
The problem I'm having is that if an element is replaced by the ajax request, `.live()` seems to trigger the `ajax:complete` handler anyway when the request is done, but `.delegate()` does not (also, I did a little experiment with jQuery 1.7 and found that `.on()` does not work either).
Essentially, if the `ajax_link` element is replaced, this works:
<!-- language: lang-js -->
$(".ajax_link").live("ajax:complete", function(){
//Do something...
});
But this does not:
<!-- language: lang-js -->
$("body").delegate(".ajax_link", "ajax:complete", function(){
//Do something...
});
Any thoughts on why this is occurring? I read elsewhere on SO that `.delegate()` uses `.live()` behind the scenes so this behaviour is surprising to me. Also, any suggestions for a better way to approach this problem would be welcome. | 0 | [
2,
487,
8190,
93,
45,
13,
9,
5928,
5,
6,
4611,
13,
9,
24249,
3322,
26,
20624,
45,
15990,
807,
27,
1141,
2065,
800,
3726,
3726,
31,
22,
79,
568,
487,
8190,
93,
137,
9,
379,
9,
135,
19,
21,
10811,
27,
2240,
18,
203,
9,
387,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP asort array error
===
I have the following array:
$franchise_a_status[] = array('id' => $franchise['franchise_id'],
'text' => $franchise['franchise_surname']. ' ' .$franchise['franchise_firstname'].' '.'('.$distance.')');
the variables receive the information from the database, and the distance variable retrieves info from the Google distance matrix. But I want the array sorted in order of distance i.e the nearest first.
I thought it was as easy as this:
asort($franchise_a_status);
Sadly I was wrong | 0 | [
2,
13,
26120,
21,
22843,
7718,
7019,
800,
3726,
3726,
31,
57,
14,
249,
7718,
45,
5579,
23087,
870,
1,
58,
1,
10631,
267,
2558,
500,
800,
7718,
5,
22,
1340,
22,
800,
1,
5579,
23087,
870,
2558,
22,
23087,
870,
1,
1340,
22,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I cant open a file
===
Hello i am working on a option meny for my drawing programm.
The problem is that the file that i open dosent draw anything from it.
The file contains 266 Kb so i know save works. i am wondering what i have do wrong here?
The method of open i am using is called Binary Formater
[Serializable]
class SaveANDOpen
{
Lines l = new Lines();
SaveFileDialog saveDialog = new SaveFileDialog();
BinaryFormatter formatter = new BinaryFormatter();
OpenFileDialog openDialog = new OpenFileDialog();
public void openit()
{
if (openDialog.ShowDialog() == DialogResult.OK)
{
FileStream fileopen = new FileStream(openDialog.FileName, FileMode.Open);
l.gates = (LinkedList<Shape>)formatter.Deserialize(fileopen);
fileopen.Close();
}
}
}
l.gates is a linkedlist with contains many shapes in the Line class.
The lineclass draws lines between the shapes.
Greetings
Unknown Programmer =)
| 1 | [
2,
31,
2973,
368,
21,
3893,
800,
3726,
3726,
10975,
31,
589,
638,
27,
21,
4255,
304,
93,
26,
51,
3533,
625,
79,
9,
14,
1448,
25,
30,
14,
3893,
30,
31,
368,
107,
18,
2291,
2003,
602,
37,
32,
9,
14,
3893,
1588,
13,
24311,
1525... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I override the default 'Print to File' port's save dialogue?
===
I'm trying to create a version 3 virtual printer driver, which uses the XPS filter pipeline to convert the XPS spool file into another PDL and save it to disk.
I'm fine with the conversion side of things (using a pipeline filter), but when it comes to presenting the user with a dialog to select a path to save to, I'm not sure what's best!
I know that when I assign my virtual printer to the 'Print to File' port (FILE:), the spooler will show a default save dialogue before the job hits the print queue, like below on windows 7:
![Default save dialog][1]
Only problem is that the default is just a bit too basic. Is there any way to override this default save dialogue for my specific printer driver and provide my own full save dialog?
Thanks a lot!
Andy
[1]: http://i.stack.imgur.com/jMFAz.png | 0 | [
2,
184,
92,
31,
84,
11891,
14,
12838,
13,
22,
10299,
20,
3893,
22,
1295,
22,
18,
2079,
6402,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
615,
203,
6599,
12925,
2425,
15,
56,
2027,
14,
23045,
18,
11945,
12250,
20,
8406,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MFC StretchDIBits cannot draw image from memory
===
I use this class to draw Bitamp from memory. But I cannot get anything on my Picture control. I find [this][1] posting said he could draw 6000X4716 bitmap image from memory. I feel I make some mistake in require memory device and draw in the screen. Any suggestion will be appreciated.
`
long lWidth = 6000;
long lHeight= 4716;
LPWORD lpData = (LPWORD) malloc(28296000*sizeof(BYTE));
memset(lpData, 119, 28296000);
HBITMAP hGray;
LPBITMAPINFO bminfo;
LPBYTE lpBits;
bminfo=(LPBITMAPINFO)new char[sizeof(BITMAPINFO) + sizeof(RGBQUAD)*(256)];
bminfo->bmiHeader.biSize = sizeof( BITMAPINFOHEADER );
bminfo->bmiHeader.biWidth = lWidth;
bminfo->bmiHeader.biHeight = -lHeight;
bminfo->bmiHeader.biBitCount = 32;
bminfo->bmiHeader.biPlanes = 1;
bminfo->bmiHeader.biCompression=BI_RGB;
bminfo->bmiHeader.biSizeImage=WIDTHBYTES(lWidth*8)*lHeight;
//bminfo->bmiHeader.biXPelsPerMeter=0;
//bminfo->bmiHeader.biYPelsPerMeter=0;
// bminfo->bmiHeader.biClrUsed=256;
// bminfo->bmiHeader.biClrImportant=256;
for( int a = 0; a < 256; ++a ){
bminfo->bmiColors[a].rgbBlue = a;
bminfo->bmiColors[a].rgbGreen = a;
bminfo->bmiColors[a].rgbRed = a;
bminfo->bmiColors[a].rgbReserved=0;
}
CDC* pDC = GetDlgItem(IDC_PICTURE)->GetDC();
HDC hDC = pDC ->GetSafeHdc();
HDC hMemDC = CreateCompatibleDC( hDC );
//HDC hMemDC = CreateCompatibleDC( hDC );
if( !hDC )
return;
hGray = CreateDIBSection( hMemDC, bminfo, DIB_RGB_COLORS,
( VOID ** )&lpBits, NULL, 0 );
if( !hGray ){
::ReleaseDC( NULL, hDC );
return;
}
HBITMAP hOld = ( HBITMAP )SelectObject( hMemDC, hGray );
SetDIBColorTable( hMemDC, 0, 256, bminfo->bmiColors );
StretchDIBits(hDC,
0, 0, lWidth, lHeight,
0, 0, lWidth, lHeight,
lpData, ( CONST BITMAPINFO *)bminfo, DIB_RGB_COLORS, SRCCOPY);
DeleteDC( hMemDC );
::ReleaseDC( NULL, hDC );
GdiFlush();
//return hGray;
}
`
[1]: http://stackoverflow.com/questions/1442162/stretchdibits-failed-sometimes-it-draw-nothing | 0 | [
2,
307,
7061,
6363,
1115,
3326,
18,
1967,
2003,
1961,
37,
1912,
800,
3726,
3726,
31,
275,
48,
718,
20,
2003,
1142,
10158,
37,
1912,
9,
47,
31,
1967,
164,
602,
27,
51,
2151,
569,
9,
31,
477,
636,
1565,
500,
2558,
165,
500,
15669,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to assign values to the parameters of <portlet:resourceURL/>?
===
I'm trying to assign values to the parameters of <portlet:resourceURL/>
<portlet:resourceURL id="<%=Constants.Color%>" var="<%=Constants.Color%>"/>
This code does not work.
public class Constants {
public static final String Color = "Red";
} | 0 | [
2,
184,
20,
13952,
4070,
20,
14,
12905,
16,
13,
1,
1993,
1336,
45,
99,
12097,
911,
255,
118,
1,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
13952,
4070,
20,
14,
12905,
16,
279,
255,
38,
73,
1993,
1336,
45,
99,
12097,
911,
255,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
static css not show in express jade
===
i have app.coffee :
pp.configure ->
publicDir = "#{__dirname}/public"
app.set "views", viewsDir
app.set "view engine", "jade"
app.use(stylus.middleware debug: true, src: viewsDir, dest: publicDir, compile: compileMethod)
compileMethod = (str, path) ->
stylus(str)
.set('filename', path)
.set('compress', true)
app.get "/pag",(req,res) ->
res.render "pag",
title: "test",
in /stylesheet/pag.jade:
...
link(rel='stylesheet', href='public/pag/css/bootstrap.min.css')
...
when im go to "myserver:9090/pag" the page not load the bootstrap.min.css.
i get the following error:
source :(my folder of proyects)/public/pag/css/bootstrap.min.styl
dest : (my folder of proyects)/public/pag/css/bootstrap.min.css
read : (my folder of proyects)/public/pag/css/bootstrap.min.styl
Error: ENOENT, open '(my folder)/public/pag/css/bootstrap.min.styl'
Where am i wrong? i am probably missing something.. any ideas?
| 0 | [
2,
12038,
272,
18,
18,
52,
298,
19,
2999,
11713,
800,
3726,
3726,
31,
57,
4865,
9,
18387,
2851,
13,
45,
3273,
9,
1126,
15951,
13,
8,
1,
317,
9035,
800,
13,
7,
5910,
1,
9035,
7259,
1,
118,
12259,
7,
4865,
9,
3554,
13,
7,
4725... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Grow a div to the left
===
Is this even possible? The basic setup is a sidebar on the right with div elements in it.
Clicking one of these elements would add a "popout" div, that should be displayed left of the clicked element. The popout contains a variable number of buttons.
I'd like to style it using only CSS, so i can just add the correct HTML elements from my script and have the stylesheet do the layout.
- I've attepmted the popout inside the sidebar element, positioned absolutely, but then I cannot make the sidebar element itself scale to be at least as tall as the popout. (The sidebar elements are usually shorter in height than the popout).
- I tried putting the popout before the element, and using position absolute, but for some reason the popout will not get wider if i add more buttons, and instead overflows them downwards.
- Using position relative on the popout will make it leave empty space where it would have been in the sidebar.
- Floating it messes up the width of other sidebar elements.
The sidebar is fixed width. The popout is fixed-height. The buttons are fixed-size. The sidebar elements are full-width but variable-height.
I've lost track of all the different things I've tried. My closest attempt at the moment is in this [JsFiddle][1], where the popout is positioned correctly, but does not grow leftwards, only overflow downwards. If I set the width to a large number, it will line the buttons up correctly, but it makes strange things happen if I add a :hover pseudo-class.
How could this be done in HTML/CSS? Or is it only possible using JavaScript? If so, what could be a simple "out-of-the-way" approach of doing this?
[1]: http://jsfiddle.net/cUceH/2/ | 0 | [
2,
3213,
21,
13,
12916,
20,
14,
225,
800,
3726,
3726,
25,
48,
166,
938,
60,
14,
2125,
18161,
25,
21,
270,
1850,
27,
14,
193,
29,
13,
12916,
2065,
19,
32,
9,
25590,
53,
16,
158,
2065,
83,
3547,
21,
13,
7,
6057,
1320,
7,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need help in File processing script
===
#!/bin/sh
p=`date '+20%y%m%d'`
cp Process_*"$p"*.txt /tmp/
cat /tmp/number.txt | egrep -v "Prefix|---|" | sed -e 's/ //g' -e '/^$/d' | nawk -F"->" 'BEGIN{FS="->";OFS=","} {print $1,$2}' > /tmp/numberserieslookup.txt
cat /tmp/numberserieslookup.txt | nawk 'BEGIN{FS=OFS=","} { print substr($1,3,14),$2}' > /tmp/lookup.txt
for i in `cat /tmp/lookup.txt |awk -F, '{print $2}' |sort -u`;
do
grep $i /tmp/lookup.txt > /tmp/$i.txt ;
done
I made one script in shell, but it is not running in my server. So i am trying to make perl for the same. Can anyone help me?
Steps:
1.Copying the Process_currentdate.txt file in to tmp path
2.Making one file numberserieslookup.txt from input file number.txt
number.txt will be like this
Prefix
`----------`
7777777 -> PPPP
8888888 -> QQQQ
I dont want that Prefix and ----. so using sed i am removing those Prefix,---- and blank space. This gives output numberserieslookup.txt as
numberseries.txt
7777777,PPPP
8888888,QQQQ
3. Using numberseries.txt, removing first 2 digit of first field.
lookup.txt
77777,PPPP
88888,QQQQ
4.for loop is used to make different files as per 2nd field.
Filename will be PPPP.txt inside that file
Eg:
PPPP.txt
77777,PPPP
QQQQ.txt
88888,QQQQ
can any one help me to make perl for this?
| 4 | [
2,
376,
448,
19,
3893,
5511,
3884,
800,
3726,
3726,
6926,
187,
118,
4772,
118,
1635,
351,
3726,
1,
8209,
13,
22,
2430,
21447,
93,
11881,
79,
11881,
43,
22,
1,
9750,
953,
1,
2483,
7,
4403,
306,
7,
2483,
9,
38,
396,
38,
13,
118,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using class with PDO
===
I decided to use PDO after recommends here and i found this code below. Those codes are good enough to prevent SQl injection? And class is better option?
<?
class database {
private $hostname;
private $database;
private $username;
private $password;
private $pdo;
function __construct($hostname, $database, $username, $password) {
$this->pdo = new PDO("mysql:host={$this->hostname};port={$this->port};dbname={$this->database}", $this->username, $this->password, array(PDO::ATTR_PERSISTENT => true));
} catch(PDOException $e) {
print "<b>Error - Connection Failed: </b>" . $e->getMessage() . "<br/>";
die();
}
}
public function query($query, $bind = null) {
global $pdo;
$this->statement = $this->pdo->prepare($query);
$this->statement->execute($bind);
}
$date = date("Y-m-d H:i:s", time());
$database->query('INSERT INTO users_inactive(verCode, username, password, email, date) VALUES (?, ?, ?, ?, ?)', array($verCode, $username, $password, $email, $date));
$success[] = "You account has been created!";
?> | 0 | [
2,
568,
718,
29,
351,
537,
800,
3726,
3726,
31,
868,
20,
275,
351,
537,
75,
12360,
18,
235,
17,
31,
216,
48,
1797,
1021,
9,
273,
11358,
50,
254,
511,
20,
2501,
4444,
255,
13646,
60,
17,
718,
25,
574,
4255,
60,
13,
1,
60,
718... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
mysql query count if or something like that
===
I have a table with this fields
id sell_date
a1 27/7/2012
a1 26/7/2012
a1 24/7/2012
a1 24/2/2012
I want a count of the months who has sells in a period of one year before the current date.
result
a1 = 2
my english sucks.... sorry
| 0 | [
2,
51,
18,
22402,
25597,
2468,
100,
54,
301,
101,
30,
800,
3726,
3726,
31,
57,
21,
859,
29,
48,
2861,
4924,
3344,
1,
8209,
21,
165,
1298,
118,
9816,
3212,
21,
165,
1262,
118,
9816,
3212,
21,
165,
937,
118,
9816,
3212,
21,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get rid of the borders in gap.plot?
===
I'm using gap.plot() from the plotrix package to plot data with a wide gap on the x-axis. I have data at 2,4,6 and 28,30,32. I set par(bty = "n") to avoid having boxes around my plots. However, for some reason, the borders are still drawn between the two ranges. I would like to get ride of these borders and just have a gap indicator, as in axis.break().
I was going to post the graph, but I'm a newbie, so StackOverflow won't let me upload it :( | 0 | [
2,
184,
107,
31,
164,
6681,
16,
14,
5878,
19,
4127,
9,
13221,
38,
60,
800,
3726,
3726,
31,
22,
79,
568,
4127,
9,
13221,
38,
5,
6,
37,
14,
3798,
16741,
6030,
20,
3798,
1054,
29,
21,
1051,
4127,
27,
14,
993,
8,
19676,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there an easy way to transform ExtJS 4 MVC application to ExtJS DeftJS MVC?
===
I am looking for an easy way to transform an ExtJS app that already uses ExtJS 4 MVC based architecture to an ExtJS app which uses [DeftJS][1] in order to use benefits of dependency injection provided by this framework.
In ExtJS MVC we have one controller but multiple views associated with it. However DeftJS suggests using ViewController concept i.e. one controller per view. This is the main problem with transition.
[1]: http://deftjs.org/ | 0 | [
2,
25,
80,
40,
2010,
161,
20,
8007,
1396,
38,
728,
18,
268,
307,
8990,
3010,
20,
1396,
38,
728,
18,
6312,
38,
728,
18,
307,
8990,
60,
800,
3726,
3726,
31,
589,
699,
26,
40,
2010,
161,
20,
8007,
40,
1396,
38,
728,
18,
4865,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Add one object to another set of objects in C++
===
I'm working on my assignment in C++ course.
I have to create `operator+=` which will add an object to another set of object.
Here is some explaination and example.
in the `int main` this line is call
` d1 += sgs[i];` which in turn will call the `operator+=`
`d1` is define like this `classNew d1(7, "w");` and `sgs` is define like this
`anotherClass sgs[5];`
So from the above as you can see that both are from different class so I have to create the `operator+=` like this
`classNew classNew::operator+=(anotherClass& rhs);`
in the class call `classNew` it has a set of `anotherClass` which define in `private` like this
anotherClass *my_objects;
so how can I add them in this case?
I'm really sorry if my question is very confusing because I'm also confuse on how to explain this :( | 0 | [
2,
3547,
53,
3095,
20,
226,
309,
16,
3916,
19,
272,
20512,
800,
3726,
3726,
31,
22,
79,
638,
27,
51,
8427,
19,
272,
20512,
674,
9,
31,
57,
20,
1600,
13,
1,
9477,
3457,
2430,
3726,
1,
56,
129,
3547,
40,
3095,
20,
226,
309,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Implementing jQuery tabs into Django project
===
I'm working on a django project and am now trying to add jquery tabs. The problem I am running into is that my {% extends "base.html" %} overrides and makes my jquery css void.
I am wondering if it is at all possible to have my jquery css override the css extending from {% extends "base.html" %}? | 0 | [
2,
17333,
487,
8190,
93,
6523,
18,
77,
3857,
14541,
669,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
3857,
14541,
669,
17,
589,
130,
749,
20,
3547,
487,
8190,
93,
6523,
18,
9,
14,
1448,
31,
589,
946,
77,
25,
30,
51,
13,
1,
118... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to interpret this flow in code?
===
I' having got confusing and problems about design the scenario.
The algorithm is for a math system.
**INPUT:**
- Level: Difficulty of the math problems
- Quantity: Number of problems
**OUTPUT:**
- Problems: This will be an IEnumerable of Problem
I have lack of experience designing. I guess the intermediate of the process will be something like a factory.
The problems are generated by specs. For example, imagine I have the problem model for an addition problem.
public class AdditionProblem : Problem
{
public double Number1 { get; set; }
public double Number2 { get; set; }
}
To generate the problems, the factory should know specs of the problems. If my input receive a begginer level, so problems should be just positive integers between 10 to 90, if he chooses an Advance level, the specs to generate the problem should be negative and positive integers and until 6 digits.
What I think is the factory should already know the specs (I supposed a IDictionary<Levels, Specs>).
I just want that you can help with this first design and I can continue developing later. This is the first part which I'm a bit lost.
I don't want full code, just get the idea. | 0 | [
2,
184,
20,
11584,
48,
3312,
19,
1797,
60,
800,
3726,
3726,
31,
22,
452,
330,
18084,
17,
1716,
88,
704,
14,
12705,
9,
14,
9083,
25,
26,
21,
5057,
329,
9,
13,
1409,
108,
4881,
45,
1409,
13,
8,
662,
45,
6967,
16,
14,
5057,
171... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Clickonce Deployment - How to do partial update
===
Here is my problem which I thought was very simple but after spending few hours I just could not get a fix.
I have a .NET application and have deployed it to a network share using Clickonce publish option Visual Studio 2010.
On the client computer the application is installed succesfully.
Now I had to change a file in my application. I replace the file in the "Application Files" folder, updated the app.exe.maifest file using Mage UI. (Verified the hash got changed for the modified file).
Now updated the .application file so that the hash in it is also recreated because of the change in the app.exe.manifest file.
But when I lauch the application on the client, its not recognizing the update.
Im at loss to understand why is the app not updating.
Any ideas/pointers help is really appreciated.
Thanks | 0 | [
2,
10840,
13120,
10475,
13,
8,
184,
20,
107,
7284,
11100,
800,
3726,
3726,
235,
25,
51,
1448,
56,
31,
289,
23,
253,
1935,
47,
75,
4837,
310,
974,
31,
114,
110,
52,
164,
21,
6098,
9,
31,
57,
21,
13,
9,
2328,
3010,
17,
57,
669... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Exception in MatlabControl when running matlab function outside matlab
===
Hi guys i'm newbie here in SOF and need help in my graduation project to connect between java
and matlab via matlabcontrol .
firstly i wanted to test code in Walkthrough but every time i got same exception :
myfunc.m :
function myfunc()
disp('hello from MYFUNC')
end
class ShowImage {
public static void main(String[] args)
throws MatlabConnectionException, MatlabInvocationException
{
// create proxy
MatlabProxyFactoryOptions options =
new MatlabProxyFactoryOptions.Builder()
.setUsePreviouslyControlledSession(true)
.build();
MatlabProxyFactory factory = new MatlabProxyFactory(options);
MatlabProxy proxy = factory.getProxy();
// call builtin function
proxy.eval("disp('hello world')");
// call user-defined function (must be on the path)
proxy.eval("addpath('E:\\vm')");
proxy.feval("myfunc");
proxy.eval("rmpath('E:\\vm)");
// close connection
proxy.disconnect();
}}
and here's exceptions :
Exception in thread "main" matlabcontrol.MatlabConnectionException: Could not launch MATLAB. Command: [matlab, -r, javaaddpath 'C:\Users\walaa\Desktop\matlabcontrol-4.0.0.jar'; matlabcontrol.MatlabClassLoaderHelper.configureClassLoading(); javarmpath 'C:\Users\walaa\Desktop\matlabcontrol-4.0.0.jar'; matlabcontrol.MatlabConnector.connectFromMatlab('PROXY_RECEIVER_42dd44d9-815e-41ad-bec9-e469718b5710', 2100);]
at matlabcontrol.RemoteMatlabProxyFactory.createProcess(RemoteMatlabProxyFactory.java:305)
at matlabcontrol.RemoteMatlabProxyFactory.requestProxy(RemoteMatlabProxyFactory.java:116)
at matlabcontrol.RemoteMatlabProxyFactory.getProxy(RemoteMatlabProxyFactory.java:134)
at matlabcontrol.MatlabProxyFactory.getProxy(MatlabProxyFactory.java:81)
at ShowImage.main(ShowImage.java:19)
Caused by: java.io.IOException: Cannot run program "matlab": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at matlabcontrol.RemoteMatlabProxyFactory.createProcess(RemoteMatlabProxyFactory.java:292)
... 4 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 6 more
i'm out of time and don't know what's the problem ,,,any help will be appreciated!! | 0 | [
2,
5391,
19,
4277,
9086,
12898,
76,
946,
4277,
9086,
1990,
719,
4277,
9086,
800,
3726,
3726,
4148,
2776,
31,
22,
79,
78,
5893,
235,
19,
86,
410,
17,
376,
448,
19,
51,
6860,
669,
20,
6379,
128,
8247,
17,
4277,
9086,
1197,
4277,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to achive this layout with div and css?
===
I want to design a static webpage with a very easy and strict layout.
I want to achive this with div and css.
Here is an idea how it should look:
image HEADING Content Content Content Content
teasertext tesertext Content Content Content Content
Content Content Content Content
Content Content Content Content Content Content Content Content
Content Content Content Content Content Content Content Content
Content Content Content Content Content Content Content Content
----------------- -----------------
|Large Image 1 | | Large Image 2 | Imagedescription
| | | | Imagedescription
| | | | Imagedescription
----------------- -----------------
image copyright
The basic idea is to have a small image at the left (a red square).
The rest of the page is aligned right to the image.
First the heading followed by a teaser text.
The content area should be a fixed size and the text should overflow to the right area (if larger)
After that I have two images with a description to the right and a copyright below.
I have newer done anything before with css / div and the biggest problem for me is how to define the content area as an overflow.
I am messing around with this for some time and can't figure out how to do this.
I hope this is an easy task for a expirienced web developer, who can give me a hint. | 0 | [
2,
184,
20,
21,
1594,
195,
48,
9106,
29,
13,
12916,
17,
272,
18,
18,
60,
800,
3726,
3726,
31,
259,
20,
704,
21,
12038,
2741,
6486,
29,
21,
253,
2010,
17,
8170,
9106,
9,
31,
259,
20,
21,
1594,
195,
48,
29,
13,
12916,
17,
272,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unicode file I/O with Javascript and gjs?
===
Can anybody give any working example of how to read/write **Unicode** text files using **Javascript** and [ **Gjs**][1], possibly using Gio and/or Glib? I'm experienced in Javascript, but these APIs are still alien to me and being quite new technologies, googling is not helping much.
I've seen this one: https://live.gnome.org/Seed/Tutorial/Simple_file_io , but it is Seed based (not Gjs), and seems quite old. I'm getting errors (like too few arguments on Gio.read on line 9) and thus cannot test using Unicode text.
A working snippet will be much helpful. Thanks!
[1]: https://live.gnome.org/Gjs/ "Gjs"
**Update**: I'm testing on Ubuntu 12.04 64bit. | 0 | [
2,
28010,
3893,
31,
118,
111,
29,
8247,
8741,
17,
489,
728,
18,
60,
800,
3726,
3726,
92,
11181,
590,
186,
638,
823,
16,
184,
20,
1302,
118,
23716,
13,
1409,
8843,
9375,
1409,
1854,
6488,
568,
13,
1409,
1004,
1385,
8741,
1409,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Declaring object as final in java
===
Can someone clarify the significance of the below code.
class A
{
int i=10;
public void setI(int b)
{
i = b;
}
public int getI()
{
return i;
}
}
class Test
{
public static void main(String args[])throws Throwable
{
final A ob = new A();
ob.setI(10);
System.out.println(ob.getI());
}
}
The object A is declared as final, but I can change value of this object's instance variable and also retrive the updated value. So what are the significance of declaring an object as final.
I am aware about declaring primitive datatype as final, which makes that variable constant.
| 0 | [
2,
15594,
3095,
28,
426,
19,
8247,
800,
3726,
3726,
92,
737,
23116,
14,
7294,
16,
14,
1021,
1797,
9,
718,
21,
13,
1,
19,
38,
31,
3726,
1036,
73,
317,
11364,
309,
49,
5,
6391,
334,
6,
13,
1,
31,
800,
334,
73,
13,
1,
317,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding widgets to my launcher screen automatically
===
I intent to put some widgets on my launcher screen without the need of the users to pick from the widget list. I googled and found that this operation needs binding appWidgetId to AppWidgetInfo, which is only possible with the BIND_APPWIDGET permission. i.e. this operation is only possible in system app (but my launcher is not). Is my finding correct?
But I found that in GO Launcher, all its widgets can be put on the launcher screen automatically after download and installation. GO Launcher and its widgets should not be system apps. Any idea on how GO Launcher can implement the automatic widget adding to home screen?
| 0 | [
2,
4721,
4807,
43,
3060,
18,
20,
51,
19755,
2324,
7499,
800,
3726,
3726,
31,
6936,
20,
442,
109,
4807,
43,
3060,
18,
27,
51,
19755,
2324,
366,
14,
376,
16,
14,
3878,
20,
2036,
37,
14,
4807,
43,
3060,
968,
9,
31,
8144,
43,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Image is not posted in Tumblr
===
I used the code, which is mentioned in the link https://github.com/FredrikL/android-ttTumblr. When i use this code, it was successfully logged in after that i'm trying to post a image or text or quote or video nothing will be posted. I can't understand why it will happening. Any one can explain why it will not post. One of my application need Tumblr. In my application i must post image and text. Thanks in Advance. | 0 | [
2,
1961,
25,
52,
6054,
19,
13,
5633,
6287,
139,
800,
3726,
3726,
31,
147,
14,
1797,
15,
56,
25,
2211,
19,
14,
3508,
7775,
18,
6903,
10404,
20926,
9,
960,
118,
16724,
6639,
255,
118,
290,
18524,
8,
38,
38,
5633,
6287,
139,
9,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
German UI Culture de-DE decimal changing to comma value issue in asp.net
===
I am using german UI Culture in my asp.net application.
I am changing my application's UI culture based on the language selected in the dropdown, on dropdown selected index change i am using this code
Thread.CurrentThread.CurrentCulture = new CultureInfo(this.lstLanguage.SelectedValue);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(this.lstLanguage.SelectedValue);
the Dropdown is as below
<asp:DropDownList cssClass="ddllanguage" ValidationGroup="b" runat="server" ID="lstLanguage" AutoPostBack="True" OnSelectedIndexChanged="LstLanguage_SelectedIndexChanged" meta:resourcekey="lstLanguage">
<asp:ListItem Value="en-US" Text="English" meta:resourcekey="ListItemResource2" ></asp:ListItem>
<asp:ListItem Value="de-DE" Text="Deutsch" meta:resourcekey="ListItemResource3"></asp:ListItem>
</asp:DropDownList>
My problem is after changing the language to de-DE all the decimal values in my application are being changed as comma, all the decimal number like 5.12 is coming as 5,12 all the decimal values are changed to comma.
How to get decimal values as it is without comma.
| 0 | [
2,
548,
13,
5661,
1365,
121,
8,
546,
26380,
4226,
20,
11951,
58,
1923,
1513,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
589,
568,
548,
13,
5661,
1365,
19,
51,
28,
306,
9,
2328,
3010,
9,
31,
589,
4226,
51,
3010,
22,
18,
13,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which RESTLET edition do I need?
===
I have application that is build with GAE and GWT. I plan to use GQuery and other javascript libraries in addition to GWT (it is possible). I decided to use Restlet for RESTful design. I need to have some REST resources accessible to the regular ajax calls, but also want to call some of REST services directly from GWT client code. Is this possible? I don't know which Restled edition to choose - GAE or GWT?
Thank you!
Best Regards | 0 | [
2,
56,
760,
1336,
1322,
107,
31,
376,
60,
800,
3726,
3726,
31,
57,
3010,
30,
25,
1895,
29,
13,
17721,
17,
14094,
38,
9,
31,
944,
20,
275,
489,
8190,
93,
17,
89,
8247,
8741,
8649,
19,
848,
20,
14094,
38,
13,
5,
242,
25,
938,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Nested model, update_attributes not working
===
I am having a hard time with what I thought would be an textbook update example. Searched SO but couldn't find the answer. In short, when I click submit the user_id in the profile model gets wiped out and no other data gets saved. I am using Rails 3.2.2.
Here is what I have...
User model...
class User < ActiveRecord::Base
attr_accessible :email, :password, :password_confirmation, :profile_attributes
has_one :profile
accepts_nested_attributes_for :profile
end
Profile model...
class Profile < ActiveRecord::Base
validates :first_name, :presence => true
validates :last_name, :presence => true
belongs_to :user
attr_accessible :first_name, :last_name
end
Users controller...
class UsersController < ApplicationController
def edit
@user = User.find(params[:id])
end
def update
@user = User.find(params[:id])
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to @user, notice: 'Profile was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @user.errors, status: :unprocessable_entity }
end
end
end
end
Nested form...
<%= form_for @user, :validate => true do |f| %>
<%= f.fields_for :profile do |p| %>
<fieldset>
<div class="field">
<%= p.label :first_name %>
<%= p.text_field :first_name %>
</div>
<div class="field">
<%= p.label :last_name %>
<%= p.text_field :last_name %>
</div>
<% end %>
<div class="field">
<%= f.label :email %>
<%= f.text_field :email %>
</div>
<div class="actions">
<%= f.submit 'Edit Profile', :class => "btn btn-large btn-success" %>
<%= cancel %>
</div>
</fieldset>
<% end %> | 0 | [
2,
5618,
69,
1061,
15,
11100,
1,
721,
14755,
18,
52,
638,
800,
3726,
3726,
31,
589,
452,
21,
552,
85,
29,
98,
31,
289,
83,
44,
40,
19059,
11100,
823,
9,
9036,
86,
47,
711,
22,
38,
477,
14,
1623,
9,
19,
502,
15,
76,
31,
108... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
axis2, Maven and IntelliJ
===
I am trying to generate Java classes for a Web Service client using axis2. I keep getting a Cannot resolve symbol 'wsname_ServiceStub' The java file is not being picked up. Meanwhile the 'wsname_ServiceCallbackHandler' the java file in the same directory is getting picked up and I can reference to it from the rest of my project.
I'm using IntelliJ 11.1.2 and Maven 2.2.1
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>AnotherWS</groupId>
<artifactId>AnotherWS</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>1.5.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.6.2</version>
<configuration>
<!--<generateTestcase>true</generateTestcase>-->
<!--<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>-->
<packageName>wsname</packageName>
<wsdlFile>src/main/resources/wsname.wsdl</wsdlFile>
<!--<generateAllClasses>true</generateAllClasses>-->
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2code</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
| 0 | [
2,
8577,
135,
15,
1216,
3124,
17,
19,
4213,
9999,
800,
3726,
3726,
31,
589,
749,
20,
7920,
8247,
2684,
26,
21,
2741,
365,
6819,
568,
8577,
135,
9,
31,
643,
1017,
21,
1967,
9854,
4678,
13,
22,
10268,
7259,
1,
11449,
384,
4502,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to establish dial-up internet connection
===
I have a Nokaia 3G USB modem (stick) that I want to turn on and off programmatically.
This modem installs itself in Windows 7 as just another network adapter - no new modems are added.
Because no modem is added I cannot use RAS to establish connection from code, as I can (and do) with many other 3G USB modem sticks.
In the Network Connections window the network adapter looks like a **WLAN** adapter (you know, with those "signal strength bars" in the icon), and by right-clicking it i am able to do the connect/disconnect action interactively.
But how can I establsh connection **from code** with this modem? I'm sure there must be a simple way...?
| 0 | [
2,
184,
20,
4088,
11601,
8,
576,
2620,
2760,
800,
3726,
3726,
31,
57,
21,
90,
657,
549,
203,
263,
182,
220,
3740,
79,
13,
5,
10277,
6,
30,
31,
259,
20,
805,
27,
17,
168,
625,
6732,
1326,
9,
48,
3740,
79,
16146,
18,
1145,
19,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting nth child value of element using Jquery
===
I wish to add '1' to the id conCol to make it conCol1. Please can someone tell me how I go about this because my statement below doesn't work. Also, is it possible to get the value of "first-column" i.e Condition #0 to make it Condition #1?
newElem.children('select :nth-child(2)').attr('id', 'conCol' + newNum).attr('name', 'name' + newNum);
<tr id="condition1" class="clonedInput">
<td class="first-column">Condition #0</td>
<td><span style="float:left; padding-right: 10px;">
<select id="conCol" name="conCol" class="standard_select" style="width:147px; background:#fff;">
| 0 | [
2,
1017,
13,
103,
96,
850,
1923,
16,
4520,
568,
487,
8190,
93,
800,
3726,
3726,
31,
2536,
20,
3547,
13,
22,
165,
22,
20,
14,
4924,
1065,
7771,
20,
233,
32,
1065,
7771,
165,
9,
2247,
92,
737,
494,
55,
184,
31,
162,
88,
48,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Distinct Count Via SQLFiddle
===
This seems weird: [\[SQL FIDDLE\]][1]
The two users are definitely different i.e 1<>2. So why is the distinct count saying 1 ?
[1]: http://sqlfiddle.com/#!3/b4130/3 | 0 | [
2,
4421,
2468,
1197,
4444,
9641,
49,
12312,
800,
3726,
3726,
48,
2206,
5455,
45,
636,
1,
2558,
18,
22402,
12759,
1,
500,
500,
2558,
165,
500,
14,
81,
3878,
50,
4939,
421,
31,
9,
62,
137,
1,
135,
9,
86,
483,
25,
14,
4421,
2468,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating Grouped UITableview with Different Cell Types
===
I need to create a grouped uitableview that includes some sections and possibly different cell types in each sections.
I am trying to create something like old foursquare app, user page (includes 'leaderboard', 'friend suggestions', 'friends', 'stats', 'most explored categories' ... sections).
I am fairly new to ios programming, so that view may not be a grouped uitableview.
What I especially stuck is creating different cells for sections, and finding out which cells are clicked.
My data source will be 2 different NSArray* that consists of different data types, that's why I need different custom cells. | 0 | [
2,
2936,
19511,
13,
11193,
579,
4725,
29,
421,
1667,
2551,
800,
3726,
3726,
31,
376,
20,
1600,
21,
19511,
13,
11193,
579,
4725,
30,
1103,
109,
4501,
17,
2879,
421,
1667,
2551,
19,
206,
4501,
9,
31,
589,
749,
20,
1600,
301,
101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Syntax Isuse- Razor MVC4
===
I'm trying to display a partial view using a custom helper method. The only problem is, I can't get past this syntax issue. The model set for this cshtml file is an IEnumerable collection of models I've defined as Operation. I'm sure this is an easy fix. Here's an example of what I'm seeing:
I have this block of code:
@using(Html.BeginForm()) {
<div id="editor_rows">
@foreach (var item in Model){
Html.RenderPartial("OperationEditorRow", item);
}
</div>
}
This gives me the following error at runtime:
Unexpected "{" after "@" character. Once inside the body of a code block (@if {}, @{}, etc.) you do not need to use "@{" to switch to code.
But if I remove the @ sign in front of the foreach statement, everything is interpreted as plain text. So I tried placing an @ in front of Html as follows:
@using(Html.BeginForm()) {
<div id="editor_rows">
@foreach (var item in Model){
@Html.RenderPartial("OperationEditorRow", item);
}
</div>
}
This comes back with a compilation error that says:
Cannot implicitly convert type void to object
If I run the project from here, I get a runtime error that says:
The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
I'm assuming this is related to the previous error. If anybody has a suggestion for me, please help. | 0 | [
2,
22649,
25,
3699,
8,
14282,
307,
8990,
300,
800,
3726,
3726,
31,
22,
79,
749,
20,
3042,
21,
7284,
1418,
568,
21,
5816,
448,
106,
2109,
9,
14,
104,
1448,
25,
15,
31,
92,
22,
38,
164,
640,
48,
22649,
1513,
9,
14,
1061,
309,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL require multiple values from multiple rows of a join
===
I have the following table structures.
Table A
id name
1 name1
2 name2
Table B
a_id b_id
1 1
1 2
How can I select all rows of table A that have both a b_id of 1 and 2? Table B is a mapping table between table A and another table, whose contents do not matter for this question.
Thank you for your time and help! | 0 | [
2,
51,
18,
22402,
4077,
1886,
4070,
37,
1886,
11295,
16,
21,
1865,
800,
3726,
3726,
31,
57,
14,
249,
859,
3815,
9,
859,
21,
4924,
204,
137,
204,
165,
172,
204,
135,
859,
334,
21,
1,
1340,
334,
1,
1340,
137,
137,
137,
172,
184,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Video PHP scripts for every video site
===
This is frustrating...
Right now I just have the following:
$regexes = array();
//youtube regex, will go to matches[1]
$regexes[] = '(?:https?:\/\/(?:(?:.+\.(?:youtube\.com|ytimg\.com))|(?:youtu\.be\/))(?:.*?)(?:\??vi?[\/\=]{1}|embed\/)([A-Za-z0-9\-_]{11}))';
//vimeo regex, will go to matches[2]
$regexes[] = '(?:https?:\/\/(?:.+\.)vimeo.com(?:\/video\/|(?:.+clip_id=))([a-z0-9-]+))';
That´s just Youtube and Vimeo. But what I want is Youtube, Vimeo, Dailymotion... and every other site in existence.
The idea is that I have a website that allows users to embed videos from other sites. Kinda like tumbler I guess. I have about a hundred sites in mind. But I don't know where to begin looking for a complete list of code for these sites. | 0 | [
2,
763,
13,
26120,
17505,
26,
352,
763,
689,
800,
3726,
3726,
48,
25,
25568,
9,
9,
9,
193,
130,
31,
114,
57,
14,
249,
45,
5579,
12463,
1706,
160,
800,
7718,
5,
6,
73,
12894,
245,
19302,
7953,
1706,
15,
129,
162,
20,
1717,
2558... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I confirm login to Rally when using Java and the RallyRestApi object?
===
I am writing a web service client for accessing Rally using Java and the Rally API, and would like to confirm that a user has entered the correct username/password when logging in (which occurs during the creation of the RallyRestApi object). The only way I have found so far to show if their credentials worked was to just attempt a query and check for a response. Does RallyRestApi give any feedback that would indicate a correct login, or can anyone recommend a method that would validate the user/password information?
Thank you | 0 | [
2,
184,
107,
31,
10265,
6738,
108,
20,
6950,
76,
568,
8247,
17,
14,
6950,
99,
6106,
2159,
3095,
60,
800,
3726,
3726,
31,
589,
1174,
21,
2741,
365,
6819,
26,
1381,
68,
6950,
568,
8247,
17,
14,
6950,
21,
2159,
15,
17,
83,
101,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Problems with on submit and jquery
===
Working on a project where form changes are checked for. I'm having difficulty removing the changes have been made alert when the user submits the form.
$(document).ready(function(){
changes_made = false;
$('input, select, textarea').on('change', function() {
changes_made = true;
});
$(window).bind('beforeunload', function() {
if(changes_made) { return 'You have made changes on this page.'; }
});
$('form').each(function() {
$(this).on('submit', function() {
changes_made = false;
});
});
}) | 0 | [
2,
1716,
29,
27,
12298,
17,
487,
8190,
93,
800,
3726,
3726,
638,
27,
21,
669,
113,
505,
1693,
50,
6505,
26,
9,
31,
22,
79,
452,
6967,
9096,
14,
1693,
57,
74,
117,
7863,
76,
14,
4155,
12298,
18,
14,
505,
9,
5579,
5,
28132,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
google font is not rendering proper a specific swedish letter
===
this is my site: [LINK][1]
Lately the letter "å" seems to look wierd, like a dot instead of an "a" with a circle around it. Is there a solution for this? It was fine before. Other swedish letters work fine (ä, ö)
I use wordpress 3.4, theme Aggregate. The theme I use uses google webfont Cuprum. I really like it and would like to keep it.
This is the code used for the body: http://pastebin.com/LnyzU8Cf
[1]: http://kiljano.se | 0 | [
2,
8144,
9978,
25,
52,
15307,
4119,
21,
1903,
3061,
1748,
800,
3726,
3726,
48,
25,
51,
689,
45,
636,
6258,
500,
2558,
165,
500,
10434,
14,
1748,
13,
7,
58,
7,
2206,
20,
361,
11842,
897,
15,
101,
21,
14123,
700,
16,
40,
13,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
tkinter treeview - drag and drop?
===
I can see how to cut and paste nodes in a tree or move them up and down using buttons or key bindings. Is there a way to implement dragging and dropping nodes around the treeview? | 0 | [
2,
13,
38,
1767,
815,
1541,
4725,
13,
8,
5501,
17,
2804,
60,
800,
3726,
3726,
31,
92,
196,
184,
20,
1077,
17,
640,
62,
16272,
19,
21,
1541,
54,
780,
105,
71,
17,
125,
568,
12861,
54,
1246,
8728,
18,
9,
25,
80,
21,
161,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
Multi-instancing a project with extensive use of globals
===
We have a fairly robust program developed in Visual Basic .NET, and we've created an API which essentially represents the entire program as a single object. This works quite well and we've been using it for years--but now a project's come up where we really could use multiple instances of this.
The problem is that the codebase has extensive references to a global variable (gSvcMgr) in a Startup module. How can I make multiple instances of this object reference a different variable? Can I use namespaces? Or the Shadows keyword?
I can describe the structure further if I've been unclear, or if the specifics might help.
While refactoring the globals isn't out of the question if it's the only option, we have a very large code base, and only a few developers.
Thank you! | 0 | [
2,
1889,
8,
108,
6114,
6302,
21,
669,
29,
3386,
275,
16,
2062,
18,
800,
3726,
3726,
95,
57,
21,
6647,
15313,
625,
885,
19,
3458,
2125,
13,
9,
2328,
15,
17,
95,
22,
195,
679,
40,
21,
2159,
56,
7398,
4719,
14,
1078,
625,
28,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to pop to a specific view in the poppover when dismissing popover?
===
I have a popover that has a main view that is used to pick from several sub-views and I'd like to reset the popover to the main view when the user taps outside of the popover and closes the window.
For example, the main popover view has Options, Categories, WordList, and Results. I'd like to make it so that the next time the user invokes the popover, they go to the main view rather than back to the view they were on when they last closed the popover.
If I'm only one level deep, I can use
- (void)viewWillDisappear:(BOOL)animated {
[[self navigationController] popToRootViewControllerAnimated:YES];
[super viewWillDisappear:animated];
}
But if I'm deep in a hierarchy, e.g. WordList:Category:Words I can't pop to root in WordList or Category since when the view disappears, I want to go to the next level down. If I use the code listed above, I can't get down a level. I pop to the root view.
What I'd like is to be able to tell the popover view to pop to its root when it's dismissed. Something like this:
- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController {
[[self popover] popToRootViewControllerAnimated:YES];
[self.popoverController dismissPopoverAnimated:YES];
}
Any thoughts?
| 0 | [
2,
25,
32,
938,
20,
1675,
20,
21,
1903,
1418,
19,
14,
1675,
306,
2549,
76,
14372,
68,
1675,
2549,
60,
800,
3726,
3726,
31,
57,
21,
1675,
2549,
30,
63,
21,
407,
1418,
30,
25,
147,
20,
2036,
37,
238,
972,
8,
4725,
18,
17,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PNG transparency issue
===
I'm having a weird IE 8 transparency issue. The png does get transparent but the shadows and borders are all broken up. See it for yourself:
![enter image description here][1]
[1]: http://i.stack.imgur.com/Mu9WU.jpg
The 2 upper images are in IE 8 and in the lower part are the same in Chrome. The pngs show perfectly in every other browser. IE 9 show the images OK. | 0 | [
2,
351,
2723,
19668,
1513,
800,
3726,
3726,
31,
22,
79,
452,
21,
5455,
13,
660,
469,
19668,
1513,
9,
14,
351,
2723,
630,
164,
14862,
47,
14,
5327,
17,
5878,
50,
65,
2023,
71,
9,
196,
32,
26,
2834,
45,
13,
187,
2558,
13679,
196... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
postgreSQL - return interval as time type
===
In a form we have, people will enter an age by first specifying a category (minutes, hours, days, months, years) and then secondarily entering an integer value. The problem with this practice is that ages become inconsistent - 18 months is greater than 1 year, this makes statistical analysis difficult.
Internally I need to store this data not as two integers (as it is currently stored) but as an interval and an integer. The second integer indicates the original unit.
Here is the question: what is the simple method for telling postgreSQL to return this interval back as the time it was entered as? So for instance, the user enters: 18 months. Right now, it will return it as 1 year, 6 months. -- can't redisplay that on the form. I know based on the other integer what they entered it as, so there will be no fractional component - i.e. if they entered it in days, there will be no hours, etc.
Ideally it would be something like
SELECT as_time((person.age).value,'months')
Note that these intervals are entered as-is, so the months would not ever be anything other than the 30-day interval 'months' (representational months). If need be I can use a plpgsql function for it, since I'll need to do a lookup on the time type code; but the strict requirement in all cases is that if they entered some time, they get back exactly that time, no rounding, no 'correction', etc. | 0 | [
2,
678,
6879,
18,
22402,
13,
8,
788,
14422,
28,
85,
1001,
800,
3726,
3726,
19,
21,
505,
95,
57,
15,
148,
129,
2830,
40,
348,
34,
64,
19077,
68,
21,
3230,
13,
5,
5556,
18,
15,
974,
15,
509,
15,
818,
15,
122,
6,
17,
94,
153,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
T4 Soap Proxy Template
===
I was looking for a way to dynamically handle soap requests and saw a few posts about using the ServiceDescriptionImporter, to generate a proxy object on the fly. While playing with this, I found that the resulting object wasn't usable across COM Interop, not sure why.
Anyway, it gave me the idea to use T4 templates to generate SOAP proxies, instead of the traditional service reference approach. After generating the code, I added Guid and ComVisible attributes to the generated code. I was rather pleased with the result.
I'm sharing the initial t4 template in the hopes that it may help someone else faced with the same dilemma.
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ output extension=".cs" #>
<#@ assembly name="System.Net" #>
<#@ assembly name="System.Web.Services" #>
<#@ assembly name="System.Xml" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Security.Permissions"#>
<#@ import namespace="System.Web.Services.Description" #>
<#@ import namespace="System.CodeDom" #>
<#@ import namespace="System.CodeDom.Compiler" #>
<#
string wsdl = "http://www.webservicex.com/globalweather.asmx?wsdl";
System.Net.WebClient client = new System.Net.WebClient();
System.IO.Stream stream = client.OpenRead(wsdl);
ServiceDescription description = ServiceDescription.Read(stream);
ServiceDescriptionImporter importer = new ServiceDescriptionImporter();
importer.ProtocolName = "Soap12"; // Use SOAP 1.2.
importer.AddServiceDescription(description, null, null);
importer.Style = ServiceDescriptionImportStyle.Client;
importer.CodeGenerationOptions = System.Xml.Serialization.CodeGenerationOptions.GenerateProperties;
CodeNamespace nmspace = new CodeNamespace();
CodeCompileUnit unit1 = new CodeCompileUnit();
unit1.Namespaces.Add(nmspace);
ServiceDescriptionImportWarnings warning = importer.Import(nmspace, unit1);
if (warning == 0)
{
StringWriter writer = new StringWriter();
CodeDomProvider provider1 = CodeDomProvider.CreateProvider("CSharp");
provider1.GenerateCodeFromCompileUnit(unit1, writer, new CodeGeneratorOptions() );
return writer.ToString();
}
#>
| 0 | [
2,
13,
38,
300,
6447,
27188,
22894,
800,
3726,
3726,
31,
23,
699,
26,
21,
161,
20,
7782,
1326,
3053,
6447,
12279,
17,
441,
21,
310,
9868,
88,
568,
14,
365,
546,
8741,
872,
1660,
1993,
106,
15,
20,
7920,
21,
27188,
3095,
27,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Right click setIcon() to mark bomb - Minesweeper
===
I am pretty new to programming and am trying to make a Minesweeper GUI. The game worked perfectly when the right clicking a JToggleButton displayed a "B" for bomb on the button, but when I replaced the setText() with setIcon() in the mouselistener it shows the icon when left and right clicking occurs. I didn't have this problem with setText().
public void mousePressed(MouseEvent e){
if(e.isMetaDown())
if(btnPresses == 0)
{
startTime = System.currentTimeMillis();
btnPresses++;
}
//if(btn[y][x].getText().equals("B"))
if(btn[y][x].getIcon()==flag)
{
//btn[y][x].setText("");
btn[y][x].setIcon(null);
if(bombs[y][x]!=BOMB)
markers++;
}
else
{
//btn[y][x].setText("B");
btn[y][x].setIcon(flag);
if(bombs[y][x]==BOMB)
markers++;
else
markers--;
} | 0 | [
2,
193,
10840,
309,
49,
1126,
5,
6,
20,
943,
3816,
13,
8,
27531,
800,
3726,
3726,
31,
589,
1772,
78,
20,
3143,
17,
589,
749,
20,
233,
21,
27531,
9457,
9,
14,
250,
577,
5759,
76,
14,
193,
25590,
21,
487,
262,
263,
4875,
811,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I show a loading indicator while javascript image carousel loads 36 images ?
===
I'm using Nivo Slider [Nivo Slider][1] as an Image Carousel. However, I needed to embed a powerpoint presentation, so I converted all slides to JPG images totaling about 3.5 MB. Now it takes a while for all the images to load. But while loading, the containing div area is totally empty and shows the page background.
My questions is whether I can show some sort of loading indicator while all 36 images are loading. Another option that might be possible is to do lazy loading of images so that only the first image is loaded, and when user clicks the next arrow to go to the next image, it loads and so forth. Are either of these options possible ?
[1]: http://nivo.dev7studios.com/ | 0 | [
2,
92,
31,
298,
21,
12797,
13310,
133,
8247,
8741,
1961,
27374,
19069,
3372,
3502,
13,
60,
800,
3726,
3726,
31,
22,
79,
568,
1781,
2625,
3295,
106,
636,
103,
7852,
3295,
106,
500,
2558,
165,
500,
28,
40,
1961,
27374,
9,
207,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
django-registration - how do i change example.com in the email?
===
do i have the django-registration setup, and it sends emails - yay!
However, it's decided that it would be ace to call my site "example.com", which is not the name i decided to use. Cool name, but not for me.
How do i change example.com to something else? I read somewhere that i go to the admin page but - spoiler alert - i've never used the admin page in django and am not actively planning on this currently (but maybe someday?)
So i go to the admin page - `/admin/sites/site/` - and sure enough i can see "example.com" and "domain name". But now what? I added my sites domain name and "display name", but how do i *select* to use it? I even deleted example.com!
However, the email insists on still sending out example.com. All the sites i read just say "use admin", but i don't know if maybe my admin is broken (which would be odd, as i really haven't touched it) or if there is a link i'm missing?
any ideas?
| 0 | [
2,
3857,
14541,
8,
12463,
702,
5946,
13,
8,
184,
107,
31,
753,
823,
9,
960,
19,
14,
8517,
60,
800,
3726,
3726,
107,
31,
57,
14,
3857,
14541,
8,
12463,
702,
5946,
18161,
15,
17,
32,
11350,
8517,
18,
13,
8,
2167,
93,
187,
207,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MongoDB: How do I update a single subelement in an array, referenced by the index within the array?
===
I'm trying to update a single subelement contained within an array in a mongodb document. I want to reference the field using its array index. (Elements within the array don't have any fields that I can guarantee will be unique identifiers.) Seems like this should be easy to do, but I can't figure out the syntax.
Here's what I want to do in pseudo-json.
Before:
{
_id : ...,
other_stuff ... ,
my_array : [
{ ... old content A ... },
{ ... old content B ... },
{ ... old content C ... }
]
}
After:
{
_id : ...,
other_stuff ... ,
my_array : [
{ ... old content A ... },
{ ... NEW content B ... },
{ ... old content C ... }
]
}
Seems like the query should be something like this: (Again, pseudocode)
db.my_collection.update(
{_id: ObjectId(document_id), my_array.1 : 1 },
{my_array.$.content: NEW content B }
)
But this doesn't work. I've spent way too long searching the mongodb docs, and trying different variations on this syntax (e.g. using $slice, etc.) I can't find any clear explanation of how to accomplish this kind of update in MongoDB. Please help! | 0 | [
2,
3521,
5474,
220,
45,
184,
107,
31,
11100,
21,
345,
972,
27567,
19,
40,
7718,
15,
17571,
34,
14,
4348,
363,
14,
7718,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
11100,
21,
345,
972,
27567,
3437,
363,
40,
7718,
19,
21,
3521,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Debugging unwanted strictness?
===
I have a problem that I don't know how to reason about. I was just about to ask if somebody could help me with the specific problem, but it dawned on me that I could ask a more general question and hopefully get a better general understanding as a result. Hopefully. So here goes:
It's usually obvious enough when your program is too lazy, because you end up with glaring issues like space leaks, for example. I have the opposite problem: my program is too strict. I am trying to [tie](http://mergeconflict.com/archives/57) [knots](http://stackoverflow.com/questions/11060565/tying-the-knot-with-a-state-monad), and find that certain things I attempt to do will somehow defeat the laziness I need. So my general question is, **how does one debug unwanted strictness?**
---
For completeness, here's my specific case: I'm in `RWS`, where the writer component populates a map, and the reader component observes the final state of that map. I can't do anything strict with this map before I've finished populating it. It appears to be no problem to look up values in the map, like:
do
m <- ask
val <- m ! key
doSomething val -- etc.
But `(!)` fails using `error`, where I'd instead prefer to fail using my monad's `fail`. So I'd like to do something like the following:
do
m <- ask
maybe
(fail "oh noes")
(doSomething)
(lookup key m)
This causes my program to `<<loop>>`, which I don't understand. It doesn't *seem* to me like this should be any more strict than using `(!)`, but obviously I'm wrong... | 0 | [
2,
121,
16254,
2762,
21095,
8170,
720,
60,
800,
3726,
3726,
31,
57,
21,
1448,
30,
31,
221,
22,
38,
143,
184,
20,
1215,
88,
9,
31,
23,
114,
88,
20,
1349,
100,
8861,
110,
448,
55,
29,
14,
1903,
1448,
15,
47,
32,
4824,
69,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XAMPP + OSX + Virtualhosts + change user in httpd.conf = phpmyadmin create database not working
===
I have installed XAMPP on OSX Lion.
Because I want to serve a folder from one of my development folders I have added a virtualhost to /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin email@gmail.com
DocumentRoot "/Users/myosxUsername/Documents/dir/dir/htdocs"
ServerName qmh
ErrorLog "logs/qmh-error_log"
CustomLog "logs/qmh-access_log" common
</VirtualHost>
and also added an entry to the hosts file
127.0.0.1 qmh
Because of permission issue with the server accessing the directory "/Users/myosxUsername/Documents/dir/dir/htdocs" I have also changed the user in httpd.conf to my myosxUsername
User myosxusername
Group admin
# previous setting below
# User nobody
# Group nobody
After those changes virtual hosts work fine.
The problem is that when i now use phpmyadmin to create a new database i get the error message
> db_create.php: Missing parameter: new_db
if I change the user back to:
User nobody
Group nobody
then phpmyadmin works fine, but my virtualhost directory cannot be accessed due to permission issue.
I assume I somehow have to tell apache to not use the new user somehow ?? Your help is appreciated Thanks | 0 | [
2,
993,
765,
3421,
2754,
13,
759,
396,
2754,
6599,
11694,
18,
2754,
753,
4155,
19,
7775,
43,
9,
14093,
800,
13,
26120,
915,
1283,
2160,
1600,
6018,
52,
638,
800,
3726,
3726,
31,
57,
4066,
993,
765,
3421,
27,
13,
759,
396,
6023,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ruby - collaborative learning
===
I am interested in brining together a group of like minded folk with similar skill levels for a hack jam style collaborative learning event for ruby on rails. We live in a regional area where some small events like this would really help bring people out of the woodwork. There are services out there like webmaker.org from mozilla that offer templates for putting together hack jams. Does anyone else know of any similar services that can help put on / promote an event like this? | 2 | [
2,
10811,
13,
8,
12937,
2477,
800,
3726,
3726,
31,
589,
3158,
19,
17970,
68,
429,
21,
214,
16,
101,
13,
12693,
3267,
29,
835,
6148,
2216,
26,
21,
11835,
4001,
1034,
12937,
2477,
807,
26,
10811,
27,
2240,
18,
9,
95,
515,
19,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP curl cannot read a page
===
PHP curl at our localhost works fine but not on any other server
Here is the code
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" );
curl_setopt($ch, CURLOPT_URL, 'http://50.7.243.50:8054/played.html');
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER ,0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch,CURLOPT_TIMEOUT,120);
curl_setopt($ch,CURLOPT_MAXREDIRS,20);
$data = curl_exec ($ch);
if ($data == false)
echo "CURL ERROR : ".curl_error($ch)."<br>";
curl_close ($ch);
even if we do this
curl_setopt($ch, CURLOPT_URL, 'http://50.7.243.50/played.html');
curl_setopt($ch, CURLOPT_PORT, 8054);
it shows error **couldn't connect to host**
Any help is appreciated.... | 0 | [
2,
13,
26120,
14320,
1967,
1302,
21,
2478,
800,
3726,
3726,
13,
26120,
14320,
35,
318,
375,
11694,
693,
1123,
47,
52,
27,
186,
89,
8128,
235,
25,
14,
1797,
5579,
673,
800,
14320,
1,
108,
242,
5,
6,
73,
14320,
1,
870,
3880,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HOW TO UNDERSTAND THE LOGIC OF COMPLEX SQL QUERIES IN MYSQL AND RELATIONAL ALGEBRA
===
i'm working on a simple project to create tables and insert data into them and finally execute some queries.(i'm using mysql command client.)
my schema is, it's easy to implement it no problem.
Emp(eid: integer, ename: string, age: integer, salary: real)
Works(eid: integer, did: integer, pct_time: integer)
Dept(did: integer, budget: real, managerid: integer)
**My first question:**
1-Find the department with the highest average age of employees.
when first i read the question, it seems easy however while implementing i can't get the results.
i have many queries like this, is someone explain the steps to make these queries easier.
i use this query to get the avg ages of the all employees next step is to get the MAX age,but how?
> SELECT AVG(E.age) FROM DEPT D,EMP E,WORKS W
> WHERE D.did=W.did and
> W.eid=E.eid GROUP BY D.did
(if you know any good books for just understanding these types of queries will be fine for me.)
**Second question:**
Sometimes some instructors or database managers want the relational algebra of the queries?
knowing the relational algebra of the queries,why important?
and can we all implement all these complex queries by using relational algebra?
thank you. | 0 | [
2,
184,
20,
1369,
14,
7085,
16,
1502,
4444,
255,
9386,
2829,
19,
51,
18,
22402,
17,
5827,
192,
10999,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
1935,
669,
20,
1600,
7484,
17,
14692,
1054,
77,
105,
17,
722,
15644,
109,
9386,
2829... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Google Developer Registration
===
I've been registered as Google Developer at 26 of July
and until this very moment my status is:
Your Registration to Google Play is still being processed.You can upload applications to Google Play but you cannot publish until your registration is completed.
I'm pretty sure the transaction has been made successfully,
so what's holding Google back from approving my account?
thanks | 2 | [
2,
8144,
10058,
8587,
800,
3726,
3726,
31,
22,
195,
74,
3801,
28,
8144,
10058,
35,
1262,
16,
313,
17,
163,
48,
253,
688,
51,
1782,
25,
45,
154,
8587,
20,
8144,
418,
25,
174,
142,
16697,
9,
245,
92,
71,
8294,
3767,
20,
8144,
41... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Detect symbol on paper
===
I want to detect a symbol drawn by the user on a piece of paper. This symbol will be specified by the documentation so every user draws the same symbol but differences will exist of course because of each user's unique handwriting.
1. What kind of symbol should I choose? What is easily recognizable but also makes the detection tolerant to minor modifications (by each user's hand)?
2. What pattern matching method/algorithm should I use for detection of the symbol in a document image? | 0 | [
2,
9092,
4678,
27,
1397,
800,
3726,
3726,
31,
259,
20,
9092,
21,
4678,
3160,
34,
14,
4155,
27,
21,
1855,
16,
1397,
9,
48,
4678,
129,
44,
9931,
34,
14,
13945,
86,
352,
4155,
10802,
14,
205,
4678,
47,
4921,
129,
3182,
16,
674,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use xQuery
===
I have an xsl file which I am currently grabbing all of the records from at once, starting them off as hidden and showing them as the user selects an id (`<xsl:for-each select"">`). The id value is currently being stored as a javascript variable selected by a user clicking that id. <br><br>
I would like to use xQuery to grab the records, but only the records which match the ID the user has selected. Furthermore I generally understand the logic behind the rules in xQuery i just don't understand how to actually use it in my xsl file. Is it possible to use xQuery to maybe compare the value of the id(a js variable) to something using xQuery to grab only the records with that matching id?
Thank you for your time, | 0 | [
2,
184,
20,
275,
993,
8190,
93,
800,
3726,
3726,
31,
57,
40,
993,
18,
255,
3893,
56,
31,
589,
871,
9910,
65,
16,
14,
742,
37,
35,
382,
15,
1422,
105,
168,
28,
3689,
17,
3187,
105,
28,
14,
4155,
5407,
18,
40,
4924,
13,
5,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Msg 14027, Level 11, State 1, Procedure sp_MSrepl_addarticle [table] does not exist in the current database
===
Before setting up SQL Server snapshot replication, I backed up the database from ServerA and restored it to ServerB. Both servers are running SQL Server 2008 R2 SP1.
In trying to setup snapshot replication from ServerA to ServerB using the GUI, I get the following error: "Msg 14027, Level 11, State 1, Procedure sp_MSrepl_addarticle, Line 582 [dbo].[SYSCOLUMNS] does not exist in the current database." Yes, that is the name of the table and it is indeed a user table. I ran the setup from ServerA which is the Publisher. The collation is the same between the tables on both servers. If I remove that table as an article, the replication is setup just fine.
I've searched the web on this and I'm stumped. Any ideas?
Thanks!
Rebecca | 2 | [
2,
4235,
263,
10008,
2567,
15,
662,
547,
15,
146,
137,
15,
7004,
3782,
1,
79,
18,
99,
5727,
1,
14854,
20360,
636,
5924,
500,
630,
52,
3182,
19,
14,
866,
6018,
800,
3726,
3726,
115,
2697,
71,
4444,
255,
8128,
29946,
23841,
15,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Strange casting in VB in Math.Pow
===
This code is works fine
Dim bc As Long = Math.Pow(36, ((IBase36.Length - 1) - i))
**! Under VB Math.Pow return DOUBLE data type.**
When I convert it into C# I have got
long bc = Math.Pow(36, ((IBase36.Length - 1) - i));
And I have a cast syntax issue.
How it could be resolved? Thank you! | 0 | [
2,
2578,
9087,
19,
13,
20468,
19,
5057,
9,
1638,
499,
800,
3726,
3726,
48,
1797,
25,
693,
1123,
5937,
2726,
28,
175,
800,
5057,
9,
1638,
499,
5,
3775,
15,
13,
5,
5,
49,
8436,
3775,
9,
6325,
13,
8,
137,
6,
13,
8,
31,
6,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unable to launch Activity using an Intent-Filter in the Emulator Browser
===
I am new to Android and am experimenting with some of Android's features in preparation for project work. Before I pose the question, I'll state that I have spent several hours googling this issue to only find the same answers, even on Stack Overflow. I believe that I have followed the advice given on Stack Overflow and other sites (mostly the same answers), yet have not been able to get my problem resolved.
My problem is that I would like to be able to launch my activity from the emulator's Browser whenever the user clicks a link. This is just for testing purposes; the next step is to do additional filtering on the intent-filter data.
I am able to get my activity to display in the activity selector dialog from my own WebView and from Messages. However, it has never displayed in the Browser. In order to make sure that it wasn't anything else in my code, I created a very simple app to demonstrate the problem.
My activity just loads up a simple layout with a TextView. Below is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="14"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="MyActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
</intent-filter>
</activity>
</application>
</manifest>
I have also checked the Browser's Default actions, and they are empty. Does anyone have any idea about why this is not working?
| 0 | [
2,
2343,
20,
3394,
2358,
568,
40,
6936,
8,
11924,
815,
19,
14,
3579,
14868,
16495,
800,
3726,
3726,
31,
589,
78,
20,
13005,
17,
589,
5737,
68,
29,
109,
16,
13005,
22,
18,
967,
19,
6675,
26,
669,
170,
9,
115,
31,
10810,
14,
130... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get latitude longitude value from address in google map
===
I have a form which has textfield called address. I want to get the latitude and longitude value when the user types in his address in the textbox and clicks a button to get the latitude and longitude value. How can i do this? I have done this using php but i need to get the latitude and longitude using javascript/ google api.
Any link to some tutorial? | 0 | [
2,
184,
20,
164,
16337,
22291,
1923,
37,
3218,
19,
8144,
2942,
800,
3726,
3726,
31,
57,
21,
505,
56,
63,
1854,
1109,
227,
3218,
9,
31,
259,
20,
164,
14,
16337,
17,
22291,
1923,
76,
14,
4155,
2551,
19,
33,
3218,
19,
14,
1854,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Get ProductName using Collection Magento
===
I've a list of product Ids and based on that product Id I want to get product Name but as the catalog_product_entity table doesn't contain the product name only sku, I'm trapped.
kindly check my code, I've tried left and right join both but not getting the name
$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('name')
->getSelect()->joinRight(
array('table_alias'=>'my_table'),
'entity_id = table_alias.product_id',
array('table_alias.*')
);
$result = null;
foreach ($collection as $temp) {
$result[] = array(
'category_id' => $temp->getCustomer_name(),
);
}
| 0 | [
2,
164,
2374,
7259,
568,
1206,
4723,
17050,
800,
3726,
3726,
31,
22,
195,
21,
968,
16,
2374,
13,
9178,
17,
432,
27,
30,
2374,
4924,
31,
259,
20,
164,
2374,
204,
47,
28,
14,
10594,
1,
14086,
1,
2291,
856,
859,
1437,
22,
38,
371... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
css issue with float content
===
Please refer the fiddle
http://jsfiddle.net/9xbGC/
I need to move up the fourth column under the first column. Is there any possibility to do this in css? | 0 | [
2,
272,
18,
18,
1513,
29,
11510,
2331,
800,
3726,
3726,
2247,
5017,
14,
12759,
7775,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
518,
396,
220,
10362,
118,
31,
376,
20,
780,
71,
14,
1140,
4698,
131,
14,
64,
4698,
9,
25,
80,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Python logging and Japanese (or any non-ascii)
===
After localisation of one legacy Django project (based on Django 1.1) to Japanese, some logs (not all of them) are outputting something like this, when locale is Japanese:
Traceback (most recent call last):
File "/home/deploy/.pythonbrew/pythons/Python-2.7/lib/python2.7/logging/__init__.py", line 838, in emit
msg = self.format(record)
File "/home/deploy/.pythonbrew/pythons/Python-2.7/lib/python2.7/logging/__init__.py", line 715, in format
return fmt.format(record)
File "/home/deploy/.pythonbrew/pythons/Python-2.7/lib/python2.7/logging/__init__.py", line 467, in format
s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)
What can be the cause of this and is there easy way to circumvent this? If not, how can I invetigate this issue more closely, as I even don't know which lines calling failing logs? Thanks in advance.
| 0 | [
2,
20059,
13,
13919,
17,
1095,
13,
5,
248,
186,
538,
8,
472,
1892,
49,
6,
800,
3726,
3726,
75,
375,
4330,
16,
53,
7780,
3857,
14541,
669,
13,
5,
1281,
27,
3857,
14541,
137,
9,
165,
6,
20,
1095,
15,
109,
18893,
13,
5,
1270,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple AJAX fade effect + Loader + current class
===
Hello I am trying to add ajax function to my site and it is working fine with this code. Only now I am getting trouble to get fadeIn and fadeOut effect and loading animation.
This is my jquery script
$(document).ready(function() {
// initial page load
$('#content-div').load('details/default.html');
// handle menu click
$('ul#sidenav li a').click(function(){
var page = $(this).attr('href');
$('#content-div').load('details/'+ page +'.html');
return false;
})
});
And here is html markup
<ul class="square sidebar-list" id="sidenav">
<li><a href="default">Description</a></li>
<li><a href="greenhill" class="current">greenhill</a></li>
<li><a href="introduction">Introduction</a></li>
</ul>
<div id="content-div">
<div id="loading">Loading...</div>
</div>
Also want to change class for current selected list item in sidenav | 0 | [
2,
1935,
20624,
11381,
1590,
2754,
6305,
106,
2754,
866,
718,
800,
3726,
3726,
10975,
31,
589,
749,
20,
3547,
20624,
1990,
20,
51,
689,
17,
32,
25,
638,
1123,
29,
48,
1797,
9,
104,
130,
31,
589,
1017,
2572,
20,
164,
11381,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change name of document class - Flash CS Pro
===
In document class, constructor, following line produces following error:
name = "hello world";
Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
Is this doable or hackable?
| 0 | [
2,
753,
204,
16,
4492,
718,
13,
8,
4433,
272,
18,
895,
800,
3726,
3726,
19,
4492,
718,
15,
6960,
248,
15,
249,
293,
6700,
249,
7019,
45,
204,
800,
13,
7,
11515,
126,
7,
73,
7019,
45,
7019,
7921,
2984,
457,
45,
14,
204,
1354,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascripts dateObject: jump from Mai 31st to next month gets july 1st
===
I had to build a DatePicker without any Library (like jQuery) for a client.
I succeeded on my local machine. However my client is using it now and it shows some odd behaviour if its included in his web-app.
If i select the 31st of May and scroll to the next month i end up at July 1st.
The DateObject infact has May 31st before i click the button to fire up the "jumpToNextMonth" function.
I assume the dateObject jumps to June 31st which is nonexistend and then goes one foward to 1st of july.
This happens in August as well and all other 30-day-months which are followed by 31-day-months.
The line which is fired up on click is
this.currentDate= new Date(this.currentDate.getFullYear(), this.currentDate.getMonth() + 1, this.currentDate.getDate());
I don't see this behaviour on my local machine nor do i see it running an apache server.
I can't imagine what corrupts the date object on my clients web-app and unfortunately i don't have access to their files.
I found similar non-answered questions here
http://stackoverflow.com/questions/9126194/flex-mobile-4-6-datespinner-dateandtime-jumping-from-jan-31st-to-march-1st
| 0 | [
2,
8247,
8741,
18,
1231,
23793,
45,
3936,
37,
5300,
1538,
384,
20,
328,
1617,
3049,
313,
137,
384,
800,
3726,
3726,
31,
41,
20,
1895,
21,
1231,
16855,
106,
366,
186,
1248,
13,
5,
1403,
487,
8190,
93,
6,
26,
21,
6819,
9,
31,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jquery move choose element position
===
in each ax div there have two button,higer & lower,when click higher ,if this div is not at top position,then move higer than original,if click the lower button then move lower than original,the key is how to cut this element and move behind or at front of some element,hope someone could help me
<div>
<div id="a1">a1<input name='higher' type='button' value='higher'/><input name='lower' type='button' value='lower'/></div>
<div id="a2">a3<input name='higher' type='button' value='higher'/><input name='lower' type='button' value='lower'/></div>
<div id="a3">a3<input name='higher' type='button' value='higher'/><input name='lower' type='button' value='lower'/></div>
</div> | 0 | [
2,
487,
8190,
93,
780,
3538,
4520,
649,
800,
3726,
3726,
19,
206,
21,
396,
13,
12916,
80,
57,
81,
5167,
15,
1822,
1674,
279,
987,
15,
3185,
10840,
1184,
13,
15,
821,
48,
13,
12916,
25,
52,
35,
371,
649,
15,
2504,
780,
4148,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# error in sending mail : A connect request was made on an already connected socket
===
I have seen many examples of sending email from c# code, i am following the most popular method of using `System.Net.Mail.SmtpClient`. I am able to send the mail for the first time but after that it gives an error saying **A connect request was made on an already connected socket**.
I am using the following code to send the mail :
using (MailMessage mail = new MailMessage())
{
using (SmtpClient mailer = new SmtpClient("smtp.server.com"))
{
Console.Write("Sending mails...");
mail.From = new MailAddress("from@mail.com");
mail.To.Add("myaddress@mail.com");
mail.Subject = "test-subject";
mail.Body = "test-body";
mailer.Port = 25;
mailer.Credentials = new System.Net.NetworkCredential("from@mail.com", "from-password");
mailer.EnableSsl = true;
try
{
mailer.Send(mail);
Console.WriteLine("Mail sent");
}
catch (Exception e)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("\rCannot send mail, an error occured : {0}", e);
Console.ResetColor();
}
}
}
Error message is :
Cannot send mail, an error occured : System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connect request was made on an already connected socket 200.200.200.200:25
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at TestApp.Program.Main(String[] args) in D:\Desktop\TestApp\TestApp\Program.cs:line 290
As you can see, i have kept instances of both `MailMessage` and `SmptClient` inside `using` clause so that if any error occurs, the connection will be closed automatically. But it sends the mail for first time after boot correctly and fails all the other attempts afterwards.
The SMTP server is behind a proxy and the firewall client is running on my system. Proxy is not a problem, here as far as i think.
Is there any error in the code? How can i make it to work?
I have tried using the Outlook API but that requires authentication from the user before sending every mail. I do not want this behaviour.
PS : I have removed some details like IP address and server name which are irrelevant in this case.
Thanks in advance :) | 0 | [
2,
272,
5910,
7019,
19,
4907,
4216,
13,
45,
21,
6379,
3772,
23,
117,
27,
40,
614,
2587,
18482,
800,
3726,
3726,
31,
57,
541,
151,
3770,
16,
4907,
8517,
37,
272,
5910,
1797,
15,
31,
589,
249,
14,
127,
844,
2109,
16,
568,
13,
1,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Get the fragment of an URL within the controller
===
Consider the following URL:
http://www.iamsomeweiredurl.fromsomewhere/andIwant#thisfragment
Is there a chance to get "thisfragment" by <code>@RequestMapping</code> or something? | 0 | [
2,
164,
14,
14847,
16,
40,
287,
6362,
363,
14,
9919,
800,
3726,
3726,
3563,
14,
249,
287,
6362,
45,
7775,
6903,
6483,
9,
49,
765,
3220,
10515,
99,
10852,
255,
9,
2665,
3220,
2798,
118,
290,
49,
14876,
5910,
1565,
22133,
1130,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Nullable object must have a value
===
This is my model class
[HiddenInput(DisplayValue = false)]
public long ProductId { get; set; }
[Display(Name="Alarm Point")]
public short AlarmPoint { get; set; }
[Required]
public long? MeasurementId { get; set; }
[Display(Name="Measurement Id")]
public IList<SelectListItem> Measurement { get; set; }
[Display(Name="Length")]
public decimal Length { get; set; }
[Display(Name="Breadth")]
public decimal Breadth { get; set; }
[Display(Name="Height")]
public decimal Height { get; set; }
[Display(Name="Weight")]
public decimal Weight { get; set; }
[Display(Name="Is Active")]
public bool IsActive { get; set; }
[Display(Name="Is Sellable")]
public bool IsSellable { get; set; }
and in my controller's index page i just pass a value through Json.
[GridAction]
public ActionResult ProductList()
{
var collection = _productService.GetAllProduct().Select(x =>
new ProductModel()
{
ProductId = x.ProductId,
Title = x.Title,
CategoryId = x.CategoryId,
Description = x.Description,
Barcode = x.Barcode,
AlarmPoint = x.AlarmPoint.Value,
MeasurementId = x.MeasurementId,
Length = x.Length.Value,
Breadth = x.Breadth.Value,
Height = x.Height.Value,
Weight = x.Weight.Value,
IsActive = x.IsActive.Value,
IsSellable = x.IsSellable.Value,
IsPurchasable = x.IsPurchasable.Value
});
return Json(collection, JsonRequestBehavior.AllowGet);
}
and this is my index view
<h1 style="font-size: 25px ">View</h1>
<br />
@(Html.Telerik().Grid<CommerceSuite.Web.Models.Product.ProductModel>()
.Name("Product")
.DataBinding(databinding =>
{
databinding.Ajax().Select("ProductList", "Product");
})
.Columns(columns =>
{
columns.Bound(p => p.ProductId)
.ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= ProductId #>' />")
.Title("")
.Width(20)
.HtmlAttributes(new { style = "text-align:center" });
columns.Bound(p => p.Title).Width(200);
columns.Bound(p => p.ProductId).Width(200);
columns.Bound(p => p.CategoryId).Width(200);
columns.Bound(p => p.Barcode).Width(200);
columns.Bound(p => p.ProductId)
.ClientTemplate("<input type='button' name='<#=ProductId #>' onclick='csPopupOpen(\"Edit BillOf Material\",\"" + @Url.Action("Edit") + "\",<#=ProductId #>,\"" + @Url.Action("Index") + "\")' value='Edit' > <input type='button' name='<#=ProductId #>' onclick='csPopupOpen(\"Delete BillOf Material\",\"" + @Url.Action("Delete") + "\",<#=ProductId #>)' value='Delete' > ").Width(210);
})
.Pageable()
.Scrollable()
.Sortable()
)
when i rum this code and click on a link i got a internal server 500 error on index view that is saying that nullable object must have a value. | 0 | [
2,
16203,
579,
3095,
491,
57,
21,
1923,
800,
3726,
3726,
48,
25,
51,
1061,
718,
636,
1822,
43,
817,
108,
4881,
5,
2906,
5438,
15165,
800,
4997,
6,
500,
317,
175,
2374,
1340,
13,
1,
164,
73,
309,
73,
13,
1,
636,
2906,
5438,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript, jQuery - rotating divs on page load
===
I am a Javascript beginner and am running into a small problem. I'm trying to get my five divs to rotate visibility as soon as the page loads. Right now they only begin rotating after I hover over each of my image buttons. Thank you!
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
<!--
function toggleDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
}
window.onload = rotatecontent;
</script>
<style type="text/css">#div1, #div2, #div3, #div4, #div5 {position:absolute; top: 100; left: 200; width:200; visibility:hidden}
</style>
</head>
<body>
<script type="text/javascript">
if (document.all || document.getElementById){ //if IE4 or NS6+
document.write('<style type="text/css">\n')
document.write('.dyncontent{width: 250px; height: 60px;}\n')
document.write('</style>')
}
var curcontentindex=0
var messages=new Array()
function getElementByClass(classname){
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
messages[inc++]=alltags[i]
}
}
function rotatecontent(){
//get current message index (to show it):
curcontentindex=(curcontentindex<messages.length-1)? curcontentindex+1 : 0
//get previous message index (to hide it):
prevcontentindex=(curcontentindex==0)? messages.length-1 : curcontentindex-1
messages[prevcontentindex].style.display="none" //hide previous message
messages[curcontentindex].style.display="block" //show current message
}
window.onload=function(){
if (document.all || document.getElementById){
getElementByClass("dyncontent")
setInterval("rotatecontent()", 1000)
}
}
</script>
<a href="#" onMouseOver="toggleDiv('div1',1)" onMouseOut="toggleDiv('div1',0)" ><img src="Images/BAB.com_web_link_10.jpg" width="250" height="100" STYLE="position:absolute; TOP:0px; LEFT:400px;"></a>
<a href="#" onMouseOver="toggleDiv('div2',1)" onMouseOut="toggleDiv('div2',0)"><img src="Images/SLU_on_the_Road.jpg" width="250" height="100" STYLE="position:absolute; TOP:100px; LEFT:400px;"></a>
<a href="#" onMouseOver="toggleDiv('div3',1)" onMouseOut="toggleDiv('div3',0)"><img src="Images/Billiken_Blogs.jpg" width="250" height="100" STYLE="position:absolute; TOP:200px; LEFT:400px;"></a>
<a href="#" onMouseOver="toggleDiv('div4',1)" onMouseOut="toggleDiv('div4',0)"><img src="Images/SLU_Chat.jpg" width="250" height="100" STYLE="position:absolute; TOP:300px; LEFT:400px;"></a>
<a href="#" onMouseOver="toggleDiv('div5',1)" onMouseOut="toggleDiv('div5',0)"><img src="Images/Viewbook_Button_2011.jpg" width="250" height="100" STYLE="position:absolute; TOP:400px; LEFT:400px;"></a>
<p class="desc">
<div class="dyncontent"><div id="div1">Div 1/div></div>
<div class="dyncontent"><div id="div2">Div 2</div></div>
<div class="dyncontent"><div id="div3">Div 3</div></div>
<div class="dyncontent"><div id="div4">Div 4</div></div>
<div class="dyncontent"><div id="div5">Div 5</div></div>
</p>
</body>
</html>
| 0 | [
2,
8247,
8741,
15,
487,
8190,
93,
13,
8,
16164,
13,
12916,
18,
27,
2478,
6305,
800,
3726,
3726,
31,
589,
21,
8247,
8741,
26931,
17,
589,
946,
77,
21,
284,
1448,
9,
31,
22,
79,
749,
20,
164,
51,
355,
13,
12916,
18,
20,
21448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
heroku pg password authentication failed error
===
I'm a total heroku noob so please bear with me on this one. Last night I deployed an application to heroku cedar, putting 'gem 'pg'' into the production group on my gemfile and leaving sqlite3 in my development and test groups.
Everything was working fine last night, today I went to show it off and got a 500 error. My local dev environment is peachy. I looked at my logs and I find that it's a 'PG::Error Authentication Failed'. Same problem on the heroku production console. The authentication is failing for a pg user that I'm assuming is being generated for heroku. Thoughts?
| 0 | [
2,
36,
9266,
13,
9623,
20884,
27963,
1702,
7019,
800,
3726,
3726,
31,
22,
79,
21,
600,
36,
9266,
90,
4995,
86,
2247,
2746,
29,
55,
27,
48,
53,
9,
236,
343,
31,
6698,
40,
3010,
20,
36,
9266,
11083,
15,
3873,
13,
22,
20231,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to properly query LDAP for alias list?
===
Could someone help me with querying LDAP and handling results properly? I'm trying to check if email, that I'm going to send" is an alias from LDAP or real user address so that my mail won't be send to multi-user aliases. Just to prevent mailing wrong members :)
I'm not familiar enought with LDAP, but here's what I've got.
->LDAP path is like this (to obtain aliases only)
OU=Postfix,OU=Groups,OU=Company,DC=company,DC=local
How to I pull result addresses into an array to compare? I guess it's sort of almost-oneliner, but I'd like to learn from someone more experienced in this matter, been using /etc/aliases for a long time :) | 0 | [
2,
184,
20,
7428,
25597,
644,
20472,
26,
15794,
968,
60,
800,
3726,
3726,
110,
737,
448,
55,
29,
25597,
68,
644,
20472,
17,
7988,
1736,
7428,
60,
31,
22,
79,
749,
20,
2631,
100,
8517,
15,
30,
31,
22,
79,
228,
20,
2660,
7,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cakephp CMS Plugin or Component available ? or Croogo Cakephp CMS is good?
===
Is any predefined Content management systems in cakephp ? . I find an open source `http://croogo.org/` is an Cakephp CMS. any one have idea on these, because i could not find any documentation on this **Croogo** | 0 | [
2,
8390,
26120,
2390,
18,
10922,
108,
54,
5912,
904,
13,
60,
54,
4880,
12019,
8390,
26120,
2390,
18,
25,
254,
60,
800,
3726,
3726,
25,
186,
782,
13439,
2331,
1097,
1242,
19,
8390,
26120,
13,
60,
13,
9,
31,
477,
40,
368,
1267,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mouse click not working in my column chart in html5
===
Hi all again i have problem in my chart construction in html 5. This time did everything well except one part or module. I tried some code which i got through internet for displaying some alert when a rectangle in canvas in clicked. When i comment the module it works fine but not the mouse click. Can anyone help me out. Thanks in advance. Here is my fiddle and code [fiddle]: http://jsfiddle.net/s8kZs/
<!doctype html>
<html>
<head>
<script type="text/javascript">
window.onload=function() {
var canvas=document.getElementById('mycanvas');
var ctx=canvas.getContext('2d');
var graphInfo=[{data:[120,130,140,160,180,100],color:'purple',label:["a","b","c","d","e","f"]},{data:[100,120,130,140,150,190],color:'green',label:["g","h","i","j","k","l"]}];
var width=45;
function renderGrid(gridPixelSize, color)
{
ctx.save();
ctx.lineWidth = 0.5;
ctx.strokeStyle = color;
for(var i = 20; i <= canvas.height-20; i = i + gridPixelSize)
{
ctx.beginPath();
ctx.moveTo(20, i);
ctx.lineTo(canvas.width-20, i);
ctx.closePath();
ctx.stroke();
}
for(var j = 20; j <= canvas.width-20; j = j + gridPixelSize)
{
ctx.beginPath();
ctx.moveTo(j, 20);
ctx.lineTo(j, canvas.height-20);
ctx.closePath();
ctx.stroke();
}
ctx.restore();
}
renderGrid(10, "grey");
ctx.beginPath();
ctx.strokeStyle = 'black';
ctx.moveTo(20, canvas.height-20);
ctx.lineTo(canvas.width-20, canvas.height-20);
ctx.closePath();
ctx.stroke();
ctx.beginPath();
ctx.strokeStyle = 'black';
ctx.moveTo(20, 20);
ctx.lineTo(20, canvas.height-20);
ctx.closePath();
ctx.stroke();
ctx.font = "bold 16px Arial";
function getFunctionForTimeout(j){
var i=0,currx=30,info=graphInfo[j],x5=j*5;
var fTimeout=function(){
var h=Math.max(info.data[i]-x5,0);
var m=info.label[i];
ctx.fillStyle='black'
ctx.fillRect(currx+(10*x5)+2,canvas.height-h-20,width+2,h-1);
ctx.fillStyle=info.color;
ctx.fillRect(currx+(10*x5),canvas.height-h-21,width,h);
ctx.fillText(m, currx+(10*x5)+20, canvas.height-5);
currx+=120;
i++;
/*var ctx = $('#mycanvas').get(0).getContext('2d');
$('#mycanvas').click(function(e) {
var x = e.offsetX,
y = e.offsetY;
for(var k=0;k<j;k++) {
if(x > currx+(10*x5)
&& x < canvas.height-h-21
&& y > width
&& y < h) {
alert('Rectangle ' + j + ' clicked');
}
}
});*/
if(i<info.data.length)setTimeout(fTimeout,2000);
};
return fTimeout;
}
for(var j=graphInfo.length-1;j>=0;j--) {
setTimeout(getFunctionForTimeout(j),2000);
}
};
</script>
</head>
<body>
<canvas id="mycanvas" height="400" width="800" style="border:1px solid #000000;">
</body>
</html> | 0 | [
2,
7567,
10840,
52,
638,
19,
51,
4698,
1795,
19,
13,
15895,
264,
800,
3726,
3726,
4148,
65,
188,
31,
57,
1448,
19,
51,
1795,
900,
19,
13,
15895,
331,
9,
48,
85,
144,
796,
134,
1613,
53,
141,
54,
12613,
9,
31,
794,
109,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
shell script to extract a string from parameter
===
I am working on a shell script where it has to extract string from parameter passed. If I am passing parameters like
test.sh a=6 b=7
I have to extract the parameters and manipulate, some thing like
for arg in "$@"
do
if [ "${arg}" == "a" ] then
# extract a's value and do something
elif [ "${arg}" == "b" ] then
# extract b's value and do something
fi
done
Please help me how can I extract the parameter's value ? | 0 | [
2,
3593,
3884,
20,
10962,
21,
3724,
37,
18906,
800,
3726,
3726,
31,
589,
638,
27,
21,
3593,
3884,
113,
32,
63,
20,
10962,
3724,
37,
18906,
1100,
9,
100,
31,
589,
2848,
12905,
101,
1289,
9,
1635,
21,
3726,
379,
334,
3726,
465,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
play framework 2 upload file to mySQL
===
I am trying to upload image to mySQL using play framework2.
In play framework 1.24, I use "play.db.jpa.Blob" and "multipart/form-data" to upload a image to mySQL.
But in play framework2 there is no Blob,How could I upload the image using "multipart/form-data" to mySQL? | 0 | [
2,
418,
6596,
172,
71,
8294,
3893,
20,
51,
18,
22402,
800,
3726,
3726,
31,
589,
749,
20,
71,
8294,
1961,
20,
51,
18,
22402,
568,
418,
6596,
135,
9,
19,
418,
6596,
137,
9,
1996,
15,
31,
275,
13,
7,
5438,
9,
9007,
9,
728,
1060... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What does +(?!\d) in regex mean?
===
I have also seen it as +$.
I am using
$(this).text( $(this).text().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,") );
To convert 10000 into 10,000 etc.
I think I understand everything else:
- (\d) - find number
- (?=\d{3}) - if followed by 3 numbers
- '+' - don't stop after first find
- (?!\d) - starting from the last number?
- /g - for the whole string
- ,"$1," - replace number with self and comma
| 0 | [
2,
98,
630,
2754,
5,
60,
187,
1,
43,
6,
19,
7953,
1706,
884,
60,
800,
3726,
3726,
31,
57,
67,
541,
32,
28,
2754,
4403,
9,
31,
589,
568,
5579,
5,
1565,
6,
9,
11969,
5,
5579,
5,
1565,
6,
9,
11969,
5,
6,
9,
99,
5119,
5,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Uploading file to Sand boxed Page
===
I have sand boxed solution running in my site collection.
I have uploaded a file as byte array to sand boxed solution and on sand boxed solution that byte array is convert to file and save in a document library. I used
webclient.UploadData(address, method, byte[])
I can get byte array send to sand boxed page through Page.Request.InStream
But when I try to send byte[] of file sized 50 MB then in sand boxed page, I am unable to get that byte array.
How can I send byte array to sand boxed page and procces that byte[] in sand boxed i.e adding it as a file in Document library??
| 0 | [
2,
71,
16866,
3893,
20,
1965,
1649,
69,
2478,
800,
3726,
3726,
31,
57,
1965,
1649,
69,
4295,
946,
19,
51,
689,
1206,
9,
31,
57,
23782,
21,
3893,
28,
34,
591,
7718,
20,
1965,
1649,
69,
4295,
17,
27,
1965,
1649,
69,
4295,
30,
34... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add a custom library to GCC while compliling?
===
i have downloaded a C library from the net with the name libsal.a, to access the APIs in that library i include a header file by name #include <sal.h> in my main.c. i use the following command to compile it : **gcc -L /home/traana/Desktop/opensal-1.0.0/libsal.a main.c** but get the following error when i compile
main.c:3:17: fatal error: sal.h: No such file or directory
compilation terminated.
Please help me out if the procedure is wrong. Any help would be appreciated.
Thanks | 0 | [
2,
184,
20,
3547,
21,
5816,
1248,
20,
489,
3384,
133,
6479,
1210,
802,
60,
800,
3726,
3726,
31,
57,
23887,
21,
272,
1248,
37,
14,
4275,
29,
14,
204,
13,
8326,
8266,
9,
58,
15,
20,
1381,
14,
21,
8954,
19,
30,
1248,
31,
468,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can i get the path of file?
===
:image => StorageRoom::Image.new_with_filename(path)
I have to get the path of the image. So far i have specified the path manually and it worked and now i have put in heroku but it shows Load Error - No such file present.
How can i get the path value of the local system using browse button. | 0 | [
2,
184,
92,
31,
164,
14,
2013,
16,
3893,
60,
800,
3726,
3726,
13,
45,
22039,
800,
1,
4326,
4447,
45,
45,
22039,
9,
2681,
1,
1410,
1,
16877,
7259,
5,
8353,
6,
31,
57,
20,
164,
14,
2013,
16,
14,
1961,
9,
86,
463,
31,
57,
993... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cassandra bulk loader hangs
===
I am trying to bulk load using the sstableloader. My files get loaded OK (I think – judging from the progress bar), but then I get this message and it just hangs indefinitely:
Waiting for targets to rebuild indexes …
Full output of the loader is as follows:
Starting client (and waiting 30 seconds for gossip) …
Streaming revelant part of /app/sstable/bin/tuiru/packagetours-hd-4-Data.db /app/sstable/bin/tuiru/packagetours-hd-2-Data.db /app/sstable/bin/tuiru/packagetours- hd-1-Data.db /app/sstable/bin/tuiru/packagetours-hd-3-Data.db to [/10.40.14.93]
progress: [/10.40.14.93 4/4 (100)] [total: 100 - 3MB/s (avg: 17MB/s)]
Waiting for targets to rebuild indexes …
Any help would be greatly appreciated. Thanks! | 0 | [
2,
17825,
7238,
6305,
106,
4546,
18,
800,
3726,
3726,
31,
589,
749,
20,
7238,
6305,
568,
14,
13,
18,
18,
5924,
8294,
106,
9,
51,
6488,
164,
8572,
5854,
13,
5,
49,
277,
13,
10,
15504,
37,
14,
3455,
748,
6,
15,
47,
94,
31,
164... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
page break after 10 rows in subreport
===
I have a single report which consists of header information, within this is then a sub report that holds up to 20000 lines of information.
I need to insert a page break after 20 rows in the sub report so that the rendering is quicker, how do I achieve this? At present I have tried adding a parent group with a rownumber count but as it is in the subreport it still all shows on a a single page.
Any suggestions?
=int((ceiling(RowNumber(Nothing) - 1) / 10)) | 0 | [
2,
2478,
1442,
75,
332,
11295,
19,
972,
17437,
800,
3726,
3726,
31,
57,
21,
345,
1330,
56,
2043,
16,
157,
106,
676,
15,
363,
48,
25,
94,
21,
972,
1330,
30,
2763,
71,
20,
824,
387,
1560,
16,
676,
9,
31,
376,
20,
14692,
21,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to merge two generators in between?
===
How can I merge two different generators, in a way that in every iteration, a different generator will get yield?
>>> gen = merge_generators_in_between("ABCD","12")
>>> for val in gen:
... print val
A
1
B
2
C
D
How can I achieve this? I didn't find a function for it in [`itertools`][1].
[1]: http://docs.python.org/library/itertools.html | 0 | [
2,
184,
20,
12666,
81,
20495,
19,
128,
60,
800,
3726,
3726,
184,
92,
31,
12666,
81,
421,
20495,
15,
19,
21,
161,
30,
19,
352,
23534,
15,
21,
421,
15286,
129,
164,
11537,
60,
13,
1,
4380,
800,
12666,
1,
17083,
9922,
1,
108,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ruby in android
===
I want to start a project in android in ruby.
I already use rails n did many project by using ruby on rails.
can anyone suggest me what to install in my com? My com has os linux.I want to run
my android project in my com. pleaze help me . | 0 | [
2,
10811,
19,
13005,
800,
3726,
3726,
31,
259,
20,
799,
21,
669,
19,
13005,
19,
10811,
9,
31,
614,
275,
2240,
18,
13,
103,
144,
151,
669,
34,
568,
10811,
27,
2240,
18,
9,
92,
1276,
5601,
55,
98,
20,
16146,
19,
51,
13,
960,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.