unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Cakephp edit.ctp not populating input boxes despite existing in $this->data
===
I'm struggling to find the answer to this. I have only been using CakePHP for a month and I've hit a problem. It's something I can fix by manually inserting the values but I expected my data to pre-populate. Here is what is happening:
The Model is Product which hasMany 'Dynamicprice'
I'm testing a product with the id of 7 (/products/edit/7).
the first part of my edit function is:
public function edit($id = null) {
$this->Product->id = $id;
if (!$this->Product->exists()) {
throw new NotFoundException('Invalid Product');
}
if ($this->request->is('get')){
$this->request->data = $this->Product->read();
}
debug($this->request->data);
//other stuff setting vars for drop-down lists
}
the
debug($this->request->data);
gives me the following:
array(
'Product' => array(
'id' => '7',
'category_id' => '70',
'name' => 'Full Test',
'description' => 'This is to test all features',
'price' => '0.00',
'aesthetic' => true,
'image' => '',
'price_structure' => '2',
'suggest_for' => '',
'created' => '2012-06-28 12:49:06',
'modified' => '2012-06-28 12:49:06'
),
'Dynamicprice' => array(
(int) 0 => array(
'id' => '15',
'product_id' => '7',
'drop' => '600',
'prices' => '6000:9.99, 12000:18.99 '
),
(int) 1 => array(
'id' => '16',
'product_id' => '7',
'drop' => '1200',
'prices' => '6000:19.99, 12000:28.99 '
),
(int) 2 => array(
'id' => '17',
'product_id' => '7',
'drop' => '2400',
'prices' => '6000:29.99, 12000:38.99 '
)
)
)
However, whilst everything in ['Product'] pre-populates the ['Dynamicprice'] array does not pre-populate the following:
<?php
echo $this->Form->input('Dynamicprices.0.id');
echo $this->Form->input('Dynamicprices.0.drop', array('label' => 'Drop 1 (mm). Enter "0" for "Any Drop"'));
echo $this->Form->input('Dynamicprices.0.prices', array('label' => 'Prices 1', 'type' => 'textarea', 'rel' => 'dynamic'));
?><hr><?php
echo $this->Form->input('Dynamicprices.1.id');
echo $this->Form->input('Dynamicprices.1.drop', array('label' => 'Drop 2 (mm).'));
echo $this->Form->input('Dynamicprices.1.prices', array('label' => 'Prices 2', 'type' => 'textarea', 'rel' => 'dynamic'));
?><hr><?php
echo $this->Form->input('Dynamicprices.1.id');
echo $this->Form->input('Dynamicprices.2.drop', array('label' => 'Drop 3 (mm).'));
echo $this->Form->input('Dynamicprices.2.prices', array('label' => 'Prices 3', 'type' => 'textarea', 'rel' => 'dynamic'));
?>
Am I right to expect them to populate automatically and if so what have I done wrong?
I have created /Model/Dynamicprice.php with the following just to make sure:
class Dynamicprice extends AppModel {
public $name = 'Dynamicprice';
public $belongsTo = 'Product';
But as I expected it didn't change anything. | 0 | [
2,
8390,
26120,
9392,
9,
4812,
306,
52,
1675,
10038,
6367,
8120,
869,
3149,
19,
5579,
1565,
8,
1,
18768,
800,
3726,
3726,
31,
22,
79,
7587,
20,
477,
14,
1623,
20,
48,
9,
31,
57,
104,
74,
568,
8390,
26120,
26,
21,
1617,
17,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python tuple operations and count
===
I have the following tuple.I want to build a string which outputs as stated in output.I want count all the elements corresponding to 'a' i.e, how many k1 occured w.r.t 'a' and so on .What is the easiest way to do this
a=[('a','k1'),('b','k2'),('a','k2'),('a','k1'),('b','k2'),('a','k1'),('b','k2'),('c','k3'),('c','k4')]
Output should be in a string output=""
a k1 3
a k2 1
b k1 1
b k2 3
c k3 1
c k4 1 | 0 | [
2,
20059,
2289,
5106,
1311,
17,
2468,
800,
3726,
3726,
31,
57,
14,
249,
2289,
5106,
9,
49,
259,
20,
1895,
21,
3724,
56,
5196,
18,
28,
1240,
19,
5196,
9,
49,
259,
2468,
65,
14,
2065,
7265,
20,
13,
22,
58,
22,
31,
9,
62,
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... |
parse XML file with javascript in variable on click
===
I am trying to load a different xml file everytime a link is clicked, based on its href.
I have the following in head:
JAVASCRIPT
window.onload=function() {
loadXMLDoc("papers.xml"); // loads the default xml file so that page is not empty
}
function scanForXML(){
var extLinks=document.getElementById('results_list').getElementsByTagName('a');
for (i=0; i<extLinks.length; i++) {
extLinks[i].onclick=function getName()
{
var fileName=this.getAttribute('href');
loadXMLDoc(fileName);
return false;
}
}
}
HTML
<ol id="results_list">
<li> <a class="tooltip" href="paper2.xml"> Teaching with Tablet PC's </a></li>
<li> <a href="paper3.xml" class="tooltip"> Tablet PC’s as Instructional Tools </a></li>
</ol>
The onclick event works, I get the href value but the new xmlFile does not get loaded.
Any ideas why?
ps: no jquery plz, cannot use that. trying to learn better basic javascript
The Javascript load code - by the way it does not work in chrome and opera - but works the default xml file gets loaded in safari
Code:
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET",dname,false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
}
Thanks!
K | 0 | [
2,
2017,
870,
23504,
3893,
29,
8247,
8741,
19,
7612,
27,
10840,
800,
3726,
3726,
31,
589,
749,
20,
6305,
21,
421,
23504,
3893,
352,
891,
21,
3508,
25,
15802,
15,
432,
27,
82,
746,
14057,
9,
31,
57,
14,
249,
19,
157,
45,
8247,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 Xcode Instruments to print objects from memory address
===
Is it possible to get more meaningful information on a leaking object in instruments? At the moment Instruments will tell me the type (`NSArray`) and the memory address (`0x123456`). Normally if I was debugging with LLDB I'd do a `po 0x123456` to get a bit more info on the instance of the object. Is there any equivalent in Instruments, or am I approaching this in the wrong way? Any advice would very welcome! | 0 | [
2,
568,
993,
9375,
4507,
20,
4793,
3916,
37,
1912,
3218,
800,
3726,
3726,
25,
32,
938,
20,
164,
91,
16912,
676,
27,
21,
26334,
3095,
19,
4507,
60,
35,
14,
688,
4507,
129,
494,
55,
14,
1001,
13,
5,
1,
103,
4964,
2787,
1,
6,
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... |
Top most class of ruby 1.8.7 and 1.9.1
===
This is my interview questions.
Which one is the top most class of ruby 1.8.7 and ruby 1.9.1?
Thanks. | 1 | [
2,
371,
127,
718,
16,
10811,
137,
9,
457,
9,
465,
17,
137,
9,
518,
9,
165,
800,
3726,
3726,
48,
25,
51,
2421,
2346,
9,
56,
53,
25,
14,
371,
127,
718,
16,
10811,
137,
9,
457,
9,
465,
17,
10811,
137,
9,
518,
9,
165,
60,
36... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How Change Telerik RadGrid Column's Property Server-Side
===
I have a TemplateColumn in my telerik radgird like below :
<telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn_Commands column"
HeaderText="Commands" UniqueName="TemplateColumn_Commands"
AllowFiltering="False" Display="False">
<ItemTemplate>
<asp:LinkButton ID="lbDelete" runat="server" CommandName="Delete" CausesValidation="False"
CssClass="lb">Delete</asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</telerik:GridTemplateColumn>
i want to change display property of this column server-side.
which event should i use and how can i do that?
thanks in advance
| 0 | [
2,
184,
753,
4338,
6639,
4944,
16375,
4698,
22,
18,
1354,
8128,
8,
1416,
800,
3726,
3726,
31,
57,
21,
22894,
716,
4404,
103,
19,
51,
4338,
6639,
4944,
16791,
43,
101,
1021,
13,
45,
13,
1,
14305,
6639,
45,
16375,
9577,
6554,
716,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Prefix for ambigious fieldnames on joining tables in MySQL?
===
Is there an MySQL-Way to set a prefix for fieldnames?
An Example:
Table 'foo' fields: id, parent_id, name, age
SELECT foo1.*, foo2.* FROM foo AS foo1
JOIN foo AS foo2 ON foo1.id=foo2.parent_id;
In this case I know all fields and could leave out the '*', but in reality I do not know which field in there. Any ideas? | 0 | [
2,
14315,
26,
589,
6407,
5907,
575,
7259,
18,
27,
3765,
7484,
19,
51,
18,
22402,
60,
800,
3726,
3726,
25,
80,
40,
51,
18,
22402,
8,
1443,
20,
309,
21,
14315,
26,
575,
7259,
18,
60,
40,
823,
45,
859,
13,
22,
4120,
111,
22,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is a good standard size for uploaded photos?
===
I'm building a little image hosting site and I'm wondering if there are any best practices regarding image resizing?
Longest side 1024px? 960px?
Thanks! | 0 | [
2,
98,
25,
21,
254,
1236,
1072,
26,
23782,
7064,
60,
800,
3726,
3726,
31,
22,
79,
353,
21,
265,
1961,
10637,
689,
17,
31,
22,
79,
5712,
100,
80,
50,
186,
246,
5242,
3467,
1961,
10719,
3335,
60,
5646,
270,
332,
1996,
306,
396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
How to process parallel HTTP request in go programming language?
===
I was playing with the go HTTP package. I wanted to process request in parallel as I do in java. But I couldn't.
I created a simple web server, put a sleep in the middle and realized that go process one request per time, so if I did a refresh on my browser, the process of the first request has to finish until the second request start processing, here is the code:
func main(){
//Process the http commands
fmt.Printf("Starting http Server ... ")
http.Handle("/", http.HandlerFunc(sayHello))
err := http.ListenAndServe("0.0.0.0:8080", nil)
if err != nil {
fmt.Printf("ListenAndServe Error",err)
}
}
func sayHello(c http.ResponseWriter, req *http.Request) {
fmt.Printf("New Request\n")
processRequest(c, req)
}
func processRequest(w http.ResponseWriter, req *http.Request){
time.Sleep(time.Second*3)
w.Write([]byte("Go Say’s Hello(Via http)"))
fmt.Println("End")
}
As I wanted to process both request in parallel I added the "go" command before "processRequest(c, req)" in "sayHello" function in order to process each request in a different gorutine. But... it doesn't work.... I don't know why. I know that both request are processed because I see the printed line at the console but the browser keep waiting for information..... and don't show my response.
So... my questions,
Does each request create a new http.ResponseWriter? or it's use the same?
Do you know how to indicate the web server to process each request with different threads?
Any help is welcomed....
Fersca | 0 | [
2,
184,
20,
953,
3821,
7775,
3772,
19,
162,
3143,
816,
60,
800,
3726,
3726,
31,
23,
791,
29,
14,
162,
7775,
6030,
9,
31,
417,
20,
953,
3772,
19,
3821,
28,
31,
107,
19,
8247,
9,
47,
31,
711,
22,
38,
9,
31,
679,
21,
1935,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I compile an existing C program for Android using NDK?
===
I am writing an Android app to test network performance, and I want to use iPerf in the app. I can find binary iPerf files already compiled for Android (and then I can run iPerf on the phone and collect its output) but I'm interested in compiling the files myself.
Here, someone presents scripts that can be used to compile the program:
http://sourceforge.net/tracker/index.php?func=detail&aid=3533374&group_id=128336&atid=711373
I know that it requires the NDK but I don't know where to start. Are there any good resources or advice that can help guide me to compiling this on my own (on Windows, but I also have Cygwin). I know C and how to use GCC on linux, but I'm not sure where to start here.
Thanks for any help in advance! | 0 | [
2,
184,
107,
31,
26561,
40,
3149,
272,
625,
26,
13005,
568,
13,
706,
197,
60,
800,
3726,
3726,
31,
589,
1174,
40,
13005,
4865,
20,
1289,
982,
956,
15,
17,
31,
259,
20,
275,
31,
1432,
410,
19,
14,
4865,
9,
31,
92,
477,
14171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 encrypt SQLite (seeded/otherwise) database when used with RestKit
===
I am using RestKit to perform database seeding, as well as perform local persistence. The related Core Data and Object Mapping are working as expected. However, I need to encrypt the local database now. I know that the following options are generally used to protect SQLite database
1. Use some kind of a MDM/Profile Manager with Lion Server, to secure application data (remote wipe etc.)
2. Use SQLCipher to encrypt database
However, SQLCipher does not work with RestKit. Anybody been in a situation like this, anything else to encrypt the local SQLite? I would like to continue to use RestKit. | 0 | [
2,
184,
20,
1957,
11435,
4444,
10601,
13,
5,
14611,
118,
9539,
10474,
6,
6018,
76,
147,
29,
760,
13703,
800,
3726,
3726,
31,
589,
568,
760,
13703,
20,
2985,
6018,
5134,
68,
15,
28,
134,
28,
2985,
375,
28584,
9,
14,
1597,
2884,
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... |
Error with php redirect
===
I am following a tutorial and I have everything 100% correct. Basically I am creating a basic CMS. In this section of the CMS I am uploading some data from a form to my database.
Currently everything works except for the page re-direct. So when I fill in my form everything gets added into the database perfectly. It simply does not redirect to the required page. I also get no errors. I have also tried making the redirect a website just to make sure it isn't my page path.
When i submit the form, instead of redirecting it stays on the .php page that is handling the upload.
Here is my code:
<?php require_once("includes/connections.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php
$menu_name = $_POST['menu_name'];
$position = $_POST['position'];
$visible = $_POST['visible'];
?>
<?php
$query = "INSERT INTO phpPractice (
menu_name, position, visible
) VALUES (
'{$menu_name}', {$position}, {$visible}
)";
if(mysql_query($query, $connect)) {
//echo"<p> did send </p>";
//header('Location: content.php');
header("Location: content.php");
exit;
} else {
echo "<p>Subject not created</p>";
echo "<p>" . mysql_error() . "</p>";
}
?>
<?php mysql_close($connect); ?>
| 0 | [
2,
7019,
29,
13,
26120,
302,
14706,
800,
3726,
3726,
31,
589,
249,
21,
29724,
17,
31,
57,
796,
12849,
4456,
9,
11374,
31,
589,
2936,
21,
2125,
2390,
18,
9,
19,
48,
1050,
16,
14,
2390,
18,
31,
589,
71,
16866,
109,
1054,
37,
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... |
Magento payment options do not show up on first load
===
I am setting up an instance of Magento Enterprise (v 1.11.2) and currently I have authorize.net and paypal configured as accepted payment options.
The first time a user progresses through checkout to the payment screen the authorize.net payment option is not listed on the page or even in the source. However, when I refresh the page it will show up. This only happens on the first time through. Could it be session related in some way?
I am unsure of where to being to diagnose this bug. Does anyone have any suggestions? | 0 | [
2,
4723,
17050,
7582,
6368,
107,
52,
298,
71,
27,
64,
6305,
800,
3726,
3726,
31,
589,
2697,
71,
40,
4851,
16,
4723,
17050,
6002,
13,
5,
710,
137,
9,
1306,
9,
135,
6,
17,
871,
31,
57,
1314,
2952,
9,
2328,
17,
1372,
6720,
28895,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Delete all numbers from a text using PHP or JavaScript
===
I have a .txt file that contains a list of names and some numbers.
For example,
----------
AARON 0.24 350,151 77
ABDUL 0.007 10,213 831
ABE 0.006 8,754 854
----------
and on...
So, I need to delete ALL numbers from that list using PHP or JavaScript with returning words from the list.
P.S.: I'm just learning these languages so, please, answer concretely- with full code and with its place.
| 0 | [
2,
27448,
65,
2116,
37,
21,
1854,
568,
13,
26120,
54,
8247,
8741,
800,
3726,
3726,
31,
57,
21,
13,
9,
38,
396,
38,
3893,
30,
1588,
21,
968,
16,
1817,
17,
109,
2116,
9,
26,
823,
15,
13,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
618... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Modeling a 2:n relationship effectively in Rails
===
Here's the what I've got:
I have a model Match and a model Team. A Match has home_team and away_team. In fact it's a 2:n relationship.
class Team < ActiveRecord::Base
has_many :home_matches, :class_name => 'Match', :foreign_key => 'home_team_id'
has_many :away_matches, :class_name => 'Match', :foreign_key => 'away_team_id'
public
def matches
return home_matches + away_matches
end
end
and
class Match < ActiveRecord::Base
attr_accessible :away_team_id, :home_team_id
belongs_to :home_team, :class_name => 'Team', :foreign_key => 'home_team_id'
belongs_to :away_team, :class_name => 'Team', :foreign_key => 'away_team_id'
end
Effectively I can now call Team.find(2).matches and get all away and home matches. But **what I don't like is that it needs two SQL queries instead of one**:
SELECT `matches`.* FROM `matches` WHERE `matches`.`home_team_id` = 2
SELECT `matches`.* FROM `matches` WHERE `matches`.`away_team_id` = 2
How can I get Rails to use this query?
SELECT `matches`.* FROM `matches` WHERE `matches`.`home_team_id` = 2 OR `matches`.`away_team_id` = 2
The other way around causes the same headache; If I define a method `team` that merges `home_team` and `away_team` I query the DB two times where only one query is necessary. | 0 | [
2,
12807,
21,
4274,
103,
1429,
5463,
19,
2240,
18,
800,
3726,
3726,
235,
22,
18,
14,
98,
31,
22,
195,
330,
45,
31,
57,
21,
1061,
730,
17,
21,
1061,
173,
9,
21,
730,
63,
213,
1,
6575,
17,
229,
1,
6575,
9,
19,
837,
32,
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... |
Update textbox value in asp page through WCF service from console application
===
I have a c# console application scheduled to run on a Win 2003 server reading values such as disk space, cpu usage etc.
Now I want to display these values online or real-time, on an aspx page.
This my (non-working) attempt so far:
The WCF service:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace ServerMonitoring
{
public class Service1 : IService1
{
public void InsertDataValues(DataValues server)
{
FreeDiskSpace = server.FreeDiskSpace;
Data.FreeDiskSpace = FreeDiskSpace;
}
[DataMember]
public decimal FreeDiskSpace
{
get { return Data.FreeDiskSpace; }
set { Data.FreeDiskSpace = value; }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace ServerMonitoring
{
[ServiceContract]
public interface IService1
{
[OperationContract]
void InsertDataValues(DataValues server);
}
[DataContract]
public class DataValues
{
[DataMember]
public decimal FreeDiskSpace;
/*
[DataMember]
public decimal TotalDiskSpace;
*/
}
}
Try to update textbox from Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ServerMonitoring
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Attributes.Add("onchange", "DefaultValue();");
HiddenFieldFreeDiskSpace.Value = Data.FreeDiskSpace.ToString();
}
}
}
Default.aspx:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="ServerMonitoring._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="head">
<script type="text/javascript">
function DefaultValue() {
var data = $('#<%=HiddenFieldFreeDiskSpace.ClientID%>').val();
var txt1 = document.getElementById("TextBox1");
txt1.setAttribute("value", data);
}
</script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<div class="extra-wide-column">
<h2>
FIC Server Monitoring Services
</h2>
<br />
<br />
<br />
<h3>System</h3>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:HiddenField runat="server" ID="HiddenFieldFreeDiskSpace" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
The value to be written to the textbox is coming from my console app with a reference to my WCF service
static void UpdateList(string columnName, decimal diskSpaceValue)
{
Service1 serv = new Service1();
DataValues dv = new DataValues();
dv.FreeDiskSpace = diskSpaceValue;
serv.InsertDataValues(dv);
}
However, the value is not sent to the asp page
BR,
Peer
| 0 | [
2,
11100,
1854,
5309,
1923,
19,
28,
306,
2478,
120,
11801,
410,
365,
37,
8650,
3010,
800,
3726,
3726,
31,
57,
21,
272,
5910,
8650,
3010,
3758,
20,
485,
27,
21,
628,
973,
8128,
1876,
4070,
145,
28,
8582,
726,
15,
17578,
7514,
2722,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
NSLocale - finding CountryCode and then using this to deploy code
===
I am stumped as to why this code isn't working as per the comment below:
NSString *countryCode = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode];
NSLog(@"Country Code: %@", countryCode);
if (countryCode == @"US") {
NSLog(@"Country is USA"); // Does not execute since the if does not pass
}
The locale is en_US therefore the country code is US. Everything is correct on that part of things. What am I doing wrong, and how do I get "Country is USA" to display?
Thank you!
*Testing on iOS 5.1 and 6.0, same result* | 0 | [
2,
13,
2172,
15580,
62,
13,
8,
3007,
475,
9375,
17,
94,
568,
48,
20,
17617,
1797,
800,
3726,
3726,
31,
589,
15781,
69,
28,
20,
483,
48,
1797,
2532,
22,
38,
638,
28,
416,
14,
6484,
1021,
45,
13,
2172,
11130,
1637,
10741,
9375,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Disable button when clicked and make other buttons enabled
===
i have three buttons what is the best way to disable button when clicked and make other two button enabled
<Button Name="initialzeButton"
Width="50"
Height="25"
Margin="460,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Click="initialzeButton_Click"
Content="Start"
Cursor="Hand" />
<Button Name="uninitialzeButton"
Width="50"
Height="25"
Margin="0,0,64,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="uninitialzeButton_Click"
Content="Stop"
Cursor="Hand" />
<Button Name="loadButton"
Width="50"
Height="25"
Margin="0,0,9,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="loadButton_Click"
Content="Load"
Cursor="Hand" />
now i use this way in every button :(
private void uninitialzeButton_Click(object sender, RoutedEventArgs e)
{
this.uninitialzeButton.IsEnabled = false;
if (!this.initialzeButton.IsEnabled)
{
this.initialzeButton.IsEnabled = true;
}
if (!this.loadButton.IsEnabled)
{
this.loadButton.IsEnabled = true;
}
}
| 0 | [
2,
1460,
579,
5167,
76,
15802,
17,
233,
89,
12861,
9338,
800,
3726,
3726,
31,
57,
132,
12861,
98,
25,
14,
246,
161,
20,
1460,
579,
5167,
76,
15802,
17,
233,
89,
81,
5167,
9338,
13,
1,
811,
444,
204,
3726,
7,
27313,
1734,
811,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get SVG map using geoserver?
===
Is it possible to get SVG output from geoserver? I saw this [link][1] but I don't know what it is.
[1]: http://docs.geoserver.org/stable/en/user/webadmin/services/WMS.html | 0 | [
2,
184,
20,
164,
13,
18,
22955,
2942,
568,
6389,
10321,
106,
60,
800,
3726,
3726,
25,
32,
938,
20,
164,
13,
18,
22955,
5196,
37,
6389,
10321,
106,
60,
31,
441,
48,
636,
6258,
500,
2558,
165,
500,
47,
31,
221,
22,
38,
143,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
GB Widget is coming for ICS
===
I am using DatePicker widget in my application, I have set minSdk and targetsdk to 14 .
But i am getting GB style DatePicker. Am i missing something.
Thanks in advance. | 0 | [
2,
14857,
4807,
43,
3060,
25,
880,
26,
13,
8354,
800,
3726,
3726,
31,
589,
568,
1231,
16855,
106,
4807,
43,
3060,
19,
51,
3010,
15,
31,
57,
309,
4232,
18,
43,
197,
17,
7767,
43,
197,
20,
513,
13,
9,
47,
31,
589,
1017,
14857,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0... |
Array sort by date and month only (ignore year)
===
I have following festival array:
id = 1, Start_date = 2011-11-01 , End_date = 2016-12-31
[[1, 2011-11-01 , 2016-12-31],
[2, 2011-11-28 , 2016-12-31],
[3, 2011-10-01 , 2015-12-31],
[4, 2011-11-28 , 2021-12-31],
[5, 2010-11-15 , 2016-12-31],
[6, 2011-07-01 , 2017-12-31],
[7, 2012-02-01 , 2013-02-19],
[8, 2011-03-21 , 2015-04-30],
[9, 2012-03-01 , 2016-03-20]]
I need to sort this by 'start_date' start from current date but ignore year here (use only month and day).
Actually these are festival's start dates and end dates. I need to show running festivals first(order by: start_date) then upcoming festivals(order by: start_date separately).
For example:
festival A: start_date: 15-may - end_date:15-june
festival B: start_date: 01-june - end_date:20-june
festival C: start_date: 01-Oct - end_date:30-Oct
If today is 14-june then order should be A B C
if today is 16-june then order should be: B C A
and finally if today is 1-Feb then order should be: A B C
Thank you in advance for responses. | 0 | [
2,
7718,
2058,
34,
1231,
17,
1617,
104,
13,
5,
23565,
99,
159,
6,
800,
3726,
3726,
31,
57,
249,
874,
7718,
45,
4924,
800,
137,
15,
799,
1,
8209,
800,
542,
8,
1306,
8,
3026,
13,
15,
241,
1,
8209,
800,
690,
8,
918,
8,
3513,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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# test if variable assigned
===
I'm trying to code a Linq MinBy extension method
public static class Extensions
{
public static T MinBy<T>(this IEnumerable<T> source, Func<T,int> selector)
{
T min;
int? minKey = null;
foreach (var x in source)
{
var key = selector(x);
if (minKey == null || key < minKey)
{
minKey = key;
min = x;
}
}
if (minKey == null)
{
throw new ArgumentException("source should not be empty");
}
return min;
}
}
I think my logic is correct and readable. But I get a build error
> Use of unassigned local variable 'min'
What can I do about this? Can I test if the variable is assigned? | 0 | [
2,
272,
5910,
1289,
100,
7612,
2467,
800,
3726,
3726,
31,
22,
79,
749,
20,
1797,
21,
6294,
1251,
4232,
779,
3896,
2109,
317,
12038,
718,
17529,
13,
1,
317,
12038,
13,
38,
4232,
779,
1,
38,
1,
5,
1565,
13,
660,
6336,
106,
579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
thejit should refresh when receive portion of json
===
I need somehow to refresh my [thejit][1] library. when I load json for the first time
( tm.loadJSON(json_data_object)), it works as expected, but after the second time I receive kind of elements. See the picture below. ![enter image description here][2]
I have to see a new image according to my new json.
[1]: http://thejit.org/
[2]: http://i.stack.imgur.com/pkleb.png | 0 | [
2,
14,
13803,
378,
24905,
76,
2588,
2980,
16,
487,
528,
800,
3726,
3726,
31,
376,
3625,
20,
24905,
51,
636,
124,
13803,
500,
2558,
165,
500,
1248,
9,
76,
31,
6305,
487,
528,
26,
14,
64,
85,
13,
5,
13,
38,
79,
9,
8294,
728,
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... |
sending data from form to email and mysql
===
I've got problem with sending data from form to email. Code that I use is sending "Raport" and "Date" as a subject, but i need to have a Name and Surname of User as well.
It isn't sending "time" in the message. What should I change? Please help.
<?php
session_start();
if (!isset($_SESSION['username'])) {
header('Location: index.php');
}
$conn = mysql_connect ("localhost", "rzeczyjc_ext", "admin") or die (mysql_error ());
mysql_select_db ("rzeczyjc_ext") or die (mysql_error ());
$loggedinuser = $_SESSION['username'];
$query2 = "SELECT firstname, lastname FROM members, WHERE username = '$loggedinuser'";
$result = mysql_query($query2);
$rozpoczecie=$_POST['rozpoczecie'];
$zakonczenie=$_POST['zakonczenie'];
if ($rozpoczecie < $zakonczenie)
{
$q=mysql_query ("
INSERT INTO raport (pracownik,miejsce,data,rozpoczecie,zakonczenie,opis)
VALUES ('".$_SESSION['username']."','".$_POST['miejsce']."','".$_POST['data']."','".$_POST['rozpoczecie']."','".$_POST['zakonczenie']."','".$_POST['opis']."')
") or die ('{"success":"false"}');
$qu=mysql_query("UPDATE raport SET czas=zakonczenie-rozpoczecie SELECT czas FROM raport" ) ;
}
else {
echo ('{"success":"false"}');
}{
$to = "you@gmail.com";
$subject = "Raport ".$_POST['data']." - ".$_POST['firstname']." ".$_POST['lastname']."";
$message = "'".$_POST['czas']."'";
$from = "me@o2.pl";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
echo '{"success":"true"}';
}
else {
echo '{"success":"false"}';
}
$qqq=mysql_query("INSERT INTO time (czerwiec)
SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(czas))) time_sum
FROM raport
WHERE YEAR(data) = 2012 AND MONTH(data) = 6");
?> | 0 | [
2,
4907,
1054,
37,
505,
20,
8517,
17,
51,
18,
22402,
800,
3726,
3726,
31,
22,
195,
330,
1448,
29,
4907,
1054,
37,
505,
20,
8517,
9,
1797,
30,
31,
275,
25,
4907,
13,
7,
525,
1993,
7,
17,
13,
7,
8209,
7,
28,
21,
1550,
15,
47... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
AppEngine SNI https and Google Webmaster Tools
===
I am trying to include a https url hosted on AppEngine (with SNI) in a Chrome WebStore manifest.
When I try to to upload the .zip file, the Chrome Webstore complains, that I do not own the url.
So tried to add the url with WebMaster Tools. I am able to add the http url, but cannot verify the https url (It complains about not beeing able to reach the server. I am able to reach the https url from my browser without problems.) | 0 | [
2,
4865,
16847,
13,
18,
889,
7775,
18,
17,
8144,
2741,
4594,
4672,
800,
3726,
3726,
31,
589,
749,
20,
468,
21,
7775,
18,
287,
6362,
2812,
27,
4865,
16847,
13,
5,
1410,
13,
18,
889,
6,
19,
21,
13,
12985,
2741,
16828,
13160,
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... |
Custom tabs in jtextarea in java
===
How to set tab stops in jtextarea for different lengths,
first tab should stop 4
Second tab should stop at 20 (If i give tab from 4 it should stop at 20)
Third tab should stop at 30 (If i give tab from 0 it should stop at 30) | 0 | [
2,
5816,
6523,
18,
19,
487,
11969,
17760,
19,
8247,
800,
3726,
3726,
184,
20,
309,
6523,
6604,
19,
487,
11969,
17760,
26,
421,
13189,
15,
64,
6523,
378,
747,
268,
153,
6523,
378,
747,
35,
434,
13,
5,
821,
31,
590,
6523,
37,
268,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 you use mysql to change database value, if it is past a date?
===
Ok, so lets say I have two column. DATE and STATUS.
When a new row comes in, STATUS has a default that gets set. Status has four values:
Not Answered,
Just Asked (Default),
Answered,
Closed
Lets say after 2 days, I would like it to automatically change to Not Answered, can I use mysql to do this? Or do I have to use some scripting language like php and run it daily?
Thanks!
| 0 | [
2,
92,
42,
275,
51,
18,
22402,
20,
753,
6018,
1923,
15,
100,
32,
25,
640,
21,
1231,
60,
800,
3726,
3726,
5854,
15,
86,
6884,
395,
31,
57,
81,
4698,
9,
1231,
17,
1782,
9,
76,
21,
78,
3131,
1624,
19,
15,
1782,
63,
21,
12838,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Migrate/map Wordpress.com blog to subdomain on a typo3 powered domain
===
I have a blog test.wordpress.com <br>
I have a website powered by Typo3 <www.mysite.com>
<br>I want to redirect(map) my wordpress blog to <www.blog.mysite.com>
<br>I want mysite.com to remain unchanged and my blog to be powered by <wordpress.com>
<br>Is there anything I need to do within typo3 for the migration to work? Do i need to create a subdomain in typo3 manually?
<br>Is following the wordpress advice - changing the c name suffice? | 0 | [
2,
22985,
118,
15022,
833,
5890,
9,
960,
8146,
20,
972,
537,
6232,
27,
21,
22550,
240,
7462,
4603,
800,
3726,
3726,
31,
57,
21,
8146,
1289,
9,
9587,
5890,
9,
960,
13,
1,
5145,
1,
31,
57,
21,
2271,
7462,
34,
22550,
240,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
average number of days using mysql
===
I'm trying to get the average number of days between when a user closes a ticket to when they open their "next" ticket. A sample of my mysql table is below. You will notice that Mike has created 3 tickets, 9 days apart (July1-July 10) and 5 days (July 10-July 15) apart, average is 7 days. I can't seem to figure out how to look for the last resolved date, anybody have any ideas?
This is what I have so far.
select Name, Created, Resolved, avg(datediff("Last Ticket Resolved", created) AS last_tket_open from MyTable where Name='Mike'
Name Created Resolved
Mike July 1 July 1
Jill July 2 July 3
Mike July 10 July 10
Harry July 11 July 11
Mike July 15 July 15
| 0 | [
2,
862,
234,
16,
509,
568,
51,
18,
22402,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
14,
862,
234,
16,
509,
128,
76,
21,
4155,
543,
18,
21,
6133,
20,
76,
59,
368,
66,
13,
7,
20021,
7,
6133,
9,
21,
5717,
16,
51,
51,
18,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get a div object on top
===
I'm using the following code
<?php
$link= $_SERVER['HTTP_HOST'];
echo "<div id='link' style='position: relative; margin: 60 auto; width: 70%; top: -10px;
height: 100%;'>{$link}";
?>
The code works fine but I have other content on the page. This makes the above code move my content down the page or up depending on how I set up the margin.
What I want to do is to have my echo text to appear over my content.
Any help would be appreciated. | 0 | [
2,
184,
20,
164,
21,
13,
12916,
3095,
27,
371,
800,
3726,
3726,
31,
22,
79,
568,
14,
249,
1797,
13,
1,
60,
26120,
5579,
6258,
3726,
5579,
1,
10321,
106,
2558,
22,
21127,
1,
11694,
22,
12660,
8117,
13,
7,
1,
12916,
4924,
3726,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Black bar behind the listview item which is being deleted - android
===
I am deleting an item through my dailogfragment from database and listview through database . I am able to delete the item from the database , from the listview , and able to refresh the list with the item deleted removed from the listview .
But the problem is i am getting some type of black bar ( background behind the deleted item ) immediately after deleting the item : http://i733.photobucket.com/albums/ww331/suntuu/Capture-1.png
in the image you could see my default background is white ( theme.holo.light) , but after deleting this black background pops out at the end .
When i am executing the listview fragment again , it goes away .
I am stuck with this for a very long time now . | 0 | [
2,
319,
748,
439,
14,
968,
4725,
9101,
56,
25,
142,
19584,
13,
8,
13005,
800,
3726,
3726,
31,
589,
121,
1336,
68,
40,
9101,
120,
51,
7655,
5567,
22133,
1130,
37,
6018,
17,
968,
4725,
120,
6018,
13,
9,
31,
589,
777,
20,
27448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Clustering and Bayes classifiers Matlab
===
So I am at a cross roads on what to do next, I set out to learn and apply some machine learning algorithms on a complicated dataset and I have now done this. My plan from the very beginning was to combine two possible classifiers in an attempt to make a multi-classification system.
But here is where I am stuck. I choose a clustering algoritm (Fuzzy C Means) and Naive Bayes as the two candidates for the MCS (Multi-Classifier System).
I can use both independantly to classify the data but I am struggling to combine the two in a meaningful way.
For instance the Fuzzy clustering catches almost all "Smurf" attacks except for usually **one** and I am not sure why it doesnt catch this **odd ball** but all I know is it doesnt. One of the clusters will be dominated by the smurf attacks and usualy I will find just one smurf in the other clusters. And here is where I run into the problem scenario, if I train the bayes classifier on all the different attack types (Smurf, normal, neptune... etc) and apply that to the remainder of the clusters in an attempt to find that last remaining smurf it will have a high false alarm rate.
Im not sure how to proceed, I dont want to take the other attacks out of the training set but I only want to train the bayes classifer to spot "Smurf" attacks. Atm it is trained to try and spot everything, and in this process I think (not sure) that the accuracy is dropped.
So this is my question when using the naive classifer, how would you get it to only look for smurf and categorise everything else as "Other".
rows = 1000;
columns = 6;
indX = randperm( size(fulldata,1) );
indX = indX(1:rows)';
data = fulldata(indX, indY)
indX1 = randperm( size(fulldata,1) );
indX1 = indX1(1:rows)';
%% apply normalization method to every cell
%data = zscore(data);
training_data = data;
target_class = labels(indX,:)
class = classify(test_data,training_data, target_class, 'diaglinear')
confusionmat(target_class,class)
What I was thinking was manually changing `target_class` from all the normal traffic and attacks that arent smurf to **other**. Then as I already know that FCM correctly classifys all but one smurf attack, I just have to use the bayes classifier on the remaainder clusters.
For instance:
**Cluster 1 = 500 smurf attacks** (repeating this step might shift the "majority" of smurf attacks from the 1000 samples into a different cluster so I have to check or iterate through the clusters for the biggest size, once found I can remove it from the bayes classifier stage)
Then I test the classifier on each remaining cluster (not sure how to do loops etc yet in matlab) so atm I have to manually pick them during the processing.
clusters = 4;
CM = colormap(jet(clusters));
options(1) = 12.0;
options(2) = 1000;
options(3) = 1e-10;
options(4) = 0;
[~,y] = max(U);
[centers, U, objFun] = fcm(data, clusters, options); % cluster 1000 sample data rows
training_data = newTrainingData(indX1,indY); % this is the numeric data
test_data = fulldata(indX(y==2),:); % this is cluster 2 from the FCM phase which will be classified.
target_class = labels(indX,:) % this is labels for the training_data, it only contains the smurf attacks while everything else is classed as other
class = classify(test_data,training_data, target_class, 'diaglinear')
confusionmat(target_class,class)
I then repeat the bayes classifier for each of the remaining clusters, looking for that one smurf attack.
My problem is what happens if it misclassifys an "other" attack as a smurf or doesnt find the one remaining smurf.
I feel kind of lost on a better way of doing it. I am in the process of trying to pick a good ratio of smurf attacks to "other" as I dont want to over-fit which was explained in a previous question [here](http://stackoverflow.com/questions/11554938/naive-classifier-matlab).
But this will take me some time as I dont yet know how to change/replace the existing labels from neptune, back, ipsweep, wareclient attacks to "other" in matlab so I cant yet test this theory out (will get there).
So my question is:
1) Is there a better method at finding that one elusive smurf attack.
2) How can I grep the target_class (labels) to replace everything that isnt smurf with "**other**"
**Note:**
It was my full ambition when I set out to classify "All" attacks but I think its rather full hearty so I zoned in to just trying to correctly classify one attack (Smurfs) and im trying to go from a 98% accuracy to 100%. | 0 | [
2,
7460,
68,
17,
899,
160,
718,
16292,
18,
4277,
9086,
800,
3726,
3726,
86,
31,
589,
35,
21,
919,
3956,
27,
98,
20,
107,
328,
15,
31,
309,
70,
20,
2484,
17,
5645,
109,
1940,
2477,
15935,
27,
21,
8343,
1054,
3554,
17,
31,
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... |
gtk window sometimes incompletely drawn
===
I created an undecorated window using python and GTK3 in which I place a titlebar, toolbar and iconview. I set all to be transparent and I draw the background and border of the main window with Cairo. However, sometimes when the window first loads, It is not completely drawn. It looks like the window was first drawn before the iconview is fully populated and the parent window is not full size, then is redraw at full size, but the first cairo border still shows through the background.!(go here to see screenshot: http://imgur.com/JgdZY ) This happens about 40% of the time I open the application, but it goes away as I move the mouse over the window (sometimes gradually, sometimes all at once). I've played with adding self.queue_draw() in different places, freeze_updates() and thaw_updates(), hiding the window and re-showing, but I can't seem to completely rid myself of this phenomena. Anyone have any clues?
Here's the relevant parts of the code:
class Drawer(Gtk.Window):
'''This class will parse a .desktop file and open a Drawer Window with its
quicklist contents
'''
__gtype_name__ = "Drawer"
def __init__(self, filename=None, addfile=[]):
Gtk.Window.__init__(self)
###Code to add iconview and other stuff here:
self.builddrawer()
#####
self.freeze_notify()
self.set_gravity(Gdk.Gravity.WEST)
self.set_decorated(False)
self.set_app_paintable(True)
self.connect("delete-event", Gtk.main_quit)
self.connect("key-press-event", self.handle_keypresses)
#Set up dragNdrop to add URIs to open drawer
self.connect("drag-motion", self.motion_cb)
self.connect("drag-drop", self.drop_cb)
self.connect("drag-data-received", self.got_data_cb)
self.drag_dest_set(0, [], 0)
#Format the drawer - not ideal would like to implement more unity
#like style that changes with theme
screen=self.get_screen()
self.set_visual(screen.get_rgba_visual())
css = Gtk.CssProvider()
#Want the drawer background and font to change with average of desktop background
self.BG_rgb= [int(i*COLOR_SCALING) for i in self.get_color() ]
if sum(self.BG_rgb)/3 > 175:
self.FONT_rgb=[0,0,0]
else:
self.FONT_rgb=[255,255,255]
css.load_from_data("""
.title { background-color: rgba(255, 255, 255, 0); color: rgba(%s,1);}
.iconview { background-color: rgba(255, 255, 255, 0); color: rgba(%s,1); font-size:%i}
.background2 { background-color: rgba(%s,0.7); }
""" % (str(self.FONT_rgb).strip('[]'),str(self.FONT_rgb).strip('[]'),FONTSIZE,str(self.BG_rgb).strip('[]')))
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), css,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
self.iconview.get_style_context().add_class('iconview')
self.title.get_style_context().add_class('title')
self.toolbar.get_style_context().add_class('title')
self.move(MARGIN, Gdk.Screen.height()/2)
self.thaw_notify()
self.show_all()
self.connect("draw", self.draw_window_cb)
..........
..........
def draw_window_cb(self, widget, cr):
#clear everything before we start painting
cr.set_source_rgba(0,0,0,0)
cr.set_operator(cairo.OPERATOR_SOURCE)
cr.paint()
w = Gtk.Widget.get_allocated_width(widget)
h = Gtk.Widget.get_allocated_height(widget)
offset=2
area = (offset, w-offset, offset, h-offset)
radius=10
draw_rounded(cr, area, radius)
r=float(self.BG_rgb[0])/255.
g=float(self.BG_rgb[1])/255.
b=float(self.BG_rgb[2])/255.
fr=float(self.FONT_rgb[0])/255.
fg=float(self.FONT_rgb[1])/255.
fb=float(self.FONT_rgb[2])/255.
cr.set_source_rgba(fr,fg,fb,1)
cr.set_line_width(2)
cr.stroke()
offset=3
area = (offset, w-offset, offset, h-offset)
draw_rounded(cr, area, radius)
cr.set_source_rgba(r,g,b,TRANSPARENCY)
cr.fill()
cr.set_operator(cairo.OPERATOR_OVER)
| 0 | [
2,
9509,
197,
1463,
1030,
14011,
102,
3160,
800,
3726,
3726,
31,
679,
40,
3968,
15283,
7432,
1463,
568,
20059,
17,
9509,
197,
240,
19,
56,
31,
209,
21,
581,
1850,
15,
5607,
1850,
17,
9801,
4725,
9,
31,
309,
65,
20,
44,
14862,
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... |
Error with src() command in R
===
Yesterday I posted [this question][1] on Stats Exchange and based on the response I got, I decided to do some analysis using R's src() function. It's part of the "sensitivity" package.
I installed the package with no trouble, and then tried the following command:
sens <- src(seminars, REV, rank=TRUE, nboot=100)
`sens` is a new variable to store the results of the test
`seminars` is a data frame that I imported from a CSV file using the `read.csv()` command
`REV` is the name of a variable/column in `seminars` and my desired response variable
When I ran the command, I got the following error:
Error in data.frame(Y = y, X) : object 'REV' not found
Any thoughts?
[1]: http://stats.stackexchange.com/questions/32582/interpreting-a-weak-model-proceeding-from-there | 0 | [
2,
7019,
29,
13,
18,
5453,
5,
6,
1202,
19,
761,
800,
3726,
3726,
7124,
31,
6054,
636,
1565,
1301,
500,
2558,
165,
500,
27,
12819,
18,
1950,
17,
432,
27,
14,
1627,
31,
330,
15,
31,
868,
20,
107,
109,
2495,
568,
761,
22,
18,
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... |
Local copies of CSS and .js files not working, yet remote linked copies are
===
I tried to copy local versions of remote .CSS and .js files in my .net application. However, upon running the application the local versions don't take. They only take if I link to them remotely:
What works:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>
<link href="Styles/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" />
What doesn't work:
<script src="Scripts/1.8.21-jquery-ui.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.8.21/themes/ui-lightness/jquery-ui.css" />
I just don't like relying on code outside of my control. And in addition this code is running interally in our network, so I wouldn't the app. to not work properly if the Internet is down.
Thanks | 0 | [
2,
375,
3298,
16,
272,
18,
18,
17,
13,
9,
728,
18,
6488,
52,
638,
15,
768,
5388,
4727,
3298,
50,
800,
3726,
3726,
31,
794,
20,
4344,
375,
3281,
16,
5388,
13,
9,
6824,
18,
17,
13,
9,
728,
18,
6488,
19,
51,
13,
9,
2328,
3010... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
alias_module doesnot work
===
In my httpd.conf file of my apache server(on windows7), I used <i>**LoadModule alias_module modules/mod_alias.so**</i>
And then I modified the httpd.conf with the following:
<IfModule alias_module><br/>
***Alias /b /blog***<br/>
ScriptAlias /cgi-bin/ "cgi-bin/"<br/>
</IfModule>
After I restarted the server and type the localhost/b in my address bar,however,it did not redirect to the localhost/blog.I don't konw why.Can you help me, Any help is greatly appreciated | 0 | [
2,
15794,
1,
19673,
62,
630,
1270,
170,
800,
3726,
3726,
19,
51,
7775,
43,
9,
14093,
3893,
16,
51,
17140,
8128,
5,
218,
1936,
465,
6,
15,
31,
147,
13,
1,
49,
1,
1409,
8294,
19673,
62,
15794,
1,
19673,
62,
17113,
118,
13670,
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... |
mingw32 showing undefined reference to all gtk functions
===
I am trying to compile the following code, base.c
#include <glib/gerror.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return(0);
}
/* example-end */
I compile it using
gcc -Wall base.c -o base `pkg-config --cflags --libs gtk+-2.0`
The message I get returned in MinGW is
C:\Users\Sunny\AppData\Local\Temp\cc4eIpLM.o:base.c:(.text+0x34): undefined reference to `gtk_init_abi_check`
`collect2: ld return 1 exit status`
I get the same message for `gtk_window_new`, `gtk_widget_show` and `gtk_main`
I have a feeling it could be to do with the following questions:
1) When compiling c programs with gtk where should I have them saved. In the mingw folder somewhere?
2) I current have this appended onto my system variables path: `C:\gtk\bin\;C:\msys\1.0\bin;C:\mingw\bin`
Is it correct?
3) mingw32 can not find the libraries. Is there something I should have done with them when I downloaded msys and mingw
Cheers.
| 0 | [
2,
12069,
499,
3125,
3187,
367,
13439,
2801,
20,
65,
9509,
197,
3719,
800,
3726,
3726,
31,
589,
749,
20,
26561,
14,
249,
1797,
15,
1000,
9,
150,
6926,
22640,
13,
1,
6441,
220,
118,
263,
29992,
9,
252,
1,
6926,
22640,
13,
1,
263,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 set up .vimrc
===
How do you set up a .vimrc file on Ubuntu?
This is not helping http://vim.wikia.com/wiki/Open_vimrc_file
1. Where do you create it?
2. Whats the fomat inside?
(I know the stuff I want to put in it, just dont know how) | 0 | [
2,
184,
107,
42,
309,
71,
13,
9,
1755,
79,
5453,
800,
3726,
3726,
184,
107,
42,
309,
71,
21,
13,
9,
1755,
79,
5453,
3893,
27,
287,
12968,
2473,
60,
48,
25,
52,
3713,
7775,
6903,
1755,
79,
9,
17375,
58,
9,
960,
118,
17375,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 pass variable from instance method into controller?
===
<p>I need to call need to call method for each user user(admin part), which has email parametr. It is function for paying in PayPal, but I can't use redirection in instances.
<p>Code from my view payments.erb:
% @users.each do |user| %>
<li>
<%= user.email %>
<%= link_to "Pay", user.pay(user.email) %>
</li>
<% end %>
Code of pay method
def pay email
//making post request to PayPal
//res = clnt.post(uri, data, header)
//if res.status ==200
//redirect_to PayPal
//else redirect_to :back
end
<p>How I can pass parametrs or how I can reorganize this all ?
So I need create action in pages controller ? Or I can use some after_call_pay function ? | 0 | [
2,
184,
20,
1477,
7612,
37,
4851,
2109,
77,
9919,
60,
800,
3726,
3726,
13,
1,
306,
1,
49,
376,
20,
645,
376,
20,
645,
2109,
26,
206,
4155,
4155,
5,
1283,
2160,
141,
6,
15,
56,
63,
8517,
2258,
5909,
139,
9,
32,
25,
1990,
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... |
SQL DB server closed connection
===
Im getting
> **I/O Error: DB server closed connection.**
while connecting to MS SQL server 2008 from java code .
----------
SQL server is in mixed mode.My connection string is
> **jdbc:jtds:sqlserver://machineName:1433;databaseName=DB;integratedSecurity=true**
| 0 | [
2,
4444,
255,
13,
9007,
8128,
827,
2760,
800,
3726,
3726,
797,
1017,
13,
1,
13,
1409,
49,
118,
111,
7019,
45,
13,
9007,
8128,
827,
2760,
9,
1409,
133,
6440,
20,
4235,
4444,
255,
8128,
570,
37,
8247,
1797,
13,
9,
13,
8,
8,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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: stack overflow error on EditText TextChangedListener
===
I get the StackOverflow error running this particular code:
litera.addTextChangedListener(new TextWatcher(){
public void afterTextChanged(Editable s) {}
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
public void onTextChanged(CharSequence s, int start, int before, int count){
String ghici = litera.getText().toString();
System.out.println(ghici);
litera.setText("");
}
});
I commented each line at a time and I found out that the culprit is the litera.setText(""); line, the others work normally. I've used it before and it baffles me why a particularly simple instruction causes such a bad error... The rest of the error messages are about "android.view.ViewGroup.addFocusables(ViewGroup.java:637)" and others, but I doubt they are conclusive.
What am I missing? | 0 | [
2,
13005,
45,
7566,
20285,
7019,
27,
9392,
11969,
1854,
16229,
43,
13891,
106,
800,
3726,
3726,
31,
164,
14,
7566,
2549,
9990,
7019,
946,
48,
1498,
1797,
45,
13,
12438,
58,
9,
14854,
11969,
16229,
43,
13891,
106,
5,
2681,
1854,
9054... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
A more complex selection
===
not so long ago i found out that you can do this in css ( the use of ">" ) :
#viewCounterFix > .hourMinSec > .hour > .devider ,
#viewCounterFix > .hourMinSec > .min > .devider ,
#viewCounterFix > .hourMinSec > .sec > .devider{
left: 24px;
}
Now , in the example above as you can see , i need the exact same thing and the only diference is .hour, .min, .sec .
I was wondering if there is a shorter way to do this ?
Maybe something like:
#viewCounterFix > .hourMinSec > [.sec or .min or .hour] > .devider{
left: 24px;
}
So does such syntax exist ? | 0 | [
2,
21,
91,
1502,
3155,
800,
3726,
3726,
52,
86,
175,
1464,
31,
216,
70,
30,
42,
92,
107,
48,
19,
272,
18,
18,
13,
5,
14,
275,
16,
13,
7,
1,
7,
13,
6,
13,
45,
6926,
4725,
24416,
18594,
13,
1,
13,
9,
4754,
2160,
14332,
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... |
Hadoop yarn tasklevel logging with log4j
===
I have been trying to setup up Hadoop logging at the task level but with no success so far. I have modified log4j.properties and set many parameters to DEBUG level (log4j.logger.org.apache.hadoop.mapred.Task=DEBUG
log4j.logger.org.apache.hadoop.mapred.MapTask=DEBUG
log4j.logger.org.apache.hadoop.mapred.ReduceTask=DEBUG
and
log4j.logger.org.apache.hadoop = DEBUG
)
but I cant see any LOG.info or LOG.debug messages from the tasks being recorded. This is with yarn being enabled.
I am not sure what I have missed in the configurations to make it work properly. I think I should eventually get these messages in the nodemanage.out log file?
Thanks in advance,
Sherif | 0 | [
2,
41,
21709,
23419,
3005,
3906,
13,
13919,
29,
6738,
300,
728,
800,
3726,
3726,
31,
57,
74,
749,
20,
18161,
71,
41,
21709,
13,
13919,
35,
14,
3005,
662,
47,
29,
90,
1280,
86,
463,
9,
31,
57,
5372,
6738,
300,
728,
9,
10890,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Directshow Redering Preview With Capture Get Hanged
===
I have one Directshow application that captures Video and Save it to Mp4 file format, along with that... it also captures Closed-Caption for the video , which works fine...
Now i coded to preview the graph while capture is running, but after a few seconds my application stop responding and get hanged , can anybody have idea for such behaviour.
Thanks
Meghana | 0 | [
2,
1744,
9303,
402,
7882,
16121,
29,
3683,
164,
20093,
800,
3726,
3726,
31,
57,
53,
1744,
9303,
3010,
30,
3683,
18,
763,
17,
2079,
32,
20,
4628,
300,
3893,
2595,
15,
303,
29,
30,
9,
9,
9,
32,
67,
3683,
18,
827,
8,
4666,
3309,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 i get last cell where user ends dragging
===
I am dragging on cells.
using below code i am getting start cell text where i start dragging.
How i get last cell text where user stop dragging.
var firstcell= $('td.csstdhighlight:first').text();
| 0 | [
2,
184,
31,
164,
236,
1667,
113,
4155,
3451,
13052,
800,
3726,
3726,
31,
589,
13052,
27,
2934,
9,
568,
1021,
1797,
31,
589,
1017,
799,
1667,
1854,
113,
31,
799,
13052,
9,
184,
31,
164,
236,
1667,
1854,
113,
4155,
747,
13052,
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... |
Regex not applying my non capturing positive lookahead at the right position?
===
I have the line...
[2] = "2012-06-25 00:00:44 W3SVC1768084652 22.66.33.11 GET /errorpage/404.aspx/ 404;http://www.mydomain.com:8050/images/bg_vertical_menu_arrow.gif 8050 - 10.22.77.11 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+Trident/4.0;+GTB7.3;+SLCC2;+.NET+CLR+2.0.5...
And the regular expression...
(http://.*)(?=\s)
But I get:
http://www.mydomain.com:8050/images/bg_vertical_menu_arrow.gif 8050 - 10.22.77.11
As the match, which is annoying because there is clearly a whitespace after the .gif part and this is where the regex should stop no?
| 0 | [
2,
7953,
1706,
52,
11989,
51,
538,
12859,
2221,
361,
58,
1743,
35,
14,
193,
649,
60,
800,
3726,
3726,
31,
57,
14,
293,
9,
9,
9,
636,
135,
500,
800,
13,
7,
3212,
8,
3370,
8,
1811,
13,
2032,
45,
2032,
21286,
619,
240,
18,
8990... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
CentOS 5.8 dependencies on Python 2.4?
===
I have a CentOS 5.8 server and am planning to install a later version of python (presumably 2.7). I have heard a lot of mention that CentOS relies quite heavily on 2.4 for many admin features etc. I'm trying to determine exactly what these features are (and whether I would actually be using them) so that I can decide whether to update python through yum or build from source.
Can anyone give me some more detailed information on what CentOS features have dependencies on Python 2.4. | 0 | [
2,
5802,
759,
331,
9,
457,
29411,
27,
20059,
172,
9,
300,
60,
800,
3726,
3726,
31,
57,
21,
5802,
759,
331,
9,
457,
8128,
17,
589,
2334,
20,
16146,
21,
138,
615,
16,
20059,
13,
5,
11973,
723,
4801,
172,
9,
465,
6,
9,
31,
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... |
Suitable tree data structure
===
Which is the most suitable tree data structure to model a hierarchical (containment relationship) content. My language is bit informal as I don't have much theoretical background on these
1. Parent node can have multiple children.
2. Unique parent
3. Tree structure is rarely changed, os it is ok to recreate than add/rearrange nodes.
4. Two way traversal
5. mainly interested in, find parent, find children, find a node with a unique id
6. Every node has a unique id
7. There might be only hundreds of nodes in total, so performance may not be big influence
8. Persistence may be good to have, but not necessary as I plan to use it in memory after reading the data from DB.
My language of choice is go (golang), so available libraries are limited. Please give a recommendation without considering the language which best fit the above requirement.
http://godashboard.appspot.com/ lists some of the available tree libraries. Not sure about the quality and how active they are. I read god about
1. https://github.com/petar/GoLLRB
2. http://www.stathat.com/src/treap
Please let know any additional information required.
| 0 | [
2,
6445,
1541,
1054,
1411,
800,
3726,
3726,
56,
25,
14,
127,
6445,
1541,
1054,
1411,
20,
1061,
21,
21376,
4272,
13,
5,
1126,
5851,
1130,
1429,
6,
2331,
9,
51,
816,
25,
1142,
13140,
28,
31,
221,
22,
38,
57,
212,
9482,
2395,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET MVC Two file upload, different destinations
===
I'm trying to upload two different files into two different database fields on same form.
------------------------------------
reportid | name | image | template |
------------------------------------
this is the table look. So I want to upload files to image and template. My model:
public class Report
{
[Key]
public int ReportID { get; set; }
[Required]
public string Name { get; set; }
public byte[] Image { get; set; }
public byte[] Template { get; set; }
}
My Create method in controller:
public ActionResult Create(Report report, HttpPostedFileBase file, HttpPostedFileBase temp)
{
if (ModelState.IsValid)
{
if (file != null && file.ContentLength > 0)
{
using (MemoryStream ms = new MemoryStream())
{
file.InputStream.CopyTo(ms);
report.Image = ms.GetBuffer();
}
}
if (temp != null && temp.ContentLength > 0)
{
using (MemoryStream ms1 = new MemoryStream())
{
temp.InputStream.CopyTo(ms1);
report.Template = ms1.GetBuffer();
}
}
db.Reports.Add(report);
db.SaveChanges();
db.Configuration.ValidateOnSaveEnabled = true;
return RedirectToAction("Index");
}
And part of view concerning uploads:
<div class="editor-label">
<%:Html.LabelFor(model => model.Image) %>
</div>
<div class="editor-field">
<input type="file" id="fuImage" name="file" />
</div>
<div class="editor-label">
<%:Html.Label("Template") %>
</div>
<div class="editor-field">
<input type="file" id="temp" name="temp"/>
</div>
<p>
<input type="submit" value="Create" />
</p>
I'm quite stuck in this since I can not use `IEnumerable<HttpPostedFileBase> files` as a parameter in `Create` method because I need to save it in a different field, or can I? How should I approach this? Please help :S
Note: Image upload works fine. | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
81,
3893,
71,
8294,
15,
421,
16821,
800,
3726,
3726,
31,
22,
79,
749,
20,
71,
8294,
81,
421,
6488,
77,
81,
421,
6018,
2861,
27,
205,
505,
9,
13,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
IBOutlet declarations do not show up in ViewController Referencing Outlets
===
in the latest version of XCode I have had mixed success declaring and connecting IBOutlets in my UIViewController. The following code was able to work for me before but now for whatever reason does not:
in the header file;
#import <UIKit/UIKit.h>
@interface XYZViewController : UIViewController{
IBOutlet UILabel *result;
IBOutlet UItextField *user;
}
@property (strong, nonatomic) UIWindow *window;
-(IBAction)login:(id)sender;
@end
and in the implementation file:
#import "JUNAppDelegate.h"
@implementation XYZViewController;
@synthesize window = _window;
-(IBAction)login:(id)sender{
int x = [user.text intValue];
if(x==50){
result.text=@"Access Granted";
}
if (x!=50){
result.text=@"Access Denied";
}
}
This code was able to pull through before so I am wondering if it has something to do with my settings or some other non-code issue. This is really driving me crazy as it is so simple and has worked before yet I cannot get it to work again. Please help!
| 0 | [
2,
13,
4598,
1320,
1336,
7098,
18,
107,
52,
298,
71,
19,
1418,
12898,
1252,
13,
29254,
13071,
800,
3726,
3726,
19,
14,
5736,
615,
16,
993,
9375,
31,
57,
41,
2198,
1280,
15594,
17,
6440,
13,
4598,
1320,
11045,
19,
51,
13,
5661,
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... |
Rails on tc server documentation
===
I have asked this question [here](http://stackoverflow.com/questions/11352186/how-can-i-start-a-rails-application-on-a-tcserver). I understood the it needs the warble gem to run jruby and rails on a tc server. But i could not find any documentation on the net to go through and deploy a rails application on tc server. Any kind of documentation or link related to this will be very helpful to me.
Thank you | 0 | [
2,
2240,
18,
27,
13,
6668,
8128,
13945,
800,
3726,
3726,
31,
57,
411,
48,
1301,
636,
6836,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
11698,
17161,
18665,
12626,
1544,
8,
1245,
8,
49,
8,
13680,
8,
58,
8,
730... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
SQLite Boolean/Date DataTypes (or affinities)
===
I've done my research and from what I've read (SQLites data type weirdness aside) dates can be represented with integer, real and text and boolean can be represented with integer.
However I am going through an android book which has an example using DATE and want to know if maybe there are some modifications to Android's implementation of SQLite?
What actual datatype do I enter in my create statement for DATE,TIME, DATETIME and BOOLEAN? | 0 | [
2,
4444,
10601,
9827,
413,
210,
118,
8209,
1054,
4474,
18,
13,
5,
248,
13,
19704,
3808,
6,
800,
3726,
3726,
31,
22,
195,
677,
51,
527,
17,
37,
98,
31,
22,
195,
1302,
13,
5,
18,
22402,
6359,
1054,
1001,
5455,
720,
3841,
6,
4076... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Self-referencing table with parent-child relationship to represent file tree using LINQ
===
I have a single database table representing a file tree structure.
Files
- Id (int, primary key)
- Name
- ParentId (int, foreign key to Files.Id)
How can I write a method that makes sure all parents of a child cannot have the child's Id as its ParentId to prevent a infinite loop when displaying the tree structure.
Also, is there a more efficient way to design this? | 0 | [
2,
1119,
8,
29254,
859,
29,
4766,
8,
11287,
1429,
20,
3501,
3893,
1541,
568,
6294,
1251,
800,
3726,
3726,
31,
57,
21,
345,
6018,
859,
3793,
21,
3893,
1541,
1411,
9,
6488,
13,
8,
4924,
13,
5,
6391,
15,
1256,
1246,
6,
13,
8,
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... |
Apache Access Log showing 502 errors for bots
===
In my .htaccess file, I am using the [P] flag to proxy some urls to another site hosted on the same box. And whenever a web crawler (google, yahoo, msn, baidu) requests any of the URLs that are going through the Apache Proxy declared in the htaccess then I see a 502 response in my apache access logs.
Currently the application is running php 5.3 on Apache 2.2.22 the web pages can be accessed fine via a web browser.
I am using amazon linux on an EC2 instance. We currently have 2 web servers running behind an elastic load balancer, which is also behind our Content Distribution Network proxy.
Any insight into this issue would be highly appreciated.
The other curious thing is the amount of IPs that is listed in the X-forwarded-for header.
My LogFormat is:
%{X-forwarded-for}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
Here is an example of one line from the log, all the entries for other bots are similar.
180.76.5.95, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.214.150.38, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38, 107.20.135.88, 10.30.138.201, 107.21.224.117, 10.30.138.201, 107.21.224.117, 10.214.150.38 10.214.150.38 - - [09/Jul/2012:17:41:47 +0000] "GET /user/register?returnurl=%2Fcurlreading%2Fcategory%2Fwedding-prom-hairstyles HTTP/1.1" 502 475 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"
| 0 | [
2,
17140,
1381,
6738,
3187,
1222,
135,
11908,
26,
11012,
18,
800,
3726,
3726,
19,
51,
13,
9,
9020,
20604,
3893,
15,
31,
589,
568,
14,
636,
306,
500,
3157,
20,
27188,
109,
13,
911,
7532,
20,
226,
689,
2812,
27,
14,
205,
1649,
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... |
Button in a Tipsy Tooltip not firing an onClick event
===
I've set up this [JSFiddle][1] demonstrating what I am trying to do, but basically I think this is a situation of event bubbling. I am trying to position (in a tool tip) a button that when clicked on will change the value of the input that the tool tip is triggering on. The problem I'm seeing is the button 'Click' event is never firing. Any ideas on how to make this work?
Here is the simple code (this is using jQuery 1.7.2 and Tipsy 1.0.0a):
<input type="text" title="<button class='Action'>Add Balance</button>" name="Balance"/>
$(document).ready(function() {
$('input[name="Balance"]').tipsy({
trigger: 'focus',
gravity: 'n',
html: true
});
$('button.Action').click(function() {
$(input[name = "Balance"]).val('Clicked');
});
});
[1]: http://jsfiddle.net/vryAz/2/ | 0 | [
2,
5167,
19,
21,
11034,
93,
5607,
10169,
52,
7139,
40,
27,
150,
10129,
807,
800,
3726,
3726,
31,
22,
195,
309,
71,
48,
636,
728,
18,
1707,
12312,
500,
2558,
165,
500,
16133,
98,
31,
589,
749,
20,
107,
15,
47,
11374,
31,
277,
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... |
exporting Eclipse configuration
===
I've invested a lot of time, sweat, hair and foul language getting my 32-bit Eclipse installation configured just how I like it, with lots of plugins like Maven, MAT and TPCP .
Now the time has come to switch over to 64-bit. Can one export/import an Eclipse installation configuration in the same way one can export/import a project?
TIA,
Still-learning Steve | 0 | [
2,
7487,
68,
11652,
8091,
800,
3726,
3726,
31,
22,
195,
12269,
21,
865,
16,
85,
15,
6006,
15,
627,
17,
9602,
816,
1017,
51,
2512,
8,
3326,
11652,
7758,
28895,
114,
184,
31,
101,
32,
15,
29,
7503,
16,
10922,
108,
18,
101,
1216,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
battery temperature returns null
===
I have a problem. :) It's a tiny one but appreciate if some one can help!
the thing is I take want to take the battery information of the android device but it returns me null. I have done everything correct bt cant figure out the error. :(
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.resources_battery);
BroadcastReceiver batteryData = new BroadcastReceiver() {
String tech,temp;
int level;
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
tech = intent.getStringExtra(BatteryManager.EXTRA_TECHNOLOGY);
level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL,-1);
temp = intent.getStringExtra(BatteryManager.EXTRA_TEMPERATURE);
TextView technology = (TextView) findViewById(R.id.Appres_BatType);
technology.setText("Current Technology : " + tech);
TextView Tempreture = (TextView) findViewById(R.id.Appres_Battemp);
Tempreture.setText("Current Battery Tempreature : " +temp);
}
};
IntentFilter filter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
registerReceiver(batteryData, filter);
}
Above is the code which i wrote to get the temp but it returns null!
Please help!
I changed the code to this bt still it returns zero!
temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, -1); | 0 | [
2,
5044,
3348,
4815,
16203,
800,
3726,
3726,
31,
57,
21,
1448,
9,
13,
45,
6,
32,
22,
18,
21,
3228,
53,
47,
8831,
100,
109,
53,
92,
448,
187,
14,
584,
25,
31,
247,
259,
20,
247,
14,
5044,
676,
16,
14,
13005,
3646,
47,
32,
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... |
add a sleep in my loop
===
I can't get it to sleep, I want it to pause for a second before continuing.
public static void main(String[] args) {
//supply your own path instead of using this one
String path = "\\image.JPG";
for(;;)
SPI.INSTANCE.SystemParametersInfo(
new UINT_PTR(SPI.SPI_SETDESKWALLPAPER),
new UINT_PTR(0),
path,
new UINT_PTR(SPI.SPIF_UPDATEINIFILE | SPI.SPIF_SENDWININICHANGE));
}
When i try to add Thread.sleep(1000); it gives me an error, unreachable code.
| 0 | [
2,
3547,
21,
1742,
19,
51,
5293,
800,
3726,
3726,
31,
92,
22,
38,
164,
32,
20,
1742,
15,
31,
259,
32,
20,
6911,
26,
21,
153,
115,
4489,
9,
317,
12038,
11364,
407,
5,
11130,
2558,
500,
13,
10663,
18,
6,
13,
1,
12894,
1666,
34... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android: Mysterious http connection issue with targetSdkVersion >= 11
===
Working on an Android library that reads config data from a remote host using HttpClient from two files. Everything worked fine until I tested it with targetSdkVersion set above 11. Now the first of the http requests fail with a general exception (I think).
My thought is that the second request interrupts the first somehow, causing it to fail. But why only in sdk version 11+?
Here is a code snippet of the connection class:
import org.apache.http.client.HttpClient;
public static String readUrl(String url, boolean isCompressed) throws IOException {
String result = "";
HttpParams httpParameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParameters, 15000);
HttpConnectionParams.setSoTimeout(httpParameters, 15000);
HttpClient client = new DefaultHttpClient(httpParameters);
HttpGet get = new HttpGet(url);
get.addHeader("Cache-Control", "no-cache");
if(isCompressed) get.addHeader("Accept-Encoding", "gzip,deflate");
HttpResponse response = null;
try {
response = client.execute(get);
} catch (ClientProtocolException e) {
Log.e("debug", "ClientProtocolException HttpClient execute "+e.getMessage());
} catch (IOException e) {
Log.e("debug", "IOException HttpClient execute "+e.getMessage());
} catch (Exception e) {
Log.e("debug", "Gen Exception HttpClient execute "+e.getMessage());
}
result = readResponse(response);
client.getConnectionManager().shutdown();
return result;
}
The general exception is triggered and e.getMessage() returns null - which is even more confusing. That is the only error I get. I've also tried re-writing this with httpURLConnection - same result.
Any ideas?
| 0 | [
2,
13005,
45,
6896,
7775,
2760,
1513,
29,
7767,
43,
197,
10898,
13,
1,
3726,
547,
800,
3726,
3726,
638,
27,
40,
13005,
1248,
30,
11137,
13,
14093,
2816,
1054,
37,
21,
5388,
2015,
568,
7775,
150,
18513,
38,
37,
81,
6488,
9,
796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 this character keep popping up in my db: Â when saving other special characters?
===
It seems when I add any special characters (like © and ®) to my database, it saves it including this character: `Â`, so it saves it like this `©` It's popping up more and more now.
I can either think the database is doing this when I save the data (but it seems to be just currently happening), maybe it's because of the browser? Since I don't HTMLEncode the data when saving it to the database, but maybe not because I haven't been able to reproduce the issue myself personally, so wondering if someone else has had this same issue?
Do you think it's the web browser doing this? Maybe it's happening due to submitting the form via jQuery? What could be the culprit causing this? | 0 | [
2,
483,
630,
48,
925,
643,
24157,
71,
19,
51,
13,
9007,
45,
21,
76,
7599,
89,
621,
1766,
60,
800,
3726,
3726,
32,
2206,
76,
31,
3547,
186,
621,
1766,
13,
5,
1403,
13,
1,
17,
13,
1,
6,
20,
51,
6018,
15,
32,
16815,
32,
215,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 XQuery to create valid Latex file based on XML data
===
I know this task is somewhat unorthodox, but I hope someone is able to help me. I'm trying to create a valid Latex file using XQuery, based on XML file on products. The XML file (xml/products.xml) looks like this:
<?xml version="1.0"?>
<Products>
<Maker name = "A">
<PC model = "1001" price = "2114">
<Speed> 2.66 </Speed>
<RAM> 1024 </RAM>
<HardDisk> 250 </HardDisk>
</PC>
This is the latex output I need:
\documentclass[]{article}
\begin{document}
\begin{center}
\begin{tabular}{| l | l |}
\hline
Price & Model \\ \hline
price value & model value \\ \hline
\end{tabular}
\end{center}
\end{document}
And I've created the following (character escaping) XQuery to produce the required Latex:
let $oc := "{" (: for { :)
let $cc := "}" (: for } :)
let $space := " " (: space :)
let $tab := "	" (: tab :)
let $ampersand := "&" (: ampersand :)
\\documentclass\[\]{$oc}article{$cc}
\\begin{$oc}document{$cc}
\\begin{$oc}center{$cc}
\\begin{$oc}tabular{$cc}{$oc}| l | l |{$cc}
\\hline
Model{$ampersand}Price{$space}\\\\{$space}\\hline
{for $pc in doc("xml/products.xml")/Products/Maker/PC
let $price:=data($pc/@price)
let $model:=data($pc/@model)
return
{$model}{$ampersand}{$price} \\\\ \\hline
}
\\end{$oc}tabular{$cc}
\\end{$oc}center{$cc}
\\end{$oc}document{$cc}
I can't get the query to work.. :(. And as usual, XQuery does not give much debug info to go on. Are there smarter ways of escaping characters using XQuery? Or perhaps just printing text directly? | 0 | [
2,
568,
993,
8190,
93,
20,
1600,
7394,
456,
396,
3893,
432,
27,
23504,
1054,
800,
3726,
3726,
31,
143,
48,
3005,
25,
4131,
367,
24227,
15,
47,
31,
1376,
737,
25,
777,
20,
448,
55,
9,
31,
22,
79,
749,
20,
1600,
21,
7394,
456,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Oracle ranking columns on multiple fields
===
I am having some issues with ranking some columns in Oracle. I have two columns I need to rank - a group id and a date.
I have to group the table two ways -
1. rank the records in each GROUP_ID by DATETIME (RANK_1)
2. rank the GROUP_ID's by their DATETIME, GROUP_ID (RANK_2)
It should look like this:
GROUP_ID | DATE | RANK_1 | RANK_2
----------|------------|-----------|----------
2 | 1/1/2012 | 1 | 1
2 | 1/2/2012 | 2 | 1
2 | 1/4/2012 | 3 | 1
3 | 1/1/2012 | 1 | 2
1 | 1/3/2012 | 1 | 3
I have been able to do the former, but have been unable to figure out the latter.
SELECT group_id,
datetime,
ROW_NUMBER() OVER (PARTITION BY group_id ORDER BY datetime) AS rn,
DENSE_RANK() OVER (ORDER BY group_id) AS rn2
FROM table_1
ORDER BY group_id;
This incorrectly orders the RANK_2 field:
GROUP_ID | DATE | RANK_1 | RANK_2
----------|------------|-----------|----------
1 | 1/3/2012 | 1 | 1
2 | 1/1/2012 | 1 | 2
2 | 1/2/2012 | 2 | 2
2 | 1/4/2012 | 3 | 2
3 | 1/1/2012 | 1 | 3 | 0 | [
2,
15759,
4992,
7498,
27,
1886,
2861,
800,
3726,
3726,
31,
589,
452,
109,
1549,
29,
4992,
109,
7498,
19,
15759,
9,
31,
57,
81,
7498,
31,
376,
20,
2839,
13,
8,
21,
214,
4924,
17,
21,
1231,
9,
31,
57,
20,
214,
14,
859,
81,
284... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Installing product on Cloud.
===
Doing an research on cloud computing.
I have one product(works in windows) which I sell to my customers. I have like 20 customers SO I have to visit my customer place and install the product.
Instead of this Can I install the product in the cloud and give the access to all the customers to access from anywhere???
Please let me know if there are any free cloud service or we need to get the paid service?
| 0 | [
2,
25429,
2374,
27,
4005,
9,
800,
3726,
3726,
845,
40,
527,
27,
4005,
10626,
9,
31,
57,
53,
2374,
5,
7684,
19,
1936,
6,
56,
31,
3344,
20,
51,
5279,
9,
31,
57,
101,
434,
5279,
86,
31,
57,
20,
2139,
51,
7705,
209,
17,
16146,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 run Doxygen Makefile?
===
I have created a .NET C# project that I have commented using blocks similar to `///<summary>A summary...</summary>` that I would like to document using Doxygen. I have set up Doxygen and it runs generating a some 100 .tex-files and a Makefile.
As I have understood, the Makefile is the key to generating the documentation as a PDF, however I do not get it to work.
I'm using a Mac to do the LaTeX and Doxygen bit by writing `make -f Makefile` in the Terminal when I am in the Doxygen LaTeX output directory.
all: refman.pdf
pdf: refman.pdf
refman.pdf: clean refman.tex
pdflatex refman
makeindex refman.idx
pdflatex refman
latex_count=5 ; \
while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\
do \
echo "Rerunning latex...." ;\
pdflatex refman ;\
latex_count=`expr $$latex_count - 1` ;\
done
clean:
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf
How should I get the Makefil thing work? | 0 | [
2,
184,
20,
485,
107,
15161,
1863,
233,
16877,
60,
800,
3726,
3726,
31,
57,
679,
21,
13,
9,
2328,
272,
5910,
669,
30,
31,
57,
5973,
568,
5198,
835,
20,
13,
1,
118,
118,
118,
1,
18,
723,
17396,
1,
58,
14740,
9,
9,
9,
1,
118... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Quick and easy implementation of a WCF web service, given wsdl?
===
I'm writing a client to access a SOAP webservice, that will be hosted by a third party. I have the WSDL and XSD that define the interface and the data.
I've had no problem in creating a service reference from the WSDL, but I'm having a problem in building a simple web service that implements it, that I can use to test against. (The third party's service isn't ready, yet, but even were it running, I'd still like to do my initial testing against my own test server, not against theirs.)
I've browsed around, and apparently I can use svcutil to generate an interface for the service:
svcutil.exe thewsdl.wsdl thexsd.xsd /language:c# /out:ITestService.cs
This generates a file containing the service interface definition. But now what?
I figured the easiest way to go would be to build a self-hosted service, so I created a new console app, and in it I implemented a class derived from the service interface definition, and fired it up with a ServiceHost.
It runs, and while it was running I was able to create a Service Reference in my client app. But when I try to call it, from the client app, I get an error:
The provided URI scheme 'http' is invalid; expected 'https'.
What is the easiest way to get around this? Is there a simple way to simply turn off authentication and authorization, and simply allow unrestricted access?
| 0 | [
2,
2231,
17,
2010,
6123,
16,
21,
11801,
410,
2741,
365,
15,
504,
619,
18,
8643,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
6819,
20,
1381,
21,
6447,
2741,
11449,
15,
30,
129,
44,
2812,
34,
21,
422,
346,
9,
31,
57,
14,
619,
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... |
jQuery .focus() works differently in each browser. How to prevent that?
===
When I try to do `.focus()` I expect to set focus on input element and to see cursor after last character of the value. And I see it in IE.
In safari/chrome input gets focus and all text is selected.
In firefox/opera input gets focus, but cursor is in the beginning.
What could I do to prevent that and get correct behavior for all browsers?
An example is here: http://jsbin.com/ozojol/edit#javascript,html
PS. `focus().val('').val(value)` method doesn't work in IE... What other workarounds exist? | 0 | [
2,
487,
8190,
93,
13,
9,
23371,
5,
6,
693,
12670,
19,
206,
16495,
9,
184,
20,
2501,
30,
60,
800,
3726,
3726,
76,
31,
1131,
20,
107,
13,
1,
9,
23371,
5,
6,
1,
31,
4186,
20,
309,
1776,
27,
6367,
4520,
17,
20,
196,
29588,
75,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Extjs button enable keyboard events
===
is there any kind of enableKeyEvents:true for extJs button? I knew text has this property but buttons don't have this property. So that the e.getKey() returns null when i handle keyboard events on button.
Any ideas? | 0 | [
2,
1396,
38,
728,
18,
5167,
9240,
8896,
963,
800,
3726,
3726,
25,
80,
186,
825,
16,
9240,
4237,
4943,
38,
18,
45,
13398,
26,
1396,
38,
728,
18,
5167,
60,
31,
404,
1854,
63,
48,
1354,
47,
12861,
221,
22,
38,
57,
48,
1354,
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... |
Ruby: "gem install bundler" not installing bundler
===
I'm new to rails and trying to get a demo app up and running. I've been having problems on my linux system (lubuntu, mostly clean install) getting "bundle install" to run. Even when it does, if I close my terminal and start another, it fails to run again. The cycle looks something like this:
sandbox@75bf7f3:~/railsstuff/sample_app_2nd_ed$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
sandbox@75bf7f3:~/railsstuff/sample_app_2nd_ed$ gem install bundler
Successfully installed bundler-1.1.4
1 gem installed
sandbox@75bf7f3:~/railsstuff/sample_app_2nd_ed$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
As far as I can tell, I'm using the latest version of Ruby and rvm seems to be working fine.
Can anyone explain what's going on here? | 0 | [
2,
10811,
45,
13,
7,
20231,
16146,
10194,
139,
7,
52,
25429,
10194,
139,
800,
3726,
3726,
31,
22,
79,
78,
20,
2240,
18,
17,
749,
20,
164,
21,
8376,
4865,
71,
17,
946,
9,
31,
22,
195,
74,
452,
1716,
27,
51,
13024,
329,
13,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Maven SVN checkout
===
Can anybody tell me how to make checkout and further updates from SVN with Maven? I read the documentation on maven.apache.org but it seems that i'm too dumb for this because i can't understand how to use scm:checkout and scm:update without passing them parameters in command line. I mean when i run just:
mvn scm:checkout (or scm:update) clean install
maven checks out sources to /target/checkout, then it deletes it and of course it has nothing to compile so it makes empty jar. So i have to write something like this:
mvn scm:checkout -DconnectionUrl=scm:svn:http://svn.my.dev/scm/repo/trunk/myProject -DcheckoutDirectory=src clean install
But i don't want to! How can i set these parameters inside pom.xml? And how can i set current directory as checkoutDirectory? (probably it should not be a problem if set it in pom.xml because i can set it as ${project.basedir}, but who knows)
My pom.xml includes these lines:
...
<scm>
<connection>scm:svn:http://svn.my.dev/scm/repo/trunk/myProject</connection>
<developerConnection>scm:svn:http://svn.my.dev/scm/repo/trunk/myProject</developerConnection>
</scm>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.7</version>
<configuration>
<username>username</username>
<password>password</password>
</configuration>
</plugin>
...
Btw, what is the difference between connection and developerConnection. Maven documentation says only that developerConnection is... "The SCM connection URL for developers". Which is very surprising for me 'cause i thought that this is some connection for squirrels or may be bunnies.
| 0 | [
2,
1216,
3124,
13,
18,
16578,
2631,
1320,
800,
3726,
3726,
92,
11181,
494,
55,
184,
20,
233,
2631,
1320,
17,
653,
16779,
37,
13,
18,
16578,
29,
1216,
3124,
60,
31,
1302,
14,
13945,
27,
1216,
3124,
9,
7738,
2569,
9,
5583,
47,
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... |
Incorrect syntax near ','
===
INSERT INTO [Temp].[dbo].[Student]
([Fname], [Lname], [Gender])
VALUES
(N'Aname', N'Alname', N'Male')
GO
This codes workes fine but when I try to add multiple values it gives me an error
USE TEMP
GO
INSERT INTO [Temp].[dbo].[Student]
([Fname], [Lname], [Gender])
VALUES
(N'Aname', N'Alname', N'Male'),
(N'Bname', N'Blname', N'Male')
GO
**Error: Incorrect syntax near ','.**
Thanks for help!
| 3 | [
2,
18867,
22649,
424,
13,
22,
15,
22,
800,
3726,
3726,
14692,
77,
636,
9577,
500,
9,
2558,
43,
1192,
500,
9,
2558,
24822,
500,
13,
5,
2558,
410,
7259,
500,
15,
636,
255,
7259,
500,
15,
636,
25465,
500,
6,
4070,
13,
5,
103,
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... |
Using JavaScript to show and hide PHP echoed XML data
===
I'm using PHP to echo out 50 video id's from an XML file. I use the video id's to embed 50 YouTube videos into my website. This works fine but I need to isolate the videos two at a time. I don't want the user to see all fifty videos at once. I want them to see two, then click next, see another two, then maybe click back, etc. etc.
Here's what I have so far:
$url = "http://www.theURLofmyXML.blah";
$xml = simplexml_load_file($url);
$i = 0;
while ($i < 49) {
$title = (string) $xml->query->results->item[$i]->title;
$videoid = (string) $xml->query->results->item[$i]->id;
$explanation = (string) $xml->query->results->item[$i]->explanation;
$i = $i + 1;
echo $title."<br />";
echo '<iframe width="400" height="225" src="http://www.youtube.com/embed/'.$videoid.'?rel=0&autohide=1&showinfo=0" frameborder="0" allowfullscreen></iframe><br/>';
echo $explanation."<br /><br />";
}
So I think the best thing to do is echo all fifty items to the page inside divs labeled 0 to 49...then use JavaScript to hide all divs except 0 and 1 until you click a next button and it switches to hiding everything except 2 and 3...and so on...
But I'm not sure how to do that in JavaScript/jQuery. I think using .show() and .hide() would work but I'm not sure of the syntax.
| 0 | [
2,
568,
8247,
8741,
20,
298,
17,
3077,
13,
26120,
10848,
23504,
1054,
800,
3726,
3726,
31,
22,
79,
568,
13,
26120,
20,
8117,
70,
1222,
763,
4924,
22,
18,
37,
40,
23504,
3893,
9,
31,
275,
14,
763,
4924,
22,
18,
20,
11911,
69,
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... |
Tool to evaluate many xpaths
===
I have a excel file with a list of 100+ xpaths and I need to evaluate each of those xpaths for about 15 different xml files. I was using Altova's XML Spy to evaluate the xpaths; however I can only evaluate 1 xpath at a time using that tool.
Is there a tool that would allow me to, say, copy and paste my list of xpaths and then evaluate them all at once for a given xml file(s)?
Thank you. | 0 | [
2,
5607,
20,
13,
15599,
151,
993,
8353,
18,
800,
3726,
3726,
31,
57,
21,
20700,
3893,
29,
21,
968,
16,
808,
2430,
993,
8353,
18,
17,
31,
376,
20,
13,
15599,
206,
16,
273,
993,
8353,
18,
26,
88,
357,
421,
23504,
6488,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
$1 in subject string when using preg_split
===
I want to split a text into an array where the delimiter is one or more of "\n", and then put the content of the array as elements in a unorder html-list. When I do this using preg_split when there is a $1 in the subject string I get a weird result. Just looking at the array resulting from the splitting the result is fine and the $1 seems not to have caused any problem, but when I loop over the array and make it into a html list it creates a different result then expected(see example bellow)
Like if this was the subject string:
"First line
Second line $1
Third line"
It should become:
<ul>
<li>First line</li>
<li>Second line $1</li>
<li>Third line</li>
</ul>
But it becomes:
<ul>
<li>First line</li>
<li>Second lineFirst line
Second line $1
Third line</li>
<li>Third line</li>
</ul>
Does anyone know why this happens?
Is $1 some kind of special html or php character with a reserved meaning?
This is the code I've written:
$listElements = preg_split('/[\n]+/',$subject);
$output = '<ul>';
foreach ( $listElements as $val ) {
$output .= '<li>' . $val . '</li>';
}
$output .= '</ul>';
| 0 | [
2,
3742,
19,
1550,
3724,
76,
568,
782,
263,
1,
25603,
800,
3726,
3726,
31,
259,
20,
2132,
21,
1854,
77,
40,
7718,
113,
14,
121,
20565,
106,
25,
53,
54,
91,
16,
13,
7,
1,
103,
7,
15,
17,
94,
442,
14,
2331,
16,
14,
7718,
28,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Accessing Navigation Properties in a View
===
I have a Controller action the receives 2 URL parameters, which are foreign keys for the data model:
public ActionResult Create(SurveyResponseModel surveyresponsemodel, int MemberId, int ProgramId)
{
surveyresponsemodel.MemberId = MemberId;
surveyresponsemodel.ProgramId = ProgramId;
return View();
}
Here is the data model:
public class SurveyResponseModel
{
[Key]
public int ResponseId { get; set; }
public int MemberId { get; set; }
public int ProgramId { get; set; }
// "If yes, what changes did you make? Mark all that apply."
[DisplayName("Did you make any changes in your practice, research, or administration activities as a result of participating in this CME activity?")]
public string CmeChanges { get; set; }
[DisplayName("Better patient follow-up")]
public bool PatientFollowUp { get; set; }
public virtual SurveyProgramModel SurveyProgramModel { get; set; }
public virtual PersonModel PersonModel { get; set; }
And the Data Model for "SurveyProgramType"
public class SurveyProgramModel
{
[Key]
public int ProgramId { get; set; }
public int ProgramYear { get; set; }
public int ProgramStatusId { get; set; }
public string ProgramTitle { get; set; }
public int ProgramTypeId { get; set; }
public virtual SurveyProgramTypeModel ProgramType { get; set; }
public virtual ProgramStatusModel ProgramStatusModel { get; set; }
}
What I want to be able to do in my view, is retrieve the `ProgramTitle` by the URL parameter that is passed for `ProgramId`. So the view looks something like:
<div class="editor-label">
@Model.SurveyProgramModel.ProgramTitle
</div>
However, @Model.SurveyProgramModel.ProgramTitle is throwing an exception because it is null. I'm thinking I have my navigation property set up incorrectly. Any idea what that is? | 0 | [
2,
1381,
68,
8368,
3704,
19,
21,
1418,
800,
3726,
3726,
31,
57,
21,
9919,
1028,
14,
8359,
172,
287,
6362,
12905,
15,
56,
50,
1228,
5534,
26,
14,
1054,
1061,
45,
317,
1028,
29955,
1600,
5,
4082,
8704,
99,
18,
8782,
870,
13998,
34... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Encoding a PNG with JavaScript
===
I have some arbitrary pixel data that I want to save as a PNG. How can I encode a PNG with JavaScript to accomplish this?
The data is a series of 1's and 0's that I want to use to create a QR code. It's QR code arbitrary data
I'm not using the DOM, so jQuery and createElement's are out. | 0 | [
2,
19608,
21,
351,
2723,
29,
8247,
8741,
800,
3726,
3726,
31,
57,
109,
17237,
18146,
1054,
30,
31,
259,
20,
2079,
28,
21,
351,
2723,
9,
184,
92,
31,
20523,
21,
351,
2723,
29,
8247,
8741,
20,
14570,
48,
60,
14,
1054,
25,
21,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I safely require Perl's DBI instead of using it?
===
I have a large script that has no database connection yet. I need one for a tiny new feature. Is it safe to add a naked block to `require DBI` where I need it or do I need to import something?
# Lots of no-database code here...
my $obj;
{
require DBI;
my $dbh = DBI->connect('dsn');
$obj = ModuleThatNeedsDBH->new(dbh => $dbh);
}
$ob->fancyStuff();
# More no-database code...
The block is to keep `$dbh` hidden from the rest of the program of course. | 0 | [
2,
92,
31,
9817,
4077,
416,
255,
22,
18,
13,
43,
2161,
700,
16,
568,
32,
60,
800,
3726,
3726,
31,
57,
21,
370,
3884,
30,
63,
90,
6018,
2760,
768,
9,
31,
376,
53,
26,
21,
3228,
78,
1580,
9,
25,
32,
1834,
20,
3547,
21,
5426,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
flotr2 The target container must be visible at
===
I'm trying to get flotr2 graphs working in my Phonegap application. I can get their example graph(http://www.humblesoftware.com/flotr2/documentation#usage) to run on an AVD, but if I try to use it in my actual application it gives me the error Uncaught The target container must be visible at file:///android_asset/www/flotr2.min.js:27 How would I fix this? | 0 | [
2,
9319,
6384,
135,
14,
2935,
12147,
491,
44,
4560,
35,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
9319,
6384,
135,
7210,
18,
638,
19,
51,
1132,
1136,
306,
3010,
9,
31,
92,
164,
66,
823,
7210,
5,
21127,
6903,
6483,
9,
252,
239... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Have problems with testing my project by maven-surefire-plugin
===
I wrote my maven project in Netbeans.I wrote tests for my project (dao,service..). All tests are right, but when I build or test my project maven shows there are no tests to compile.I'm using maven-surefire-plugin, so include it to the pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.10</version>
</dependency>
</dependencies>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
</configuration>
</plugin>
I think something wrong with surefire-plugin..
Thats:
Scanning for projects...
------------------------------------------------------------------------
Building Employeers 1.0.0-BUILD-SNAPSHOT
------------------------------------------------------------------------
[aspectj:compile]
[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 4 resources
[compiler:compile]
Nothing to compile - all classes are up to date
[aspectj:test-compile]
[resources:testResources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 1 resource
[compiler:testCompile]
Nothing to compile - all classes are up to date
[surefire:test]
Surefire report directory: C:\Users\Администратор\Documents\NetBeansProjects\Employeers\target\surefire-reports
Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Error: An unexpected error occurred while trying to open file C:\Users\?????????????\Documents\NetBeansProjects\Employeers\target\surefire\surefirebooter472050683580306804.jar
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[war:war]
Packaging webapp
Assembling webapp [Employeers] in [C:\Users\Администратор\Documents\NetBeansProjects\Employeers\target\Employeers-1.0.0-BUILD-SNAPSHOT]
Processing war project
Copying webapp resources [C:\Users\Администратор\Documents\NetBeansProjects\Employeers\src\main\webapp]
Webapp assembled in [590 msecs]
Building war: C:\Users\Администратор\Documents\NetBeansProjects\Employeers\target\Employees.war
Warning: selected war files include a WEB-INF/web.xml which will be ignored
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 5.258s
Finished at: Fri Jul 27 19:47:07 EEST 2012
Final Memory: 6M/16M
------------------------------------------------------------------------
| 0 | [
2,
57,
1716,
29,
4431,
51,
669,
34,
1216,
3124,
8,
5838,
5929,
8,
18527,
5831,
800,
3726,
3726,
31,
738,
51,
1216,
3124,
669,
19,
4275,
863,
5950,
9,
49,
738,
4894,
26,
51,
669,
13,
5,
17104,
15,
11449,
9,
9,
6,
9,
65,
4894,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
JGroups v/s Shoal - which to choose for reliable heartbeat implementation in a cluster?
===
I am currently evaluating java libraries/toolkits for reliable heartbeat implementation among nodes in a small cluster (2-3 machines). My intention is to implement a framework to ensure high availability by performing quick failovers between the nodes by detecting network/hardware outages etc.
What I need is a clean, reliable way to implement a periodic heartbeat mechanism over (multicast) UDP. I am not trying to send across any data as well. Just some ECHOs among nodes to make sure everyone's alive, if you will. The nodes are RHEL5 machines.
<a href="http://jgroups.org">JGroups</a> and <a href="http://shoal.java.net/ShoalOverview.html">Shoal</a> seem to achieve the same goals, although JGroups looks easier to implement, on the outset. Can anyone who is aware of these libraries please weigh-in and recommend (with reasons) which one I should choose? | 0 | [
2,
487,
8024,
18,
566,
118,
18,
24924,
13,
8,
56,
20,
3538,
26,
11398,
12694,
6123,
19,
21,
7460,
60,
800,
3726,
3726,
31,
589,
871,
26764,
8247,
8649,
118,
20799,
13703,
18,
26,
11398,
12694,
6123,
497,
16272,
19,
21,
284,
7460,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
export in SOAP complete properties of entity reference
===
why in SOAP, linq not export the complete properties of entity References, in this example only export EntityKeyMember of ImagesReference and no the other properties of Images entity
<images_likes>
<EntityKey>
<EntitySetName>Images_Likes</EntitySetName>
<EntityContainerName>WiredinEntities</EntityContainerName>
<EntityKeyValues>
<EntityKeyMember>
<Key>LikeId</Key>
<Value xsi:type="xsd:int">96</Value>
</EntityKeyMember>
</EntityKeyValues>
</EntityKey>
<LikeId>96</LikeId>
<Date>2012-07-27T09:00:35.697</Date>
<ImagesReference>
<EntityKey>
<EntitySetName>Images</EntitySetName>
<EntityContainerName>WiredinEntities</EntityContainerName>
<EntityKeyValues>
<EntityKeyMember>
<Key>ImageId</Key>
<Value xsi:type="xsd:int">26</Value>
</EntityKeyMember>
</EntityKeyValues>
</EntityKey>
</ImagesReference>
</images_likes>
| 0 | [
2,
7487,
19,
6447,
1279,
3704,
16,
9252,
2801,
800,
3726,
3726,
483,
19,
6447,
15,
6294,
1251,
52,
7487,
14,
1279,
3704,
16,
9252,
7231,
15,
19,
48,
823,
104,
7487,
9252,
4237,
6990,
16,
3502,
28018,
17,
90,
14,
89,
3704,
16,
35... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Finding an item within a list within another list?
===
Okay, so let's say I have a `list<car>`. Each car also contains a `list<part>`. Each part has an `ID` associated with it. I'm only given the `ID` to a `part`, and I want to find the `car` that contains that `part`. What is the best way to find this `car`? | 0 | [
2,
3007,
40,
9101,
363,
21,
968,
363,
226,
968,
60,
800,
3726,
3726,
1705,
15,
86,
408,
22,
18,
395,
31,
57,
21,
13,
1,
5739,
1,
1367,
1,
9,
206,
349,
67,
1588,
21,
13,
1,
5739,
1,
3091,
1,
9,
206,
141,
63,
40,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Pass value to Taglib from JSTL
===
How can I pass a value from JSLT loop to a Taglib?
Example:
<c:set var="MyVar" value="MyValue" />
<ibe:I18N baseName="config.ft.i18n.msg" key="MyKey" myBB="${MyVar}"/>
The above code does not work. The I18N taglib extends`SimpleTagSupport`
| 0 | [
2,
1477,
1923,
20,
3383,
8326,
37,
487,
18,
7786,
800,
3726,
3726,
184,
92,
31,
1477,
21,
1923,
37,
487,
18,
255,
38,
5293,
20,
21,
3383,
8326,
60,
823,
45,
13,
1,
150,
45,
3554,
4033,
3726,
7,
915,
3311,
7,
1923,
3726,
7,
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 add custom font in .xib?
===
Hai Developers,
I am add custom font in info.plist.But it work only coding.it doesn't change the statically in the .xib object attribute section. for example i used the uilabel then i choose the custom font. it will not change the font style.
install the "Harrowprint" font to double click and also put into my project resource file.
![enter image description here][1]
[1]: http://i.stack.imgur.com/zmKtX.png
thanks in advance,
Senthilkumar | 0 | [
2,
184,
20,
3547,
5816,
9978,
19,
13,
9,
5845,
220,
60,
800,
3726,
3726,
8349,
10168,
15,
31,
589,
3547,
5816,
9978,
19,
15404,
9,
306,
5739,
9,
811,
32,
170,
104,
13,
15458,
9,
242,
1437,
22,
38,
753,
14,
12038,
1326,
19,
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... |
Does Aptana studio work on Mac OSX 10.8 (Mountain Lion)
===
Have anyone upgraded to Mountain Lion and can confirm that Aptana Studio (http://www.aptana.com/products/studio3/download) is compatible with OSX 10.8? | 0 | [
2,
630,
8442,
9068,
1120,
170,
27,
1572,
13,
759,
396,
332,
9,
457,
13,
5,
23741,
6023,
6,
800,
3726,
3726,
57,
1276,
9958,
20,
1286,
6023,
17,
92,
10265,
30,
8442,
9068,
1120,
13,
5,
21127,
6903,
6483,
9,
2552,
9068,
9,
960,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
VB Script a line break
===
I have VB script that controls how a document processes checkboxes using a program called pageflex studio. My problem is that when multiple checkboxes are selected it does not Line break properly inside of my Input field. Here is my script.
<code>
Function FormatLine()
'Variable to be formated.
vText = PFGetValue("Line6")
'Variables to select formatting.
vFont = PFGetValue("Font")
vColor = PFGetValue("Imprint_Color2")
'Configure Font Selection
If vFont <> "" Then
End If
'Return formatted text.
FormatLine = "<_char " + vFont + " " + vColor + ">" + vText + "</_char>"
End Function
</code> | 0 | [
2,
13,
20468,
3884,
21,
293,
1442,
800,
3726,
3726,
31,
57,
13,
20468,
3884,
30,
8671,
184,
21,
4492,
5102,
2631,
5309,
160,
568,
21,
625,
227,
2478,
19752,
1120,
9,
51,
1448,
25,
30,
76,
1886,
2631,
5309,
160,
50,
1704,
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... |
Store array of objects or create when needed?
===
I'm new to objective-c and ios, but I'm coming along alright. Now I've run into a situation where I can see two ways of arriving at the same destination. I'm just curious as to which way would better suit the efficiency of the program. I apologize in advance if there are better ways of phrasing all this that I don't know of yet.
(removing all prior context)..The meat of the matter is this:
My first object is a rectangular UIView object that may have rotational transformation applied. This object has properties that stores the CGPoints of the location of the four transformed corners.
rectangularView.h
<...>
@property (nonatomic) CGPoint topLeft;
@property (nonatomic) CGPoint topRight;
@property (nonatomic) CGPoint bottomLeft;
@property (nonatomic) CGPoint bottomRight;
I have created a Line object:
line.h
<...>
@property (nonatomic) CGPoint pointA;
@property (nonatomic) CGPoint pointB;
@property (nonatomic) float m; // slope
@property (nonatomic) float b; // y-intercept
Basically, the Line objects represent the sides of the rectangularView. These lines will get stored in an array.
Elsewhere there is a method that is able to determine whether two Line objects intersect in order to determine whether one rectangularView intersects with another.
- (BOOL)checkLineIntersection:lineA:lineB
QUESTION:
When checkLineIntersection:lineA:lineB is called it needs to obviously send two Line objects. Would it be better for:
- (A) The line objects to be created and stored within each of the rectangularView objects?
- Pros: The line's would already be created and just need to be passed to the method, yielding faster processing
- Cons: More memory would be utilized
- (B) Create the line objects just before sending them to the method.
- Pros: The Line objects would not be taking up memory
- Cons: More processing time during all the loops of creating the sides for all the rectangularView objects before sending them to the method
Basically, if there is a comparison rectangularView (compView)
[OPTION A]
for (RectangularView *rv in rectangularViewArray) {
BOOL doesIntersect = [self checkLineIntersection:[rv lineA] lineB:[compView lineA]];
<...>
or
[OPTION B]
for (RectangularView *rv in rectangularViewArray) {
Line *lineA = [[Line alloc].....
Line *lineB = [[Line alloc]....
<...>
BOOL doesIntersect = [self checkLineIntersection:[rv lineA] lineB:[compView lineA]];
I'm leaning towards Option A in order to split up processing time between events, meaning the lines get designed and calculated when the rectangularView is created, and they only need to be recalled when they are sent for intersection testing.
Thank you..and I hope I wrote this out well enough. | 0 | [
2,
1718,
7718,
16,
3916,
54,
1600,
76,
851,
60,
800,
3726,
3726,
31,
22,
79,
78,
20,
7038,
8,
150,
17,
13,
7760,
15,
47,
31,
22,
79,
880,
303,
11885,
9,
130,
31,
22,
195,
485,
77,
21,
1858,
113,
31,
92,
196,
81,
2847,
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... |
My Jython Delay doesn't work time.sleep(.2)
===
My jython script is told:
import time
>>>def wait(x):
>>>>>>>print "started"
>>>>>>>time.sleep(x)
>>>>>>>print "stopped"
then when I tell it:
>>> wait(.2)
It waits for .2 seconds then prints started AND stopped at the same time!
if i use sleep in a loop it doesn't do anything (it's caught up doing the sleeping only)
Is there a better way to do short delays?
Thanks to anyone who replies! :D
| 0 | [
2,
51,
487,
93,
11570,
7255,
1437,
22,
38,
170,
85,
9,
21092,
5,
9,
135,
6,
800,
3726,
3726,
51,
487,
93,
11570,
3884,
25,
470,
45,
9010,
85,
13,
1,
13862,
1760,
5,
396,
6,
45,
13,
1,
10299,
13,
7,
13680,
69,
7,
13,
1,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a kernel driver implementing mmap() have to create a character device?
===
I am trying to write a kernel driver to manage some memory blocks of physically contiguous and DMAable memory (I am using `kmalloc()` since these are only DMA streams). To pull some functionality into userspace, this memory is to be `mmap()`ed with its own implementation of `mmap()`. I have been using _Linux Device Drivers_ and the bad examples that show up in Google as my main source of information.
My `mmap()` (calling it `my_mmap()` for now) needs to be registered with the kernel. It appears the only valid way to do this using a `struct file_operations`, but this requires creating a character device and a physical location for it. I do not want to do that. I just want to create a virtual address for the userspace application to access the memory buffers and not create any files to map the memory buffers to. Is this possible?
I did find that frame buffers also have an equivalent structure with an `mmap()` implementation, but that would be too much of a hack. That and it adds more unknowns.
As I understand it, `my_mmap()` can do the heavy lifting and use `remap_pfn_range()` as long as I am ok with the lost flexibility. Otherwise I would have to implement a local `nopages()` and register it using a `struct vm_operations_struct`. Is this correct? | 0 | [
2,
630,
21,
17007,
2425,
17333,
1620,
2552,
5,
6,
57,
20,
1600,
21,
925,
3646,
60,
800,
3726,
3726,
31,
589,
749,
20,
2757,
21,
17007,
2425,
20,
4705,
109,
1912,
5198,
16,
7994,
1065,
8407,
9627,
17,
13,
43,
540,
579,
1912,
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... |
Tkinter can't work while a socket loop is happening
===
Please i need a help my code is that.
def start():
def start_tkinter():
global main,l
main.destroy()
main=Tk()
l=Listbox(main)
f1=Frame(main)
e=Entry(f1)
b1=Button(main,text="Stop",command=parar)
l.pack(side=TOP)
f1.pack(side=BOTTOM)
e.pack(side=LEFT)
b1.pack(side=RIGHT)
main.update()
start_server()
def start_server():
HOST, PORT = "localhost", 9999
server = SocketServer.UDPServer((HOST, PORT), MyUDPHandler)
server.serve_forever()
start_tkinter()
When i start the loop, Tkinter freezes and i can't use it. Please i need a solution. | 0 | [
2,
13,
38,
1767,
815,
92,
22,
38,
170,
133,
21,
18482,
5293,
25,
4942,
800,
3726,
3726,
2247,
31,
376,
21,
448,
51,
1797,
25,
30,
9,
6312,
799,
5,
6,
45,
6312,
799,
1,
38,
1767,
815,
5,
6,
45,
2062,
407,
15,
255,
407,
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... |
Change Colours of all Black Pixels in Pygame
===
I'm making a program with the Pygame that changes the overall colours of inserted pictures. It works fine, but now I'd like to change specific portions of the picture - only black. Is there a method that changes the colours of _all_ black pixels to an alternative colour?
I've already tried using `surface.set_at()`, `surface.get_at()` as well as a few others. Help please? :) | 0 | [
2,
753,
8739,
16,
65,
319,
18146,
18,
19,
7103,
5128,
800,
3726,
3726,
31,
22,
79,
544,
21,
625,
29,
14,
7103,
5128,
30,
1693,
14,
1677,
8739,
16,
14215,
3104,
9,
32,
693,
1123,
15,
47,
130,
31,
22,
43,
101,
20,
753,
1903,
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 do I stop "perspective pop-up" in Eclipse?
===
It seems like half the actions I perform in Eclipse open up a new perspective, thus covering up the beautifully arranged perspective I've created. It feel like I'm back in 1998 fighting all these "pop-up perspectives."
Is there a way to prevent new perspectives from opening automatically in Eclipse? Is there a universal setting that controls this (?) or will I have to change a plugin specific setting? | 0 | [
2,
184,
107,
31,
747,
13,
7,
1432,
7350,
1284,
1675,
8,
576,
7,
19,
11652,
60,
800,
3726,
3726,
32,
2206,
101,
519,
14,
3078,
31,
2985,
19,
11652,
368,
71,
21,
78,
6531,
15,
1086,
3846,
71,
14,
21202,
4300,
6531,
31,
22,
195,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
TFS Web Access query limits to 100 rows and update to maxWorkitemsInReportList does not work
===
I updated the web.config for the entry maxWorkitemsInReportList , but it still limits the rows to 100. I have even restarted the TFS website but this well know solution will not work for me. This is on TFS 2008 . | 1 | [
2,
13,
11720,
18,
2741,
1381,
25597,
5887,
20,
808,
11295,
17,
11100,
20,
2049,
3783,
2119,
79,
18,
108,
17437,
5739,
630,
52,
170,
800,
3726,
3726,
31,
6372,
14,
2741,
9,
14093,
2816,
26,
14,
2792,
2049,
3783,
2119,
79,
18,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL COUNT(*) GROUP BY HAVING COUNT=?
===
This my Query
SELECT COUNT(*) as total, toys, date FROM T1 WHERE (date >= '2012-06-26'AND date < '2012-06-30')AND (Avail > '0')
UNION
SELECT COUNT(*) as total, toys, date FROM T2 WHERE (date >= '2012-06-26'AND date < '2012-06-30')AND (Avail > '0')
UNION
SELECT COUNT(*) as total, toys, date FROM T3 WHERE (date >= '2012-06-26'AND date < '2012-06-30')AND (Avail > '0')
GROUP BY RoomType
HAVING COUNT( total ) =4
Output result
count Toys date
3 Bibi 2012-06-26
4 Baba 2012-06-26
How can i get MYSQL to show results only for count=4
| 0 | [
2,
51,
18,
22402,
2468,
5,
2483,
6,
214,
34,
452,
2468,
3726,
60,
800,
3726,
3726,
48,
51,
25597,
5407,
2468,
5,
2483,
6,
28,
600,
15,
12029,
15,
1231,
37,
13,
38,
165,
113,
13,
5,
8209,
13,
1,
3726,
13,
22,
3212,
8,
3370,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 multi select options with ok and cancel buttons
===
I'm trying to create a day select user interace with an ok and cancel buttons. This is basically the same thing that is on the alarm function to pick the days, but I can't seem to find a good example that I can make sense of so I can understand it. Anyone know of a good example?
Thanks. | 0 | [
2,
13005,
1889,
5407,
6368,
29,
5854,
17,
14815,
12861,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
208,
5407,
4155,
1480,
6174,
29,
40,
5854,
17,
14815,
12861,
9,
48,
25,
11374,
14,
205,
584,
30,
25,
27,
14,
6490,
1990,
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... |
Error while calling a function(pointer and vector)
===
Suppose that in the main I have a function a:
a(c),
and c is declared like char* c.
The function a is actually like this:
void a(char* v)
{
v[0] = 1;
v[2] = 2;
}
Is this wrong?Because the program is saying that c is uninitialized in this functon.
Thanks for answering. | 0 | [
2,
7019,
133,
2555,
21,
1990,
5,
3132,
106,
17,
7497,
6,
800,
3726,
3726,
5787,
30,
19,
14,
407,
31,
57,
21,
1990,
21,
45,
21,
5,
150,
6,
15,
17,
272,
25,
2482,
101,
4892,
2483,
272,
9,
14,
1990,
21,
25,
1121,
101,
48,
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... |
Is it possible to run multiple processeses on a Heroku dyno?
===
I am aware of the memory limitations of the Heroku platform, and I know that it is far more scalable to separate an app into web and worker dynos. However, I still would like to run asynchronous tasks alongside the web process for testing purposes. Dynos are costly and I would like to prototype on the free instance that Heroku provides.
Are there any issues with spawning a new job as a process or subprocess in the same dyno as a web process? | 0 | [
2,
25,
32,
938,
20,
485,
1886,
5102,
160,
27,
21,
36,
9266,
9841,
251,
60,
800,
3726,
3726,
31,
589,
3854,
16,
14,
1912,
14070,
16,
14,
36,
9266,
2452,
15,
17,
31,
143,
30,
32,
25,
463,
91,
18957,
579,
20,
1725,
40,
4865,
77... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Perform action when instance name is invoked in IDLE
===
So let's say you have something like this:
Class Person:
height = """6' 0"""
and
Henry = Person
What do I have to define in the class to do `Henry` and get `'6' 0"'` and not something like `<class __main__.Person 0x00012040>`? | 0 | [
2,
2985,
1028,
76,
4851,
204,
25,
26252,
19,
18652,
800,
3726,
3726,
86,
408,
22,
18,
395,
42,
57,
301,
101,
48,
45,
718,
840,
45,
2947,
800,
13,
7,
7,
7,
379,
22,
713,
7,
7,
7,
17,
1010,
800,
840,
98,
107,
31,
57,
20,
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... |
User ip's are not getting logged
===
Hi I have 2 files on my site config.php and log_user_ips.php.
I am having trouble inserting user IP data into my database.
My DB contains "IPS" table.
config.php file =
<?php require_once("path/to/base/ip_user_logs.php"); fSaveIPUserLog(); ?>
log_user_ips.php =
<?php
function fSaveIPUserLog() {
return;
$check = mysql_query("SELECT id FROM ips WHERE ip = '".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."' LIMIT 1") or die(mysql_error());
if (mysql_num_rows($check) > 0):
$check_fetched = mysql_fetch_array($check);
$id = (int)$check_fetched['id'];
else:
mysql_query("INSERT INTO ips SET ip = '".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."'") or die(mysql_error());
$id = (int)mysql_insert_id();
endif;
mysql_free_result($check);
mysql_query("UPDATE ips SET times = times + 1,
host = '".mysql_real_escape_string(gethostbyaddr($_SERVER['REMOTE_ADDR']))."',
agent ='".mysql_real_escape_string($_SERVER['HTTP_USER_AGENT'])."',
script = CONCAT(script, '".mysql_real_escape_string("\n".date('Y-m-d H:i:s').' '.$_SERVER['SCRIPT_NAME'].((count($_GET))? '?'.http_build_query($_GET): ''))."'),
username = IF('".mysql_escape_string($_SESSION[SESSION_PREFIX.'user']['username'])."' != '', '".mysql_escape_string($_SESSION[SESSION_PREFIX.'user']['username'])."', username),
date = NOW()
WHERE id = '$id' LIMIT 1") or die(mysql_error());
return;
}
| 0 | [
2,
4155,
15735,
22,
18,
50,
52,
1017,
13,
19287,
800,
3726,
3726,
4148,
31,
57,
172,
6488,
27,
51,
689,
13,
14093,
2816,
9,
26120,
17,
6738,
1,
16704,
1,
4307,
18,
9,
26120,
9,
31,
589,
452,
2572,
14692,
68,
4155,
15735,
1054,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 highlight new items on the site since last visit with jquery?
===
I have a couple of divs on the site. I'd like to have the new items highlighted since the last visit.
I don't want to use php and mySQL for this, because:
- i don't want to store every users last visit info in the database
- i want this to work with non registered/non logged in users too
- the main content is cached, so i can't output different content to different users.
I think this leaves me one solution: cookies + javascript:
- check if cookie exists
- if yes highlight new items (example add a class to the div)
- update cookie
So, how can I do this?
The divs are currently using the same class, and they have no id, so if needed I can put there the date of the div, or the primary ID of the item. | 0 | [
2,
184,
20,
14373,
78,
3755,
27,
14,
689,
179,
236,
2139,
29,
487,
8190,
93,
60,
800,
3726,
3726,
31,
57,
21,
1335,
16,
13,
12916,
18,
27,
14,
689,
9,
31,
22,
43,
101,
20,
57,
14,
78,
3755,
12528,
179,
14,
236,
2139,
9,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IIS Rewrite Input Types
===
What are the "input" types you can use in rewrite rules in IIS? Eg, "URL", "REQUEST_FILENAME". | 0 | [
2,
595,
18,
27891,
6367,
2551,
800,
3726,
3726,
98,
50,
14,
13,
7,
108,
4881,
7,
2551,
42,
92,
275,
19,
27891,
1761,
19,
595,
18,
60,
12369,
15,
13,
7,
911,
255,
7,
15,
13,
7,
99,
10351,
1,
16877,
7259,
7,
9,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.