unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
how do I send watch warnings to ubuntu's notifier?
===
Is it possible to send the watch warning and errors to the Ubuntu desktop notifier? | 0 | [
2,
184,
107,
31,
2660,
1455,
3590,
18,
20,
287,
12968,
2473,
22,
18,
52,
16292,
60,
800,
3726,
3726,
25,
32,
938,
20,
2660,
14,
1455,
3590,
17,
11908,
20,
14,
287,
12968,
2473,
17404,
52,
16292,
60,
3,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Sporadically losing we.config settings after app pool recycle
===
We have an asp.net application on IIS7, with a services directory containing the following in its web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet" />
<add name="HttpPost" />
</protocols>
</webServices>
</system.web>
</configuration>
This allows the webservices in that directory to operate without issue. Every night, we recycle the app pool on all webservers. Sometimes (3x in the last 10 days) a webserver loses this config when the app pool completes recycling and calls to the webservices in that directory on that webserver fail. Recycling the app pool fixes the issue.
Has anyone seen this behavior before? I realize one possible resolution would be to stop recycling the pools but I'd like to figure out the root issue. Thanks in advance... | 0 | [
2,
28882,
2281,
95,
9,
14093,
2816,
12410,
75,
4865,
3067,
302,
12467,
800,
3726,
3726,
95,
57,
40,
28,
306,
9,
2328,
3010,
27,
595,
18,
465,
15,
29,
21,
687,
16755,
3503,
14,
249,
19,
82,
2741,
9,
14093,
2816,
45,
13,
1,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to pass a variable in the query below
===
I have linq request.
I need get `item.Title` in select. how do this?
var list = (from item in answer.SubItems.OfType<TItemView>()
where item.SubItems != null
from ty in item.SubItems
select ty as TDealRequestView
into request
select new
{
itemTitle = item.Title,//item not visible
Title = request.Title,
}).ToList(); | 0 | [
2,
184,
20,
1477,
21,
7612,
19,
14,
25597,
1021,
800,
3726,
3726,
31,
57,
6294,
1251,
3772,
9,
31,
376,
164,
13,
1,
2119,
79,
9,
22235,
1,
19,
5407,
9,
184,
107,
48,
60,
4033,
968,
800,
13,
5,
2665,
9101,
19,
1623,
9,
7563,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
(Access names from closed excel worksheet through VB.NET.) What is wrong with this?
===
a) I have assigned a name "abc" to range A3 to G3 using name manager functionality in excel 2007
b) I want to access this name from VB.NET to assign values in a loop
How to do this? I am new to VB.NET
Excel workbook will not be open
I tried it using usual VBA like code.
For i = 1 To k
costs("abc").RefersToRange.Cells(3, i).value = "Cost" & i
Errors:
1) 'Microsoft.Office.Interop.Excel.Names' cannot be indexed because it has no default property.
2) Loop control variable cannot be a property or a late-bound indexed array.
Thanks for your help in advance.
| 0 | [
2,
13,
5,
20604,
1817,
37,
827,
20700,
170,
17627,
120,
13,
20468,
9,
2328,
9,
6,
98,
25,
1389,
29,
48,
60,
800,
3726,
3726,
21,
6,
31,
57,
2467,
21,
204,
13,
7,
21880,
7,
20,
978,
21,
240,
20,
489,
240,
568,
204,
1382,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I decrypt a PGP encrypted file using BouncyCastle?
===
Been beating my brains trying to find a solution to a 'simple' problem that has eluded me for a week. I created a pair of PGP key files, public and private and made a passphrase. I sent the public key to someone who encrypted a file and sent it back to me. In the past I have received 'ascii armored' files, basically readable text files and I have been able to decrypt these fine. The file that they sent back is encrypted but not ascii readable.
Given that I have the private key and passphrase, can someone point me to an C# example to decrypt this? I've reached the end of my rope on things to try.
thanks.
| 0 | [
2,
184,
92,
31,
121,
11435,
21,
351,
13321,
29403,
3893,
568,
5963,
14386,
16736,
60,
800,
3726,
3726,
74,
4785,
51,
1964,
18,
749,
20,
477,
21,
4295,
20,
21,
13,
22,
24629,
22,
1448,
30,
63,
931,
3192,
69,
55,
26,
21,
877,
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... |
Special Characters not working in PHP Mail script
===
I have a contact page running on a website of a client that I bought from a script website. It uses class.phpmailer.php to send emails. I tried contacting the Author of the script but he is rather unresponsive so I thought I might try here.
I would like the script to support the Turkish Charset. Whenever a email is sent with special characters like ç, ş, ğ etc. it will send the email but the received email will have characters like ü, ç, ÅŸ etc. instead.
I tried changing the charset in class.phpmailer.php
from: public $CharSet = 'iso-8859-9';
to: public $CharSet = 'utf-8';
but this did not help.
Could somebody please point me in the right direction how to fix this. Could this be something in the PHP or do I need to change something in the server settings? | 0 | [
2,
621,
1766,
52,
638,
19,
13,
26120,
4216,
3884,
800,
3726,
3726,
31,
57,
21,
2203,
2478,
946,
27,
21,
2271,
16,
21,
6819,
30,
31,
2448,
37,
21,
3884,
2271,
9,
32,
2027,
718,
9,
26120,
8079,
106,
9,
26120,
20,
2660,
8517,
18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Twitter Bootstrap Collapse data-target Issue
===
I'm developing a simple webpage, but have come across an issue with the Twitter Bootstrap Collapse.
I have a Web User Control with the following code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Template.ascx.cs" Inherits="Project.Template" %>
<div class="hero-unit-main">
<textarea runat="server" class="input-large span8" id="textarea" rows="2" placeholder="Write a comment" style="overflow:hidden; resize:none" data-toggle="collapse" data-target="#divCollapse"></textarea>
<div id="divCollapse" class="collapse">
<asp:Button runat="server" ID="btnPost" class="btn btn-primary" style="width: 110px; height: 30px;" Text="Post Comment" />
</div>
</div>
Then I have another page which dynamically creates the Web User Control, which is the above Template.ascx Then, I add the Web User Control to a PlaceHolder called "ph".
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Project
{
public partial class HomePage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Template t = (Template) LoadControl("Template.ascx");
ph.Controls.Add(pt);
t = (Template)LoadControl("Template.ascx");
ph.Controls.Add(pt);
}
}
}
The problem here is that whenever I select the TextArea in the website, the collapse effect seems to only apply to the recently added TextArea. I believe this is due to the div id (divCollapse) being identical for all Template that I dynamically create? Is there a way to solve this issue? | 0 | [
2,
10623,
5894,
16514,
6529,
1054,
8,
3958,
3060,
1513,
800,
3726,
3726,
31,
22,
79,
3561,
21,
1935,
2741,
6486,
15,
47,
57,
340,
464,
40,
1513,
29,
14,
10623,
5894,
16514,
6529,
9,
31,
57,
21,
2741,
4155,
569,
29,
14,
249,
1797... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do O run a Java program behind a web app giving the web app access to it's objects?
===
I am currently building a java web app in netbeans. I have come to a point where I am stuck now. I have a draft application for a sports website I am building. The draft has the ability to have every user in the league access it, but I need it to be synchronized for all of them. I want to run a java program or method that will create the draft at the specified date and time, then have centralized variables and a timer that each user can access when they access the web page. So I want every user to see the same thing when they open the draft, regardless of what point in time they open it. Essentially this draft needs to run regardless of whether or not anyone actually opens it.
I am struggling with how I can do this, I was thinking threads, or a cron job, but I have no idea how to gain access to the program I run from my web app using something such as JSTL or jsp:useBean.
Any help at all would be much appreciated. | 0 | [
2,
184,
107,
635,
485,
21,
8247,
625,
439,
21,
2741,
4865,
1438,
14,
2741,
4865,
1381,
20,
32,
22,
18,
3916,
60,
800,
3726,
3726,
31,
589,
871,
353,
21,
8247,
2741,
4865,
19,
4275,
863,
5950,
9,
31,
57,
340,
20,
21,
454,
113,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Translate animation works perfectly when defining with XML and only once perfectly by code - Android
===
I'm getting this weird issue. Basically I'm animating a view with translate animation. (Translate into the screen and out via 2 different events) My code for translate animation is:
final Animation animtopOut = new TranslateAnimation(0, 0, 0, -mainHeaderlayout.getMeasuredHeight());
animtopOut.setDuration(500);
animtopOut.setFillAfter(true);
mainHeaderlayout.setAnimation(animtopOut);
And the xml code is:
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:interpolator="@android:anim/accelerate_interpolator" >
<translate
android:fromYDelta="0%p"
android:toYDelta="-99%p"
android:duration="600"
android:fillAfter="true">
</translate>
</set>
Setting it using the code:
final Animation animtopOut = AnimationUtils.loadAnimation(mContext, R.anim.header_animate_out);
When I trigger the animation it works fine if I use the xml animation properties. **The problem is when i use it via code. Which is what I want. It runs with translate animation only for the first time.** The second time, when it is triggered, the view is inside the screen without animation. Please some one help me if I'm missing any properties. Thanks. | 0 | [
2,
20628,
6236,
693,
5759,
76,
14684,
29,
23504,
17,
104,
382,
5759,
34,
1797,
13,
8,
13005,
800,
3726,
3726,
31,
22,
79,
1017,
48,
5455,
1513,
9,
11374,
31,
22,
79,
14487,
1203,
21,
1418,
29,
20628,
6236,
9,
13,
5,
7028,
6554,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 my mail sending php code secure?
===
<?php
$newline = $_GET['message'];
$newline = str_replace("[N]","\n","$newline");
$newline = str_replace("[n]","\n","$newline");
mail($_GET['to'],$_GET['subject'],$newline,"From: ".$_GET['from']);
header( 'Location: http://site.com/report/report.html' ) ;
?>
This is the code I'm using to send a message to my corporate mail. the variables will be defined in my application. How safe is this?
Again, I uploaded some data via ftp to our server and added the link to that data to the message. How safe is this? | 2 | [
2,
25,
51,
4216,
4907,
13,
26120,
1797,
4315,
60,
800,
3726,
3726,
13,
1,
60,
26120,
5579,
2681,
1143,
800,
5579,
1,
3060,
2558,
22,
3845,
18,
1303,
22,
12660,
5579,
2681,
1143,
800,
13,
9729,
1,
99,
5119,
5,
7,
2558,
103,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to find the nearest cities in Google map API
===
I want to find the nearest cities in the Australia which city i gave for [example][1] In this look out the examples. I tried wit h Google API but no use .How can i achieve like this. Could you help me?
[1]: http://www.wimdu.com/sydney?bounds=-28.156192,153.638745,-37.505032,140.999212&city=New%20South%20Wales,%20Australia¤cy=USD¤t_city=New%20South%20Wales,%20Australia&distance=785&lat=-32.8306119&lng=147.3189786&price_filter%5Bmax%5D=7&price_filter%5Bmin%5D=0&show_big_map=true&sort_by=score&utf8=%E2%9C%93 | 0 | [
2,
184,
20,
477,
14,
6557,
1920,
19,
8144,
2942,
21,
2159,
800,
3726,
3726,
31,
259,
20,
477,
14,
6557,
1920,
19,
14,
750,
56,
136,
31,
492,
26,
636,
29041,
500,
2558,
165,
500,
19,
48,
361,
70,
14,
3770,
9,
31,
794,
9642,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating temporary files with PHP
===
<br>
I have following situation:
My php site is just something like CGI: it parse parameters, call application with provided parameters and then serve result to user.<br>
My application output is image (to be more precise: jpeg image). Now I just save image to some accessible to user directory and return link.<br>
Problem is, that after some time this directory will be full of images.<br>
Is there any easy solution to read this image file from disk, provide it to user browser and then delete it? | 0 | [
2,
2936,
4700,
6488,
29,
13,
26120,
800,
3726,
3726,
13,
1,
5145,
1,
31,
57,
249,
1858,
45,
51,
13,
26120,
689,
25,
114,
301,
101,
272,
2234,
45,
32,
2017,
870,
12905,
15,
645,
3010,
29,
1173,
12905,
17,
94,
1884,
829,
20,
415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Doctrine 2 composite primary key with auto increment
===
In our database we have tables which have no single auto-increment primary key but instead a composite one, which may or may not include an auto-increment field as the first field for that primary key.
For example:
DROP TABLE IF EXISTS `gen_5_23`;
CREATE TABLE IF NOT EXISTS `gen_5_23` (
`id_azienda` int(10) unsigned NULL DEFAULT 1,
`id_sede` int(10) unsigned NULL DEFAULT 1,
`revisione_documento` int(10) unsigned NULL DEFAULT 0,
`premessa_generale` text,
`flag_stampa` char(1) DEFAULT 'N',
PRIMARY KEY (`id_azienda`,`id_sede`,`revisione_documento`),
CONSTRAINT `fk_revisione_documento_gen_5_23` FOREIGN KEY (`revisione_documento`, `id_azienda`, `id_sede`) REFERENCES `agews_revisioni_documenti` (`revisione_documento`, `id_azienda`, `id_sede`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `gen_5_23_consumi`;
CREATE TABLE IF NOT EXISTS `gen_5_23_consumi` (
`id_consumo` int(10) unsigned AUTO_INCREMENT,
`id_azienda` int(10) unsigned NULL DEFAULT 1,
`id_sede` int(10) unsigned NULL DEFAULT 1,
`revisione_documento` int(10) unsigned NULL DEFAULT 0,
`consumo` varchar(255) NULL DEFAULT NULL,
`unita` varchar(255) NULL DEFAULT NULL,
`valore` float(11,2) NULL DEFAULT 0,
PRIMARY KEY (id_consumo,`id_azienda`,`id_sede`,`revisione_documento`),
CONSTRAINT `fk_main_gen_5_23_consumi` FOREIGN KEY (`id_azienda`, `id_sede`, `revisione_documento`) REFERENCES `gen_5_23` (`id_azienda`, `id_sede`, `revisione_documento`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
The key in gen_5_23_consumi is defined as is 'cause there are procedures in our webapp which would blindly take a row, change only id_azienda or id_sede or revisione_documento and then re-insert it, in this way the row would be valid, as it would not be if the primary key was only id_consumo.
We're considering to start using doctrine 2 for database management, but I do not understand from the docs how would you implement such an entity, if it is ever possible. | 0 | [
2,
7521,
172,
12639,
1256,
1246,
29,
3108,
13,
28461,
800,
3726,
3726,
19,
318,
6018,
95,
57,
7484,
56,
57,
90,
345,
3108,
8,
28461,
1256,
1246,
47,
700,
21,
12639,
53,
15,
56,
123,
54,
123,
52,
468,
40,
3108,
8,
28461,
575,
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... |
Zend Framework. No form is displayed
===
Create a form.
**In application.ini ordered**:
includePaths.forms = APPLICATION_PATH "/forms"
**Form - application/forms/UserForm.php**
class Application_Form_Login extends Zend_Form { ... }
**In controller**:
$form = new Application_Form_Login();
$this->view->form = $form;
**In view**:
<?=$this->form?>
**In the end, get this error**:
Warning: include_once(Application/Form/Login.php) [function.include-once]:
failed to open stream:
No such file or directory in /home/..../library/Zend/Loader.php on line 146
Ie the problem is that the search form is not in the directory application / forms and the Application / Form /.
What am I doing wrong? | 0 | [
2,
10526,
43,
6596,
9,
90,
505,
25,
6115,
800,
3726,
3726,
1600,
21,
505,
9,
13,
1409,
108,
3010,
9,
2651,
1905,
1409,
45,
468,
8353,
18,
9,
4190,
18,
800,
3010,
1,
8353,
13,
7,
118,
4190,
18,
7,
13,
1409,
4190,
13,
8,
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... |
From field in Form to email (unknown sender)
===
So I'm having trouble showing the senders full name in the From: in a form to email script.
I have this:
$name = $_POST['name'];
$headers = "From: $name" . PHP_EOL;
$headers .= "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL;
$headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL;
It works if only one word/name is entered in the name field but as soon as their is two or more words it shows (unknown sender).
I could split the names into two fields but I really don't want to do that.
What am I doing wrong?
Thanks! | 0 | [
2,
37,
575,
19,
505,
20,
8517,
13,
5,
1020,
2929,
2660,
106,
6,
800,
3726,
3726,
86,
31,
22,
79,
452,
2572,
3187,
14,
2660,
445,
503,
204,
19,
14,
37,
45,
19,
21,
505,
20,
8517,
3884,
9,
31,
57,
48,
45,
5579,
7259,
800,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to make a global label
===
I want to change the text of a label from another controller you know like defining a global variable. | 0 | [
2,
25,
80,
21,
161,
20,
233,
21,
2062,
1899,
800,
3726,
3726,
31,
259,
20,
753,
14,
1854,
16,
21,
1899,
37,
226,
9919,
42,
143,
101,
14684,
21,
2062,
7612,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Recursively print diamond in python
===
Can anyone help me out here, I am stuck on the base cases for turning this code into a recursive function... Can't use loops in the recursive function obviously.
def diamond(a):
assert a > 0, "width must be greater than zero"
for i in range(0, a, 2):
for c in range(0, a - i, 2):
print(" ", end='')
if a % 2 == 0:
i += 1
for m in range(0, i - 1):
print("*", end='')
print()
for i in range (0, a, 2):
for c in range(0, i, 2):
print(" ", end='')
for m in range(0, a - i):
print("*", end='')
print() | 0 | [
2,
302,
24244,
102,
4793,
5313,
19,
20059,
800,
3726,
3726,
92,
1276,
448,
55,
70,
235,
15,
31,
589,
4549,
27,
14,
1000,
1871,
26,
2101,
48,
1797,
77,
21,
302,
24244,
1990,
9,
9,
9,
92,
22,
38,
275,
19661,
19,
14,
302,
24244,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't handle Push Notification when the app is running in Background, receives push but didn't click on the banner or alert
===
I have implemented push notification in my application. I have tested the push message in my iPod. The result is as follows:
Scenario Tested:
1. Application Running in Front End, iPod not locked - [status = no problem ]
2. Application Running in Front End, iPod locked - [status = no problem ]
3. Application Running in Background, iPod not locked - [status = FOUND PROBLEM] not saved in database + no alert (actually not getting any event handler)
4. Application Running in Background, iPod locked - status = no problem if I open the app immediately, but if I wait for 2 mins, then open my app I don't get the message!
5. Application isn't Running (not in Background + Front End), iPod not locked - (FOUND PROBLEM) not saved in database + no alert {I can see push message as an alert, but I don't click it, my app then contain a badge icon, but if I click on my app, I don't get any information of my push message}
6. Application isn't Running(not in Background + Front End), iPod locked - no problem if I unlock the phone immediately, but If I wait for 2 mins, I lost the message!
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
If I summarize my problem: I am getting the push notification for all scenario, but I can't handle the notification for some scenario if I don't click on the alert/banner! I want to save the messages in my local database in all scenario for special purposes.
I have seen so many links in stackoverflow and other sites as well, but I didn't see the same scenario that someone already faced!
Can anyone help me regarding this issue ? | 0 | [
2,
92,
22,
38,
3053,
3250,
52,
4634,
76,
14,
4865,
25,
946,
19,
2395,
15,
8359,
3250,
47,
223,
22,
38,
10840,
27,
14,
7492,
54,
7863,
800,
3726,
3726,
31,
57,
6807,
3250,
52,
4634,
19,
51,
3010,
9,
31,
57,
7631,
14,
3250,
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... |
find my parent using SQL CTE?
===
I currently use a function call to get some "parent" data. It seems to be quite slow on very large databases. I would like to know if anyone has a better suggestion for accomplishing my task.
I was considering using a CTE but I can't seem to work it out. I'm not sure it is even possible.
ALTER FUNCTION [dbo].[SATFN_Util_FindLevel3Parent](@level4PK as uniqueidentifier)
RETURNS @GroupTable TABLE
(
level3PK uniqueidentifier,
Title nvarchar(255)
)
AS
BEGIN
DECLARE @Parent_Type tinyint, @Parent_FK uniqueidentifier
select @Parent_Type=parent_type, @Parent_FK=parent_fk from level4Table where level4PK = @level4PK
if (@Parent_Type is null or @Parent_Type = null)
begin
/* I need to find a parent group of a group */ /*level 3 can next on itself */
select @Parent_Type=parent_type, @Parent_FK=parent_fk from level3Table where level3PK = @level4PK
if @Parent_Type = 2 /* level 2 - we've gone too far*/
begin
return
end
end
while (@Parent_Type != 3)
begin
if (@Parent_Type = 6)
select @Parent_Type=parent_type, @Parent_FK=parent_fk from level6Table where Proc_Condition_PK = @Parent_FK
if (@Parent_Type = 4)
select @Parent_Type=parent_type, @Parent_FK=parent_fk from level4Table where item_pk = @Parent_FK
if (@Parent_Type = 2) /* level 2 - we've gone too far */
return
end
INSERT INTO @GroupTable
SELECT level3PK,Title FROM level3Table WHERE GROUP_PK = @Parent_FK
RETURN
END
| 0 | [
2,
477,
51,
4766,
568,
4444,
255,
13,
22447,
60,
800,
3726,
3726,
31,
871,
275,
21,
1990,
645,
20,
164,
109,
13,
7,
18908,
7,
1054,
9,
32,
2206,
20,
44,
1450,
2276,
27,
253,
370,
6018,
18,
9,
31,
83,
101,
20,
143,
100,
1276,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
FQL Facebook query and strange LIMIT behavior
===
Well i got alot of posts in my stream but when i do:
SELECT type,source_id,actor_id,post_id,type,attachment,message,permalink,description,created_time FROM stream WHERE source_id = xxx ORDER BY created_time DESC limit 15
it only returns 7 rows... it shouldn't returns 15 rows?
someone could explain it for me?
thanks. | 0 | [
2,
398,
22402,
9090,
25597,
17,
2578,
4496,
3257,
800,
3726,
3726,
134,
31,
330,
21,
5639,
16,
9868,
19,
51,
3766,
47,
76,
31,
107,
45,
5407,
1001,
15,
12097,
1,
1340,
15,
20908,
1,
1340,
15,
6962,
1,
1340,
15,
4474,
15,
14986,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Segmentaion Fault
===
Im trying to write a simple program that takes in the users input, then prints it out. Its to keep doing this until the user types "done". But when I run the bellow code i get 01"input"
then Segmentation Fault ( core dumped ) . I think this has something to do with getline() but i don't know. I would appreciate it if someone could explain to me why its not working and how to fix it.
#include <stdio.h>
#include <stdlib.h>
int main(){
char* line;
size_t size ;
size = 100;
char* done;
done = "done";
printf("0");
while ( strcmp(line, "done") != 0 ) {
printf("1");
getline(&line, &size, stdin);
printf("2");
printf("%s\n", line);
}
return 0;
}
| 0 | [
2,
5631,
58,
872,
4173,
800,
3726,
3726,
797,
749,
20,
2757,
21,
1935,
625,
30,
1384,
19,
14,
3878,
6367,
15,
94,
12202,
32,
70,
9,
82,
20,
643,
845,
48,
163,
14,
4155,
2551,
13,
7,
43,
849,
7,
9,
47,
76,
31,
485,
14,
2304... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 strip exif data from images uploaded to amazon S3?
===
Is there a way to have S3 automatically strip any exif data? | 0 | [
2,
184,
20,
4998,
1396,
821,
1054,
37,
3502,
23782,
20,
8059,
13,
18,
240,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
57,
13,
18,
240,
7499,
4998,
186,
1396,
821,
1054,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Android always returns to first Activity when pressing Home after using Intent.FLAG_ACTIVITY_CLEAR_TOP once from notification manager
===
I have a really annoying problem and I keep playing with all the flags/launchMode combinations without any luck. Hope somebody can help me :-)
In my android application I have to activities, A and B.
for the flow
> A -> B -> press Home -> returns to app
Activity B is displayed when the user returns which is just what I expect.
Now, I have a notification that would open Activity A no matter what the activities stack was before.
For that purpose, when invoking the intent from a notification I use
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
So now for the flow
A -> B -> press Home -> Receive a notification -> open it
Activity A is displayed, which is also what I expect.
The problem is that from this point forward (until I kill the application), if I return the first flow, activity A is always displayed even if activity B was top of the stack when I pressed Home...
I guess that since I gave Activity A the flag `Intent.FLAG_ACTIVITY_CLEAR_TOP`, it keeps clearing the stack every time the application returns.
Is there any way to undo this flag setting or something, and keep both flows working as I expect?
Thanks,
Maxim | 0 | [
2,
13005,
550,
4815,
20,
64,
2358,
76,
7196,
213,
75,
568,
6936,
9,
22868,
1,
19348,
1,
18600,
1,
3880,
382,
37,
52,
4634,
1382,
800,
3726,
3726,
31,
57,
21,
510,
17610,
1448,
17,
31,
643,
791,
29,
65,
14,
9318,
118,
18494,
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... |
using header function to redirect
===
I'm new to programming in PHP. Kindly bear me...
when using header function, refresh option is not working when using variable from post method(dynamically). when hard-coded the number its working. I tried different options. You can see my whole code here.not succeeded to make refresh work dynamically. Can someone help?
<?php
if($_POST['time']>0) {
$t = $_POST['time'];
$u =$_POST['url'];
echo "You will be redirected to the " .$u . " website in " .$t. "seconds";
//header("refresh:5; url=http://www.google.com");
//header("refresh:($_POST['time']);url=($_POST['url'])");
header('refresh: ' .$t);
header('Location: '.$u);
exit;
}
?>
| 0 | [
2,
568,
157,
106,
1990,
20,
302,
14706,
800,
3726,
3726,
31,
22,
79,
78,
20,
3143,
19,
13,
26120,
9,
22215,
2746,
55,
9,
9,
9,
76,
568,
157,
106,
1990,
15,
24905,
4255,
25,
52,
638,
76,
568,
7612,
37,
678,
2109,
5,
20985,
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... |
EXT JS load content image data into a window
===
I'm having trouble loading image data into a draggable window using EXT JS.
The link to a process that streams the image file is in the code.
I've tried using
var plotWin = Ext.create('Ext.Window', {
title: 'Plot',
width: 600,
height: 400,
x: 10,
y: 200,
loader : {
url : "http://209.105.242.30/custom/webimg",
autoLoad : true,
renderer : 'data'
},
plain: true,
headerPosition: 'top',
layout: 'fit',
items: {
border: false
}
});
and then
plotWin.show();
But this does not seem to work. | 0 | [
2,
1396,
38,
487,
18,
6305,
2331,
1961,
1054,
77,
21,
1463,
800,
3726,
3726,
31,
22,
79,
452,
2572,
12797,
1961,
1054,
77,
21,
5501,
263,
579,
1463,
568,
1396,
38,
487,
18,
9,
14,
3508,
20,
21,
953,
30,
9464,
14,
1961,
3893,
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... |
gawk running out of memory when going through large files: can i optimize my code?
===
I'm using gawk to go through a large textual corpus (about 3-4GB, a compilation of ebooks) in order to print out every association of 3 words that appears at least 3 times, in order to produce linguistic statistics. Here is the code:
content of file.awk:
BEGIN { RS="[^[:alnum:]]+" }
{ w1 = w2; w2 = w3; w3 = $0 }
NR > 2 { count[tolower(w1 " " w2 " " w3)]++ }
END {
for (phrase in count) {
if (count[phrase] >= 3) {
print phrase, count[phrase]
}
}
}
command: gawk -f file.awk mytxtfile > output
It works fine with small files (a few hundreds MB) but I can't get it to work with files bigger than 1GB: gawk eats all my RAM (8GB) in less than a minute, then starts eating my swap and the whole system eventually freezes.
Do you know how I could optimize the code, even if it eventually takes much longer?
Thank you very much | 0 | [
2,
28182,
946,
70,
16,
1912,
76,
228,
120,
370,
6488,
45,
92,
31,
22864,
51,
1797,
60,
800,
3726,
3726,
31,
22,
79,
568,
28182,
20,
162,
120,
21,
370,
1854,
6948,
15482,
13,
5,
6901,
203,
8,
300,
11400,
15,
21,
4868,
16,
26751... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 when i run rake db:migrate installing fedena
===
I'm installing Fedena and struggling for two weeks now.When i run
rake db:migrate
i get this error
database configuration does not specify adapter.
Please help
Thanks
Clement Osei | 0 | [
2,
7019,
76,
31,
485,
21009,
13,
9007,
45,
10183,
5487,
25429,
6068,
3591,
800,
3726,
3726,
31,
22,
79,
25429,
6068,
3591,
17,
7587,
26,
81,
1342,
130,
9,
3185,
31,
485,
21009,
13,
9007,
45,
10183,
5487,
31,
164,
48,
7019,
6018,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Time of execution of a portion of code in C++
===
How do you compute the time (in MS) of execution of a portion of code in C++ ? | 0 | [
2,
85,
16,
5769,
16,
21,
2980,
16,
1797,
19,
272,
20512,
800,
3726,
3726,
184,
107,
42,
23909,
14,
85,
13,
5,
108,
4235,
6,
16,
5769,
16,
21,
2980,
16,
1797,
19,
272,
20512,
13,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to show a node in a block in drupal 7
===
I am trying to make frontpage and want to show a poll node on frontpage in a block. How can I do this? I have tried views but I am unable to find any way. how can I do this?
My second question is that how can I customize the css of the site?
Any help would be highly appreciated.
Regards. | 0 | [
2,
184,
20,
298,
21,
15421,
19,
21,
1921,
19,
15708,
6720,
453,
800,
3726,
3726,
31,
589,
749,
20,
233,
431,
6486,
17,
259,
20,
298,
21,
4994,
15421,
27,
431,
6486,
19,
21,
1921,
9,
184,
92,
31,
107,
48,
60,
31,
57,
794,
414... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Setting function's prototype to a private variable
===
I am essentially trying to set a function's prototype within the function itself. The purpose is to hide many functions inside one public function, yet keep the functionality.
Here is the non-working code in a [jsFiddle][1]. The intended behaviour is displaying "Greetings!" and "Take me to your leader."
The code can be 'fixed' by moving the `Outer.prototype` lines and the `Extensions` function out of the `Outer` function to the global scope. However, this means the `Extensions` function is public and free for direct use, which it shouldn't be.
What would be a good way to achieve this 'private' behaviour?
[1]: http://jsfiddle.net/j6zd9/ | 0 | [
2,
2697,
1990,
22,
18,
7063,
20,
21,
932,
7612,
800,
3726,
3726,
31,
589,
7398,
749,
20,
309,
21,
1990,
22,
18,
7063,
363,
14,
1990,
1145,
9,
14,
2131,
25,
20,
3077,
151,
3719,
572,
53,
317,
1990,
15,
768,
643,
14,
18548,
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... |
Optimization of xargs and agrep
===
I am using the below script to do agrep. before the step of agrep, ,my output is the list of ACCOUNTS which is here
`Output 1
321121212
122132432
566575676
456456454`
`zgrep -i XX FILE1|grep -o "ACCOUNT=[0-9|A-Z]*"|xargs -L 1 -I {} agrep -dEOE {} FILE2`
After this for each line in o/p 1, there is a corresponding block in FILE 2. As of now, if I do this I will be able to fetch one line from output 1 and feed as an input to agrep so that it would fetch the corresponding block.
`My question is I need to optimize this, i.e in the script it is traversing the file 4 times for 4 agreps for each of the RID's. **Is there any option to provide the 4 RID's input together so that I would be able to get the corresponding blocks in 1 agrep statement**` . I have explored a grep -e option . But can that be used in agrep. Help regarding this will be really useful to me
| 0 | [
2,
21597,
16,
993,
10663,
18,
17,
21,
6879,
306,
800,
3726,
3726,
31,
589,
568,
14,
1021,
3884,
20,
107,
21,
6879,
306,
9,
115,
14,
1424,
16,
21,
6879,
306,
15,
13,
15,
915,
5196,
25,
14,
968,
16,
5310,
56,
25,
235,
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... |
Unable to fetch Nearby Venues from Foursquare
===
I am using Foursquare API and i am trying to fetch nearby venues This is the code i am using
public ArrayList<FsqVenue> SearchBykeyword(double latitude, double longitude, String query) throws Exception {
ArrayList<FsqVenue> venueList = new ArrayList<FsqVenue>();
try {
String ll = String.valueOf(latitude) + "," + String.valueOf(longitude);
URL url = new URL(API_URL + "/venues/search?ll=" + ll + "&query=" + query + "&radius=" + 50 + "&oauth_token=" + mAccessToken + "&v=20120610");
Log.d(TAG, "Opening URL " + url.toString());
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.setDoInput(true);
urlConnection.connect();
String response="";
try{
response = streamToString(urlConnection.getInputStream());
} catch (Exception e) {
String error= streamToString(urlConnection.getErrorStream());
Log.d("error", error);
throw e;
}
JSONObject jsonObj = (JSONObject) new JSONTokener(response).nextValue();
JSONArray groups = (JSONArray) jsonObj.getJSONObject("response").getJSONArray("groups");
int length = groups.length();
if (length > 0) {
for (int i = 0; i < length; i++) {
JSONObject group = (JSONObject) groups.get(i);
JSONArray items = (JSONArray) group.getJSONArray("items");
int ilength = items.length();
for (int j = 0; j < ilength; j++) {
JSONObject item = (JSONObject) items.get(j);
FsqVenue venue = new FsqVenue();
venue.id = item.getString("id");
venue.name = item.getString("name");
JSONObject location = (JSONObject) item.getJSONObject("location");
Location loc = new Location(LocationManager.GPS_PROVIDER);
loc.setLatitude(Double.valueOf(location.getString("lat")));
loc.setLongitude(Double.valueOf(location.getString("lng")));
venue.location = loc;
//venue.address = location.getString("address");
venue.distance = location.getInt("distance");
//venue.herenow = item.getJSONObject("hereNow").getInt("count");
venue.type = group.getString("type");
venueList.add(venue);
}
}
}
} catch (Exception ex) {
throw ex;
}
return venueList;
}
On this Line :
urlConnection.setRequestMethod("GET");
I am getting this Error :
07-08 22:45:16.432: W/System.err(27663): java.net.ProtocolException: Connection already established
07-08 22:45:16.432: W/System.err(27663): at java.net.HttpURLConnection.setRequestMethod(HttpURLConnection.java:654)
07-08 22:45:16.440: W/System.err(27663): at libcore.net.http.HttpsURLConnectionImpl.setRequestMethod(HttpsURLConnectionImpl.java:143)
07-08 22:45:16.440: W/System.err(27663): at com.android.guideme.FoursquareApp.SearchBykeyword(FoursquareApp.java:207)
07-08 22:45:16.447: W/System.err(27663): at com.android.guideme.GuideMeService$1.run(GuideMeService.java:89)
I am not sure what it means or what the problem is any ideas?
Thanks In advance
| 0 | [
2,
2343,
20,
18312,
1754,
9771,
37,
222,
12300,
800,
3726,
3726,
31,
589,
568,
222,
12300,
21,
2159,
17,
31,
589,
749,
20,
18312,
1754,
9771,
48,
25,
14,
1797,
31,
589,
568,
317,
7718,
5739,
1,
11754,
1251,
3124,
4185,
1,
2122,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 doesn't piping work inside a callback
===
I have the following server:
http.createServer(function (req, res) {
fs.mkdir(__dirname + '/output', function (err) {
req.pipe(fs.createWriteStream(__dirname + '/output/file.txt'));
res.end();
});
}).listen(3000);
I am then using [request](http://github.com/mikeal/request) to pipe a stream to the server.
var fs = require('fs');
var request = require('request');
var crs = fs.createReadStream(__dirname + '/file.txt');
var r = request.post('http://0.0.0.0:3000');
crs.pipe(r);
Sometimes it works but most of the time /output/file.txt is empty. When I move the req.pipe(...) outside of the mkdir callback it works every time. Could anybody explain why it is happening?
| 0 | [
2,
483,
1437,
22,
38,
11280,
68,
170,
572,
21,
645,
1958,
800,
3726,
3726,
31,
57,
14,
249,
8128,
45,
7775,
9,
6037,
1373,
10321,
106,
5,
22359,
13,
5,
99,
1251,
15,
10719,
6,
13,
1,
398,
18,
9,
79,
197,
9035,
5,
1,
9035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Scrollable band of images, and other things inside screen using MonoTouch
===
I am looking for sample code, documentation, or even a third party control I could use to do the following.
I'd like to create a band on my iOS screen that only takes up part of the screen. This could be scrollable left and right. The content inside the band would be information. Icons. Pictures. Etc. Each item would be clickable as well.
Any thoughts on how to accomplish this in MonoTouch? | 0 | [
2,
12159,
579,
323,
16,
3502,
15,
17,
89,
564,
572,
2324,
568,
4129,
15725,
800,
3726,
3726,
31,
589,
699,
26,
5717,
1797,
15,
13945,
15,
54,
166,
21,
422,
346,
569,
31,
110,
275,
20,
107,
14,
249,
9,
31,
22,
43,
101,
20,
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... |
How to Insert BigInteger into MySQL database using java
===
My Question is: How can I inset a BigInteger variable as BIGINT in MySQL DB?? It seems to me that the preparedstatement object in Java does not have a method supports this type? | 0 | [
2,
184,
20,
14692,
580,
6391,
13699,
77,
51,
18,
22402,
6018,
568,
8247,
800,
3726,
3726,
51,
1301,
25,
45,
184,
92,
31,
19,
3554,
21,
580,
6391,
13699,
7612,
28,
580,
6391,
19,
51,
18,
22402,
13,
9007,
60,
60,
32,
2206,
20,
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... |
Why is my block declaration giving me an incompatible pointer error?
===
I'm declaring a block like this:
void (^callback)(NSString *_accessToken) = ^{
// do something interesting with _accessToken
}
but XCode keeps telling me
Incompatible block pointer types initializing void(^__strong)(NSString *__strong)
with an expression of type void (^)(void)
What am I doing wrong? | 0 | [
2,
483,
25,
51,
1921,
7098,
1438,
55,
40,
19,
20049,
454,
106,
7019,
60,
800,
3726,
3726,
31,
22,
79,
15594,
21,
1921,
101,
48,
45,
11364,
13,
5,
1,
9200,
1958,
6,
5,
2172,
11130,
1637,
1,
20604,
262,
2853,
6,
800,
13,
1,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS WebKit Overflow Hidden Border Radius Issue
===
I have a list of circles that when clicked animate a div (.active) from top to bottom that gets displayed within the original circle. In Firefox the animated divs are masked but in Safari and Chrome the animated div (.active) can be seen and don't mask themselves to the parent li.
I've seen a few other posts with this issue but not with animating.
Has anyone else had this issue or know of a solution?
HTML
<ul class="circles">
<li class="image-1"><div class="active"><p>text text</p></div></li>
<li class="image-2"><div class="active"><p>text text</p></div></li>
<li class="image-3"><div class="active"><p>text text</p></div></li>
</ul>
CSS
ul.circles li{float:left; text-align: center; background-color:blue; height:186px; width:186px; border-radius:200px; border:10px solid white; overflow:hidden; display:block; position:relative;}
ul.circles li.image-1{background:url(image.png) 0 0 no-repeat;}
ul.circles li .active{background: rgb(154, 189, 44); position:relative; width:186px; height:186px; top:190px; border-radius:200px;}
JS
$('#home .circles li').toggle(function() {
$(this).find('div').animate({opacity: 0.8, top:'0'}, 1000 )
},function() {
$(this).find('div').animate({opacity: 0.7, top:'190px'}, 1000 );
}); | 0 | [
2,
272,
18,
18,
2741,
13703,
20285,
3689,
1862,
13288,
1513,
800,
3726,
3726,
31,
57,
21,
968,
16,
7845,
30,
76,
15802,
14487,
591,
21,
13,
12916,
13,
5,
9,
7889,
6,
37,
371,
20,
2129,
30,
3049,
6115,
363,
14,
501,
2775,
9,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Display the value of a variable property in LLDB debugger?
===
I'm using a breakpoint with Action "Log Message", and I want to print the row of an NSIndexPath. So I tried: `cell row @indexPath.row@` but nothing gets printed. I also tried using a debugger command: `expr (void)NSLog(@"indexPath row:%i", indexPath.row)` but I get an error: `error: property 'row' not found on object of type 'NSIndexPath *'`
What am I doing wrong? | 0 | [
2,
3042,
14,
1923,
16,
21,
7612,
1354,
19,
13,
211,
9007,
121,
2345,
11356,
60,
800,
3726,
3726,
31,
22,
79,
568,
21,
1442,
3132,
29,
1028,
13,
7,
5567,
2802,
7,
15,
17,
31,
259,
20,
4793,
14,
3131,
16,
40,
13,
2172,
25671,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# httprequest POST method timeout when using proxy
===
the following is my code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Timeout = timeout;
request.ReadWriteTimeout = timeout;
request.Proxy = new WebProxy("http://" + proxyUsed + "/", true);
request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7";
request.CookieContainer = new CookieContainer();
request.AllowAutoRedirect = true;
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "";
foreach (string[] p in parameter)
{
if (postData != "")
postData += "&";
postData += string.Format("{0}={1}", p[0], p[1]);
}
byte[] data = encoding.GetBytes(postData);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (Stream newStream = request.GetRequestStream())
{
newStream.Write(data, 0, data.Length);
newStream.Close();
}
using (WebResponse myResponse = request.GetResponse())
{
using (StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8))
{
result = sr.ReadToEnd();
httpLink = myResponse.ResponseUri.AbsoluteUri;
sr.Close();
}
myResponse.Close();
}
I have encountered a problem that when makeing a POST http request to a Webpage. When I use direct connection it works fine. But if I use proxy, it throw a timeout exception. However, if I set the postData to be empty, it works fine even I am using proxy.
What's the most likely reason for this?
Thanks. | 0 | [
2,
272,
5910,
7775,
99,
10351,
678,
2109,
85,
1320,
76,
568,
27188,
800,
3726,
3726,
14,
249,
25,
51,
1797,
45,
7775,
458,
3692,
10351,
3772,
800,
13,
5,
21127,
458,
3692,
10351,
6,
458,
3692,
10351,
9,
6037,
1373,
5,
911,
255,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Starting out with reversing
===
I am just starting to learn reverse engineering..So I am referring the reversing secrets book and binary auditor package. Besides this, can anyone tell me what should I read or refer to if I want to perfect my conversion of assembly into c/c++ (decompilation), even though I only know C and not cpp. I also want to do WinAPI; any reading material besides Forger's tut and also that are short..
Thanks in advance | 4 | [
2,
1422,
70,
29,
28829,
800,
3726,
3726,
31,
589,
114,
1422,
20,
2484,
7006,
1552,
9,
9,
656,
31,
589,
7378,
14,
28829,
7818,
360,
17,
14171,
19172,
6030,
9,
3410,
48,
15,
92,
1276,
494,
55,
98,
378,
31,
1302,
54,
5017,
20,
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... |
Python XML parsing comparison of files
===
I have to compare two XML files using Python. Each has a list of items and I have to output which items do not appear in both. Each item has various properties which need to agree to see if it's the same item.
Which parser would be the most suitable. It has to already be included in Python 2.7. I looked at etree but does it enable me to do what I want easily? Or is there something else that would be more suitable. Thanks! | 0 | [
2,
20059,
23504,
2017,
18,
68,
6050,
16,
6488,
800,
3726,
3726,
31,
57,
20,
11590,
81,
23504,
6488,
568,
20059,
9,
206,
63,
21,
968,
16,
3755,
17,
31,
57,
20,
5196,
56,
3755,
107,
52,
1893,
19,
156,
9,
206,
9101,
63,
617,
3704... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting the path of the app
===
I'm writing a system app and I wish to read data from internal memory, and I'm wondering where the data can actually be stored? How can I get this programmatically? I know there's a function getFilesDir() but I'm not sure how to use this.
I'm opening the file as follows:
FileOutputStream fos = null;
try {
fos = openFileOutput("myfile.txt", Context.MODE_PRIVATE);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
try {
fos.write(packageName.getBytes());
} catch (IOException e) {
e.printStackTrace();
}
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
| 0 | [
2,
1017,
14,
2013,
16,
14,
4865,
800,
3726,
3726,
31,
22,
79,
1174,
21,
329,
4865,
17,
31,
2536,
20,
1302,
1054,
37,
3117,
1912,
15,
17,
31,
22,
79,
5712,
113,
14,
1054,
92,
1121,
44,
8214,
60,
184,
92,
31,
164,
48,
625,
673... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add a left padding to the WPF CheckBox control?
===
Good day,
I'm in the process of styling a CheckBox control in an WPF application. My goal is to add a padding to the left of the CheckBox 'default' rectangle/border.
By default the padding is only applied to the content area of the CheckBox. Margin does work on the left, but in this case the CheckBox doesn't register the click to check the box.
Anyone got an idea? Thanks in advance!! | 0 | [
2,
184,
20,
3547,
21,
225,
4432,
3258,
20,
14,
619,
7721,
2631,
5309,
569,
60,
800,
3726,
3726,
254,
208,
15,
31,
22,
79,
19,
14,
953,
16,
23020,
21,
2631,
5309,
569,
19,
40,
619,
7721,
3010,
9,
51,
1195,
25,
20,
3547,
21,
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... |
Allow Event To Proceed
===
I have a custom date picker jQuery plugin. On form submission, the date picker validates the selected date to check whether it is valid or not. In case it is not, it displays an error message, otherwise it *should* proceed and post the form.
What happens is that in case the user inputs a valid date on the first time, everything works fine. But, in case the user inputs an invalid date, the error message shows up and then when the user fixes the date, it still doesn't post the form. It just sits there.
Here's the part of the code that handles the form submit event:
var hiddenInput = $('.custom-date-picker-value');
var form = hiddenInput.closest('form');
$(form).submit(function (e) {
selectedMonth = monthSelect.find('option:selected').text();
selectedYear = yearSelect.find('option:selected').text();
selectedDay = daySelect.find('option:selected').text();
$('#dateValidationMessage').html('');
if (selectedMonth == '' || selectedDay == '' || selectedYear == '') {
$('#dateValidationMessage').html($('#dateOfBirthRequired').val());
e.preventDefault();
}
else {
var dateValue = selectedMonth + '/' + selectedDay + '/' + selectedYear;
var dob = new Date(dateValue);
var modifiedDate = new Date(dob.getFullYear() + 2, dob.getMonth(), dob.getDay());
if (modifiedDate > new Date()) {
$('#dateValidationMessage').html($('#AgeGreaterThan').val());
e.preventDefault();
}
else {
hiddenInput.val(dateValue);
console.log('date is valid');
}
}
});
When the user inputs a valid date, I can see a trace being output to the console saying "date is valid", but for some reason the form does not get submitted.
What's happening here? | 0 | [
2,
1655,
807,
20,
11158,
800,
3726,
3726,
31,
57,
21,
5816,
1231,
2036,
106,
487,
8190,
93,
10922,
108,
9,
27,
505,
10923,
15,
14,
1231,
2036,
106,
7394,
7759,
14,
1704,
1231,
20,
2631,
1472,
32,
25,
7394,
54,
52,
9,
19,
610,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can there be more than one <itunes:author>-tag in a RSS feed?
===
I want to create a RSS feed for a podcast with more than one author. Shall I write
<item>
...
<itunes:author>Person 1, Person 2</itunes:author>
...
</item>
or
<item>
...
<itunes:author>Person 1</itunes:author>
<itunes:author>Person 2</itunes:author>
...
</item>
? | 0 | [
2,
92,
80,
44,
91,
119,
53,
13,
1,
12866,
2696,
45,
10007,
1,
8,
8628,
19,
21,
13,
1224,
18,
4063,
60,
800,
3726,
3726,
31,
259,
20,
1600,
21,
13,
1224,
18,
4063,
26,
21,
15124,
29,
91,
119,
53,
1314,
9,
3004,
31,
2757,
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... |
HTML5 History API popsate Chrome Issue
===
Thank you in advance for any help.
I am creating a Single page application that uses tabs to display content.
What I want is when users click tabs, it gets pushed to the history, so that for example when the user clicks back, the previously selected tab gets selected. The user also has the option of closing tabs. So here I need to 'rewrite' the history to remove instances of this tab.
I have all of this working but only in Firefox (I don't have other browsers to test in at work). Chrome doesn't seem to fire the popsate event when I call history.go.
This is the code that I have and that works exactly how I want it to in Firefox.
function removeTab(tabID) {
isHistoryrewriteBool = true;
// Remove all tabID references in history array
var a = 0;
while (a != -1) {
a = tabHistory.indexOf(tabID);
if (a != -1)
{
tabHistory.splice(a, 1);
}
}
// This routine simply strips out any tabID references that are the same consequitively.
// e.g. [tabOne, tabOne, tabTwo, tabTwo] would become [tabOne, tabTwo]
// You could end up in this situation if the tab you just removed was situated between the duplicate tabs
// e.g [tabOne, tabThree, tabOne, tabTwo, tabThree, tabTwo]
var previousTab;
for (var i = tabHistory.length; i >= 0; i--) {
if (tabHistory[i] === previousTab)
{
tabHistory.splice(i, 1);
}
previousTab = tabHistory[i];
}
var ourHistoryLength = history.length - webAppStartHistoryLength;
var goBack = ourHistoryLength - ((ourHistoryLength * 2)- 1);
// This is supposed to move the history pointer to where we started writing history.
// Only works in FF.
history.go(goBack);
//Now rewrite the history based on our array.
for (var i = 0; i < tabHistory.length; i++) {
if (i === 0 && tabHistory.length != 1)
{
history.replaceState({ id: i }, " ", " ");
}
else{
history.pushState({ id: i }, " ", " ");
}
}
// Select the last tab on the history array.
var tabIndx = -1;
var tab = $("#" + tabHistory[tabHistory.length - 1]);
if (tab !== null) {
tabIndx = tab.index();
}
$("#MainTabs").data("kendoTabStrip").select(tabIndx);
currentHistoryPointer = tabHistory.length - 1;
isHistoryrewriteBool = false;
}
Does anyone know why Chrome doesn't fire the popsate event in this situation? If I comment out all of the code apart from the history.go, then it does fire the popsate event.
Again, thank you in advance for any help.
Dom | 0 | [
2,
13,
15895,
264,
447,
21,
2159,
1675,
18,
1373,
13,
12985,
1513,
800,
3726,
3726,
3531,
42,
19,
3612,
26,
186,
448,
9,
31,
589,
2936,
21,
345,
2478,
3010,
30,
2027,
6523,
18,
20,
3042,
2331,
9,
98,
31,
259,
25,
76,
3878,
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... |
QTP v 10.0 on windows 7 - need to solve the issue with getVisibleText •
===
On Windows XP getVisibleText was working fine in scripts.
After migration to QTP10 and Windows 7 was done they stopped to work.
Is there a good workaround for that issue? (migration to QTP11 is not an option) | 0 | [
2,
2593,
13726,
566,
332,
9,
387,
27,
1936,
453,
13,
8,
376,
20,
8402,
14,
1513,
29,
164,
3762,
3426,
11969,
13,
1,
800,
3726,
3726,
27,
1936,
23045,
164,
3762,
3426,
11969,
23,
638,
1123,
19,
17505,
9,
75,
8443,
20,
2593,
13726... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iPhone and iPad video purchasing & storage (In App Purchase)
===
I am currently looking into what would be best way to handle video within the iOS.
I have 6 videos, estimated at about 2 hours worth of video.
Each video contains images that move, pan, zoom and rotate on the screen.
I need optimal quality, however, all my attempts at compressing the video to a decent file size to use has produced bad results on the zooming parts of the video.
I require each video to be purchased/unlocked using an in app purchase.
Any suggestions on what would be the best way to compress/store the video? File Formats? Compression Advice? Storage ideas?
Thanks in advance. | 2 | [
2,
21024,
17,
31,
8240,
763,
14828,
279,
4326,
13,
5,
108,
4865,
3301,
6,
800,
3726,
3726,
31,
589,
871,
699,
77,
98,
83,
44,
246,
161,
20,
3053,
763,
363,
14,
13,
7760,
9,
31,
57,
400,
6610,
15,
2744,
35,
88,
172,
974,
2715... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 C++ code get SIGILL on ideone.com?
===
The question title says it all. Why does it happen? The code works and generates no warnings with GCC 4.7 on Linux and MSVC++ 2010 on Windows. Yet, on ideone.com it [crashes][1] with `SIGILL`. Is undefined behavior involved here?
#include <iostream>
#include <cstdarg>
using namespace std;
enum types
{
INT,
DOUBLE,
CHAR,
STRING
};
struct mt
{
types type;
union
{
int i;
double d;
char c;
const char *s;
} val;
mt(int i)
: type(INT)
{
val.i = i;
}
mt(double d)
: type(DOUBLE)
{
val.d = d;
}
mt(char c)
: type(CHAR)
{
val.c = c;
}
mt(const char *s)
: type(STRING)
{
val.s = s;
}
};
void print(int n, ...)
{
va_list ap;
va_start(ap, n);
for (int i = 0; i < n; i++)
{
mt x(va_arg(ap, mt));
switch (x.type)
{
case INT:
cout << x.val.i << endl;
break;
case DOUBLE:
cout << x.val.d << endl;
break;
case CHAR:
cout << x.val.c << endl;
break;
case STRING:
cout << x.val.s << endl;
break;
}
}
va_end(ap);
}
int main()
{
print(4, mt(2), mt(4.2), mt('a'), mt("Hello"));
}
[1]: http://ideone.com/kOKBm | 0 | [
2,
483,
630,
48,
272,
20512,
1797,
164,
2769,
13859,
27,
13,
3448,
849,
9,
960,
60,
800,
3726,
3726,
14,
1301,
581,
898,
32,
65,
9,
483,
630,
32,
2384,
60,
14,
1797,
693,
17,
7920,
18,
90,
3590,
18,
29,
489,
3384,
268,
9,
46... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 this valid to use bit fields with union?
===
I have used bit field with a structure like this,
struct
{
unsigned int is_static: 1;
unsigned int is_extern: 1;
unsigned int is_auto: 1;
} flags;
Now i wondered to see if this can be done with a union so i modified the code like,
union
{
unsigned int is_static: 1;
unsigned int is_extern: 1;
unsigned int is_auto: 1;
} flags;
I got the bit field with union works but all those fields in the union are given to a single bit as I understood from output. Now I am seeing it is no erroneous to use bit fields with union, but this is seemed to me using like this is not operationally correct. So what is the answer to is it valid to use bit field with union??? | 0 | [
2,
25,
48,
7394,
20,
275,
1142,
2861,
29,
667,
60,
800,
3726,
3726,
31,
57,
147,
1142,
575,
29,
21,
1411,
101,
48,
15,
13,
10346,
13,
1,
28839,
19,
38,
25,
1,
18077,
45,
137,
73,
28839,
19,
38,
25,
1,
1706,
8766,
45,
137,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Pagination using jquery in Jsp page
===
i want paging using jquery in jsp page.
i want page wise navigation and data should come dynamically. as well when i m going to click on page number at that time data should load..it must not be preloaded.
Please suggest.
similar like [ingrid][1]
[1]: http://reconstrukt.com/ingrid/src/example3.html | 0 | [
2,
19006,
108,
857,
568,
487,
8190,
93,
19,
487,
3401,
2478,
800,
3726,
3726,
31,
259,
19006,
68,
568,
487,
8190,
93,
19,
487,
3401,
2478,
9,
31,
259,
2478,
6714,
8368,
17,
1054,
378,
340,
7782,
1326,
9,
28,
134,
76,
31,
307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
reading a table in R?
===
I have a txt file with the following structure:
NAME--DATA1------DATA2
a--------10------------1,2,3
b--------6---------------8,9
c--------20-------------5,6,7,8
The first line represent the header and the data is separated by tabs.
I need to put the elements of DATA1 in a list or vector in a way that I can traverse the elements one by one. Also I need to extract the elements of DATA2 for each NAME and to put them in a list so I can traverse then individually, e.g. get the elements 8,9 for NAME b and put it into a list.
How I can do that both operations? I know that I can use read table and $ for accessing individual elements, but I am stuck.
info<-read.table("table1", header=FALSE,sep="\t")
namelist<-list(info$NAME)
| 0 | [
2,
1876,
21,
859,
19,
761,
60,
800,
3726,
3726,
31,
57,
21,
20225,
38,
3893,
29,
14,
249,
1411,
45,
204,
8,
8,
18768,
165,
8,
8,
8,
8,
8,
8,
18768,
135,
21,
8,
8,
8,
8,
8,
8,
8,
8,
1036,
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... |
Casting issue while returning value in method in EF4.0
===
I am trying to load employees using entity framework.
The method is supposed to return employee list.
its giving error : Cannot implicit convert....<Class names and methods>.... An Explicit conversion exists.
I think problem is related casting.
please check below code.
public List<Employee> LoadEmployees()
{
try
{
EMployeeDB1Entities EE = new EMployeeDB1Entities();
var Employees = EE.Employees.Where(p => p.Name.StartsWith("T"));
// Error comes in below line.
return Employees;
}
catch
{
return null;
}
} | 0 | [
2,
9087,
1513,
133,
2485,
1923,
19,
2109,
19,
11599,
300,
9,
387,
800,
3726,
3726,
31,
589,
749,
20,
6305,
3716,
568,
9252,
6596,
9,
14,
2109,
25,
2293,
20,
788,
7362,
968,
9,
82,
1438,
7019,
13,
45,
1967,
20290,
8406,
9,
9,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIActionSheet comes up halfway with a custom UIPickerView
===
I was looking for a way to make a UIPickerView show a "Done", "Cancel" buttons.
Googling around I found good posts, all of them had UIActionSheet involved.
So I did that
container is a UIView*
actionSheet is a UIActinSheet*
pickerView is a UIPickerView*
in **viewDidLoad**:
container = [[[UIView alloc] initWithFrame:CGRectMake(rect.origin.x,rect.origin.y, rect.size.width, rect.size.height)] autorelease];
[self.view addSubview:container];
actionSheet = [[UIActionSheet alloc] initWithTitle:@"myTitle"
delegate:nil
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
[actionSheet setActionSheetStyle:UIActionSheetStyleBlackTranslucent];
CGRect pickerFrame = CGRectMake(0, 40, 0, 0);
pickerView = [[[UIPickerView alloc] initWithFrame:pickerFrame]autorelease];
pickerView.showsSelectionIndicator = YES;
pickerView.dataSource = self;
pickerView.delegate = self;
UIToolbar *toolbar = [[[UIToolbar alloc] init] autorelease];
toolbar.frame = CGRectMake(0, 0, self.view.frame.size.width, 44);
NSMutableArray *items = [[[NSMutableArray alloc] init] autorelease];
[items addObject:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dismissActionSheet)] autorelease]];
[items addObject:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:@selector(goActionSheet)] autorelease]];
[items addObject:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(goActionSheet)] autorelease]];
[toolbar setItems:items animated:NO];
[actionSheet addSubview:toolbar];
[actionSheet addSubview:pickerView];
[actionSheet showInView:container];
[actionSheet setBounds:CGRectMake(0, 0, 320, 485)];
The app starts great, and the whole thing shows up nice as supposed to be on the line: `[actionSheet showInView:container];`
Now, When I try to dismiss the ActionSheet, it works great!
in **dismissActionSheet**:
[actionSheet dismissWithClickedButtonIndex:1 animated:NO];
The problem is, how do I make it show up again?
When I use:
[actionSheet showInView:container];
I only get the Toolbar picking from the bottom with the buttons and that's it. The whole PickerView is at the bottom and I can't see it.
What am I doing wrong here?
| 0 | [
2,
13,
5661,
8645,
17627,
1624,
71,
8423,
29,
21,
5816,
13,
5661,
16855,
106,
4725,
800,
3726,
3726,
31,
23,
699,
26,
21,
161,
20,
233,
21,
13,
5661,
16855,
106,
4725,
298,
21,
13,
7,
43,
849,
7,
15,
13,
7,
1245,
11040,
7,
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... |
Axis2 with JSON Support
===
I have an Axis2 web service that's already deployed, and which communicates with clients using SOAP. There's a new requirement now to enable REST calls by sending JSON requests and receiving JSON formatted responses.
Following this small tutorial: http://code.google.com/p/jsonp-support-for-axis2/wiki/OneStopPage
I was able to configure my Axis 2 web service correctly. Using my browser, I used the following URL to return a Student object:
http://localhost:8181/Axis2Json/services/StudentService/getStudent?response=application/json&value=3
**OUTPUT :**
{"return":{"@type":"ax21:Student","age":25,"firstName":"Mouhammed","lastName":"Soueidane"}}
The problem is that the returned JSON, doesn't look like a standard JSON representation (Not even in badgerfish format). So for instance, if I want to call a method called "setStudent" which takes in a Student object, I really have no clue of the JSON string that I need to pass to it.
I tried so many stuff, most of which resulted in a casting exception `(java.lang.ClassCastException: java.lang.String cannot be cast to org.codehaus.jettison.json.JSONObject)`
Does anyone have an idea about how to allow an Axis 2 web service to use both SOAP and JSON, based on the content type of the client? | 0 | [
2,
8577,
135,
29,
487,
528,
555,
800,
3726,
3726,
31,
57,
40,
8577,
135,
2741,
365,
30,
22,
18,
614,
6698,
15,
17,
56,
8709,
18,
29,
7421,
568,
6447,
9,
80,
22,
18,
21,
78,
8981,
130,
20,
9240,
760,
3029,
34,
4907,
487,
528,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 call a function in C code with Struct as parameter from C#
===
I have a struct in C file as shown below
struct Parameter{char param1[20];
char param2[20] }
and also a function in C file which takes this struct as parameter along with char* as another parameter as shown below
extern "C" __declspec(dllexport) void GetValue(char* opt,struct Parameter param);
void GetValue(char* opt, struct Parameter params)
{
printf("%s", params->param1);
}
I want to call it from my C# application using marshalling. I have created a similar struct in C#
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public class Parameters
{
public string Param1 { get; set; }
public string Param1 { get; set; }
}
and calling it in C# using the below method
[DllImport(@"C:\Test\CTestDll.dll",CallingConvention = CallingConvention.Cdecl,CharSet=CharSet.Ansi)]
public static extern void GetValue([MarshalAs(UnmanagedType.LPStr)]StringBuilder sbOut, [MarshalAs(UnmanagedType.LPStruct)]Parameters sbIn);
but the result which is a print statement is printing null.I am not very good in C programming. Kindly help me to sort it out. Where I am wrong, Is it in the C function or marshalling from C# | 0 | [
2,
184,
20,
645,
21,
1990,
19,
272,
1797,
29,
13,
10346,
28,
18906,
37,
272,
5910,
800,
3726,
3726,
31,
57,
21,
13,
10346,
19,
272,
3893,
28,
1721,
1021,
13,
10346,
18906,
1,
5433,
2258,
79,
165,
2558,
1323,
12660,
4892,
2258,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I join data from two tables into another table using sqlite
===
I have 3 tables in a database. films, catalogue, and catalogue_films. I need to join some data from the films table and the catalogue table into catalogue_films.
I need some help figuring out the sqlite syntax to accomplish this task.
the catalogue_films table has two columns: catalogue_id and films_id. Both the films table and catalogue table have fields called id. I need to extract this data from those tables and join it into the catalogue_films table.
thanks for any help
:) | 0 | [
2,
184,
107,
31,
1865,
1054,
37,
81,
7484,
77,
226,
859,
568,
4444,
10601,
800,
3726,
3726,
31,
57,
203,
7484,
19,
21,
6018,
9,
1491,
15,
9179,
15,
17,
9179,
1,
9051,
18,
9,
31,
376,
20,
1865,
109,
1054,
37,
14,
1491,
859,
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... |
transforming axis labels with a multiplier ggplot2
===
Previously in ggplot2, I used a formatter function to multiply values in the Y axis by 100:
formatter100 <- function(x){
x*100 }
With the new ggplot2 (v0.9.1), I am having trouble converting axis labels with a new transformation function:
mult_trans <- function() {
trans_new("mult", function(x) 100*x, function(x) x/100) }
Here is the example plot function
test<-data.frame(ecdf=c(0.02040816,0.04081633,0.06122449,0.08163265,0.10204082,0.14285714,0.14285714,0.16326531,0.24489796,0.24489796,0.24489796,0.24489796,0.26530612,0.28571429,0.30612245,0.32653061,0.36734694,0.36734694,0.38775510,0.40816327,0.42857143,0.46938776,0.46938776,0.48979592,0.53061224,0.53061224,0.59183673,0.59183673,0.59183673,0.61224490,0.63265306,0.65306122,0.67346939,0.69387755,0.71428571,0.73469388,0.75510204,0.77551020,0.79591837,0.81632653,0.83673469,0.85714286,0.87755102,0.89795918,0.91836735,0.93877551,0.95918367,0.97959184,0.99900000),lat=c(50.7812,66.4062,70.3125,97.6562,101.5620,105.4690,105.4690,109.3750,113.2810,113.2810,113.2810,113.2810,125.0000,136.7190,148.4380,164.0620,167.9690,167.9690,171.8750,175.7810,183.5940,187.5000,187.5000,191.4060,195.3120,195.3120,234.3750,234.3750,234.3750,238.2810,261.7190,312.5000,316.4060,324.2190,417.9690,507.8120,511.7190,562.5000,664.0620,683.5940,957.0310,1023.4400,1050.7800,1070.3100,1109.3800,1484.3800,1574.2200,1593.7500,1750.0000))
xbreaks<-c(50,100,150,200,300,500,1000,2000)
ybreaks<-c(1,2,5,10,20,30,40,50,60,70,80,90,95,98,99,99.5,99.9)/100
p <- ggplot( test, aes(lat, ecdf) )
p<-p +
geom_point()+
scale_x_log10(breaks=xbreaks, labels = comma(xbreaks))+
scale_y_continuous(trans='probit',
labels = trans_format(mult_trans()),
"cumulative probability %",
breaks=ybreaks)+
xlab("latency ms")
p
this returns the error:
Error in scale$labels(breaks) : could not find function "trans"
Looks like I've misunderstood how to use transforms properly.
| 0 | [
2,
22335,
8577,
13173,
29,
21,
1889,
15540,
106,
13,
4572,
13221,
38,
135,
800,
3726,
3726,
1343,
19,
13,
4572,
13221,
38,
135,
15,
31,
147,
21,
26,
24700,
1990,
20,
26314,
4070,
19,
14,
13,
93,
8577,
34,
808,
45,
26,
24700,
403... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cannot modify header information using a header.php file
===
I have a header.php file, which is included on every page of a site and it contains things like the <head> information and the opening <body> tag.
Now whenever I try to send header information from another page on the site I know I can't do that because I have already sent HTML to the client computer. So I created a function after much googling and stuck it at the top of the Header.php file:
ob_start();
function redirect($url){
flush();
ob_flush();
header("Location: $url");
die;
}
And I can call that from anywhere else in the site but I still get an error. I'm probably doing this function all wrong, but that's what google will do sometimes. Any help to fix this would be great, thanks. | 0 | [
2,
1967,
17579,
157,
106,
676,
568,
21,
157,
106,
9,
26120,
3893,
800,
3726,
3726,
31,
57,
21,
157,
106,
9,
26120,
3893,
15,
56,
25,
506,
27,
352,
2478,
16,
21,
689,
17,
32,
1588,
564,
101,
14,
13,
1,
1743,
1,
676,
17,
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... |
Is there a way to automatically collect gmail id in webform and Google sites?
===
(1) Is there a way to automatically collect gmail id of the person filling google-docs web-form?
(Something equivalent to Google apps "automatically collect username" in web forms).
(2) If I have a google app site shared with normal gmail user or google group, is there a way to run GAS to automatically collect gmail id?
This is what I am trying to do:
1. I create public google docs web forms (online tests)
2. Any student with link can take test, but I would like to automatically collect his gmail id.
3. I am running private google app site, shared with students_list@googlegroups.com. If a particular student of this list visits my website, he will be shown logged in using as student1@gmail.com
I would like to provide a "Show Results Button" on website that would lookup automatically detect student1@gmail.com and look up data from spredsheet form from (1)
| 0 | [
2,
25,
80,
21,
161,
20,
7499,
5543,
489,
8079,
4924,
19,
2741,
4190,
17,
8144,
3259,
60,
800,
3726,
3726,
13,
5,
165,
6,
25,
80,
21,
161,
20,
7499,
5543,
489,
8079,
4924,
16,
14,
840,
7702,
8144,
8,
13799,
18,
2741,
8,
4190,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I change the Zoom level of a WinRT WebView?
===
How can I change the zoom level of a WinRT [Webview][1]?
If I give it focus, I can zoom in/out using the keyboard `CTRL+ +` and `CTRL+ -`
But can this be accomplished from code?
[1]: http://msdn.microsoft.com/en-US/library/windows/apps/windows.ui.xaml.controls.webview | 0 | [
2,
184,
92,
31,
753,
14,
19469,
662,
16,
21,
628,
5256,
2741,
4725,
60,
800,
3726,
3726,
184,
92,
31,
753,
14,
19469,
662,
16,
21,
628,
5256,
636,
14113,
4725,
500,
2558,
165,
500,
60,
100,
31,
590,
32,
1776,
15,
31,
92,
19469... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
cURL GET-params ?
===
i can't download the source code from the site. It displays 'error - please fill in all form data'
the url w/ GET-parameters:
http://bahn.ltur.com/index/search/?mnd=de&lang=de_DE&searchin=DE-SB-VI&trip_mode=trip_simple&from_spar=Hamburg+Dammtor&to_spar=Leipzig+Hbf&start_datum=26.06.2012&start_time=23%3A49&end_datum=27.06.2012&end_time=23%3A51&SEA_adults=1&SEA_kids1=0&SEA_kids2=0&SEA_adult1=&SEA_adult2=&SEA_adult3=&SEA_adult4=&SEA_adult5=&SEA_kid11=&SEA_kid12=&SEA_kid13=&SEA_kid14=&SEA_kid15=&trainclass_spar=2&x=56&y=5
i tried this via OSX bash: curl -O get_ticket_list.html <url>
also w/ -L (you get redirected to blah.com/details)
No errors when I open the URL in my Browser.
What is going wrong? | 0 | [
2,
14320,
164,
8,
6351,
79,
18,
13,
60,
800,
3726,
3726,
31,
92,
22,
38,
7121,
14,
1267,
1797,
37,
14,
689,
9,
32,
9412,
13,
22,
29992,
13,
8,
2247,
3509,
19,
65,
505,
1054,
22,
14,
287,
6362,
619,
118,
164,
8,
6351,
7307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Good SVG renderer nowadays?
===
I'm developing some scripts to generate svg files and I wonder what good svg renderers exist for linux.
I know Firefox/Chrome provide SVG support (and I have the feeling that Chrome is faster at rendering) but maybe there are others standalone svg renders that I'm mising (I'm aware of pysvg existence).
suggestions? | 0 | [
2,
254,
13,
18,
22955,
16535,
106,
15694,
60,
800,
3726,
3726,
31,
22,
79,
3561,
109,
17505,
20,
7920,
13,
18,
22955,
6488,
17,
31,
2666,
98,
254,
13,
18,
22955,
16535,
445,
3182,
26,
13024,
9,
31,
143,
535,
18219,
118,
12985,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to generate bitstream (.bin) file using Synplify
===
I am using Synplify version 9.6.2
I would like to generate a .bin file to load onto the FPGA. The output from Synplify is a .edn or.edf netlist.
Anyone know what is the process for doing this?
| 0 | [
2,
184,
20,
7920,
1142,
11260,
13,
5,
9,
4772,
6,
3893,
568,
6063,
5727,
8612,
800,
3726,
3726,
31,
589,
568,
6063,
5727,
8612,
615,
561,
9,
379,
9,
135,
31,
83,
101,
20,
7920,
21,
13,
9,
4772,
3893,
20,
6305,
1204,
14,
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... |
Why is my NDK app crashing when I hit my breakpoint? -or- Why am I getting "Thread debugging is unsupported on this Android platform!" on Gingerbread?
===
I am trying to debug a multi-threaded Android app on a 2.3.6 device using NDK r6b. I've also tried using NDK r8 with the same result. Whenever I hit my breakpoint, the app crashes. I seem to be getting into a case that is described in the NDK r5b docs in the "Thread support" section:
<pre>
What this means in practical terms are:
- If you are on Android 2.3, or a prior platform release which has had the
platform bugfix back-ported to it, you will be able to debug native
threads automatically.
- If you are not, you will only be able to debug the main thread
(as in previous NDK releases). You will also see the following message
when launching ndk-gdb (just before the gdb prompt):
Thread debugging is unsupported on this Android platform!
If you place a breakpoint on a function executed on a non-main thread, the
program will exit with the following message in GDB:
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
</pre>
I get the exact error mentioned. I believe I am getting into this case because I see `Thread debugging is unsupported on this Android platform!` when I run ndk-gdb. As I mentioned, I am on a Gingerbread device and I have `<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9"/>` in the manifest so I should NOT be getting into this case.
Here is more detail about the steps I follow to get to the crash:
1. Start my app using Debug from Eclipse
2. Hit a breakpoint that I've set after System.loadLibrary where my native lib gets loaded
3. In my project directory, run ndk-gdb --force --verbose --start
4. gdb starts successfully and is attached
5. set a breakpoint in gdb, continue in Eclipse, then continue in gdb
6. crash!
See below for an edited console dump.
I'd appreciate any feedback on why this could be happening!
<pre>
$ ndk-gdb --force --verbose --start
Android NDK installation path: /Users/tony/Documents/android-ndk-r8
Using default adb command: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.29
Using ADB flags:
Using auto-detected project path: .
Found package name: com.mycompany.myapp
ABIs targetted by application: armeabi
Device API Level: 10
Device CPU ABIs: armeabi-v7a armeabi
Compatible device ABI: armeabi
Using gdb setup init: ./libs/armeabi/gdb.setup
Using toolchain prefix: /Users/tony/Documents/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-
Using app out directory: ./obj/local/armeabi
Found debuggable flag: true
Found device gdbserver: /data/data/com.appMobi.applab/lib/gdbserver
Found data directory: '/data/data/com.mycompany.myapp'
Found first launchable activity: .MainActivity
Launching activity: com.mycompany.myapp/.MainActivity
## COMMAND: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb shell am start -n com.mycompany.myapp/.MainActivity
Starting: Intent { cmp=com.mycompany.myapp/.MainActivity }
Warning: Activity not started, intent has been delivered to currently running top-most instance.
## COMMAND: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb shell sleep 2
Found running PID: 7341
Launched gdbserver succesfully.
Setup network redirection
## COMMAND: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb forward tcp:5039 localfilesystem:/data/data/com.mycompany.myapp/debug-socket
## COMMAND: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb shell run-as com.appMobi.applab lib/gdbserver +debug-socket --attach 7341
## COMMAND: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb pull /system/bin/app_process ./obj/local/armeabi/app_process
Attached; pid = 7341
Listening on sockaddr socket debug-socket
184 KB/s (5720 bytes in 0.030s)
Pulled app_process from device/emulator.
## COMMAND: /Users/tony/Documents/android-sdk-mac_86/platform-tools/adb pull /system/lib/libc.so ./obj/local/armeabi/libc.so
4347 KB/s (273940 bytes in 0.061s)
Pulled libc.so from device/emulator.
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-elf-linux".
(no debugging symbols found)
Error while mapping shared library sections:
...shared library mapping errors ommitted...
Thread debugging is unsupported on this Android platform!
Thread debugging is unsupported on this Android platform!
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
0xafd0c5ac in epoll_wait () from /Developer/AppMobiAndroid/AppLab/obj/local/armeabi/libc.so
Thread debugging is unsupported on this Android platform!
(gdb) break dcanvas.cpp:544
Breakpoint 1 at 0x81833c8a: file /Developer/AppMobiAndroid/AppLab/jni/dcanvas.cpp, line 544.
(gdb) c
Continuing.
Child terminated with signal = 5
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb)
Child terminated with signal = 0x5 (SIGTRAP)
GDBserver exiting
</pre> | 0 | [
2,
483,
25,
51,
13,
706,
197,
4865,
14604,
76,
31,
770,
51,
1442,
3132,
60,
13,
8,
248,
8,
483,
589,
31,
1017,
13,
7,
96,
10647,
121,
16254,
2762,
25,
367,
24909,
27,
48,
13005,
2452,
187,
7,
27,
12101,
22852,
60,
800,
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... |
WCF - Cannot obtain Metadata, but works when the XML Endpoint is removed?
===
I'm having a problem with the WCF Test Client. I cannot connect to my WebService because it keeps hitting this error:
> Error: Cannot obtain Metadata from
> http://xxx.xxxxxxxx.xxx/DPITerminal.svc If this is a Windows
> (R) Communication Foundation service to which you have access, please
> check that you have enabled metadata publishing at the specified
> address. For help enabling metadata publishing, please refer to the
> MSDN documentation at
> http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange
> Error URI: http://xxx.xxxxxxxx.xxx/DPITerminal.svc
> Metadata contains a reference that cannot be resolved:
> 'http://xxx.xxxxxxxx.xxx/DPITerminal.svc'. Content Type
> application/soap+xml; charset=utf-8 was not supported by service
> http://xxx.xxxxxxxx.xxx/DPITerminal.svc. The client and
> service bindings may be mismatched. The remote server returned an
> error: (415) Cannot process the message because the content type
> 'application/soap+xml; charset=utf-8' was not the expected type
> 'text/xml; charset=utf-8'..HTTP GET Error URI:
> http://xxx.xxxxxxxx.xxx/DPITerminal.svc There was an error
> downloading 'http://xxx.xxxxxxxx.xxx/DPITerminal.svc'.
Here is my Web.Config: [Link][1].
As you can see, I already have the
<serviceMetadata httpGetEnabled="true" />
as well as
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="mex" contract="IMetadataExchange" />
as suggested in the other StackOverflow questions. Still doesn't work.
I also noticed that when I comment the following endpoint:
<endpoint address="x" behaviorConfiguration="poxBehavior" binding="webHttpBinding" bindingConfiguration="web" contract="xxx.xxxxxxxx.xxxxxx.WebService.IDPITerminal" />
Everything works as expected. So I guess there's a problem with my XML Endpoint? It's weird since the XML Endpoint is sharing the JSON Endpoint's binding configuration, and the JSON one doesn't have any problems.
Also, Let me clarify that I'm only having problems with the WCF Test Client. The JSON & the XML Endpoint is both working properly.
[1]: http://pastie.org/4313058 | 0 | [
2,
11801,
410,
13,
8,
1967,
5545,
28057,
15,
47,
693,
76,
14,
23504,
241,
3132,
25,
1974,
60,
800,
3726,
3726,
31,
22,
79,
452,
21,
1448,
29,
14,
11801,
410,
1289,
6819,
9,
31,
1967,
6379,
20,
51,
2741,
11449,
185,
32,
8968,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
$.ajax in $.on('click') ran during page load
===
Recently, when I have some new function that requires firing $.ajax inside a click event, and I had some code like the followings,
$('.ClickMe').on('click', function() {
// Do something
$.ajax({
type: 'POST',
url: 'Foo.aspx/BarWebMethod',
data: '{}',
contentType: 'application/jspn',
dataType: 'json',
success: function(data) {
// Do good thing
},
error: function() {
// Do something bad
}
});
I realized that the page would fire the AJAX call to my WedMethod during page load and cached all the result, instead of firing it during someone clicked elements with 'ClickMe' in its class.
Function-wise it is all good, but since I have about hundreds of elements would hook up with the above code, and I certainly don't want to run those hundreds of excessive AJAX calls. I want to run that piece of code only when users clicked on any of the elements.
Any idea?
| 0 | [
2,
5579,
9,
6881,
7522,
19,
5579,
9,
218,
5,
22,
150,
10129,
22,
6,
717,
112,
2478,
6305,
800,
3726,
3726,
1989,
15,
76,
31,
57,
109,
78,
1990,
30,
4781,
7139,
5579,
9,
6881,
7522,
572,
21,
10840,
807,
15,
17,
31,
41,
109,
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... |
Exception while trying to displaying multiple marker
===
hi i am working in android application which display map with multple marker..
Same code when i am running with a new application it works fine but i dont when i am integrationg it with my application it gives me an exception/error as follows
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): FATAL EXCEPTION: main
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.maps/com.maps.DisplayMap}: java.lang.NullPointerException
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.os.Handler.dispatchMessage(Handler.java:99)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.os.Looper.loop(Looper.java:123)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at java.lang.reflect.Method.invokeNative(Native Method)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at java.lang.reflect.Method.invoke(Method.java:521)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at dalvik.system.NativeStart.main(Native Method)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): Caused by: java.lang.NullPointerException
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at com.maps.DisplayMap.onCreate(DisplayMap.java:32)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-24 14:19:55.737: ERROR/AndroidRuntime(1645): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
My COde
package com.maps;
import java.util.ArrayList;
import java.util.List;
import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;
import com.google.android.maps.OverlayItem;
public class DisplayMap extends MapActivity {
private MapView map=null;
private MyLocationOverlay me=null;
private SitesOverlay sites=null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
map=(MapView)findViewById(R.id.map);
map.getController().setCenter(getPoint(19.159646,
72.995664));
map.getController().setZoom(17);
map.setBuiltInZoomControls(true);
sites=new SitesOverlay();
map.getOverlays().add(sites);
me=new MyLocationOverlay(this, map);
map.getOverlays().add(me);
}
@Override
public void onResume() {
super.onResume();
me.enableCompass();
}
@Override
public void onPause() {
super.onPause();
me.disableCompass();
}
@Override
protected boolean isRouteDisplayed() {
return(false);
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_S) {
map.setSatellite(!map.isSatellite());
return(true);
}
else if (keyCode == KeyEvent.KEYCODE_Z) {
map.displayZoomControls(true);
return(true);
}
else if (keyCode == KeyEvent.KEYCODE_H) {
sites.toggleHeart();
return(true);
}
return(super.onKeyDown(keyCode, event));
}
private GeoPoint getPoint(double lat, double lon) {
return(new GeoPoint((int)(lat*1000000.0),
(int)(lon*1000000.0)));
}
private class SitesOverlay extends ItemizedOverlay<CustomItem> {
private Drawable heart=null;
private List<CustomItem> items=new ArrayList<CustomItem>();
private PopupPanel panel=new PopupPanel(R.layout.popup);
public SitesOverlay() {
super(null);
heart=getMarker(R.drawable.heart_full);
items.add(new CustomItem(getPoint(40.748963847316034,
-73.96807193756104),
"","",
getMarker(R.drawable.blue_full_marker),
heart));
items.add(new CustomItem(getPoint(40.76866299974387,
-73.98268461227417),
"",
"",
getMarker(R.drawable.orange_full_marker),
heart));
items.add(new CustomItem(getPoint(40.765136435316755,
-73.97989511489868),
"",
"",
getMarker(R.drawable.green_full_marker),
heart));
items.add(new CustomItem(getPoint(40.70686417491799,
-74.01572942733765),
"",
"",
getMarker(R.drawable.purple_full_marker),
heart));
populate();
}
@Override
protected CustomItem createItem(int i) {
return(items.get(i));
}
@Override
public void draw(Canvas canvas, MapView mapView,
boolean shadow) {
super.draw(canvas, mapView, shadow);
}
@Override
protected boolean onTap(int i) {
OverlayItem item=getItem(i);
GeoPoint geo=item.getPoint();
Point pt=map.getProjection().toPixels(geo, null);
View view=panel.getView();
((TextView)view.findViewById(R.id.latitude))
.setText(String.valueOf(geo.getLatitudeE6()/1000000.0));
((TextView)view.findViewById(R.id.longitude))
.setText(String.valueOf(geo.getLongitudeE6()/1000000.0));
((TextView)view.findViewById(R.id.x))
.setText(String.valueOf(pt.x));
((TextView)view.findViewById(R.id.y))
.setText(String.valueOf(pt.y));
panel.show(pt.y*2>map.getHeight());
return(true);
}
@Override
public int size() {
return(items.size());
}
void toggleHeart() {
CustomItem focus=getFocus();
if (focus!=null) {
focus.toggleHeart();
}
map.invalidate();
}
private Drawable getMarker(int resource) {
Drawable marker=getResources().getDrawable(resource);
marker.setBounds(0, 0, marker.getIntrinsicWidth(),
marker.getIntrinsicHeight());
boundCenter(marker);
return(marker);
}
}
class PopupPanel {
View popup;
boolean isVisible=false;
PopupPanel(int layout) {
ViewGroup parent=(ViewGroup)map.getParent();
popup=getLayoutInflater().inflate(layout, parent, false);
popup.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
hide();
}
});
}
View getView() {
return(popup);
}
void show(boolean alignTop) {
RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT
);
if (alignTop) {
lp.addRule(RelativeLayout.ALIGN_PARENT_TOP);
lp.setMargins(0, 20, 0, 0);
}
else {
lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
lp.setMargins(0, 0, 0, 60);
}
hide();
((ViewGroup)map.getParent()).addView(popup, lp);
isVisible=true;
}
void hide() {
if (isVisible) {
isVisible=false;
((ViewGroup)popup.getParent()).removeView(popup);
}
}
}
class CustomItem extends OverlayItem {
Drawable marker=null;
boolean isHeart=false;
Drawable heart=null;
CustomItem(GeoPoint pt, String name, String snippet,
Drawable marker, Drawable heart) {
super(pt, name, snippet);
this.marker=marker;
this.heart=heart;
}
@Override
public Drawable getMarker(int stateBitset) {
Drawable result=(isHeart ? heart : marker);
setState(result, stateBitset);
return(result);
}
void toggleHeart() {
isHeart=!isHeart;
}
}
} | 0 | [
2,
5391,
133,
749,
20,
17418,
1886,
13289,
800,
3726,
3726,
4148,
31,
589,
638,
19,
13005,
3010,
56,
3042,
2942,
29,
6633,
38,
5106,
13289,
9,
9,
205,
1797,
76,
31,
589,
946,
29,
21,
78,
3010,
32,
693,
1123,
47,
31,
1049,
76,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RadListView with a Repeater, problems with postback
===
I am using a repeater within my RadListView which has the data source set like DataSource='<%# Bind("ContactDetails") %>'.
So then I can loop through the different properties of the ContactDetails and use them, but when I update any data in these fields the data is lost on post back.
I have read quite a lot of different blog posts etc and they seem to think I need to bind in the Onint method, but since I don't bind in the code behind, I have no idea how to do this, or if this will actually solve my problem.
The data source for the RadListView is calling a WCF web Service that expects JSON.
Here is an example of the code I am using....
Please ignore any small syntax errors, I have quickly shortend this code for putting on the forums.
<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="ObjectDataSource1" Skin="Hay">
<ItemTemplate>
<asp:Repeater ID="ContactDetails" runat="server" DataSource='<%# Bind("ContactDetails") %>'>
<ItemTemplate>
<asp:Label ID="ContactDetailLabel" runat="server"
AssociatedControlID="ContactDetailTextBox"
Text='<%# Bind("ContactDetailType") %>'></asp:Label>
<asp:TextBox ID="ContactDetailTextBox" runat="server" CssClass="rlvInput"
Text='<%# Bind("Value") %>' />
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update Profile" ToolTip="Update" />
</ItemTemplate>
</telerik:RadListView>
Any help would be great, I am totally stuck on this one. Is it even possible to do what I want? | 0 | [
2,
4944,
5739,
4725,
29,
21,
6830,
106,
15,
1716,
29,
678,
1958,
800,
3726,
3726,
31,
589,
568,
21,
6830,
106,
363,
51,
4944,
5739,
4725,
56,
63,
14,
1054,
1267,
309,
101,
1054,
12097,
3726,
22,
1,
11881,
5910,
10193,
5,
7,
2991... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Understanding Newsstand App
===
I have a big question about how newsstand works.
When you have to create a new magazine(issue), how do you do it?
I mean, Do I have to implement new code for each magazine (with new views and new view controllers)? In this case, how do I add/upload/integrate them to my newsstand app which is already in the market?
In the case that It doesn't work in this way, How does it work?
Thank you very much in advance.
| 0 | [
2,
3260,
996,
10731,
4865,
800,
3726,
3726,
31,
57,
21,
580,
1301,
88,
184,
996,
10731,
693,
9,
76,
42,
57,
20,
1600,
21,
78,
1039,
5,
12565,
6,
15,
184,
107,
42,
107,
32,
60,
31,
884,
15,
107,
31,
57,
20,
8713,
78,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Exception in Flying Saucer when processing images for custom UserAgentCallback
===
I've setup a test environment for Flying Saucer R8, and is testing building PDF's from templates and data. I'm using a custom UserAgentCallback to read external js/css and images locally from filesystem. The problem occured when introducing the following custom UserAgentCallback:
package support;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import org.xhtmlrenderer.swing.NaiveUserAgent;
public class FileUserAgent extends NaiveUserAgent {
@Override
public String resolveURI(String uri) {
URL url = null;
String path = null;
try {
url = new URL(uri);
path = url.getPath();
} catch (MalformedURLException e) {
// only path present
path = uri;
}
if (path.charAt(0) == '/') {
path = path.substring(1, path.length());
}
return path;
}
@Override
protected InputStream resolveAndOpenStream(String filepath) {
InputStream is = null;
try {
File file = new File(filepath);
is = new FileInputStream(file);
} catch (Exception e) {
System.out.print("an error occured when reading resource: " + e.getMessage());
}
return is;
}
}
The UserAgentCallback is able to read CSS without any problem, but when reading images either from src or background-image property i get the followng exception:
java.lang.ClassCastException: org.xhtmlrenderer.swing.AWTFSImage$OldAWTFSImage cannot be cast to org.xhtmlrenderer.pdf.ITextFSImage
at org.xhtmlrenderer.pdf.ITextOutputDevice.drawImage(ITextOutputDevice.java:761)
at org.xhtmlrenderer.render.AbstractOutputDevice.paintTiles(AbstractOutputDevice.java:300)
at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground0(AbstractOutputDevice.java:245)
at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground(AbstractOutputDevice.java:191)
at org.xhtmlrenderer.pdf.ITextOutputDevice.paintBackground(ITextOutputDevice.java:187)
at org.xhtmlrenderer.render.Box.paintBackground(Box.java:436)
at org.xhtmlrenderer.layout.Layer.paintBackgroundsAndBorders(Layer.java:243)
at org.xhtmlrenderer.layout.Layer.paint(Layer.java:329)
at org.xhtmlrenderer.pdf.ITextRenderer.paintPage(ITextRenderer.java:384)
at org.xhtmlrenderer.pdf.ITextRenderer.writePDF(ITextRenderer.java:348)
at org.xhtmlrenderer.pdf.ITextRenderer.createPDF(ITextRenderer.java:315)
at org.xhtmlrenderer.pdf.ITextRenderer.createPDF(ITextRenderer.java:246) | 0 | [
2,
5391,
19,
2317,
26329,
76,
5511,
3502,
26,
5816,
275,
525,
7685,
9200,
1958,
800,
3726,
3726,
31,
22,
195,
18161,
21,
1289,
2307,
26,
2317,
26329,
761,
457,
15,
17,
25,
4431,
353,
13,
11124,
22,
18,
37,
22894,
18,
17,
1054,
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... |
remove view from window give a black screen for a short time
===
(void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
MyAuraAppDelegate *delegate = (MyAuraAppDelegate *) [[UIApplication sharedApplication] delegate];
// PeopleMasterViewController *peopleMasterViewControl = [[PeopleMasterViewController alloc] initWithNibName:nil bundle:nil];
NSArray *viewsToRemove = [delegate.window subviews];
for (InfiniTabBar *v in viewsToRemove)
{
[v setHidden:YES ];
}
}
but before show other View,it give me a black screen for a short time, how to remove the black screen | 0 | [
2,
4681,
1418,
37,
1463,
590,
21,
319,
2324,
26,
21,
502,
85,
800,
3726,
3726,
13,
5,
2625,
1340,
6,
4725,
3052,
8294,
13,
1,
636,
8542,
1418,
3052,
8294,
12660,
12894,
107,
186,
1351,
18161,
75,
12797,
14,
1418,
9,
51,
58,
3031... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Related to ListSelectionListener
===
I used ListSelectionListener to listen the selection of a JTable to perform other task related with the selected item in the table. but why the following code executed twice at one selection in the beginning and many times times after that table is being updated?<br/><br/>
<br/> public void valueChanged(ListSelectionEvent e) {<br/>
System.out.println(tablelist.getSelectedIndex());
}
| 0 | [
2,
1597,
20,
7227,
5033,
13891,
106,
800,
3726,
3726,
31,
147,
7227,
5033,
13891,
106,
20,
3834,
14,
3155,
16,
21,
487,
5924,
20,
2985,
89,
3005,
1597,
29,
14,
1704,
9101,
19,
14,
859,
9,
47,
483,
14,
249,
1797,
5557,
2088,
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... |
Containkey(List<String> key ) and get(List<String> key ) operations on Map Datastructure
===
In my current project, I have implemented following data structure in Java.
Map<List<String>, Set<Subscriber>> regionSubscriber
= new Hashtable<List<String>, Set<Subscriber>>();
I want to implement following operations on above mentioned data structure.
1) Check the key exists in this map or not ( similar to `containsKey(Key)` ).
2) Get the Set<Subscriber> with key List<String> ( similar to `get(key)` ).
I have tried with default functions of Map like `containskey(Key)` and `get(Key)` . But, they are not working because, here the Key is List<String> (not a single Object).
Could you advise me on the implementation of the operations ? Let me know If you need more detail for clarity. This code is part of `small and single PC` `Publish/subscribe` middle ware that I have already donated to stack overflow communities.
| 0 | [
2,
3717,
4237,
5,
5739,
1,
11130,
1,
1246,
13,
6,
17,
164,
5,
5739,
1,
11130,
1,
1246,
13,
6,
1311,
27,
2942,
1054,
13971,
800,
3726,
3726,
19,
51,
866,
669,
15,
31,
57,
6807,
249,
1054,
1411,
19,
8247,
9,
2942,
1,
5739,
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... |
Enforce text truncation after UILabel resize
===
I have `UILabel` that can be with various width during app runtime. The text in that `UILable` can be wider than the `UILabel` itself, so the text is sometimes truncated.
The problem is that the text isn't re-truncated after `UILabel` resize, so it is either wider than the `UILabel` or narrower.
How can I enforce the `UILabel` to re-truncate the text again to make it fit perfectly? | 0 | [
2,
16525,
1854,
22328,
872,
75,
13,
5661,
21018,
302,
10454,
800,
3726,
3726,
31,
57,
13,
1,
5661,
21018,
1,
30,
92,
44,
29,
617,
9456,
112,
4865,
485,
891,
9,
14,
1854,
19,
30,
13,
1,
21442,
579,
1,
92,
44,
6350,
119,
14,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How could I achieve a better running time for this c# code?
===
I'm using a BigInteger implementation in C# to make some calculations but the performance in windows phone is not as good as required .
The profiler detects that most of the time is consumed by this function. Any clue?
This is for windows phone 7 and I can't go native to improve it.
private const long IMASK = 0xffffffffL;
/**
* returns x = x - y - we assume x is >= y
*/
private static int[] Subtract(
int xStart,
int[] x,
int yStart,
int[] y)
{
Debug.Assert(yStart < y.Length);
Debug.Assert(x.Length - xStart >= y.Length - yStart);
int iT = x.Length;
int iV = y.Length;
long m;
int borrow = 0;
do
{
m = (x[--iT] & IMASK) - (y[--iV] & IMASK) + borrow;
x[iT] = (int)m;
// borrow = (m < 0) ? -1 : 0;
borrow = (int)(m >> 63);
}
while (iV > yStart);
if (borrow != 0)
{
while (--x[--iT] == -1)
{
}
}
return x;
} | 0 | [
2,
184,
110,
31,
4689,
21,
574,
946,
85,
26,
48,
272,
5910,
1797,
60,
800,
3726,
3726,
31,
22,
79,
568,
21,
580,
6391,
13699,
6123,
19,
272,
5910,
20,
233,
109,
19186,
47,
14,
956,
19,
1936,
1132,
25,
52,
28,
254,
28,
1390,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
"Invalid Upload Request" from POST
===
I'm trying to use the Java Apache HttpClient to send a multipart POST request to import some test data into a BigQuery table, but I keep getting HTTP 400 errors with the message "Invalid Upload Request". I'm pretty sure I followed the BigQuery tutorial well enough to reproduce what's needed, but it's not working. Could someone take a look at this request and see if anything is wrong with it?
String rawInput = "--xxx\n";
rawInput += "Content-Type: application/json; charset=UTF-8\n";
rawInput += "{\n";
rawInput += "'configuration': {\n";
rawInput += "'load': {\n";
rawInput += "'schema': {\n";
rawInput += "'fields': [\n";
rawInput += "{'name':'field1', 'type':'STRING'},\n";
rawInput += "{'name':'field2', 'type':'STRING'},\n";
rawInput += "{'name':'field3', 'type':'STRING'},\n";
rawInput += "{'name':'field4', 'type':'STRING'},\n";
rawInput += "]\n";
rawInput += "},\n";
rawInput += "'destinationTable': {\n";
rawInput += "'projectId': 'xxxxxxxxxxx [redacted]',\n";
rawInput += "'datasetId': 'test',\n";
rawInput += "'tableId': 'test'\n";
rawInput += "}\n";
rawInput += "createDisposition = CREATE_IF_NEEDED\n";
rawInput += "}\n";
rawInput += "}\n";
rawInput += "}\n";
rawInput += "--xxx\n";
rawInput += "Content-Type: application/octet-stream\n";
rawInput += "\n";
rawInput += "1,1234,11111111,1";
rawInput += "2,5678,11111111,1";
rawInput += "3,9101,11111111,1";
rawInput += "4,6543,11111111,1";
rawInput += "--xxx--";
The request is then executed like so:
postRequest.addHeader("Content-Type", "multipart/related; boundary=xxx");
postRequest.addHeader("Authorization", "OAuth " + credential.getAccessToken());
StringEntity input = new StringEntity(rawInput);
postRequest.setEntity(input);
HttpResponse response = httpClient.execute(postRequest); | 0 | [
2,
13,
7,
108,
18506,
43,
71,
8294,
3772,
7,
37,
678,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
14,
8247,
17140,
7775,
150,
18513,
38,
20,
2660,
21,
1889,
3091,
678,
3772,
20,
9010,
109,
1289,
1054,
77,
21,
580,
8190,
93,
859... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
$_SESSION MULTIDIMENSIONAL ARRAY ISSUES
===
Please i need help, this code below works fine on my localhost, php5.3+ but on the server its not working fine. 5.2
$_SESSION['myinv_id'] = $setinvid;
$_SESSION['prod_name'][$i] = $prod_name;
$_SESSION['qty'][$i] = $clean_qty;
$_SESSION['price'][$i] = $clean_price;
$_SESSION['total'][$i] = $clean_total;
$_SESSION['desc'][$i] = $desc;
when i did a var_dump
The first time contents were added, i had these.
array(5) {
["prod_name"]=> array(1) {[0]=> string(4) "SDFD" }
["qty"]=> array(1) {[0]=> string(2) "43"}
["price"]=> array(1) { [0]=> string(2) "43" }
["total"]=> array(1) { [0]=> string(4) "1849" }
["desc"]=> array(1) { [0]=> string(6) "dsfsdf" } }
works fine....as the array is returned but in an attempt to added a second value...i get these error...saying Fatal Error [] not expected for strings..when i did a var_dump...i had these...in these case, ['prod_name'] & ['desc'] has inevitable changed from array to string and an array value cannot be pushed into the stake.
array(5) {
**["prod_name"]=> &string(5) "dddsd"**
["qty"]=> &array(2) {
[0]=> string(2) "43"
[2]=> string(2) "45" }
["price"]=> &array(2) {
[0]=> string(2) "43"
[2]=> string(1) "3" }
["total"]=> &array(2) {
[0]=> string(4) "1849"
[2]=> string(3) "135" }
**["desc"]=> &string(7) "dsddadd"** }
Please what could be the source of the problem, and i have even tried decalaring this session variables as an empty array before using them, yet no avail.
| 0 | [
2,
5579,
1,
7202,
5991,
1889,
7865,
7718,
1549,
800,
3726,
3726,
2247,
31,
376,
448,
15,
48,
1797,
1021,
693,
1123,
27,
51,
375,
11694,
15,
13,
26120,
264,
9,
240,
2430,
47,
27,
14,
8128,
82,
52,
638,
1123,
9,
331,
9,
135,
557... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 remove a cell from a UITableView at runtime?
===
I want to remove a specific cell from a UITableView
I found `deleteRowsAtIndexPaths:withRowAnimation:`
I tried to change the cell.frame to `0,0,0,0`
I tried to `.hidden = YES` it
nothing works for me.
Any ideas?
Thank you! | 0 | [
2,
184,
20,
4681,
21,
1667,
37,
21,
13,
11193,
579,
4725,
35,
485,
891,
60,
800,
3726,
3726,
31,
259,
20,
4681,
21,
1903,
1667,
37,
21,
13,
11193,
579,
4725,
31,
216,
13,
1,
24249,
815,
3581,
10833,
25671,
8353,
18,
45,
1410,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
openTK migrating to windows 7 wrong graphics
===
I'm not 100% sure if the problem is with openTK but it is the most probable thing.
So here is the problem:
I made a project in a computer with WindowsXP (x32), MVS 08 with windows fomrs and OpenTK and OpenGL and everithing was working perfectly. But for other problems I needed to format the computer and install Windows 7 (x32).
After installing all the libraries that I needed for developing the proyect I run it and the computer could't open OpenTK. 1000 warnings in the compilation. After installing and unistalling OpenTK in diferrent directories and so I finally managed to make it work but when executing the application the graphic part is not working properly.
I have 3 OpenGLControllers in with I draw some different plots and so but they are not allways working and they are not allways full drawn and sometimes it just crashes!
I have updated my drivers, looked for newer versions of everything but nothing changes.
The compiler warnings are the same since the XP (I have some warning but nothing to do with the graphic part of the project)
I can post some screenshots if needed.
Edit: sometimes when crasesh I have the following exception : 'System.AccessViolationException (note that it doesen't allways crash nor allways give an exception) | 0 | [
2,
368,
38,
197,
28749,
20,
1936,
453,
1389,
8351,
800,
3726,
3726,
31,
22,
79,
52,
12849,
562,
100,
14,
1448,
25,
29,
368,
38,
197,
47,
32,
25,
14,
127,
17788,
584,
9,
86,
235,
25,
14,
1448,
45,
31,
117,
21,
669,
19,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replace URL in textarea content with anchor tag and return textarea content?
===
I have text area containing one or more URL along with other text content. I want a java script function to return the text content along with URl converted to anchor tags.
example:
textarea's content is abcd http://stackoverflow.com xyz
i want function to return
abcd <a href="http://stackoverflow.com">http://stackoverflow.com</a> xyz
how can do this??
would be grateful for help. | 0 | [
2,
3934,
287,
6362,
19,
1854,
17760,
2331,
29,
6265,
3383,
17,
788,
1854,
17760,
2331,
60,
800,
3726,
3726,
31,
57,
1854,
217,
3503,
53,
54,
91,
287,
6362,
303,
29,
89,
1854,
2331,
9,
31,
259,
21,
8247,
3884,
1990,
20,
788,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Making RMI call specific to individual server in clustered environment in WAS
===
I have a situation where i have to make individual RMI call to 4 websphere app servers to load files on those servers, but all servers are under clustered environment? Can anyone help | 1 | [
2,
544,
761,
1435,
645,
1903,
20,
1359,
8128,
19,
7460,
69,
2307,
19,
23,
800,
3726,
3726,
31,
57,
21,
1858,
113,
31,
57,
20,
233,
1359,
761,
1435,
645,
20,
268,
2741,
14079,
4865,
17595,
20,
6305,
6488,
27,
273,
17595,
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,
0,
0,
0,
0,
0,
0,
0... |
Partial Curl Transition for Modal Does Not Rotate
===
I have a custom Modal that launches at the beginning of my iPad application. The problem I am having is that the screen will not rotate once the Partial Curl is showing. All other Modals work (i.e. any modal other than a partial curl transition).
I am using a custom class for the modal that always returns `YES` for `shouldAutorotateToInterfaceOrientation`
Is there something in storyboard I need to do?
I have not seen any information on this. Any ideas? Let me know if you need anything else from me! | 0 | [
2,
7284,
14320,
4513,
26,
13,
20756,
630,
52,
21448,
800,
3726,
3726,
31,
57,
21,
5816,
13,
20756,
30,
22933,
35,
14,
997,
16,
51,
31,
8240,
3010,
9,
14,
1448,
31,
589,
452,
25,
30,
14,
2324,
129,
52,
21448,
382,
14,
7284,
143... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Make URL as an anchor tag in java script?
===
I am getting url as a input. When i get url as input. i want to assign it to anchor tag.
suppose, url=http://www.google.com
i want to put this url like this
<a href="http://www.google.com">http://www.google.com</a> | 0 | [
2,
233,
287,
6362,
28,
40,
6265,
3383,
19,
8247,
3884,
60,
800,
3726,
3726,
31,
589,
1017,
287,
6362,
28,
21,
6367,
9,
76,
31,
164,
287,
6362,
28,
6367,
9,
31,
259,
20,
13952,
32,
20,
6265,
3383,
9,
5787,
15,
287,
6362,
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... |
Cannot get pygobject to use a drawing area
===
Generally, I have been successful in using the Gtk3 system: Windows, boxes, grids, signal handlers etc. But, no matter what I try I cannot get a DrawingArea widget to work. I suspect something is wrong with my set-up but do not know how to check. Here is a bare-bones example that really should work:
#!/usr/bin/env python3
from gi.repository import Gtk, Gdk
class MyExample(object):
def __init__(self, user_data=None):
window = Gtk.Window()
window.connect("destroy", Gtk.main_quit)
drawing_area = Gtk.DrawingArea()
drawing_area.set_size_request(300,300)
drawing_area.connect('draw',self.expose)
window.add(drawing_area)
window.show_all()
def expose(self,widget,cr,data):
print ("self_exposed")
# ===
if __name__ == "__main__":
app = MyExample()
Gtk.main()
When I run it I get this error:
Exception TypeError: TypeError("Couldn't find conversion for foreign struct
'cairo.Context'",) in <module 'threading' from '/usr/lib/python3.2/threading.py'>
ignored
I am using Ubuntu 12.04 and Python 3.2. I suspect something is wrong with my install but what? I have tried re-installing python-gi-cairo.
Thanks for any ideas,
Mike
| 0 | [
2,
1967,
164,
13,
28860,
23793,
20,
275,
21,
3533,
217,
800,
3726,
3726,
1469,
15,
31,
57,
74,
1300,
19,
568,
14,
9509,
197,
240,
329,
45,
1936,
15,
8120,
15,
7354,
18,
15,
2800,
24641,
18,
2722,
9,
47,
15,
90,
1161,
98,
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... |
How to use in Nhibernate with QueryOver the Projections.SqlFunction for a mysql function that have not params?
===
I allready now how to use for any mysql function with parameters for example:
I succesfuly use the function Date(dateTimeValue) to get only the Date part.
But now i need to use the function in this way Date() or CurDate() the objective is get de MySql server
Current DateTime.
But the Projections.SqlFunction("Date", NHibernateUtil.Date,Params coma separate) not have a overload that use the function paramless.
So my question is, how can i achieve this ? Projections.SqlFunction("Date", NHibernateUtil.Date)
Thanks in advance for you time.
I use C# and Nhibernate QueryOver | 0 | [
2,
184,
20,
275,
19,
12109,
15191,
8820,
29,
25597,
2549,
14,
11607,
18,
9,
18,
22402,
22359,
26,
21,
51,
18,
22402,
1990,
30,
57,
52,
2258,
79,
18,
60,
800,
3726,
3726,
31,
65,
15193,
130,
184,
20,
275,
26,
186,
51,
18,
22402... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replace ALL lines of a .txt with first 8 characters having format xx:xx:xx where x is an integer in batch file
===
I'm comparing each properties.log file in root dir: c:\executionsdktest_10.2.2 with a reference file. Time of execution in xx:xx:xx format is printed in the first 8 chars of the 28 lines of ref and properties.log file, since the time would be different and inconsequential I would like to skip over first 8 chars of any line containing a time. How can I accomplish this?
REM assume <refLog>.txt exists
<!logPath! (
For /F "tokens=*" %%R in (!refLogPath!) DO (
set logLine=
set /p logLine=
set refLogLine=%%R
REM Check line by line of log against refLog
REM if corresponding lines mismatch: skip xx:xx:xx
if NOT "!logLine!"=="!refLogLine!" (
Echo.
Echo line below is Incorrect:
set lnCorrect=false
REM output to command line: can be put into .log/.txt later
REM output ANY and ALL incorrect line in log file
ECHO !logLine!
)
)
) | 0 | [
2,
3934,
65,
1560,
16,
21,
13,
9,
38,
396,
38,
29,
64,
469,
1766,
452,
2595,
13,
8962,
45,
8962,
45,
8962,
113,
993,
25,
40,
13820,
19,
13064,
3893,
800,
3726,
3726,
31,
22,
79,
15047,
206,
3704,
9,
5567,
3893,
19,
5900,
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... |
Transition between two pivotviewer collections
===
I'm trying to understand how to manage a transition between two collections. Both the collections has the same images, it's just that one collection is processed. I want to have one collection vanishing into the other.
I know how to define different templates that vanishes one into the other by fixing the maxwidth. For example once you zoom over 300 px then you have your new template until you reach 500 px, etc. The code is something like:
<pv:PivotViewerItemTemplate x:Key="firstTemplate" MaxWidth="300">
<!-- template layout -->
<pv:PivotViewerMultiScaleSubImageHost CollectionSource="{Binding [VisualCollectionSource][0] }" ImageId="{Binding [VisualImageId][0]}" />
<!-- template layout -->
</pv:PivotViewerItemTemplate>
<!-- template layout -->
<pv:PivotViewerItemTemplate x:Key="secondTemplate" MaxWidth="500">
<!-- template layout -->
<pv:PivotViewerMultiScaleSubImageHost CollectionSource="{Binding [VisualCollectionSource][0] }" ImageId="{Binding [VisualImageId][0]}" />
<!-- whatever -->
</pv:PivotViewerItemTemplate>
Now both templates bind the same collection source, which is the one I loaded in my code behind. I wonder what's the smartest way to load a new collection going from a template to another?
| 0 | [
2,
4513,
128,
81,
20670,
4725,
106,
5721,
800,
3726,
3726,
31,
22,
79,
749,
20,
1369,
184,
20,
4705,
21,
4513,
128,
81,
5721,
9,
156,
14,
5721,
63,
14,
205,
3502,
15,
32,
22,
18,
114,
30,
53,
1206,
25,
16697,
9,
31,
259,
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... |
copying one pointer to other in C/C++
===
#include <iostream>
using namespace std;
int main()
{
int a=5;
int *p,*q;
*p = a;
*q = *p; //line 6
cout<<*p<<p<<*q<<q;
return 0;
}
this program hangs.Is there a problem in line 6??
thanks in advance. | 0 | [
2,
4344,
68,
53,
454,
106,
20,
89,
19,
272,
118,
150,
20512,
800,
3726,
3726,
6926,
22640,
13,
1,
1963,
11260,
1,
568,
204,
5582,
354,
43,
73,
19,
38,
407,
5,
6,
13,
1,
19,
38,
21,
3726,
264,
73,
19,
38,
1637,
306,
15,
248... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I cant get the visible properties of my panel ( 1 to 6 ) to change from false to true, they are contained within a loginview , can anyone help me
===
Partial Class Details
Inherits System.Web.UI.Page
Private Sub Hiding()
Dim Panel1 As Panel
Dim Panel2 As Panel
Dim Panel3 As Panel
Dim Panel4 As Panel
Dim Panel5 As Panel
Dim Panel6 As Panel
Dim menu1 As Menu
Panel1 = LoginView1.FindControl("Panel1")
Panel2 = LoginView1.FindControl("Panel2")
Panel3 = LoginView1.FindControl("Panel3")
Panel4 = LoginView1.FindControl("Panel4")
Panel5 = LoginView1.FindControl("Panel5")
Panel6 = LoginView1.FindControl("Panel6")
menu1 = LoginView1.FindControl("Menu1")
Panel1.Visible = False
Panel2.Visible = False
Panel3.Visible = False
Panel4.Visible = False
Panel5.Visible = False
Panel6.Visible = False
End Sub
Protected Sub Menu1_MenuItemClick(sender As Object, e As System.Web.UI.WebControls.MenuEventArgs)
Dim Panel1 As Panel
Dim Panel2 As Panel
Dim Panel3 As Panel
Dim Panel4 As Panel
Dim Panel5 As Panel
Dim Panel6 As Panel
Dim menu1 As Menu
Panel2 = LoginView1.FindControl("Panel2")
Panel3 = LoginView1.FindControl("Panel3")
Panel4 = LoginView1.FindControl("Panel4")
Panel5 = LoginView1.FindControl("Panel5")
Panel6 = LoginView1.FindControl("Panel6")
menu1 = LoginView1.FindControl("Menu1")
If menu1.ID = "Medical and Nursing MDT" Then
Panel1 = LoginView1.FindControl("Panel1")
Panel1.Visible = True
ElseIf menu1.ID = "STACO" Then
Call Hiding()
Panel2.Visible = True
ElseIf menu1.ID = "Infection alerts" Then
Call Hiding()
Panel3.Visible = True
ElseIf menu1.ID = "Discharge and Health" Then
Call Hiding()
Panel4.Visible = True
ElseIf menu1.ID = "Delays" Then
Call Hiding()
Panel5.Visible = True
ElseIf menu1.ID = "Out of hours communcation" Then
Panel6.Visible = True
End If
End Sub
End Class | 0 | [
2,
31,
2973,
164,
14,
4560,
3704,
16,
51,
4113,
13,
5,
137,
20,
400,
13,
6,
20,
753,
37,
4997,
20,
1151,
15,
59,
50,
3437,
363,
21,
6738,
108,
4725,
13,
15,
92,
1276,
448,
55,
800,
3726,
3726,
7284,
718,
3289,
17569,
18,
329... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular expression to get substring of a match
===
Sorry for the odd wording, I'm not sure how to describe what I need to do succinctly...
I need to extract the first part of a part number from a string returned from our systems database. The part numbers have generally the following format:
VENDOR FIRST123-SECOND123
VENDOR is optional, as is the separating hyphen. I need to end up with FIRST123, or the last whole "word" if there is no hyphen.
So far I can get the FIRST123-SECOND123 with the following: [^ ]*$
I have not been able to figure out how to split the resulting match to get everything prior to any hyphen character. Ideas? | 0 | [
2,
1290,
1803,
20,
164,
972,
11130,
16,
21,
730,
800,
3726,
3726,
1875,
26,
14,
4210,
833,
68,
15,
31,
22,
79,
52,
562,
184,
20,
4996,
98,
31,
376,
20,
107,
13,
29437,
4812,
102,
9,
9,
9,
31,
376,
20,
10962,
14,
64,
141,
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 pointer events from top div to lower div
===
I have a cropping plugin and I wanted to apply a mask png over the top to give the impression of a cut shape. [Here is the fiddle][1].
It uses the css3 property `pointer-events:none;` on the image mask div, and it works in webkit browsers like chrome and firefox. But it doesn't work in IE because `pointer-events: none;` only works on an SVG.
So I started looking into my plugin and I updated it to [this fiddle][2]. If you click in the big gray box that says "this is an image..." and start to move the image, it allows for panning of the image in an IE browser.
So I think if I can recreate the way it overlays that div, I should be able to use the same effect on the mask div.
Does anybody have an idea on how the plugin is creating the big gray box div, in a way that it also is working in IE to allow the image to be panned around?
[1]: http://jsfiddle.net/thindery/6SmXx/
[2]: http://jsfiddle.net/thindery/SYkpN/ | 0 | [
2,
1477,
454,
106,
963,
37,
371,
13,
12916,
20,
987,
13,
12916,
800,
3726,
3726,
31,
57,
21,
4880,
5574,
10922,
108,
17,
31,
417,
20,
5645,
21,
5983,
351,
2723,
84,
14,
371,
20,
590,
14,
6394,
16,
21,
1077,
2539,
9,
636,
6836,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Google Chrome keeps session variables after browser close
===
I am using asp.net forms version 4 and using the built in FormsAuthentication.
I have selected to not persist the User.
FormsAuthentication.RedirectFromLoginPage(userIAmUsing, false);
When I close the browser in IE and Firefox. My session variables are destroyed and I am asked to re-login when I return to the page. However, in my Chrome settings I have the "Continue where I left off" setting checked. When I close the browser in Chrome, it is persisting the cookie against my (the developer's) wishes. In fact, even after I have logged out of my machine, the session is persisted.
That being the situation, does anyone know of any thing that I can do as a developer to override this behavior and not allow the session to persist after browser close? In other words, can I make Chrome behave exactly like other browsers even if the user has checked that setting?
| 0 | [
2,
8144,
13,
12985,
8968,
3723,
12157,
75,
16495,
543,
800,
3726,
3726,
31,
589,
568,
28,
306,
9,
2328,
1997,
615,
268,
17,
568,
14,
392,
19,
1997,
1346,
2504,
1786,
857,
9,
31,
57,
1704,
20,
52,
22084,
14,
4155,
9,
1997,
1346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 execute commands optionally in background?
===
I want to execute a set of commands *optionally* in background and with bash. Something like this
#!/bin/bash
BGR=""
if [ foo ] ; then
BGR=\&
fi
cmd1 $BGR
cmd2 $BGR
cmd3 $BGR
wait
But this doesn't seem possible with bash. If `foo` is true, the commands evaluate to
+ cmd1 '&'
+ cmd2 '&'
+ cmd3 '&'
so the & is just another argument.
**Is there any other way to achieve this?** Besides code duplication, where I write if/then/else blocks with the different behavior. | 0 | [
2,
184,
20,
15644,
14294,
12832,
102,
19,
2395,
60,
800,
3726,
3726,
31,
259,
20,
15644,
21,
309,
16,
14294,
1637,
2594,
3309,
1326,
2483,
19,
2395,
17,
29,
13158,
9,
301,
101,
48,
6926,
187,
118,
4772,
118,
969,
1635,
334,
8807,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Thin / Capistrano cannot connect to database
===
I'm trying to setup my Ruby on Rails application to deploy to a Thin cluster. When I manually start the thin cluster on the server using `bundle exec thin start -C config/thin.yml` everything works fine. However when I run the same command via Capistrano it just dies and the log displays:
``/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:45:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)``
I'm at a loss, I log into the server using the same user account as defined in the capistrano script.
My capistrano Thin tasks:
namespace :deploy do
task :start do
run "cd #{current_path}; bundle exec thin start -C config/thin.yml"
end
task :stop do
run "cd #{current_path}; bundle exec thin stop -C config/thin.yml"
end
task :restart do
run "cd #{current_path}; bundle exec thin restart -C config/thin.yml"
end
end
Here is my thin.yml:
---
chdir: /var/www/rails/myapp/current
environment: staging
address: 0.0.0.0
port: 3000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 2
daemonize: true
Any help would be appreciated | 0 | [
2,
2951,
13,
118,
2605,
702,
17555,
1967,
6379,
20,
6018,
800,
3726,
3726,
31,
22,
79,
749,
20,
18161,
51,
10811,
27,
2240,
18,
3010,
20,
17617,
20,
21,
2951,
7460,
9,
76,
31,
23671,
799,
14,
2951,
7460,
27,
14,
8128,
568,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to change the UIView's Y axis dynamically based on UITextView's Content size
===
I have an UITextView as subview of UIView. I have placed the UIView in bottom of the screen. The view controller have UITabViewController. I gave the frame size to UIView like below,
toolBarView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 330, 320, 40)];
[self.view addSubview: toolBarView1];
TextView1 = [[UITextView alloc] initWithFrame:CGRectMake(35, 7.5, 210, 25)];
textViewImageView1 = [[UIImageView alloc]initWithFrame: CGRectMake(0, 0, 210, 25)];
[TextView1 addSubview: textViewImageView1];
[toolBarView1 addSubview: TextView1];
I want to increase the UITextView height based on the text inside of UITextView. I have used these below code,
CGRect frame = messageTextView1.frame;
frame.size.height = messageTextView1.contentSize.height;
NSLog(@"TextViewHeight With Texts : %f", frame.size.height);
int height = frame.size.height;
NSLog(@"TextViewHeight With Texts : %d", height);
height = height + 10;
NSLog(@"Height Plus 10 : %d", height);
height = 370 - height;
NSLog(@"ToolBarView1 Y axis : %d", height);
messageTextView1.frame = frame;
textViewImageView1.frame = CGRectMake(0, 0, messageTextView1.frame.size.width, messageTextView1.frame.size.height);
toolBarView1.frame = CGRectMake(0, height, 320, messageTextView1.frame.size.height+10);
I want to place the UIView and UITextView bottom of the screen itself but i want to increase the height of the UIView and UITextview and Y Axis of the UIView based on the UITextview height. Can anyone please help me to do this? Thanks in advance.
| 0 | [
2,
184,
20,
753,
14,
13,
5661,
4725,
22,
18,
13,
93,
8577,
7782,
1326,
432,
27,
13,
5661,
11969,
4725,
22,
18,
2331,
1072,
800,
3726,
3726,
31,
57,
40,
13,
5661,
11969,
4725,
28,
972,
4725,
16,
13,
5661,
4725,
9,
31,
57,
1037,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript behaves differently in Chrome vs. Chrome app
===
I am learning how to develop offline chrome app.
I have three components: main.html, main.css, main.js
Main.js is loaded in main.html /html/head/script using this tag:
<script type="text/javascript" src="main.js"></script>
and initial action is triggered by onLoad event in body tag:
<body onLoad="initOnLoad(); ">
The function initOnLoad() manipulates some elements found by their HTML id:
...
1: function initOnLoad() {
2: alert("initOnLoad started");
3: initWaveArray();
4: addWaveButtons(document.getElementById("wave_selector"));
5: addBandButtons(document.getElementById("band_selector"));
6: e = document.getElementById("wave_HF");
7: activeWaveDiv = e;
8: setActiveWave();
9: initDateTime();
10: }
Calls in lines 4 and 5 populate some <div> elements into main.html.
Now, when I load this page in Chrome during development, everything works as expected. But when I load my project as Chrome app, I have these properties in **manifest.json**:
"app": {"launch": {"local_path": "main.html"}},
"web_accessible_resources": [
"main.js", "main.css", "main.html"]
...
When I start the app, it loads the page, _initOnLoad()_ function is started, but the calls to _document.getElementById()_ in lines 4 and 5 produce _**null**_ reference and hence nothing is loaded in the HTML document.
Although this obviously seems to be related to security, I cannot find where is my mistake. | 0 | [
2,
8247,
8741,
14149,
18,
12670,
19,
13,
12985,
4611,
9,
13,
12985,
4865,
800,
3726,
3726,
31,
589,
2477,
184,
20,
2803,
168,
1143,
13,
12985,
4865,
9,
31,
57,
132,
5090,
45,
407,
9,
15895,
15,
407,
9,
6824,
18,
15,
407,
9,
72... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# - How to enable FlowControl with RabbitMQ
===
does anyone know how to enable RabbitMQ Flow Control in C# ?
I tried something like this:
channel = connection.CreateModel();
channel.ChannelFlow(true);
channel.FlowControl += new RabbitMQ.Client.Events.FlowControlEventHandler(channel_FlowControl);
Basically, i would expect the "channel_FlowControl" Event to be triggered when the RabbitMQ connection goes into FlowControl Mode - but somehow that doesn't happen.
Anyone knows how i hae to handle it correctly?
Thanks in advance | 0 | [
2,
272,
5910,
13,
8,
184,
20,
9240,
3312,
12898,
29,
8335,
79,
1251,
800,
3726,
3726,
630,
1276,
143,
184,
20,
9240,
8335,
79,
1251,
3312,
569,
19,
272,
5910,
13,
60,
31,
794,
301,
101,
48,
45,
1318,
800,
2760,
9,
6037,
1373,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Amazon Web Services Issue
===
After I run the EC2 API tools, I run the command: ./ec2-cmd
However, I still get the error: Error: Could not find or load main class com.amazon.aes.webservices.client.cmd.
According to the guide: http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/running-an-instance.html
I'm suppose to run the ec2 commands, but none of the commands run due to the error above.
Any solutions? | 0 | [
2,
8059,
2741,
687,
1513,
800,
3726,
3726,
75,
31,
485,
14,
6695,
135,
21,
2159,
4672,
15,
31,
485,
14,
1202,
45,
13,
9,
118,
3319,
135,
8,
9095,
43,
207,
15,
31,
174,
164,
14,
7019,
45,
7019,
45,
110,
52,
477,
54,
6305,
407... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Pivot Table: Running total percentage of an absolute value?
===
In Excel 2010 I wish to in a Pivot Table to create a value that is "*% running total / estimate at that point of time*". I can create a "*running total*", but I'm not able to divide it correctly with the "*estimate at that point of time*". The value much preferably be calculated within the Pivot Table and no changes to the input data format is allowed.
The example demonstrates better than words. The field I need help with creating in the Pivot Table is marked with ** ** ** ** ** ** ** **.
Thanks in advance.
**Input Table**
Input data is in the following format - no changes are allowed. For each month I have nof hours spent in that month and the estimate for the entire project at that point of time (not just for the month).
Month Hours spent Estimate
01-2012 1 50
02-2012 10 50
03-2012 5 60
04-2012 35 60
**The Pivot Table I wish to create**
** ** ** ** ** ** ** **
Month Hours spent Estimate % Hrs/Estimate
(running total) (How do I create this?)
01-2012 1 50 2%
02-2012 11 50 22%
03-2012 16 60 27%
04-2012 51 60 85%
| 0 | [
2,
20670,
859,
45,
946,
600,
5780,
16,
40,
7070,
1923,
60,
800,
3726,
3726,
19,
20700,
498,
31,
2536,
20,
19,
21,
20670,
859,
20,
1600,
21,
1923,
30,
25,
13,
7,
2483,
11881,
946,
600,
13,
118,
10243,
35,
30,
454,
16,
85,
2483,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.