unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Check if Windows user or group exists, supporting domain names
===
I'm interested in check if a given username or group name exist. I need to support AD controllers and multidomain. So the following are valid entries for me:
MYDOMAIN\John
John@mydomain.com
OTHERDOMAIN\Administrators
So, I want to implement is exactly the same functionality as MS windows implements when you edit the permissions of a folder, then you type a name and click **"Check names"** button.
Is there a Windows API that work as described in a single call?
Thanks in advance | 0 | [
2,
2631,
100,
1936,
4155,
54,
214,
5636,
15,
3134,
4603,
1817,
800,
3726,
3726,
31,
22,
79,
3158,
19,
2631,
100,
21,
504,
4155,
7259,
54,
214,
204,
3182,
9,
31,
376,
20,
555,
21,
43,
9919,
18,
17,
1889,
537,
6232,
9,
86,
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... |
Making a query that only shows unique records
===
I have a table where duplicate entries in one of the columns is possible (emailAddress - some couples share them) and I would like to send email newsletters to them. Is there a way to make a select query where it only shows one copy of the email address if there are multiple? | 0 | [
2,
544,
21,
25597,
30,
104,
1285,
2619,
742,
800,
3726,
3726,
31,
57,
21,
859,
113,
19429,
11399,
19,
53,
16,
14,
7498,
25,
938,
13,
5,
62,
8079,
27950,
13,
8,
109,
5131,
1891,
105,
6,
17,
31,
83,
101,
20,
2660,
8517,
17782,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Edit ObservableCollection field
===
I have ObservableCollection with 3 columns: id, name, image.
First two are filed with data from db and I want to fill the last one with my data. In image column I would like to put some static part + id
Is it possible?
I assume that some for loop will do the job, but don't know where to start | 0 | [
2,
9392,
5122,
10321,
579,
15015,
872,
575,
800,
3726,
3726,
31,
57,
5122,
10321,
579,
15015,
872,
29,
203,
7498,
45,
4924,
15,
204,
15,
1961,
9,
64,
81,
50,
5263,
29,
1054,
37,
13,
9007,
17,
31,
259,
20,
3509,
14,
236,
53,
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... |
Pictures in a table
===
I have got the following question for you.
I am using PHP and MySQL (html and css aren't the big deal) and I want to collect images I uploaded (the paths are in MySQL) and put them in a table. Imagine a table of 5 columns and 6 rows (30 pictures in total). I want the newest picture to be in the first row of the first column -so left and at the top-, I want the oldest picture to be in the last row of the last column -so right and at the bottom-.
**index.php**
<?php
//Put all required/included files in here
require_once('config.php');
//Connection to database
$link = mysql_connect(DB_HOST,DB_USER,DB_PASS);
if(!$link){
die('Connection failed: ' . mysql_error());
}
//Select which database to use
$db = mysql_select_database(DB_NAME);
if(!$db){
die("Database selection failed: " . mysql_error());
}
?>
**config.php**
<?php
define('DB_HOST','host');
define('DB_USER','user');
define('DB_PASS','pass');
define('DB_NAME','name');
?>
Now, the SQL layout:
**layout.sql**
CREATE TABLE `fotos`(
id int not null,
locatie_thumb text not null,
locatie_middel text not null,
locatie_groot text not null,
primary key(id)
);
CREATE TABLE `tekst`(
id int not null auto_increment,
titel text not null,
bijschrift text not null,
album text not null,
datum DATE not null,
primary key(id)
);
**The idea behind the tables is that I upload a pic via the upload form, I enter the "titel, bijschrift, album, datum" there and MySQL creates an ID. Then I want to use that ID to link the "tekst" and "fotos" together into the table. So, my question is: How can I collect the 30 newest entries from MySQL and arrange them in a table of 5 columns and 6 rows when I want the newest picture to be left,top and the oldest to be right,bottom?** | 0 | [
2,
3104,
19,
21,
859,
800,
3726,
3726,
31,
57,
330,
14,
249,
1301,
26,
42,
9,
31,
589,
568,
13,
26120,
17,
51,
18,
22402,
13,
5,
15895,
17,
272,
18,
18,
4847,
22,
38,
14,
580,
1183,
6,
17,
31,
259,
20,
5543,
3502,
31,
2378... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
write data in hbase
===
i have a problem while write data in hbase.I have 4 region server.when i write data and use radom key ,data write to any region but they are in one region server.One server are busy, three server are free.How do write regularity in all region server. | 0 | [
2,
2757,
1054,
19,
746,
8436,
800,
3726,
3726,
31,
57,
21,
1448,
133,
2757,
1054,
19,
746,
8436,
9,
49,
57,
268,
632,
8128,
9,
3185,
31,
2757,
1054,
17,
275,
4944,
2636,
1246,
13,
15,
18768,
2757,
20,
186,
632,
47,
59,
50,
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... |
I want to provide the functionality to power user to add portlets and decorate his page
===
I want to provide the functionality to the power user to add portlets from Add->More->category(Sample).
How can i provide this facility to power user or custom user. | 1 | [
2,
31,
259,
20,
1181,
14,
18548,
20,
414,
4155,
20,
3547,
1295,
11045,
17,
27117,
33,
2478,
800,
3726,
3726,
31,
259,
20,
1181,
14,
18548,
20,
14,
414,
4155,
20,
3547,
1295,
11045,
37,
3547,
8,
1,
1995,
8,
1,
14375,
93,
5,
610... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0... |
ListView with interactive rows getView() problems
===
I'm making a ListView that is divided by separators and in each row there is a SeekBar. I'm trying to display values taken from an ArrayList.<br>
The adapter manages to display values correctly in the first and last section of SeekBars (there are 3 sections in total). But the SeekBars in the middle section displays maximum values only. If I change values in the middle section, after scrolling those SeekBars are set to maximum values again.<br>
I'm using [this article][1] from vogella.com as an example. <br><br>
public View getView(int position, View convertView, ViewGroup parent) {
int itemType = getItemViewType(position);
final SeekBarHolder sbHolder;
View view = null;
switch(itemType) {
case TYPE_ITEM: {
SeekBarItem sbItem = (SeekBarItem) mData.get(position);
if(convertView == null) {
view = mInflater.inflate(R.layout.seekbar_item, null);
sbHolder = new SeekBarHolder();
sbHolder.textViewLeft = (TextView) view.findViewById(R.id.seekbar_item_text_left);
sbHolder.textViewRight = (TextView) view.findViewById(R.id.seekbar_item_text_right);
sbHolder.seekBar = (SeekBar) view.findViewById(R.id.item_seekbar);
sbHolder.seekBar.setMax(sbItem.getMaxValue());
sbHolder.seekBar.setProgress(sbItem.getProgress());
sbHolder.seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
public void onProgressChanged(SeekBar sBar,
int progress, boolean fromUser) {
SeekBarItem sbTag = (SeekBarItem) sbHolder.seekBar.getTag();
sbTag.setMaxValue(sbHolder.seekBar.getMax());
sbTag.setProgress(progress);
}
public void onStartTrackingTouch(SeekBar seekBar) {}
public void onStopTrackingTouch(SeekBar seekBar) {}
});
view.setTag(sbHolder);
sbHolder.seekBar.setTag(sbItem);
}
else {
view = convertView;
((SeekBarHolder) view.getTag()).seekBar.setTag(sbItem);
}
SeekBarHolder holder = (SeekBarHolder) view.getTag();
holder.textViewLeft.setText(sbItem.getColorName());
holder.textViewRight.setText(sbItem.getTextValue());
holder.seekBar.setMax(sbItem.getMaxValue());
holder.seekBar.setProgress(sbItem.getProgress());
break;
}// case TYPE_ITEM
case TYPE_SEPARATOR: {
SeparatorHolder spHolder = null;
if(convertView == null) {
view = mInflater.inflate(R.layout.separator_item, null);
spHolder = new SeparatorHolder();
view.setTag(spHolder);
}
else {
view = convertView;
}
SeparatorHolder sh = (SeparatorHolder) view.getTag();
SeparatorItem spItem = (SeparatorItem) mData.get(position);
sh.textView.setText(spItem.getLabel());
break;
}
default: break;
}
return view;
}
[1]: http://www.vogella.com/articles/AndroidListView/article.html#listsactivity
| 0 | [
2,
968,
4725,
29,
9194,
11295,
164,
4725,
5,
6,
1716,
800,
3726,
3726,
31,
22,
79,
544,
21,
968,
4725,
30,
25,
2350,
34,
1353,
3574,
9922,
17,
19,
206,
3131,
80,
25,
21,
5048,
1850,
9,
31,
22,
79,
749,
20,
3042,
4070,
658,
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... |
Updating the rootLabel of a dijit.Tree
===
I'm trying to update the model.rootLabel of a dijit.Tree using javascript. I set the model like this :
<div data-dojo-id="brandsModel" data-dojo-type="dijit.tree.ForestStoreModel"
rootId="0"
rootLabel="Brands (15)"
data-dojo-props="store:myStore, query:{}">
For updating the tree I have extended it like this (this code also works with DND in the tree):
dojo.extend(dijit.Tree, { refreshModel:function() {
this._itemNodesMap = {};
// Collapse root node and set model children to null, so the model
// will fetch again from the datastore when _expandNode() is called
this._collapseNode(this.tree.rootNode);
this.model.root.children = null;
// Set root NODE to unchecked so that Tree will fetch from the model again
this.rootNode.state = "UNCHECKED";
//Set _loadFinished to false, so a new fetch is possible
this.model.store._loadFinished = false;
this._expandNode(this.tree.rootNode);
}
});
After adding or removing items from the tree I try to also update the counter. I've tried :
tree.model.rootLabel = 'Brands (16)';
tree.model.root.label = 'Brands (16)';
The changes show when debugging with console.debug(tree) but I don't know what to use to actually display the changed label.
| 0 | [
2,
71,
43,
1880,
14,
5900,
21018,
16,
21,
926,
13803,
9,
8101,
800,
3726,
3726,
31,
22,
79,
749,
20,
11100,
14,
1061,
9,
14032,
21018,
16,
21,
926,
13803,
9,
8101,
568,
8247,
8741,
9,
31,
309,
14,
1061,
101,
48,
13,
45,
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... |
cURL with Terminal for AWS Ec2
===
So I just switched from some network solutions hosting running some php files that return JSON. when I run the same curl terminal command to the new server it does not respond the php errors like it did before. What do I need to do to enable it so it returns the errors in the terminal with curl? | 0 | [
2,
14320,
29,
3855,
26,
21,
10268,
6695,
135,
800,
3726,
3726,
86,
31,
114,
6667,
37,
109,
982,
6776,
10637,
946,
109,
13,
26120,
6488,
30,
788,
487,
528,
9,
76,
31,
485,
14,
205,
14320,
3855,
1202,
20,
14,
78,
8128,
32,
630,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Http content causing errrors with Https content
===
I have a page which is Https, i am pulling some rss feeds using the Google ATOM API. I am getting an aerror about insecure data. Is there a way to get the rss feeds without causing the error> | 0 | [
2,
7775,
2331,
3242,
13,
106,
5932,
248,
18,
29,
7775,
18,
2331,
800,
3726,
3726,
31,
57,
21,
2478,
56,
25,
7775,
18,
15,
31,
589,
3303,
109,
13,
1224,
18,
17058,
568,
14,
8144,
14571,
21,
2159,
9,
31,
589,
1017,
40,
21,
29992... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 make a popup window similar to a popup logn window on click of a button?
===
I want something described below.
1) User clicks on a book now button.
2) A popup login window comes up where user enters his details like phone number, name etc. and clicks on submit.
3) His fields are validated and if correct a php page is called on submit.
| 4 | [
2,
184,
20,
233,
21,
1675,
576,
1463,
835,
20,
21,
1675,
576,
6738,
103,
1463,
27,
10840,
16,
21,
5167,
60,
800,
3726,
3726,
31,
259,
301,
745,
1021,
9,
137,
6,
4155,
10840,
18,
27,
21,
360,
130,
5167,
9,
172,
6,
21,
1675,
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... |
How to Post data from a php database populated Drop Down to another script?
===
I created a PHP Drop Down which is populated from a MySql Database and works just fine, the problem occurs when I want to post the selected in another script. The question is how to post the data to the other script?
This is the source code of the script that implements the drop downs. Please Help!!!!
<?php
$conn = mysql_connect("localhost", "admin", "admin");
if (!$conn) {
echo "Unable to connect to DB: " . mysql_error();
exit;
}
if (!mysql_select_db("ekupuvac")) {
echo "Unable to select EKupuvac: " . mysql_error();
exit;
}
$query = "SELECT ImeK, KupuvacID FROM kupuvac ORDER BY Saldo DESC";
$result = mysql_query($query) or die(mysql_error());
if (!$result) {
echo "Could not successfully run query ($query) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so I am exiting";
exit;
}
$dropdown = "<select name='ImeK'>";
while($row = mysql_fetch_assoc($result)) {
$dropdown.= "\r\n<option value='{$row['KupuvacID']}'>{$row['ImeK']}</option>";
}
$dropdown .= "\r\n</select>";
echo"Izberi Kupuvac:";
echo $dropdown;
// Second Combo
$conn = mysql_connect("localhost", "admin", "admin");
if (!$conn) {
echo "Unable to connect to DB: " . mysql_error();
exit;
}
if (!mysql_select_db("ekupuvac")) {
echo "Unable to select EKupuvac: " . mysql_error();
exit;
}
$query2 = "SELECT ImeP, ProzivodID FROM proizvod ORDER BY ImeP";
$result2 = mysql_query($query2) or die(mysql_error());
if (!$result2) {
echo "Could not successfully run query ($query2) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result2) == 0) {
echo "No rows found, nothing to print so I am exiting";
exit;
}
$dropdown2 = "<select name='ImeP'>";
while($row = mysql_fetch_assoc($result2)) {
$dropdown2.= "\r\n<option value='{$row['ProzivodID']}'>{$row['ImeP']}</option>";
}
$dropdown2.= "\r\n</select>";
echo"<br> Izberi Proizvod:";
echo $dropdown2;
echo"<br>";
mysql_free_result($result);
?>
| 0 | [
2,
184,
20,
678,
1054,
37,
21,
13,
26120,
6018,
11111,
2804,
125,
20,
226,
3884,
60,
800,
3726,
3726,
31,
679,
21,
13,
26120,
2804,
125,
56,
25,
11111,
37,
21,
51,
18,
22402,
6018,
17,
693,
114,
1123,
15,
14,
1448,
3690,
76,
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... |
Repeating a function until program closes
===
I want to repeat a function from the moment the program opens until it closes every few seconds.
What would be the best way to do this in c#? Thanks | 0 | [
2,
17389,
21,
1990,
163,
625,
543,
18,
800,
3726,
3726,
31,
259,
20,
6830,
21,
1990,
37,
14,
688,
14,
625,
8965,
163,
32,
543,
18,
352,
310,
2582,
9,
98,
83,
44,
14,
246,
161,
20,
107,
48,
19,
272,
5910,
60,
3669,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Jquery selects wrong table's colgroup
===
I have the following two tables. I'd like colgroups for each to highlite with a mouseover, using jquery.
<div id="one">
<table border=1>
<colgroup><colgroup><colgroup><colgroup>
<thead>
<tr><th>A<th>B<th>C<th>D
<tbody>
<tr><td>1<td>2<td>3<td>4</table>
</div>
<div id="two">
<table border=1>
<colgroup><colgroup><colgroup><colgroup><colgroup><colgroup>
<thead>
<tr><th>A<th>B<th>C<th>D<th>E<th>F
<tbdoy>
<tr><td>1<td>2<td>3<td>4<td>5<td>6</tr></table>
</div>
Here is the Jquery:
$("table").delegate('td, th','mouseover mouseleave', function(e) {
if (e.type == 'mouseover') {
$("colgroup").eq($(this).index()).addClass("hover");
}
else {
$("colgroup").eq($(this).index()).removeClass("hover");
}
});
The jquery works for the first table, but when I go to the first col of the second table, the FIRST col from the FIRST table highlights. Columns 1-4 of Table 2 all highlight column 1-4 of table 1. When I do the FIFTH column in the second table, the FIRST column in the SECOND table highlights. And the sixth column makes the second column highlight.
Why is everything offset like that?
| 0 | [
2,
487,
8190,
93,
5407,
18,
1389,
859,
22,
18,
3313,
8024,
800,
3726,
3726,
31,
57,
14,
249,
81,
7484,
9,
31,
22,
43,
101,
3313,
8024,
18,
26,
206,
20,
183,
10601,
29,
21,
7567,
2549,
15,
568,
487,
8190,
93,
9,
13,
1,
12916,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 you detect and identify Javascript/jQuery conflicts?
===
I am working with multiple jQuery plugins and while the configuration scripts are tried and tested in separate implementations, the combination of the plugins is causing their behaviors to either not function as intended or not function at all.
Is there a proper method or means to detecting if there are conflicts in Javascript, and specifically identifying what the conflicts are, in order to resolve them?
Thanks for your time. | 0 | [
2,
184,
107,
42,
9092,
17,
5808,
8247,
8741,
118,
728,
8190,
93,
10344,
60,
800,
3726,
3726,
31,
589,
638,
29,
1886,
487,
8190,
93,
10922,
108,
18,
17,
133,
14,
8091,
17505,
50,
794,
17,
7631,
19,
1725,
6123,
18,
15,
14,
3733,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 std::stof not throw when passed an argument it cannot convert?
===
I'm working on a project where I want to accept an input of the form `{float}{single-letter-identifier}`, for example `15.6E`, or `10W`.
To do this, I thought that I could take the input string, strip off the last letter and then check to see if a conversion could be performed to float, using `std::stof`. This would be nested in a `try-catch` block, and allow me to notify the user of invalid input.
The open-standard of the STL [here][1] (page 653) states that `std::stof` throws:
> `invalid_argument` if wcstod or wcstold reports that no conversion could be performed.
However, it doesn't throw when passed something it cannot convert, e.g. `"48East"`. A code sample to reproduce this behavior is below:
std::wstring szString = L"48East";
try{
float f = std::stof(szString);
} catch( ... )
{
std::cout << "test" << std::endl;
}
This is compiled on MSVC10 in debug mode with `/Od`, so I'm assuming the call is not optimized away.
I'd appreciate any help (or guidance as to where I've misunderstood/misread the spec!).
[1]: http://open-std.org/JTC1/SC22/WG21/docs/papers/2010/n3126.pdf | 0 | [
2,
483,
630,
354,
43,
45,
45,
384,
1041,
52,
3814,
76,
1100,
40,
5476,
32,
1967,
8406,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
669,
113,
31,
259,
20,
3440,
40,
6367,
16,
14,
505,
13,
1,
14712,
721,
1,
14031,
8,
19535,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 flash convert a AVI client side to h.264 and then submit file to a url?
===
I was wondering if there is a way flash can convert a avi to h.264 and then submit the file to a url?
If there is a way to do it can you point me to the right direction please.
Thanks | 0 | [
2,
92,
4433,
8406,
21,
13,
5271,
6819,
270,
20,
746,
9,
20470,
17,
94,
12298,
3893,
20,
21,
287,
6362,
60,
800,
3726,
3726,
31,
23,
5712,
100,
80,
25,
21,
161,
4433,
92,
8406,
21,
13,
5271,
20,
746,
9,
20470,
17,
94,
12298,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 check for syntax errors in my Apache web server configuration
===
How do I check for syntax errors in the configuration of my apache server without having to restart or reload the rules? This would be preferably done from the terminal/command line.
| 0 | [
2,
184,
107,
31,
2631,
26,
22649,
11908,
19,
51,
17140,
2741,
8128,
8091,
800,
3726,
3726,
184,
107,
31,
2631,
26,
22649,
11908,
19,
14,
8091,
16,
51,
17140,
8128,
366,
452,
20,
22767,
54,
27339,
14,
1761,
60,
48,
83,
44,
6369,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
CSS3 :: Element (background-image) opacity, but no border opacity
===
I know how to do [border opacity][1], how to do [background image opacity][2], but I would like to have an element **without** border opacity, having backround-image opacity on. I don't want to modify image in image editor, so I am looking for opacity set by CSS. Possible?
In my CSS below I want to modify *"disabled"* status with sharp no-opacity border. Please advice...
---
***button style:***
div.button, div.button:hover
{
background: none;
border: 2px solid #6C7B8B;
border-radius: 8px;
clear: none;
color: transparent;
cursor: pointer;
display: inline-block;
filter: alpha(opacity=100);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
float: none;
height: 24px;
margin-bottom: 0px;
margin-left: 3px;
margin-right: 0px;
margin-top: 7px;
opacity: 1;
-moz-opacity: 1;
outline: none;
overflow: hidden;
padding: none;
vertical-align: top;
width: 24px;
}
***click effect:***
div.button:active
{
left: 1px;
position: relative;
top: 1px;
}
***extra style for status DISABLED:***
div.disabled, div.disabled:hover
{
cursor: default;
filter: alpha(opacity=50);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
opacity: 0.50;
-moz-opacity: 0.50;
}
div.disabled:active
{
left: 0px;
position: relative;
top: 0px;
}
***extra style for status ON:***
div.on, div.on:hover
{
border: 2px solid #007FFF;
}
[1]: http://stackoverflow.com/questions/4062001/css3-border-opacity/4062032#comment15097259_4062032
[2]: http://stackoverflow.com/questions/4183948/css-set-background-image-with-opacity | 0 | [
2,
272,
18,
18,
240,
13,
45,
45,
4520,
13,
5,
1958,
8810,
8,
22039,
6,
13,
11490,
5788,
15,
47,
90,
1862,
13,
11490,
5788,
800,
3726,
3726,
31,
143,
184,
20,
107,
636,
24389,
13,
11490,
5788,
500,
2558,
165,
500,
15,
184,
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,
1,
1,
1,
1,
1,
1... |
adapter never enter to getView
===
I have tab application with layout like this
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="3dp">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignBottom = "@android:id/tabcontent"
/>
</RelativeLayout>
</TabHost>
I want to call a listview screen it , so Idesigned this like
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
and the gridview look like
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" android:background="#ffffff">
<ImageView
android:id="@+id/imageViewContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/textViewCategoryName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dip"
/>
</LinearLayout>
and I call the adapter using
SectionsAdapter adapter = new SectionsAdapter(Sections.this ,R.layout.sectionviewgridview,
appState.MainCategories);
// updating listview
setListAdapter(adapter);
and the adapter look like
public class SectionsAdapter extends ArrayAdapter<HashMap<String, String>>{
ArrayList<HashMap<String, String>> mainCategories;
private final Context context;
public SectionsAdapter(Context context, int ResourceId,
ArrayList<HashMap<String, String>> items)
{
super(context, ResourceId);
this.context = context;
this.mainCategories = items ;
Log.d("The count of the hash is",""+items.size());
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
Log.d("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx","I'm hereeeeeeeeeeeeeeeeeeeeeeeeee" );
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.sectionviewgridview, parent, false);
ImageView ImageViewObject = (ImageView)rowView.findViewById(R.id.imageViewContent);
try {
Bitmap bitmap = BitmapFactory.decodeStream((InputStream)new java.net.URL(mainCategories.get(position).get("imageUrl")).getContent());
ImageViewObject.setImageBitmap(bitmap);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Log.d(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",mainCategories.get(position).get("name"));
TextView TextViewObject = (TextView) rowView.findViewById(R.id.textViewCategoryName);
TextViewObject.setText(mainCategories.get(position).get("name"));
return rowView;
}
}
It never log what in the getview
any idea how to fix that
| 0 | [
2,
9924,
106,
243,
2830,
20,
164,
4725,
800,
3726,
3726,
31,
57,
6523,
3010,
29,
9106,
101,
48,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
19608,
3726,
7,
1982,
410,
8,
457,
7,
60,
1,
13,
1,
15783,
11694,
23504,
217... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Solving $(window).resize
===
I have a a script that on $(window).resize() needs to hide divs in a list. However, because I'm using an older OS, my browser doesn't resize in realtime. It instead leaves a trace where it will resize, and then open letting go, it resizes. Thus, the script below only removes one div from the list instead of all that conflict. How can I fix this?
jQuery:
$(window).resize(function () {
movePivots();
});
function movePivots() {
var last_pivot = $("ul li:last");
if ($("#container").width() - $("ul").width() <= 0) {
last_pivot.remove();
} else {
}
}
CSS:
#container
{
float: left;
width: 50%;
min-width: 450px;
max-width: 900px;
height: 1000px;
background-color: #eee;
}
#nav
{
float: left;
background-color: #ddd;
min-width: 450px;
max-width: 900px;
width: 100%;
}
ul
{
float: left;
margin: 0;
padding: 0;
list-style: none;
background-color: #ccc;
} | 0 | [
2,
17533,
5579,
5,
27508,
6,
9,
99,
10454,
800,
3726,
3726,
31,
57,
21,
21,
3884,
30,
27,
5579,
5,
27508,
6,
9,
99,
10454,
5,
6,
2274,
20,
3077,
13,
12916,
18,
19,
21,
968,
9,
207,
15,
185,
31,
22,
79,
568,
40,
1234,
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... |
Git Autocompletion on Mac OSX (Lion) looks weird (and only half-functional)
===
After following the excellent instructions for enabling Git bash autocompletion in OSX [here][1], I get the following output when I type "git <kbd>Tab</kbd><kbd>Tab</kbd>" at the command line:
![Output from git tab-tab][2]
Following multiple different tutorials produces the same result. Either I don't know the right search terms or there is just very little documented about this issue...
Anyone encountered similar issues implementing git autocompletion for OSX? Running Lion if that's important.
[1]: http://railslove.com/blog/2011/11/25/git-autocomplete-in-bash-on-a-mac/
[2]: http://i.stack.imgur.com/pORn2.png | 0 | [
2,
13,
10404,
3108,
11103,
1336,
872,
27,
1572,
13,
759,
396,
13,
5,
14891,
6,
1879,
5455,
13,
5,
290,
104,
519,
8,
27983,
6,
800,
3726,
3726,
75,
249,
14,
5977,
7650,
26,
13168,
13,
10404,
13158,
3108,
11103,
1336,
872,
19,
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... |
Android SDK manager SSL peer shut down incorrectly
===
When I try using Android SDK manager to download the ARM EABI for Android 4.1 it refuses to to install it. I get the following message: "SSL peer shut down incorrectly". This is on a Windows XP OS. Any idea what is happening here and what I can do to resolve the problem? | 0 | [
2,
13005,
13,
18,
43,
197,
1382,
13,
18,
18,
255,
7617,
2218,
125,
22870,
800,
3726,
3726,
76,
31,
1131,
568,
13005,
13,
18,
43,
197,
1382,
20,
7121,
14,
813,
13,
62,
9104,
26,
13005,
268,
9,
165,
32,
10864,
20,
20,
16146,
32,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 to update Webpages dll to Version 2.0.0.0 but i will use Version 1.0.0.0
===
I updated my System with MVC 4.0. So there was also installed the new Version of the Webpdages dll, version 2.0.0.0.
My problem now is to use the oldversion 1.0.0.0, but i can`t.
There are no References in the solution of MVC 4, only MVC 3. And all dlls have a reference to the specific version 1.0.0.0 of System.Web.Pages!
I also copied following setting into the web.config.
` <dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="1.0.0.0"/>
</dependentAssembly>`
Has anyone a solution.
| 0 | [
2,
376,
20,
11100,
2741,
6486,
18,
13,
43,
211,
20,
615,
172,
9,
387,
9,
387,
9,
387,
47,
31,
129,
275,
615,
137,
9,
387,
9,
387,
9,
387,
800,
3726,
3726,
31,
6372,
51,
329,
29,
307,
8990,
268,
9,
387,
9,
86,
80,
23,
67,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Hold UIViewController stationary while UITableViewController scrolls behind it
===
I want to have a subclass of UIViewController (a button launching a menu) remain in a constant position on the screen while a subclass of UITableViewController scrolls behind it.
I have the UITableViewController set as UIScrollViewDelegate and the methods are firing. No luck in getting it to work. Both the TableView and the UIViewController support portrait and landscape with no problems. The only thing missing is maintaining the button a constant position as the tableView scrolls.
From my TableVC.m file
- (void)viewDidLoad
{
[super viewDidLoad];
self.pathMenu = [[PathStoryMenuViewController alloc] initWithNibName:nil bundle:nil];
// when this pathMenuViewController is init'ed
// it is assigned position based on User Prefs, i.e., right or left handed, etc.
[self.view addSubview:self.pathMenu.view];
}
So I figured since UITableView is a subclass of UIScrollView I would be able to use the UIScrollViewDelegate and at least the delegate methods are firing.
- (void)scrollViewWillBeginDragging:(UIScrollView *)activeScrollView
{
// 'Hoping' to re-assign the position of the menu button (150,150 just placeholders)
self.pathMenu.view.center = CGPointMake(150, 150);
NSLog(@"scrollViewWillBeginDraggingl");
}
- (void)scrollViewDidScroll:(UIScrollView *)activeScrollView {
self.pathMenu.view.center = CGPointMake(150,150);
NSLog(@"scrollViewDidScroll");
}
Intuitively, since pathMenu was added as a subView, it doesn't seem like this would work because the position being assigned above is relative to the parent view. (Of course it doesn't, and clearly I don't need both methods). I've gone round and round with a viewContainer approach ala'
- (void)addChildViewController:(UIViewController *)childController;
- (void)removeFromParentViewController;
discussed by Cocoanetics '[Containing View Controllers][1]' to no avail. Any help will be greatly appreciated.
Thanks in Advance
PS. The tableView background is opaque and the whole mess is in a UINavigationController. Everything is perfect except this last little piece.
[1]: http://www.cocoanetics.com/2012/04/containing-viewcontrollers/ | 0 | [
2,
1027,
13,
5661,
4725,
12898,
1252,
312,
1857,
133,
13,
11193,
579,
4725,
12898,
1252,
12159,
18,
439,
32,
800,
3726,
3726,
31,
259,
20,
57,
21,
972,
1898,
16,
13,
5661,
4725,
12898,
1252,
13,
5,
58,
5167,
13762,
21,
11379,
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... |
WPF click once msbuild applicationversion
===
I am publishing a WPF app using msbuild as an invoke process in my TFS 2010 Team build.
msbuild "/property:PublishDir=" & BuildDetail.DropLocation & "\_PublishedWebsites\WPF\;Configuration=" & CurrentBuildConfiguration & ";GenerateManifests=true;ApplicationVersion=" & BuildDetail.BuildNumber & ";Install=false;UpdateEnabled=true;UpdateRequired=false;UpdateMode=Foreground;IsWebBootstrapper=true;BootstrapperEnabled=true;CreateWebPageOnPublish=true;WebPage=publish.htm"
This gives me an output with my manifest and deploy files in a folder like this:
"MyProductName_1_0_0_3"
I then take this output and using in an Install Shield project to create a single exe to give to the customer, which will copy the deployment files to the server where the application is installed.
My problem is that Install Shield uses a path for the components and since this changes with every build my Install Shield project paths are now incorrect. I would like to hear any solution you may have come up with. I was thinking the easy solution would be to control the output file where the manifest and deploy files go but i am not sure how to do that or if that will cause any problems with versioning. Thanks | 0 | [
2,
619,
7721,
10840,
382,
4235,
29361,
3010,
10898,
800,
3726,
3726,
31,
589,
3107,
21,
619,
7721,
4865,
568,
4235,
29361,
28,
40,
28371,
953,
19,
51,
13,
11720,
18,
498,
173,
1895,
9,
4235,
29361,
13,
7,
118,
10890,
106,
1084,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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't query SSRS XML input with a default namespace
===
I'm having an issue with a report in SSRS (SQL Server 2008 R2). The problem happens regardless of if the input is provided from within report builder (v3) or via SSRS's web service interface.
Lets say this is the input XML (in a parameter called "ProvidedData"):
<person>
<name>joe</name>
</person>
...and I create a Dataset with the query:
<Query><XmlData>" & Parameters!ProvidedData.Value & "</XmlData>
<ElementPath>person</ElementPath></Query>
Then I create a field called "Name" with the field source "name". No problem - this can be usable on a report without any issue.
If I change the input XML to give it some namespace information it also works with no changes. So now the XML is:
<person xmlns:p="http://somenamespace">
<name>joe</name>
</person>
This also works - again, with no changes anywhere else. Works as a default value in Report Builder or when passed in from C# via the web service interface.
The problem is that I'm being fed XML with a default namespace and when I use that XML the field query doesn't resolve. No errors, it just doesn't find a value.
So if the XML is as follows, it doesn't work:
<person xmlns="http://somenamespace">
<name>joe</name>
</person>
Any ideas? I don't really have any control over the incoming XML so I'm stuck with the default namespace.
| 0 | [
2,
92,
22,
38,
25597,
22118,
18,
23504,
6367,
29,
21,
12838,
204,
5582,
800,
3726,
3726,
31,
22,
79,
452,
40,
1513,
29,
21,
1330,
19,
22118,
18,
13,
5,
18,
22402,
8128,
570,
761,
135,
6,
9,
14,
1448,
5531,
7148,
16,
100,
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... |
HTTPConnection.request fails but urllib.request.urlopen works?
===
I've been stuck here for quite a while but can't find anything helpful.
I'm trying to connect to a website and get a response json file in Python3. The code looks like below:
conn = http.client.HTTPConnection('host.address')
params = "xx"+ xx + "xx" + ...
conn.request('GET', '/a/b/c', params)
resp = conn.getresponse()
This actually won't return the json file but the webpage http://host.address/a/b/c, which is an error page.
However, while using the following code:
params = "xx"+ xx + "xx" + ...
resp = urllib.request.urlopen("http://host.address/a/b/c?"+params)
It returns correctly the json file.
Any idea what's wrong with the code?
Thanks | 0 | [
2,
7775,
25996,
872,
9,
99,
10351,
13614,
47,
13,
911,
211,
4598,
9,
99,
10351,
9,
911,
16942,
103,
693,
60,
800,
3726,
3726,
31,
22,
195,
74,
4549,
235,
26,
1450,
21,
133,
47,
92,
22,
38,
477,
602,
15600,
9,
31,
22,
79,
749... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Joining a Bag of Tuples into a Single String without any Custom Pig UDFs
===
How do I concatenate a bag of tuples (ex: {(664),(823),(8),(47),(35),(27),(13),(16),(4),(8),(6)}) into a single string with Pig Latin that does not rely on writing a custom UDF? | 0 | [
2,
3765,
21,
1910,
16,
2289,
18534,
77,
21,
345,
3724,
366,
186,
5816,
7680,
287,
8736,
18,
800,
3726,
3726,
184,
107,
31,
1065,
9530,
8820,
21,
1910,
16,
2289,
18534,
13,
5,
1706,
45,
13,
1,
5,
3526,
300,
6,
15,
5,
457,
2001,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 freeze: how to loop connected to 2 MySQL databases
===
How to perform that loop:
while ($row = mysql_fetch_array($result)) {
collectData($row['NAME']);
}
To not freeze my PHP after 30 seconds?
I think it can be done by taking whole Database into array or *.temp file to work with it, not to connect everytime I want to input/output something. But I have problems with files and arrays, so thats why I am asking: whats the better/best way to do it fast and painless?
<?php
//fiveMin - Database that data is taken form
//HighCharts - Database that data is transferred to
$fiveMin=mysql_connect($fiveMin_host,$fiveMin_user,$fiveMin_pass);
mysql_select_db($fiveMin_db,$fiveMin) or die (mysql_error());
$query="SELECT * FROM BetterShopItemStock";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
collectData($row['NAME']);
}
function collectData($itemID) {
global $fiveMin_host, $fiveMin_user, $fiveMin_pass, $fiveMin_db, $week_host, $week_user, $week_pass, $week_db;
$fiveMin=mysql_connect($fiveMin_host,$fiveMin_user,$fiveMin_pass); //Load and store data from fiveMin Database
mysql_select_db($fiveMin_db,$fiveMin) or die (mysql_error());
$function_Query="SELECT AMT FROM BetterShopItemStock WHERE NAME = '$itemID'";
$function_Ask = mysql_query($function_Query);
$function_Result = mysql_fetch_row($function_Ask, 0);
$dataReadyToImport = "," . $function_Result[0];
@mysql_close($fiveMin);
$HighCharts=mysql_connect($week_host,$week_user,$week_pass); //Save stored data to weekly Database
mysql_select_db($week_db,$HighCharts) or die (mysql_error());
$function_Query="SELECT AMT FROM BetterShopItemStock WHERE NAME = '$itemID'";
$function_Ask = mysql_query($function_Query);
$function_Result = mysql_fetch_row($function_Ask, 0);
$storedData = $function_Result[0];
$dataReadyToImport = $storedData . $dataReadyToImport;
mysql_query("UPDATE BetterShopItemStock SET AMT='$dataReadyToImport' WHERE NAME='$itemID'");
@mysql_close($HighCharts);
}
?> | 0 | [
2,
13,
26120,
11551,
45,
184,
20,
5293,
2587,
20,
172,
51,
18,
22402,
6018,
18,
800,
3726,
3726,
184,
20,
2985,
30,
5293,
45,
133,
13,
5,
4403,
5417,
800,
51,
18,
22402,
1,
410,
19913,
1,
8576,
93,
5,
4403,
29955,
6,
6,
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... |
Java: Creating an array of only duplicates
===
I did a lot of searching on this subject, but I couldn't find anything usable for my problem: I'm making a simple memory game in Java based on an integer array. I want the array to contain only duplicate entries and no unique ones. Unfortunately most of the questions here are dealing with avoiding or removing duplicate entries, but what about enforcing them?
My code so far looks like this.
public Field[] getField(){
Random r = new Random();
int pool = 16;
ArrayList<Integer> used = new ArrayList<Integer>();
int rand = r.nextInt(pool);
System.out.println("First random: " + rand);
for(int i = 0; i < fields.length; i++){
System.out.println("ITERATION " + i + " STARTED");
while(used.contains(rand)){
System.out.println(rand + " is used, recalculating...");
rand = r.nextInt(pool);
System.out.println("New random is " + rand);
}
fields[i] = new Field(rand);
System.out.println(rand + " added in Field " + i);
int tmp = r.nextInt(fields.length - 1);
System.out.println("First tmp calculated: " + tmp);
while(fields[tmp] != null && i <= fields.length / 2){
tmp = r.nextInt(fields.length - 1);
System.out.println("Field " + tmp + " is used, looking for another...");
}
fields[tmp] = new Field(rand);
System.out.println(rand + " added in temp Field " + tmp);
used.add(rand);
System.out.println("ITERATION " + i + " ENDED");
System.out.println();
}
return fields;
}
fields[] is an array of the type Field (basically has just one member (int id). | 0 | [
2,
8247,
45,
2936,
40,
7718,
16,
104,
19429,
18,
800,
3726,
3726,
31,
144,
21,
865,
16,
5792,
27,
48,
1550,
15,
47,
31,
711,
22,
38,
477,
602,
182,
579,
26,
51,
1448,
45,
31,
22,
79,
544,
21,
1935,
1912,
250,
19,
8247,
432,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 raw_id_field style widget for list_filters
===
Is there a raw_id_field style widget for use when rendering list_filter fields on Django admin changelist pages?
When I add a foreign-key based field to a Django modeladmin list_filter, Django renders every row in the associated table to the right-hand panel in a select box. If that table is large (e.g. if it points to the User table) this tends to dramatically slow down load time as Django works to renders thousands of rows. Even after it finishes rendering, it can be difficult finding your selection in the huge dropdown.
| 0 | [
2,
3857,
14541,
4333,
1,
1340,
1,
1109,
1034,
4807,
43,
3060,
26,
968,
1,
11924,
6052,
800,
3726,
3726,
25,
80,
21,
4333,
1,
1340,
1,
1109,
1034,
4807,
43,
3060,
26,
275,
76,
15307,
968,
1,
11924,
815,
2861,
27,
3857,
14541,
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... |
Send mail in java servlet works but from address and subject is unknown
===
This is a little mailing script that gets the information from the form and then sends a mail.
It works like a charm only one problem is that the from address and the subject isn't working. The mail comes without a from address and without a subject.
Someone that knows what's wrong?
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, Exception {
response.setContentType("text/html;charset=UTF-8");
//PrintWriter out = response.getWriter();
//SMTPserver en de mail naar waar de mensen hun mail versturen
String smtpServ = "uit.telenet.be";
String to = "ddd@gmail.com";
String from = request.getParameter("mail");
String subject = request.getParameter("subject") + "geschreven door: " + request.getParameter("naam");
String emailContent = request.getParameter("beschrijving");
response.setContentType("text/html");
try {
sendMessage(smtpServ, to, from, subject, emailContent);
} catch (Exception e) {
throw new ServletException(e.getMessage());
}
}
private void sendMessage(String smtpServer, String to, String from,
String subject, String emailContent) throws Exception {
try{
SmtpClient client = new SmtpClient(smtpServer);
client.from(from);
client.to(to);
PrintStream message = client.startMessage();
message.println("Naar: " + to);
message.println("Onderwerp:" + subject);
message.println(emailContent);
message.println();
message.println("Het Burgerdemocratie Team");
message.println();
message.println();
client.closeServer();
}
catch (IOException e){
System.out.println("ERROR tijdens het verzenden van de mail:"+e);
}
}
| 0 | [
2,
2660,
4216,
19,
8247,
13,
10321,
1336,
693,
47,
37,
3218,
17,
1550,
25,
2562,
800,
3726,
3726,
48,
25,
21,
265,
4216,
68,
3884,
30,
3049,
14,
676,
37,
14,
505,
17,
94,
11350,
21,
4216,
9,
32,
693,
101,
21,
7533,
104,
53,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Lua Editor for Corona SDK
===
Can anyone suggest a good editor to use with Lua scripting specifically for the Corona SDK? I would like to use Eclipse Indigo (64bit) preferably but I've had problems with the Lua plugin. | 0 | [
2,
1612,
58,
1835,
26,
13538,
13,
18,
43,
197,
800,
3726,
3726,
92,
1276,
5601,
21,
254,
1835,
20,
275,
29,
1612,
58,
3884,
68,
3524,
26,
14,
13538,
13,
18,
43,
197,
60,
31,
83,
101,
20,
275,
11652,
22655,
13,
5,
3470,
3326,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0... |
fork to new cygwin terminal
===
I have this program that forks and I was wondering how to get it to fork to a separate terminal so the parent and child would have their own windows and stop fighting each other. I am trying to accomplish this with cygwin, any ideas? | 0 | [
2,
8777,
20,
78,
6728,
263,
4181,
3855,
800,
3726,
3726,
31,
57,
48,
625,
30,
8777,
18,
17,
31,
23,
5712,
184,
20,
164,
32,
20,
8777,
20,
21,
1725,
3855,
86,
14,
4766,
17,
850,
83,
57,
66,
258,
1936,
17,
747,
1849,
206,
89,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0... |
How to return the specific page in jQuery Datatables paging?
===
I have a datable and "Edit" button in each row. When I click that button, /edit/ url opens. Everything is Ok until now. But if I need to go back to the datatable, it starts from the first page. What can I do for that? | 0 | [
2,
184,
20,
788,
14,
1903,
2478,
19,
487,
8190,
93,
1054,
5924,
18,
19006,
68,
60,
800,
3726,
3726,
31,
57,
21,
1054,
2854,
17,
13,
7,
69,
242,
7,
5167,
19,
206,
3131,
9,
76,
31,
10840,
30,
5167,
15,
13,
118,
69,
242,
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... |
AutomationElement FindAll() doesn't work
===
Here is my code:
AutomationElementCollection myCollection = myAutomationElement.FindAll(TreeScope.Children, new PropertyCondition(AutomationElement.LocalizedControlTypeProperty, "someControlType"));
The problem is, FindAll doesn't return any children. When I evaluate the same code in QuickView while debugging in Visual Studio, I can find multiple children.
myAutomationElement is a global variable that was initialized on a different thread. Basically, when a form is opened, the program creates a new thread and registers every automation element on the form. That is how myAutomationElement was initialized. | 0 | [
2,
23217,
27567,
477,
1233,
5,
6,
1437,
22,
38,
170,
800,
3726,
3726,
235,
25,
51,
1797,
45,
23217,
27567,
15015,
872,
51,
15015,
872,
800,
51,
18042,
79,
857,
27567,
9,
19811,
1233,
5,
8101,
11555,
9,
17853,
15,
78,
1354,
22141,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Deploying .dll on remote sql server?
===
I'm trying to create an assembly but my remote sql server cannot access my .dll file.
create assembly BarcodeSql
from 'X:\test.dll'
WITH PERMISSION_SET = SAFE
I don't know how to put test.dll on my sql server, but I know I can send a serialized dll instead of the path to the dll. How can I serialize the dll? I can't seem to figure it out.
| 0 | [
2,
17617,
68,
13,
9,
43,
211,
27,
5388,
4444,
255,
8128,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
40,
1475,
47,
51,
5388,
4444,
255,
8128,
1967,
1381,
51,
13,
9,
43,
211,
3893,
9,
1600,
1475,
748,
9375,
18,
22402,
37,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
WPF trigger for selected items
===
I am using the MVVM light framework. On one of my pages I have a listbox which has a bound list and a bound selected item. I have a style that should highlight the selected item in that listbox. However, the item is not highlighted until I physically click it (It will not highlight the item when it is just bound).
XAML:
<UserControl.Resources>
<hartvm:ViewLocator x:Key="HartvilleLocator" d:IsDataSource="True" />
<DataTemplate DataType="{x:Type Quotes:QuotePetSummaryItem}">
<Views:QuoteSummaryItem DataContext="{Binding}" />
</DataTemplate>
<Style x:Key="ListboxItemStyle" TargetType="{x:Type ListBoxItem}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Red"/>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
</Style.Resources>
<Setter Property="BorderBrush" Value="Red"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="False">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Opacity" Value="40"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Opacity" Value="100"/>
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<UserControl.DataContext>
<Binding Source="{StaticResource HartvilleLocator}" Path="QuoteSummary" />
</UserControl.DataContext>
<Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border BorderBrush="Black" BorderThickness="0">
<TextBlock TextWrapping="Wrap" Text="Quote Summary" Margin="5,0,0,0" FontSize="21.333" Foreground="{DynamicResource ControlHeaderBrush}" FontFamily="Verdana"/>
</Border>
<ScrollViewer d:LayoutOverrides="Height" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.Row="1" Margin="10,10,5,10">
<telerik:RadBusyIndicator IsBusy="{Binding IsProcessing}">
<ListBox ItemsSource="{Binding DefaultList}" SelectedItem="{Binding SelectedDefault}" Background="{x:Null}" ItemContainerStyle="{StaticResource ListboxItemStyle}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
</telerik:RadBusyIndicator>
</ScrollViewer>
</Grid>
</Border>
</UserControl>
Code (To programmatically select the item in the list box):
public QuotePetSummaryItem SelectedDefault { get; set; }
private void SelectDefault()
{
if (DefaultList== null || DefaultList.First().Pet == null) return;
SelectedDefault = DefaultList.First();
MessengerService.Send(SelectionMessage.Create(SelectedDefault.SubDefault));
}
The message being sent is not important and does some other work on another page. The SelectedDefault property is the only thing that is used for this example.
Someone have an idea as to what I need to do to get this working? | 0 | [
2,
619,
7721,
7286,
26,
1704,
3755,
800,
3726,
3726,
31,
589,
568,
14,
17967,
20147,
471,
6596,
9,
27,
53,
16,
51,
4434,
31,
57,
21,
968,
5309,
56,
63,
21,
4138,
968,
17,
21,
4138,
1704,
9101,
9,
31,
57,
21,
1034,
30,
378,
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... |
PHP. How dynamically change page content on HTML select action?
===
I have this code:
**page.php:**
<?php
include ('include.php');
echo = '
<li>
<select name="selector" class="letter">
<option value="a" selected="selected">$a</option>
<option value="b">$b</option>
</select>
</li>
';
echo = '
<li>
<select name="a-numbers" class="number a-numbers">
<option value="$a[1][1]">$a[1][2]</option>
<option value="$a[2][1]">$a[2][2]</option>
</select>
<select name="b-numbers" class="number b-numbers">
<option value="$b[1][1]">$b[1][2]</option>
<option value="$b[2][1]">$b[2][2]</option>
</select>
</li>
';
?>
&
**include.php:**
<?php
$array = array(
"a" => array(
"1" => array("aaa1-value","aaa1-text"),
"2" => array("aaa2-value","aaa2-text")
),
"b" => array(
"1" => array("bbb1-value","bbb1-text"),
"2" => array("bbb2-value","bbb2-text")
)
)
);
?>
If *`.letter>a`* is selected, *`.a-numbers`* list should be echo-printed; and if *`.letter>b`* is selected, *`.a-numbers`* list should be removed and *`.b-numbers`* should be printed.
Of course, I can create this scenario with JS and CSS `display:none`; however, I can't use `display:none` here. So I have to remove elements from DOM, but I can't.
Thanks for your attention. | 0 | [
2,
13,
26120,
9,
184,
7782,
1326,
753,
2478,
2331,
27,
13,
15895,
5407,
1028,
60,
800,
3726,
3726,
31,
57,
48,
1797,
45,
13,
1409,
6486,
9,
26120,
45,
1409,
13,
1,
60,
26120,
468,
13,
5,
22,
22640,
9,
26120,
22,
6,
73,
8117,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 bluetooth in phonegap
===
Ive done some googling and till now havent found a way to use bluetooth on a device using phonegap.
Are there any other API's/frameworks/platforms I should look at?
| 0 | [
2,
568,
705,
15808,
19,
1132,
1136,
306,
800,
3726,
3726,
5568,
677,
109,
162,
5598,
802,
17,
3924,
130,
12460,
216,
21,
161,
20,
275,
705,
15808,
27,
21,
3646,
568,
1132,
1136,
306,
9,
50,
80,
186,
89,
21,
2159,
22,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
Input Values and Select Return Data
===
I'm trying to create a webpage where the user can submit information that they know and select information they'd like returned. For example, if they know the ID number for their submission, they can enter it and ask for the returned values to be the ID number and product name.
The information that's being retrieved is stored in a MySQL database, and the html page is laid out with a select menu, text boxes, and checkboxes (so that the user can select a name or enter other information, and then use the checkboxes to select the other information they want returned).
Here's the relevant html:
<table><tr>
<form name="input" method="post" action="next.php">
<td width="120">Flowcell ID:<br />
<select name = "Flowcell_ID">
<option disabled="disabled" selected="selected">
Select...
</option>
<?php
$link = mysqli_connect("localhost","user","pass","db");
$query = "SELECT DISTINCT ID FROM table";
$result = mysqli_query($link, $query);
while ($row = mysqli_fetch_array($result)){
$id = $row['ID'];
echo "<option value=\"$id\">$id</option>";
}
mysqli_close($link);
?>
</select></td>
</tr><tr>
<td width="120">Name:<input type="text" name="Name" /></td>
</tr><tr>
<td width="120">Date:<input type="text" name="Date" /></td>
</tr><tr>
<td width="120">Group:<input type="text" name="Group" /></td>
</tr><tr>
<td width="120"><input type="checkbox" name="options[]" value="ID">ID</input></td>
<td width="120"><input type="checkbox" name="options[]" value="Name">Name</input></td>
<td width="120"><input type="checkbox" name="options[]" value="Date">Date</input></td>
<td width="120"><input type="checkbox" name="options[]" value="Group">Group</input></td>
</tr></table>
The only php I have so far is:
$id = $_POST['ID'];
$name = $_POST['Name'];
$date = $_POST['Date'];
$group = $_POST['Group'];
How would I produce a MySQL query that looks like
SELECT [checked checkboxes] FROM table WHERE [information field] = [user-entered information]
?
Thanks! | 0 | [
2,
6367,
4070,
17,
5407,
788,
1054,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
2741,
6486,
113,
14,
4155,
92,
12298,
676,
30,
59,
143,
17,
5407,
676,
59,
22,
43,
101,
587,
9,
26,
823,
15,
100,
59,
143,
14,
4924,
234,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Does Aptana Studio 3 support hints for ajax?
===
I am trying to use this tool. And want to know if Aptana Studio 3 support hints for jquery? So it helps me in efficient coding. Thanks. | 0 | [
2,
630,
8442,
9068,
1120,
203,
555,
6382,
18,
26,
20624,
60,
800,
3726,
3726,
31,
589,
749,
20,
275,
48,
5607,
9,
17,
259,
20,
143,
100,
8442,
9068,
1120,
203,
555,
6382,
18,
26,
487,
8190,
93,
60,
86,
32,
7778,
55,
19,
8243,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Counting Facebook/Twitter Shares Uniquely
===
I'm wondering if there is a way to use multiple Facebook/Twitter share buttons on a page and have them each be counted uniquely?
I'm using the below JS to handle the counter:
url = "http://www.revival.tv/turningpoint/";
// Facebook Shares
$.getJSON('http://graph.facebook.com/'+url+'&callback=?',
function(data) {
$('#fbcount').append((data.shares || 0));
});
// Tweet Count
$.getJSON('http://urls.api.twitter.com/1/urls/count.json?url='+url+'&callback=?',
function(data) {
$('#twcount').append(data.count);
I tried using a unique url with bit.ly to try and have it be counted separate with no luck. Is there any way to accomplish this? | 0 | [
2,
11195,
9090,
118,
38,
13098,
106,
5945,
23703,
800,
3726,
3726,
31,
22,
79,
5712,
100,
80,
25,
21,
161,
20,
275,
1886,
9090,
118,
38,
13098,
106,
1891,
12861,
27,
21,
2478,
17,
57,
105,
206,
44,
8799,
23703,
60,
31,
22,
79,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Conditional formatting based on date
===
**Trying to set up a time card at work in Excel, have dates going down the left-hand side of the worksheet:**
Fri 1/1/11
Sat 1/2/11
Sun 1/3/11
**And so on. I want to gray out the rows with weekend dates like so:**
Fri 1/1/11
Sat 1/2/11
Sun 1/3/11
**Is there an obvious way to do this using conditional formatting?** | 0 | [
2,
21206,
2595,
1203,
432,
27,
1231,
800,
3726,
3726,
13,
1409,
5840,
68,
20,
309,
71,
21,
85,
2056,
35,
170,
19,
20700,
15,
57,
4076,
228,
125,
14,
225,
8,
3203,
270,
16,
14,
170,
17627,
45,
1409,
6266,
13,
8197,
8197,
1306,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Trying to access QGLWidget from entire application
===
What I am basically trying to do is to create one instance of a QGLWidget(or rather a derived class of QGLWidget), add it to a QMainWindow, and then access the QGLWidgets rendering context from anywhere in my QTCreator program to be able to call naked OpenGL anywhere I chose to.
Things I have tried:
1) Creating a subclass of QGLWidget called OGLWidget and making that into a singleton, and then trying to subclass the singleton class "OGLWidget". I thought this would give me access to the same rendering context that the OGLWidget singleton was using but it didn't work.
2) using the constructor QGLWidget(QWidget * parent, QGLWidget * shared, Qt::WindowFlags). For this one I tried casting the singleton object to a QGLWidget and then sticking it in this constructor when I was subclassing QGLWidget in another class called "Display". I tried calling makeCurrent before each classes openGl calls but only the original singleton would draw. I also checked isSharing and that returned true.
| 0 | [
2,
749,
20,
1381,
2593,
8430,
3976,
43,
3060,
37,
1078,
3010,
800,
3726,
3726,
98,
31,
589,
11374,
749,
20,
107,
25,
20,
1600,
53,
4851,
16,
21,
2593,
8430,
3976,
43,
3060,
5,
248,
864,
21,
3981,
718,
16,
2593,
8430,
3976,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 synchronize audio and video playback on iOS?
===
I want to synchronize the playback of a video with a stream of real-time audio data. I already tried to accomplish this with the AV Foundation Framework but it seems AV Foundation does not have support for [audio data generated at real-time][1].
What's there to synchronize a video playback with audio data generated in real-time on iOS?
[1]: http://stackoverflow.com/questions/11502971/how-to-add-pcm-audio-data-to-an-avasset-during-playback | 0 | [
2,
184,
20,
13,
16023,
2952,
4023,
17,
763,
21306,
27,
13,
7760,
60,
800,
3726,
3726,
31,
259,
20,
13,
16023,
2952,
14,
21306,
16,
21,
763,
29,
21,
3766,
16,
683,
8,
891,
4023,
1054,
9,
31,
614,
794,
20,
14570,
48,
29,
14,
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... |
php Session variable lost between pages with a form submit
===
I was wondering if anyone could help me.
If I am on the page details.php (code below) there is a form with a submit button (amongst other things).
When the form's submit button is clicked, you are taken to process_tenant.php.
The problem is the session variable valid_user doesn't seem to come with it. I have session_start() at the start of both pages and the session variable is definitely set and never overwritten on details.php
Anyone able to tell me why?
**details.php**
<?php
session_start();
$_SESSION['valid_user'] = admin;
echo $_SESSION['valid_user']; //This prints out admin
?>
<!DOCTYPE HTML>
<html>
<head>
...
</head>
<body>
...
<form action='process_tenant.php' method='POST'>
...
</form>
</body>
</html>
**process_tenant.php**
<?php
session_start();
if (isset($_SESSION['valid_user']))
{
echo 'heya'; //This does not print
}
echo 'hi' . $_SESSION['valid_user']; //This just prints 'hi'
?>
... | 0 | [
2,
13,
26120,
3723,
7612,
529,
128,
4434,
29,
21,
505,
12298,
800,
3726,
3726,
31,
23,
5712,
100,
1276,
110,
448,
55,
9,
100,
31,
589,
27,
14,
2478,
3289,
9,
26120,
13,
5,
9375,
1021,
6,
80,
25,
21,
505,
29,
21,
12298,
5167,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 we perform a "natural sort" using usort function
===
How can we perform a "natural sort" (as done by function `natsort`) using `usort` function.
| 0 | [
2,
184,
92,
95,
2985,
21,
13,
7,
17232,
2058,
7,
568,
287,
22843,
1990,
800,
3726,
3726,
184,
92,
95,
2985,
21,
13,
7,
17232,
2058,
7,
13,
5,
472,
677,
34,
1990,
13,
1,
11044,
22843,
1,
6,
568,
13,
1,
291,
22843,
1,
1990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to Bind 2 columns of a table when one of them is of datetime data type, need correct sql query
===
I want to bind Product & date together in a dropdown list
here is the sql query
Select P.Id , M.ProductId as ProId , P.Name + ',+'M.[Date] as Name from ProductMaster as P INNER JOIN PlanMaster as M on P.Id= M.ProductId where M.IsDelete = 'False' order by M.ProductId ASC
this works id date wasnt in datetime format
ERROR i get is :Conversion failed when converting datetime from character string. | 0 | [
2,
184,
20,
10193,
172,
7498,
16,
21,
859,
76,
53,
16,
105,
25,
16,
1231,
891,
1054,
1001,
15,
376,
4456,
4444,
255,
25597,
800,
3726,
3726,
31,
259,
20,
10193,
2374,
279,
1231,
429,
19,
21,
2804,
2968,
968,
235,
25,
14,
4444,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Subquery in MySQL WHERE clause using
===
I'm not a sql guru at all but why does this query return error?
SELECT username FROM history as h
WHERE username IS NOT NULL AND updated>1342555201 AND updated<1342641599
AND WHERE (SELECT status FROM managers WHERE username=h.username) > 0
How to group out usernames with status>0 in one query using the subquery on second table containing statuses? | 0 | [
2,
972,
8190,
93,
19,
51,
18,
22402,
113,
9040,
568,
800,
3726,
3726,
31,
22,
79,
52,
21,
4444,
255,
10334,
35,
65,
47,
483,
630,
48,
25597,
788,
7019,
60,
5407,
4155,
7259,
37,
447,
28,
746,
113,
4155,
7259,
25,
52,
16203,
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... |
IOS: Touch outside layer mask but inside frame
===
I have an **UIView** with a layermask (smaller than its frame) that can receive touches.
Now the thing is that i want to restrict those touches within the layer mask.
The mask is a rendered shape and not always a rectangle.
Do i have to do this with:
pointInside:withEvent:
or
hitTest:withEvent:
Or is there a better solution? | 0 | [
2,
13,
7760,
45,
1723,
719,
5385,
5983,
47,
572,
3523,
800,
3726,
3726,
31,
57,
40,
13,
1409,
5661,
4725,
1409,
29,
21,
5385,
23265,
13,
5,
15988,
106,
119,
82,
3523,
6,
30,
92,
2588,
13935,
9,
130,
14,
584,
25,
30,
31,
259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 default button upon press in WPF
===
I have two buttons in a wrap panel in WPF and one of them has `IsDefault="True"`. When I click on the other, I want it to become the "default button".
I realize I can do this programmatically by listening to the press event, but I want a universal solution that does not require me to wire up a lot of code here and there. | 0 | [
2,
753,
12838,
5167,
685,
901,
19,
619,
7721,
800,
3726,
3726,
31,
57,
81,
12861,
19,
21,
8118,
4113,
19,
619,
7721,
17,
53,
16,
105,
63,
13,
1,
403,
13862,
9708,
3726,
7,
13398,
7,
1,
9,
76,
31,
10840,
27,
14,
89,
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... |
Getting the List of installed windows programs(applications) using Adobe air
===
I'm new to Adobe air,I want to list out the installed windows programs(Applications) using adobe air..Is it possible?? Do i need to access registry keys to achieve this?? | 0 | [
2,
1017,
14,
968,
16,
4066,
1936,
1726,
5,
2552,
20669,
18,
6,
568,
20299,
282,
800,
3726,
3726,
31,
22,
79,
78,
20,
20299,
282,
15,
49,
259,
20,
968,
70,
14,
4066,
1936,
1726,
5,
2552,
20669,
18,
6,
568,
20299,
282,
9,
9,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
XCode - Global Function self.view
===
So i followed [this tutorial][1] on how to create a global function..
All is working except in my global function i have a line that is:
[self.view addSubview:gld];
and i am getting an error on self.view.. any ideas?
I need the self.view part to be the view that called the function..
The Error:
> Property 'view' not found on object of type 'GlobalData*'
[1]: http://sree.cc/iphone/global-functions-and-variables-in-objective-c | 0 | [
2,
993,
9375,
13,
8,
2062,
1990,
1119,
9,
4725,
800,
3726,
3726,
86,
31,
709,
636,
1565,
29724,
500,
2558,
165,
500,
27,
184,
20,
1600,
21,
2062,
1990,
9,
9,
65,
25,
638,
1613,
19,
51,
2062,
1990,
31,
57,
21,
293,
30,
25,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 code in netbeans works but executing jar through cmd gives nosuchmethod error exception
===
i have made a java program in netbeans to edit excel file using poi libraries
the code works fine in netbeans but after building the jar file and executing it through command prompt gives a error when a call to some function is made that is there is external jar...
however i hav included the target code in bulid.xml.. the jar file created in store also doesnot work..
and also the jar file created in dist folder also gives this error
Exception in thread "AWT-EventQueue-0" java.lang.Nosuchmethoderror: org.apache.xmlbeans.xmloptions.setsaveaggresivenamespaces()Lorg/apache/xmlbeans/xmloptions;
i have checked the class org.apache.xmlbeans.xmloptions is present in the jar file.....
please helpppp | 0 | [
2,
8247,
1797,
19,
4275,
863,
5950,
693,
47,
25836,
5112,
120,
2390,
43,
2352,
90,
4289,
5909,
1807,
43,
7019,
5391,
800,
3726,
3726,
31,
57,
117,
21,
8247,
625,
19,
4275,
863,
5950,
20,
9392,
20700,
3893,
568,
2353,
49,
8649,
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... |
simplexml_load_file is not defined
===
The code contains a line:
$xml = simplexml_load_file("./test.xml");
The error message in FireBug console is the following:
simplexml_load_file is not defined
What might be the reason of this? | 3 | [
2,
1935,
396,
8184,
1,
8294,
1,
16877,
25,
52,
2811,
800,
3726,
3726,
14,
1797,
1588,
21,
293,
45,
5579,
396,
8184,
800,
1935,
396,
8184,
1,
8294,
1,
16877,
5,
7,
9,
118,
10543,
9,
396,
8184,
7,
6,
73,
14,
7019,
2802,
19,
53... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
My Mac keeps broadcasting UDP packets to 255.255.255.255:2008
===
How can I determine which progress is doing this? | 2 | [
2,
51,
1572,
8968,
3647,
287,
7431,
12795,
18,
20,
13,
20038,
9,
20038,
9,
20038,
9,
20038,
45,
2753,
800,
3726,
3726,
184,
92,
31,
3746,
56,
3455,
25,
845,
48,
60,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
PHP MongoDB ordered distinct with skip and limit
===
Is there anyway to order a distinct query in MongoDB (PHP)? Would even be nicer if I could apply skip() and limit() on it. But I haven't found any ways to do this yet.
In SQL I would do something like this in the follow way:
select distinct(koppelid)
from wn
order by koppelid
limit 10
offset 100 | 0 | [
2,
13,
26120,
3521,
5474,
220,
1905,
4421,
29,
12532,
17,
4496,
800,
3726,
3726,
25,
80,
2774,
20,
389,
21,
4421,
25597,
19,
3521,
5474,
220,
13,
5,
26120,
6,
60,
83,
166,
44,
2210,
139,
100,
31,
110,
5645,
12532,
5,
6,
17,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 move my wordpress website from localhost to Server?
===
How to move my website from localhost to server ??
with all images and contents is there any plugins or what ?
please suggest me
Thank You all | 0 | [
2,
184,
20,
780,
51,
833,
5890,
2271,
37,
375,
11694,
20,
8128,
60,
800,
3726,
3726,
184,
20,
780,
51,
2271,
37,
375,
11694,
20,
8128,
13,
60,
60,
29,
65,
3502,
17,
8478,
25,
80,
186,
10922,
108,
18,
54,
98,
13,
60,
2247,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Can results from a catch block be passed to methods inside the try block?
===
I have the following code in my program:
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
if (response == null)
return false;
aDoc.Load(response.GetResponseStream()); //Load the response into another object
}
catch (WebException e)
{
//404's are caught and are saved as the response.
//The reason being that 404's from this particular
// website still provide relevant information that needs
// extracting.
response = (HttpWebResponse)e.Response;
}
finally
{
response.Close();
}
My question is: If a WebException is caught, will the response from `response = (HttpWebResponse)e.Response;` be passed to the `aDoc.Load()` method?
As an aside, I had this following code before moving more of it into the try-catch block. I figured adding a `finally` with `Close()` would be safer, but I'm still wondering if I should have changed anything at all in the first place.
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException e)
{
response = (HttpWebResponse)e.Response;
}
if (response == null)
return false;
aDoc.Load(response.GetResponseStream());
response.Close(); | 0 | [
2,
92,
1736,
37,
21,
2949,
1921,
44,
1100,
20,
3195,
572,
14,
1131,
1921,
60,
800,
3726,
3726,
31,
57,
14,
249,
1797,
19,
51,
625,
45,
7775,
458,
3692,
18,
8782,
870,
1627,
800,
16203,
73,
1131,
13,
1,
1627,
800,
13,
5,
21127,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 populate table cells conditionally based on the shape of my results object?
===
In my sweet app you can use two kinds of items from a list of items. There are equipable items, and bag items. When you navigate to the inventory screen, there are two sections of a table view, each with 4 cells. Four cells for equipped items, and four cells for items in your "bag". If you don't have anything equipped, the cells just say "empty".
How can I populate table cells conditionally based on the shape of my results object?
Here is the code I wish I had:
- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// this returns 'nil' if the index path was out of bounds
NSManagedObject * item = [self.fetchedResultsController carefullyGetObjectAtIndexPath:indexPath];
if (nil == item) {
cell.textLabel.text = @"empty";
} else {
cell.textLabel.text = [item valueForKey:@"name"];
}
}
Some problems I've encountered trying to implement this 'careful' objectAtIndexPath:
I tried bounds checking, but I'm having trouble because the fetchedArray is flat, while the conceptual model I am trying to navigate is not flat: rows are 'in' sections.
I tried using a try/catch, but then I remembered that the out-of-bounds elements are undefined, not nil... so sometimes I get an error that I can catch and react to, and sometimes I just get random interesting stuff. The setup I have now:
@try {
NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:indexPath];
return managedObject;
}
@catch (NSException * e) {
return nil;
}
consistently gives me 5 entries, 4 in the right places and 1 odd-ball which is a repeat from the other section.
Not sure how to navigate the fetched results manually. I'm playing with four items, 2 of each kind. I had hoped it would be as easy as a doubly nested array, with sections on the outside and rows on the in. It seems that things are trickier than this. When I inspect the fetchedResults NSArray, I see that it is flat. All the "bag" items are first, and the "equipable" come next. I don't imagine I can depend on this ordering, though, so I don't feel safe making a mapping function to go from indexPath section to array index. (I could be convinced to feel safe about this).
An alternative I thought of involves populating my inventory with 8 'empty' items that would be returned as place holder results when the sections don't get completely filled. This doesn't sit well with me though.
I realize why this isn't working: tables aren't supposed to have 'empty' rows. But I want my table to have empty rows!
z.
Full disclosure: this is a term project, but the project is to make the app by any means necessary. This includes third party libraries, asking questions on stackoverflow, &c... The goal of this term project is to experience working on something bigger, like a sweet app, not to learn objective-c. | 0 | [
2,
184,
92,
31,
1675,
12383,
859,
2934,
2874,
1326,
432,
27,
14,
2539,
16,
51,
1736,
3095,
60,
800,
3726,
3726,
19,
51,
2092,
4865,
42,
92,
275,
81,
8623,
16,
3755,
37,
21,
968,
16,
3755,
9,
80,
50,
24270,
579,
3755,
15,
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... |
Writing a GeoRuby Oracle Adapter for Ruby 1.9 and Rails 3.2.5
===
We are a GIS RoR-based software company which works with spatial data.
At the present time, we directly execute our pure SQL in Oracle, but it's a challenging process, now we consider the idea of switching to GeoRuby. <br/>
We want to adopt GeoRuby with our corporation's Oracle database and our Rails environment. <br/>
As far as you probably know, there is no well-structured adapter for this purpose. <br/>
Presently, I am working on my own spatial oracle adapter.
For now, I can create tables and Geometry columns with migrations. Also, I can manage to create models for a table. <br/>
For example, with assumption of having a GeoShape model which have two properties (name:string and geom:geometry), I can do:
g = GeoShape.new(:name => "Point1", geom: Point.from_x_y(-1.6, 2.8, 123))
After executing above statement, I have:
=> #<GeoShape id: nil, name: "Point1", geom: <GeoRuby::SimpleFeatures::Point:0x6a3cb030 @srid=123, @with_z=false, @with_m=false, @y=2.8, @x=-1.6, @z=0.0, @m=0.0>, created_at: nil, updated_at: nil>
Now I want to save my model to DB with g.save. <br/>
I am getting the following errors which is completely logical becasue the type mismatch between GeoRuby and Oracle types.
INSERT INTO "GEO_SHAPES" ("CREATED_AT", "GEOM", "ID", "NAME", "UPDATED_AT") VALUES (:a1, :a2, :a3, :a4, :a5) [["created_at", Sun, 01 Jul 2012 04:34:34 UTC +00:00], ["geom", #<GeoRuby::SimpleFeatures::Point:0x6a3d3410 @srid=123, @with_z=false, @with_m=false, @y=2.8, @x=-1.6, @z=0.0, @m=0.0>], ["id", 10053], ["name", "Point1"], ["updated_at", Sun, 01 Jul 2012 04:34:34 UTC +00:00]]
ActiveRecord::StatementInvalid: OCIError: ORA-00932: inconsistent datatypes: expected MDSYS.SDO_GEOMETRY got CHAR: INSERT INTO "GEO_SHAPES" ("CREATED_AT", "GEOM", "ID", "NAME", "UPDATED_AT") VALUES (:a1, :a2, :a3, :a4, :a5)
<hr/>
Anyone have any idea regarding the process of doing this? <br/>
I guess, I must map my GeoRuby structure to corresponding Oracle SDO_Geometry, but I don't have any idea about the process. <br/>
Thanks very much for your helps. | 0 | [
2,
1174,
21,
6389,
1820,
779,
15759,
9924,
106,
26,
10811,
137,
9,
518,
17,
2240,
18,
203,
9,
135,
9,
264,
800,
3726,
3726,
95,
50,
21,
16004,
761,
248,
8,
1281,
2306,
237,
56,
693,
29,
14472,
1054,
9,
35,
14,
734,
85,
15,
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... |
Refresh browser with PHP function after Javascript & AJAX POST
===
My Javascript allows user to logon to 3rd party system, returning an array of user details. This works perfectly :)
I use JSON and AJAX to POST it to a PHP script. This also works.
The PHP script interrogates my mySQL database, returning various details. This works too!
However, I can only view the mySQL output in Safari's Web Inspector. I presume I need to get the PHP script to "refresh" the browser to display the output, but cannot find how to do.
Help appreciated.
| 0 | [
2,
24905,
16495,
29,
13,
26120,
1990,
75,
8247,
8741,
279,
20624,
678,
800,
3726,
3726,
51,
8247,
8741,
2965,
4155,
20,
6449,
103,
20,
203,
897,
346,
329,
15,
2485,
40,
7718,
16,
4155,
3289,
9,
48,
693,
5759,
13,
45,
6,
31,
275,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Pry in SublimeREPL
===
Has anyone had any luck using swapping irb out for pry in SublimeREPL? I'm close, I think. I don't get an error however I don't get a response when I enter a command either. It behaves like the buffer is being reset each time I hit return. | 0 | [
2,
12307,
19,
27644,
99,
5727,
800,
3726,
3726,
63,
1276,
41,
186,
5419,
568,
10143,
5574,
31,
7549,
70,
26,
12307,
19,
27644,
99,
5727,
60,
31,
22,
79,
543,
15,
31,
277,
9,
31,
221,
22,
38,
164,
40,
7019,
207,
31,
221,
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... |
start activity when a key is hit
===
I want to monitor when the user pushes the space bar. I thought i was using the right code, but apparently It's not working. My ultimate goal is to start an activity as soon as the user pushes on it. Can somebody help steer me in the right direction? Thank you in advanced.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
text = (EditText) findViewById(R.id.Scan);
Toast.makeText(getApplicationContext(), "does it reach?",
Toast.LENGTH_SHORT).show();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_SPACE) {
Toast.makeText(getApplicationContext(), "pushed space?",
Toast.LENGTH_SHORT).show();
return true;
}
Toast.makeText(getApplicationContext(), "something else?",
Toast.LENGTH_SHORT).show();
return super.onKeyDown(keyCode, event);
}
} | 0 | [
2,
799,
2358,
76,
21,
1246,
25,
770,
800,
3726,
3726,
31,
259,
20,
7626,
76,
14,
4155,
16271,
14,
726,
748,
9,
31,
289,
31,
23,
568,
14,
193,
1797,
15,
47,
3083,
32,
22,
18,
52,
638,
9,
51,
6612,
1195,
25,
20,
799,
40,
235... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Anti-aliasing with GL_TRIANGLE_FAN
===
I'm not getting any anti-aliasing when using drawing GL_TRIANGLE_FANs with this code:
glDisable(GL_DEPTH_TEST);
// Blended points, lines, and polygons.
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
glEnable(GL_POINT_SMOOTH);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POLYGON_SMOOTH);
What am I doing wrong? | 0 | [
2,
1082,
8,
10060,
18,
68,
29,
13,
8430,
1,
3367,
15427,
1,
7491,
800,
3726,
3726,
31,
22,
79,
52,
1017,
186,
1082,
8,
10060,
18,
68,
76,
568,
3533,
13,
8430,
1,
3367,
15427,
1,
7491,
18,
29,
48,
1797,
45,
13,
8430,
2906,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 implement a matrix-lib with a DSL in scala?
===
I want to write a matrix library for my computer graphics projects. I want to use scalas dsl feature, to make it look and feel more naturaly. Can anybody give me a hint, where to find a simple tutorial that does *not* use external librarys? During my research I only found tutorials that use frameworks. | 0 | [
2,
184,
20,
8713,
21,
8187,
8,
8326,
29,
21,
13,
43,
18,
255,
19,
25975,
60,
800,
3726,
3726,
31,
259,
20,
2757,
21,
8187,
1248,
26,
51,
1428,
8351,
2314,
9,
31,
259,
20,
275,
25975,
18,
13,
43,
18,
255,
1580,
15,
20,
233,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Interactive rebase with Git Extensions
===
Did anyone managed to make an interactive rebase with Git Extensions ?
Option is available when rebasing, but whenever I selected the last n commits, select "interactive" in the rebase window, the editor pops up with "noop" comment instead of the commits lines.
Where am I wrong ? | 0 | [
2,
9194,
302,
8436,
29,
13,
10404,
17529,
800,
3726,
3726,
144,
1276,
1471,
20,
233,
40,
9194,
302,
8436,
29,
13,
10404,
17529,
13,
60,
4255,
25,
904,
76,
302,
6093,
68,
15,
47,
6634,
31,
1704,
14,
236,
13,
103,
9686,
18,
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... |
how to show only month and year in datapicker using datapicker dialog box
===
please tell me how to show only month and year in datapicker using datapicker dialog box
private DatePickerDialog.OnDateSetListener mDateSetListener2 = new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker view, int year,
int monthOfYear, int dayOfMonth) {
try {
Log.e("","myear"+mYear_1+","+"myear"+mMonth_1+","+mDay_1);
Field f[] = mDateSetListener2.getClass().getDeclaredFields();
for (Field field : f) {
if (field.getName().equals("mDatePicker")) {
field.setAccessible(true);
Object dayPicker = new Object();
dayPicker = field.get(mDateSetListener2);
((View) dayPicker).setVisibility(View.GONE);
}
}
} catch (SecurityException e) {
Log.e("ERROR", e.getMessage());
}
catch (IllegalArgumentException e) {
Log.e("ERROR", e.getMessage());
} catch (IllegalAccessException e) {
Log.e("ERROR", e.getMessage());
}
}
}; | 0 | [
2,
184,
20,
298,
104,
1617,
17,
159,
19,
1054,
16855,
106,
568,
1054,
16855,
106,
28223,
1649,
800,
3726,
3726,
2247,
494,
55,
184,
20,
298,
104,
1617,
17,
159,
19,
1054,
16855,
106,
568,
1054,
16855,
106,
28223,
1649,
932,
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... |
Doctrine 2 - Functional Testing
===
Ok, here's the situation. I use Doctrine 2 and PHPUnit.
I have a list of products, each has a category. I want to test findByCategory() method which should obviously return a list of products for specific category.
Quite simple, but I'm not sure how to test this propertly. On some places on web I see just simple examples like:
$this->assertEquals(4, count($foundProducts));
So it just tests the quantity of returned results, but not the actual data.
I also tried this:
foreach($allFoundProducts as $i=>$foundProduct) {
$this->assertEquals($products[$i], $foundProduct);
}
where $products is a list of entites I've persisted prior to searching.
But it takes alot of time to accomplish and sometimes even crashes (insufficient memory).
Please advice me the approach you use to make database tests like this.
Thanks alot!
| 0 | [
2,
7521,
172,
13,
8,
7652,
4431,
800,
3726,
3726,
5854,
15,
235,
22,
18,
14,
1858,
9,
31,
275,
7521,
172,
17,
13,
26120,
15464,
9,
31,
57,
21,
968,
16,
1985,
15,
206,
63,
21,
3230,
9,
31,
259,
20,
1289,
477,
779,
14375,
93,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
OpenCV: Allocation error with 'cvCreateGLCM' method
===
I am trying to compute GLCM for an input image. I load the image, convert it to grayscale, then I invoke cvCreateGLCM method on the grayscale image. OpenCV Version: 2.4.1, vc10, x64.
const char* filePath = "C:\\input.jpg";
IplImage* inputIm = cvLoadImage(filePath);
IplImage* grayIm = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 1);
cvCvtColor(inputIm, grayIm, CV_RGB2GRAY);
CvGLCM* glcm = cvCreateGLCM(resizedGray, 0); // ERROR
I get the following error message: http://i.stack.imgur.com/dNa7p.png
when I press 'Break', it shows where the error took place:
__forceinline void * __cdecl _heap_alloc (size_t size)
{
if (_crtheap == 0) {
_FF_MSGBANNER(); /* write run-time error banner */
_NMSG_WRITE(_RT_CRT_NOTINIT); /* write message */
__crtExitProcess(255); /* normally _exit(255) */
}
return HeapAlloc(_crtheap, 0, size ? size : 1); // <<< The error
}
Any ideas please? | 0 | [
2,
368,
12732,
45,
16840,
7019,
29,
13,
22,
12732,
6037,
1373,
8430,
9095,
22,
2109,
800,
3726,
3726,
31,
589,
749,
20,
23909,
13,
8430,
9095,
26,
40,
6367,
1961,
9,
31,
6305,
14,
1961,
15,
8406,
32,
20,
2030,
5093,
15,
94,
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... |
Using XML entity representation in jquery
===
I am wondering how i can use entity representation to fill in the id in this code
var ID = $(this).attr("id");
var dataString = 'msg_id='+ ID;
//alert(ID);
var mssg = $('#'+"ID"').html();
$('#content').val(mssg);
My attempt var mssg = `$('#'+"ID").html();` is wrong since the script won't work now.What's the correct way of doing this?. | 0 | [
2,
568,
23504,
9252,
5442,
19,
487,
8190,
93,
800,
3726,
3726,
31,
589,
5712,
184,
31,
92,
275,
9252,
5442,
20,
3509,
19,
14,
4924,
19,
48,
1797,
4033,
4924,
800,
5579,
5,
1565,
6,
9,
10303,
139,
5,
7,
1340,
7,
6,
73,
4033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Cast a Typed list<> to be prepared for DataAdapter Update
===
We Have this :
**listPerson As List<Person>**
Want to use the Data of **listPerson** in a `SqlDataAdapter`
something similar to :
adapter.Update(listPerson);
*Possibilities maybe casting and converting **listPerson** into `List<DataRow>` or A DataTable or whatever else which be acceptable for adapter's Update method ...*
LinQ or any more robust code is appreciated,
Which way do you suggest ?
| 0 | [
2,
1325,
21,
1001,
43,
968,
1,
20,
44,
3268,
26,
1054,
27576,
106,
11100,
800,
3726,
3726,
95,
57,
48,
13,
45,
13,
1409,
5739,
7276,
28,
968,
1,
7276,
1,
1409,
259,
20,
275,
14,
1054,
16,
13,
1409,
5739,
7276,
1409,
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... |
java applet: JProgressBar updating/refreshing only at completion
===
I'm just trying to iterate in for loop and updating values of JProgressBar inside the loop, initiating SwingUtilities.invokeLater.. but it's only updating after completion.
Below is my simple code:
import java.awt.Color;
import java.awt.Rectangle;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.SwingUtilities;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ProgressBar extends JApplet
{
JProgressBar pg =null;
JPanel panel=null;
JButton start = null;
int i;
public void init()
{
pg=new JProgressBar(0,100);
pg.setStringPainted(true);
this.setSize(1200, 600);
this.setLayout(null);
panel = new JPanel();
panel.setLayout(null);
panel.setBackground(Color.white);
this.setContentPane(panel);
this.setVisible(true);
pg.setBounds(new Rectangle(630,20, 150, 30));
add(pg);
start= new JButton("start");
start.setBounds(new Rectangle(330,20, 200, 30));
start.setBackground(Color.lightGray);
panel.add(start);
start.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
pg.setValue(0);
pg.setStringPainted(true);
for ( i = 0; i <= 100; i=i+1)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
try {
pg.setValue(i);
java.lang.Thread.sleep(100);
}
catch (Exception e)
{}
}});}}});}}
How to reflect the updation of progress bar in incrementing way as it's updating only 100% after for loop completion.
| 0 | [
2,
8247,
4037,
38,
45,
487,
2740,
13026,
1850,
71,
43,
1880,
118,
99,
22373,
68,
104,
35,
5392,
800,
3726,
3726,
31,
22,
79,
114,
749,
20,
32,
106,
1373,
19,
26,
5293,
17,
71,
43,
1880,
4070,
16,
487,
2740,
13026,
1850,
572,
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... |
Eclipse console error message limitation
===
I'm using Eclipse IDE and the console truncates my error message.
I want to get to the root of the error but all that it says is '5 more.' How can I make it so that eclipse shows all the error messages?
Thanks!!
For example:
java.lang.RuntimeException: java.io.IOException: <br>
at com.quantcast.rmr.MRStep.start(MRStep.java:1281) <br>
at com.quantcast.rmr.MRFlow.job(MRFlow.java:669) <br>
at com.implicitlabs.rmr.Job.exec(Job.java:1481)<br>
at com.implicitlabs.rmr.Job.startExecution(Job.java:492)<br>
at com.implicitlabs.rmr.JobStartup.callStartup(JobStartup.java:38)<br>
at com.implicitlabs.rmr.Job.main(Job.java:422)
<br>Caused by: java.io.IOException: <br>
at com.implicitlabs.rmr.Job.executeStep(Job.java:2878)<br>
at com.implicitlabs.rmr.Job.go(Job.java:1297)<br>
at com.quantcast.rmr.MRStep.start(MRStep.java:1279)<br>
<b>... 5 more</b> | 0 | [
2,
11652,
8650,
7019,
2802,
24943,
800,
3726,
3726,
31,
22,
79,
568,
11652,
13,
3448,
17,
14,
8650,
22328,
160,
51,
7019,
2802,
9,
31,
259,
20,
164,
20,
14,
5900,
16,
14,
7019,
47,
65,
30,
32,
898,
25,
13,
22,
264,
91,
9,
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... |
C# Appliocation.exit not working
===
This is what I have in my btnExit_Click. It is supposed to exit the application
this.Close();
Program.UnLoadAllForms();
Application.Exit();
static public void UnLoadAllForms()
{
try
{
Program.CloseReally = false;
Program.form1.Close();
Program.form2.Close();
Program.form3.Close();
Program.form4.Close();
Program.form5.Close();
Program.form6.Close();
Program.form1= null;
Program.form2= null;
Program.form3= null;
Program.form4= null;
Program.form5= null;
Program.form6= null;
}
catch (Exception ex)
{
throw ex;
} | 1 | [
2,
272,
5910,
4865,
11188,
16893,
9,
1706,
242,
52,
638,
800,
3726,
3726,
48,
25,
98,
31,
57,
19,
51,
334,
38,
22420,
242,
1,
150,
10129,
9,
32,
25,
2293,
20,
4350,
14,
3010,
48,
9,
14330,
5,
6,
73,
625,
9,
1020,
8294,
1233,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
passing variables to jQuery ajax success or error functions
===
I am using JQuery $.ajax to loop through a set of JSON URLs and download results into an array. Some of the URLs return a 404 -- which I'm handling & showing as a div message.
However, I can't seem to pass the URL, more precisely it always only passes the last URL in the array.
I assume that's because ajax is asynchronous and takes longer to complete, but I'm not sure how else to make sure only the current JSON url (or variable) is being shown on SUCCESS or ERROR
My Code:
// For every URL loop through 'baseitems' array
for (var i = 0; i < baseitems.length; i++) {
// This is where I'm hoping to store the current URL as a variable to pass to the end-user on Success or Error
var caturl = baseURL + "/" + baseitems[i];
// Get the data via JSON
$.ajax({
type: "GET",
url: caturl,
dataType: "json",
async: true, // set so that the variables caturl get updated below
success: function (result) {
// Success: store the object into catalog array
cat.unshift(result);
$('#showdata').prepend("Loaded: " + caturl + "</br>"); // still buggy here - probably async JSON issue
},
error: function (xhr, textStatus, error) {
// Error: write out error
console.log(xhr.statusText);
console.log(textStatus);
console.log(error);
$('#showdata').prepend("ERROR : '" + error + "' trying to access: " + caturl + "</br>"); // still buggy here - probably async JSON issue
}
});
} | 0 | [
2,
2848,
12157,
20,
487,
8190,
93,
20624,
1280,
54,
7019,
3719,
800,
3726,
3726,
31,
589,
568,
487,
8190,
93,
5579,
9,
6881,
7522,
20,
5293,
120,
21,
309,
16,
487,
528,
13,
911,
7532,
17,
7121,
1736,
77,
40,
7718,
9,
109,
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... |
Jquery Ajax load/post
===
Im trying to get the `.load` method to post to a page and then echo back what was posted to see if it is working, i can't get this to work. I tells me that the variable is undefined, here is what i have:
teachers.php:
<?php
echo $POST['class'];
The JS:
$('#test').load('teacher.php', {class: 'test'});
That is triggered once something is clicked.
`#test` is a `<div>` that I want the data to post to.
Thanks for the help.
| 0 | [
2,
487,
8190,
93,
20624,
6305,
118,
6962,
800,
3726,
3726,
797,
749,
20,
164,
14,
13,
1,
9,
8294,
1,
2109,
20,
678,
20,
21,
2478,
17,
94,
8117,
97,
98,
23,
6054,
20,
196,
100,
32,
25,
638,
15,
31,
92,
22,
38,
164,
48,
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,
1,
1,
1,
1,
1,
1... |
How do I add a chainable function to jQuery in a single step?
===
I added the following function so I could iterate backwards over some collections:
jQuery.reverseEach = function (object, callback, args) {
var reversed = $(object).get().reverse();
return $(reversed).each(callback, args);
};
Which works great if you call it like this:
$.reverseEach($('#selectedSortItems option:selected'), function() {
$(this).insertAfter($(this).next());
});
However, I wanted to be all slick and make it chainable because I like my syntactic sugar. I added a reference to the original reverseEach function on jQuery's prototype:
jQuery.prototype.reverseEach = function(callback, args) {
return jQuery.reverseEach(this, callback, args);
};
And now I can call it like this:
$('#selectedSortItems option:selected').reverseEach(function () {
$(this).insertAfter($(this).next());
});
However, I thought that the jQuery.fn.extend function does the same thing in a single step, without the need to reference prototype. I tried to use the jQuery.fn.extend function, like this:
jQuery.fn.extend({
reverseEach: function(object, callback, args) {
var reversed = $(object).get().reverse();
return $(reversed).each(callback, args);
}
});
But whenver I run the chained method that way, I get the following error:
Unable to get value of the property 'call': object is null or undefined.
What am I doing wrong with the jQuery.fn.extend method? Am I taking the complete wrong approach, or am I just missing something simple?
Thanks! | 0 | [
2,
184,
107,
31,
3547,
21,
2858,
579,
1990,
20,
487,
8190,
93,
19,
21,
345,
1424,
60,
800,
3726,
3726,
31,
905,
14,
249,
1990,
86,
31,
110,
32,
106,
1373,
12207,
84,
109,
5721,
45,
487,
8190,
93,
9,
99,
9453,
14322,
800,
1990,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Print image from imageview
===
UIPrintInteractionController uses data to be printed.if I want to print image from imageview it gives me some warning.I want to use image from imageview not from resources.I want to know how to get data from image in ImageView
UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController];
NSData * datatobeprinted [NSData dataWithContentsOfFile:imageView.image];
if(printController && [UIPrintInteractionController canPrintData:imageView.image]) {
printController.delegate = self;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = [path lastPathComponent];
printInfo.duplex = UIPrintInfoDuplexLongEdge;
printController.printInfo = printInfo;
printController.showsPageRange = YES;
[printController setPrintingItem:datatobeprinted];
} | 0 | [
2,
4793,
1961,
37,
1961,
4725,
800,
3726,
3726,
13,
5661,
10299,
6280,
8645,
12898,
1252,
2027,
1054,
20,
44,
5317,
9,
821,
31,
259,
20,
4793,
1961,
37,
1961,
4725,
32,
2352,
55,
109,
3590,
9,
49,
259,
20,
275,
1961,
37,
1961,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
moscow with user-stories
===
I have adopted the user-story template introduced in [response to a question here on SO][1], i.e.
AS A [person/role]
I NEED TO [do something]
SO THAT [provides business value].
I have two questions:
1. How should I incorporate [MOSCOW][2] into user stories, which part of the template can / should change?
2. I am re-writing requirements and often deal with statements about content being available on a website. I am unsure whether I should write the user-story from the perspective of a website user reading the content, or ad administrator making the content available. Can anyone clarify the best approach to take?
[1]: http://stackoverflow.com/questions/1707080/writing-user-stories-for-internal-technical-tasks
[2]: http://en.wikipedia.org/wiki/MoSCoW_Method | 0 | [
2,
3484,
29,
4155,
8,
18,
262,
2829,
800,
3726,
3726,
31,
57,
2527,
14,
4155,
8,
4416,
22894,
1277,
19,
636,
99,
18,
8782,
870,
20,
21,
1301,
235,
27,
86,
500,
2558,
165,
500,
15,
31,
9,
62,
9,
28,
21,
636,
7276,
118,
661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
ContinueWith a Task on the Main thread
===
Forgive me if this is a simple question; I couldn't phrase it in a generic enough way to search for the answer.
Consider the above code:
var task = Task.Factory.StartNew(() => Whatever());
task.ContinueWith(Callback), TaskScheduler.FromCurrentSynchronizationContext())
How exactly is it determined when the callback method will execute?
Will it wait until the main thread is currently finished doing whatever it is doing, or will it get called immediately after the asynchronous call is complete? And will this callback execute entirely before the main thread returns to whatever it was doing before? | 0 | [
2,
1816,
1410,
21,
3005,
27,
14,
407,
9322,
800,
3726,
3726,
8591,
55,
100,
48,
25,
21,
1935,
1301,
73,
31,
711,
22,
38,
6845,
32,
19,
21,
12733,
511,
161,
20,
2122,
26,
14,
1623,
9,
3563,
14,
784,
1797,
45,
4033,
3005,
800,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Erlang: Avoiding race condition with gen_tcp:controlling_process
===
I am implementing simple tcp server with the following sequence:
{ok, LS} = gen_tcp:listen(Port,[{active, true}, {reuseaddr, true}, {mode, list}]),
{ok, Socket} = gen_tcp:accept(LS),
Pid = spawn_link(M, F, [Socket]),
gen_tcp:controlling_process(Socket, Pid)
There might be a race condition where a new packet arrives on the socket process before the "controlling_process" get called , which would result in {tcp,Socket,Data} message arriving to the father proccess instead of the child.
How this could be avoided ?
| 0 | [
2,
13,
106,
9949,
45,
10298,
764,
2874,
29,
4380,
1,
38,
7439,
45,
12898,
802,
1,
16835,
800,
3726,
3726,
31,
589,
17333,
1935,
13,
38,
7439,
8128,
29,
14,
249,
4030,
45,
13,
1,
3085,
15,
644,
18,
1,
800,
4380,
1,
38,
7439,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 we Declare Private Parameterless Constructor Evry time
===
Why we Declare Private Parameterless Constructor Evry time when declare class which i have seen my projects.
class Product
{
public string Name { get; private set; }
public decimal Price { get; private set; }
public Product(string name, decimal price)
{
Name = name;
Price = price;
}
Product() {}
public static List<Product> GetSampleProducts()
{
return new List<Product>
{
new Product { Name="West Side Story", Price = 9.99m },
new Product { Name="Assassins", Price=14.99m },
new Product { Name="Frogs", Price=13.99m },
new Product { Name="Sweeney Todd", Price=10.99m}
};
}
public override string ToString()
{
return string.Format("{0}: {1}", Name, Price);
}
} | 0 | [
2,
483,
95,
10123,
932,
18906,
923,
6960,
248,
13,
2443,
622,
85,
800,
3726,
3726,
483,
95,
10123,
932,
18906,
923,
6960,
248,
13,
2443,
622,
85,
76,
10123,
718,
56,
31,
57,
541,
51,
2314,
9,
718,
2374,
13,
1,
317,
3724,
204,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Passing a Jquery variable to use in php script
===
I have a booking grid as shown below:
![enter image description here][1]
[1]: http://i.stack.imgur.com/mE24H.png
On this booking grid I have a dblClick event:
ondblClickRow: function(rowid)
{
var rowData = new Array();
rowData = $("#bookings").getRowData(rowid);
var brData = rowData['bookref'];
getGridRow(brData);
$("#cp-bookings-dialog").dialog({ hide: 'slide', height: 625, width: 733, title: 'Booking Reference: - '+ brData});
},
Where brData is the 'Booking Reference' value that I want to use in my PHP script. At the moment this dblClick event is being sent to the following Ajax request:
function getGridRow(brData) {
$.ajax({
url: 'scripts/php/bootstrp/all.request.php',
type: 'POST',
data: {
rowdata: 'fnme=getDGRow&row_data='+brData,
id: null,
condition: null
},
dataType: 'text/xml',
timeout: 20000,
error: function(){
alert("It failed");
$('#cp-div-error').html('');
$('#cp-div-error').append('<p>There was an error inserting the data, please try again later.</p>');
$('#cp-div-error').dialog('open');
},
success: function(response){
// Refresh page
//response = brData;
//alert(response); <--- This alerts the correct Booking Reference
}
});
Which gets sent to all.request.php
// Switch to determine method to call
switch ($_REQUEST['fnme']) {
case 'getDGRow':
header('Content-type: text/xml');
GetBookings::getGridRow($_REQUEST['rowdata']);
break;
And finally to the PHP script where I want to use this Jquery value:
class GetBookings {
public static function getGridRow($rowdata) {
$rowdata = $_REQUEST['rowdata'];
$pdo = new SQL();
$dbh = $pdo->connect(Database::$serverIP, Database::$serverPort, Database::$dbName, Database::$user, Database::$pass);
try {
$query = "SELECT * FROM tblbookings WHERE bookref = '$rowdata'";
$stmt = $dbh->prepare($query);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_BOTH);
{variables are all here}
$stmt->closeCursor();
}
catch (PDOException $pe) {
die("Error: " .$pe->getMessage(). " Query: ".$stmt->queryString);
}
$dbh = null;
}
}
I'm not sure why, but this doesn't seem to be working. Also, just to note that when you dblClick a booking this opens a jquery dialog box which displays all the details about the booking and is supposed to return all the results from "$query = "SELECT * FROM tblbookings WHERE bookref = '$rowdata'";"
All I need to do is pass the value 'brData' correctly to $rowdata to use in my PHP script and this will work. If I replace $rowdata with a booking reference value, this works as it should.
If anybody can help me with this, I will be very greatful as I've been trying to get this to work for quite some time now : (
| 0 | [
2,
2848,
21,
487,
8190,
93,
7612,
20,
275,
19,
13,
26120,
3884,
800,
3726,
3726,
31,
57,
21,
360,
68,
7354,
28,
1721,
1021,
45,
13,
187,
2558,
13679,
1961,
5318,
235,
500,
2558,
165,
500,
636,
165,
500,
45,
7775,
6903,
49,
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 read each xml node from results
===
Morning,
I am have some XML which is being returned, and i need to read each of the result nodes, and then put them into my DB.
So SKU, ResultMessageCode would be stored. I need to only pull these out if ResultCode is marked as an error.
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>123456789</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>2</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>2</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>90205</ResultMessageCode>
<ResultDescription>Some Text Here</ResultDescription>
<AdditionalInfo>
<SKU>12345</SKU>
</AdditionalInfo>
</Result>
<Result>
<MessageID>2</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>90205</ResultMessageCode>
<ResultDescription>Some Text Here</ResultDescription>
<AdditionalInfo>
<SKU>67890</SKU>
</AdditionalInfo>
</Result>
</ProcessingReport>
</Message>
I found this elsewhere on Stackoverflow, and think this maybe what i am after.
foreach (XmlNode chldNode in node.ChildNodes)
{
**//Read the attribute Name**
if (chldNode.Name == Employee)
{
if (chldNode.HasChildNodes)
{
foreach (XmlNode item in node.ChildNodes)
{
}
}
}
}
Am i assuming correctly here, and would need to use something similar? however the XML from the above sample was slightly smaller.
Thanks in advance. | 0 | [
2,
184,
20,
1302,
206,
23504,
15421,
37,
1736,
800,
3726,
3726,
959,
15,
31,
589,
57,
109,
23504,
56,
25,
142,
587,
15,
17,
31,
376,
20,
1302,
206,
16,
14,
829,
16272,
15,
17,
94,
442,
105,
77,
51,
13,
9007,
9,
86,
13,
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... |
c# - Imaginary Errors / Debugger Going Haywire?
===
Ok I know that errors can be mysterious sometimes and trying to figure out the logic can be tricky but these ones seem...impossible. Here's my trace:
----7/27/2012 9:49:14 PM ----
Type: IndexOutOfRangeException
Source: MCLight_
Message: Index was outside the bounds of the array.
Target: HandleDeath
Trace: at MCLight.Player.HandleDeath(Byte b, String customMessage, Boolean explode)
in C:\Users\Matt\Desktop\MCLight\MCLight\Player\Player.cs:line 3053 at MCLight.Player.CheckBlock(UInt16 x, UInt16 y, UInt16 z)
in C:\Users\Matt\Desktop\MCLight\MCLight\Player\Player.cs:line 3048 at MCLight.Server.<Start>b__14()
in C:\Users\Matt\Desktop\MCLight\MCLight\Server.cs:line 1694
So I am getting these errors thrown at these places in code:
int number = message.Split(' ').Length; //HERE
String[] param = message.Split(' ');
.
Server.s.Log("Code Reached 4: " + pos.Length); //HERE
ushort x = (ushort)(pos[0] / 32);
ushort y = (ushort)(pos[1] / 32);
ushort z = (ushort)(pos[2] / 32);
.
Server.s.Log("DBX:" + message); //HERE
.
Declarations:
public ushort[] pos = new ushort[3] { 0, 0, 0 };
public string message;
The last one makes no sense. There is no array with a String.
It's throwing the same array out of bound exception in all these places. Oddly these are only being thrown in NEW CODE I wrote in the last 5 hours. I used this
int number = message.Split(' ').Length;
String[] param = message.Split(' ');
exact same statement in another piece of code 6 months ago and it worked fine. So is there something wrong with my debugger or the solution file? It might be important to note that I restarted my computer today and when VS started back up it tried to recover the old solution file, so I said ok. Did that corrupt it somehow? Correct me if I'm wrong but some of these lines of code shouldn't ever throw that kind of error. Unless the trace is wrong...?
| 0 | [
2,
272,
5910,
13,
8,
17972,
11908,
13,
118,
121,
2345,
11356,
228,
4301,
13482,
60,
800,
3726,
3726,
5854,
31,
143,
30,
11908,
92,
44,
6896,
1030,
17,
749,
20,
1465,
70,
14,
7085,
92,
44,
5514,
93,
47,
158,
53,
18,
2260,
9,
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... |
Big O notation for fib recursion
===
What is the Big-O run-time of the following function? Explain.
static int fib(int n){
if (n <= 2)
return 1;
else
return fib(n-1) + fib(n-2)
}
Also how would you re-write the fib(int n) function with a faster Big-O run-time iteratively?
would this be the best way with O(n):
public static int fibonacci (int n){
int previous = -1;
int result = 1;
for (int i = 0; i <= n; ++i)
{
int sum = result + previous;
previous = result;
result = sum;
}
return result;
}
} | 0 | [
2,
580,
635,
15591,
26,
14143,
26604,
5991,
800,
3726,
3726,
98,
25,
14,
580,
8,
111,
485,
8,
891,
16,
14,
249,
1990,
60,
3271,
9,
12038,
19,
38,
14143,
5,
6391,
13,
103,
6,
1,
100,
13,
5,
103,
13,
1,
3726,
172,
6,
788,
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 present a splash/login view controller using storyboards
===
I've seen this question in various forms without a clear answer. I'm going to ask and answer here. My app needs to do work on startup... inits, a few network calls, login, etc. I don't want my main view controller working until that's done. What's a good pattern for doing this?
Requirements:
- iOS5+, storyboards, ARC.
- the main vc's view cannot appear until the startup work is done.
- want a choice of transition styles to the main vc when the startup work is done.
- want to do as much layout as possible in storyboard.
- the code should be cleanly contained somewhere obvious. | 0 | [
2,
184,
20,
734,
21,
13873,
118,
5567,
108,
1418,
9919,
568,
609,
2806,
18,
800,
3726,
3726,
31,
22,
195,
541,
48,
1301,
19,
617,
1997,
366,
21,
1207,
1623,
9,
31,
22,
79,
228,
20,
1349,
17,
1623,
235,
9,
51,
4865,
2274,
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,
1,
1,
1,
1,
1,
1... |
How to prevent NERDTree buffer deletion? (or reload it)
===
If I `:bd`at the NERDTree window, I cannot load it back by closing the NERDTree window and opening it back, It still comes empty.
How to solve this? Ideally I'd like to attribute no action to `:bd` at this buffer, but a proper reload shortcut would do. | 0 | [
2,
184,
20,
2501,
25758,
8101,
17497,
28916,
60,
13,
5,
248,
27339,
32,
6,
800,
3726,
3726,
100,
31,
13,
1,
45,
220,
43,
1,
721,
14,
25758,
8101,
1463,
15,
31,
1967,
6305,
32,
97,
34,
4239,
14,
25758,
8101,
1463,
17,
1214,
32,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Most efficient way to convert a Django QuerySet to a pandas DataFrame
===
I am doing it this way:
`qs = SomeModel.objects.select_related().filter(date__year=2012)`
Then:
`q = qs.values('date', 'OtherField')`
And finally:
`df = pd.DataFrame.from_records(q)`
It works, but is there any other way? Thanks! | 0 | [
2,
127,
8243,
161,
20,
8406,
21,
3857,
14541,
25597,
3554,
20,
21,
16982,
18,
1054,
8361,
800,
3726,
3726,
31,
589,
845,
32,
48,
161,
45,
13,
1,
1251,
18,
800,
109,
13998,
9,
23793,
18,
9,
18,
16964,
1,
6203,
5,
6,
9,
11924,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a way to make PopUp stay open when the application is minimized?
===
When I minimize the application, PopUp gets minimized too. Is there a way to prevent minimizing PopUp? | 0 | [
2,
25,
80,
21,
161,
20,
233,
1675,
576,
1179,
368,
76,
14,
3010,
25,
16713,
43,
60,
800,
3726,
3726,
76,
31,
16713,
14,
3010,
15,
1675,
576,
3049,
16713,
43,
266,
9,
25,
80,
21,
161,
20,
2501,
4236,
79,
3335,
1675,
576,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Issue with quantmod add_TA and chart_Series - lines and text disappear after next add_TA is called
===
I am using new chart_Series and add_TA quite a lot. It works very well for me and I find it very useful.
I am trying to add a few things (horizontal lines and some text) on a graph. Here problems start to occur. After horizontal lines and text are drawn correctly they disappear if I call subsequent add_TA... Please see the example code below which reproduces the problem:
library(quantmod)
getSymbols("SPY")
dev.new()
chart_Series(SPY)
add_TA(ADX(HLC(SPY))$ADX)
abline(h=15, col="red")
abline(h=35, col="green")
text(10, 7, "This text and horizontal lines will disappear after next add_TA is called", col="blue", cex=0.8, adj = c(0,0))
# run the code up to this point (including text(...
# see how horizontal lines drawn with abline and text is displayed correctly
# now run the last line by adding additional TA and you will see that lines and text disappears
add_TA(DVI(Cl(SPY))$dvi)
Is this intended behavior? | 0 | [
2,
1513,
29,
9836,
38,
13670,
3547,
1,
536,
17,
1795,
1,
8231,
13,
8,
1560,
17,
1854,
10866,
75,
328,
3547,
1,
536,
25,
227,
800,
3726,
3726,
31,
589,
568,
78,
1795,
1,
8231,
17,
3547,
1,
536,
1450,
21,
865,
9,
32,
693,
253,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Menu Items Move Around On Hover
===
I recently submitted another question, which was answered on creating a menu like the one at [RackSpace](http://rackspace.com) and when I use the code as below:
== CSS ==
.main > li{
float: left;
padding: 5px;
}
.sub li {
height: 30px;
background-color: black;
width: 1000px;
display: none;
}
.main > li:hover .sub li {
display: block;
}
== HTML ==
<ul class="main">
<li>
Hosting
<ul class="sub">
<li>cPanel Hosting Solutions</li>
<li>cPanel Reseller Solutions</li>
<li>Plesk Hosting Solutions</li>
<li>Plesk Reseller Solutions</li>
</ul>
</li>
<li>
Menu 2
<ul class="sub">
<li>Lorem</li>
<li>Ipsum</li>
<li>Dolor</li>
<li>Sit</li>
<li>Amet</li>
</ul>
</li>
<li>
Menu 3
<ul class="sub">
<li>Lorem</li>
<li>Ipsum</li>
<li>Dolor</li>
<li>Sit</li>
<li>Amet</li>
</ul>
</li>
<li>
Menu 4
<ul class="sub">
<li>Lorem</li>
<li>Ipsum</li>
<li>Dolor</li>
<li>Sit</li>
<li>Amet</li>
</ul>
</li>
</ul>
This of course needs styling, but my main point is that when hovering over a menu item, it seems to move the following items over. How can I make it not move the following menu items over? An example of what I mean can be found [at this link](http://i.imgur.com/YbUY3.png).
Thanks in advance,
Scott
| 0 | [
2,
11379,
3755,
780,
140,
27,
21350,
800,
3726,
3726,
31,
1989,
7368,
226,
1301,
15,
56,
23,
3094,
27,
2936,
21,
11379,
101,
14,
53,
35,
636,
13135,
5582,
500,
5,
21127,
6903,
13135,
5582,
9,
960,
6,
17,
76,
31,
275,
14,
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... |
Why isn't `setModel()` defined in my goog.ui.Component?
===
I made a subclass of goog.ui.Component:
/**
* Renders the bottom pane.
* @param {!myapp.Entity} entity An entity.
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper.
* @constructor
* @extends {goog.ui.Component}
*/
myapp.BottomPane = function(entity, opt_domHelper) {
goog.base(this, opt_domHelper);
this.setModel(entity);
}
goog.inherits(myapp.BottomPane, goog.ui.Component);
However, when I run my javascript, Chrome Console notes that `Uncaught TypeError: Object #<Object> has no method 'setModel'`. I set a breakpoint and realized that, indeed, my `myapp.BottomPane` instance lacked a `setModel` method in the prototype chain. This is odd since the documentation notes that all components have this method: http://closure-library.googlecode.com/svn/docs/class_goog_ui_Component.html
Why does my `goog.ui.Component` lack a `setModel` method? I know that the call to `goog.base(this, opt_domHelper);` is working because my object has a DOM helper. | 0 | [
2,
483,
2532,
22,
38,
13,
1,
3554,
13998,
5,
6,
1,
2811,
19,
51,
162,
5598,
9,
5661,
9,
11103,
218,
2291,
60,
800,
3726,
3726,
31,
117,
21,
972,
1898,
16,
162,
5598,
9,
5661,
9,
11103,
218,
2291,
45,
13,
118,
1409,
1637,
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... |
Powershell V2 assigning returned value from query to a variable return NULL
===
I think Im doing something wrong,, Im trying to query a Postgres DB from Powershell 2, using ODBC,, the DB returns a string like this if I query using PGADMIN (Postgres GUI):
0/164DAAB0
Thats a HEX with two extra characters at the beginning.
I need to extract the HEX.
When I do and assign it to a variable, and I print the variable, I get nothing, empty.
I tried on a computer with Powershell V3 and it works just fine, but I need to make it work on PS2.
I hope somebody spot my problem, I think there is a different/better way to do this so my variable gets the string returned by the query.
The code is :
$MasterDBIP = "172.16.50.20";
$MasterDBPort = "5432";
$MasterDB = "database1";
$MasterUid = "postgres";
$MasterPassword = "postgres";
$MasterMasterDBConnectionString = "Driver={PostgreSQL Unicode(x64)};Server=$MasterDBIP;Port=$MasterDBPort;Database=$MasterDB;Uid=$MasterUid;Pwd=$MasterPassword;"
$MasterDBConn = New-Object System.Data.Odbc.OdbcConnection
$MasterDBConn.ConnectionString = $MasterMasterDBConnectionString;
$MasterDBConn.Open();
$MasterDBCmdCurr = $MasterDBConn.CreateCommand();
$MasterDBCmdCurr.CommandText = "SELECT pg_last_xlog_receive_location();";
$MasterDBResultCurr = $MasterDBCmdCurr.ExecuteReader();
$MasterUserTableCurr=New-Object system.data.datatable
$MasterUserTableCurr.load($MasterDBResultCurr)
[string]$MasterStringValueCurr = $MasterUserTableCurr.pg_last_xlog_receive_location;
$MasterDBConn.Close();
$MasterStringValueCurr;
exit (0) | 0 | [
2,
414,
15984,
566,
135,
13952,
68,
587,
1923,
37,
25597,
20,
21,
7612,
788,
16203,
800,
3726,
3726,
31,
277,
797,
845,
301,
1389,
15,
15,
797,
749,
20,
25597,
21,
678,
6879,
18,
13,
9007,
37,
414,
15984,
172,
15,
568,
12340,
72... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Passing php form data back to web page
===
I know this is very basic but I am new to PHP. I have a simple embedded form on my page which, when submitted, invokes PHP code to access mySQL database (this is working OK). What I want to do is
1. pass some of the database data back to my page and display it.
2. disable (lock) some of my page elements until after the form has been submitted and unlock them depending on the returned data values.
Can someone please give me a solution. I have trolled through many possibilities but not found one yet that suits.
Thanks in advance.
George | 1 | [
2,
2848,
13,
26120,
505,
1054,
97,
20,
2741,
2478,
800,
3726,
3726,
31,
143,
48,
25,
253,
2125,
47,
31,
589,
78,
20,
13,
26120,
9,
31,
57,
21,
1935,
12138,
505,
27,
51,
2478,
56,
15,
76,
7368,
15,
28371,
18,
13,
26120,
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... |
scrolling a div with youtube video under another div
===
I have my HTML as below
<html>
<body>
<div id="d1"
style="height:100px;width:100%;background-color:#CFE;position:fixed;z-index:1000">
</div>
<div id="d2" style="padding-top:110px;z-index:-1000;background-color:#CCE;height:1000px;">
<iframe width="420" height="315"
src="http://www.youtube.com/embed/XZxo7IznQnk" frameborder="0" allowfullscreen></iframe>
</div>
</body>
</html>
Top div (d1) is fixed. while scrolling bottom div(d2) goes behind top div. But youtube video
stay on top.
I want to put it behind top div. Is there a way?? | 0 | [
2,
13,
28166,
21,
13,
12916,
29,
7330,
763,
131,
226,
13,
12916,
800,
3726,
3726,
31,
57,
51,
13,
15895,
28,
1021,
13,
1,
15895,
1,
13,
1,
9760,
1,
13,
1,
12916,
4924,
3726,
7,
43,
165,
7,
1034,
3726,
7,
252,
7748,
45,
4031,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
OpenMP: complete first iteration first
===
I have a C parallel for loop which includes a line like
b[i] = b[0];
so I need to complete the first iteration before starting any other iteration. Is there a clause which enforces such behavior?
| 0 | [
2,
368,
2554,
45,
1279,
64,
23534,
64,
800,
3726,
3726,
31,
57,
21,
272,
3821,
26,
5293,
56,
1103,
21,
293,
101,
334,
2558,
49,
500,
800,
334,
2558,
387,
12660,
86,
31,
376,
20,
1279,
14,
64,
23534,
115,
1422,
186,
89,
23534,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.