unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
bash - user input - variable
===
Say I have something like
if [[ "$age" = "12" ]]; then
"$age" = "twelve"
fi
This still returns the number itself. How can I make it become twelve? | 0 | [
2,
13158,
13,
8,
4155,
6367,
13,
8,
7612,
800,
3726,
3726,
395,
31,
57,
301,
101,
100,
636,
2558,
13,
7,
4403,
1303,
7,
800,
13,
7,
918,
7,
13,
500,
12660,
94,
13,
7,
4403,
1303,
7,
800,
13,
7,
38,
6986,
195,
7,
6028,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
Foreach Loop not working with json_decode
===
I am getting the following error for the foreach loop that I am trying to run on a json file.
Warning: Invalid argument supplied for foreach() in C:\PATH on line 17
I have been reading the PHP manual for JSON Decode/Encode etc.. and trying to wrap my head around the issue but nothing seems to fit my problem. The code I am currently using is:
$json = file_get_contents('khan-json.json');
$json_o = json_decode($json);
foreach($json_o as $val)
{
echo $val['title'];
}
I am pulling the data from an external file stored in the same location as my script. I was wondering if this could be the issue. Also here is a snippet of the JSON (I didnt want to post the entire contents of the file as it is about a mile long:
[
{
"items": [
{
"items": [
{
"items": [],
"name": "Telling time"
},
{
"items": [],
"name": "Rates and ratios"
},
{
"name": "Addition and subtraction",
"playlist": {
"backup_timestamp": "2012-06-13T22:11:55Z",
"description": "Adding and subtracting positive and negative whole numbers. Starts with 1+1=2 and covers carrying, borrowing, and word problems.",
"extended_slug": "math/arithmetic/addition-subtraction",
"hide": false,
"id": "addition-subtraction",
"ka_url": "http://www.khanacademy.org/#addition-subtraction",
"kind": "Topic",
"relative_url": "/#addition-subtraction",
"standalone_title": "Addition and subtraction",
"tags": [],
"title": "Addition and subtraction",
"topic_page_url": "/math/arithmetic/addition-subtraction",
"url": "",
"videos": [
{
"backup_timestamp": "2012-06-14T00:58:18Z",
"date_added": "2011-02-20T16:30:25Z",
"description": "Introduction to addition. Multiple visual ways to represent addition.",
"download_urls": {
"m3u8": "http://s3.amazonaws.com/KA-youtube-converted/AuX7nPBqDts.m3u8/AuX7nPBqDts.m3u8",
"mp4": "http://s3.amazonaws.com/KA-youtube-converted/AuX7nPBqDts.mp4/AuX7nPBqDts.mp4",
"png": "http://s3.amazonaws.com/KA-youtube-converted/AuX7nPBqDts.mp4/AuX7nPBqDts.png"
},
"duration": 462,
"extra_properties": null,
"ka_url": "http://www.khanacademy.org/video/basic-addition",
"keywords": "Math, Addition, Khan, Academy, CC_1_OA_1, CC_1_OA_2, CC_1_OA_3, CC_1_OA_6",
"kind": "Video",
"readable_id": "basic-addition",
"relative_url": "/video/basic-addition",
"title": "Basic Addition",
"url": "http://www.youtube.com/watch?v=AuX7nPBqDts&feature=youtube_gdata_player",
"views": 1040739,
"youtube_id": "AuX7nPBqDts"
},
In the end my goal is to be able to loop through the results of the JSON and store each individual part of each item into a database. I am new to JSON so any guidance on the subject would be great. Thank you in advance. | 0 | [
2,
26,
14322,
5293,
52,
638,
29,
487,
528,
1,
546,
9375,
800,
3726,
3726,
31,
589,
1017,
14,
249,
7019,
26,
14,
26,
14322,
5293,
30,
31,
589,
749,
20,
485,
27,
21,
487,
528,
3893,
9,
3590,
45,
16671,
5476,
7949,
26,
26,
14322,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Missing distribution spec error using pip install from requirements
===
Hi I have just created a fresh virtualenv into which I want to run my pip install. However, I'm getting this error:
raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '/path/to/dir/requirements.txt')
My **requirements.txt**:
Django==1.3
Jinja2==2.6
MySQL-python==1.2.3
PIL==1.1.7
Pygments==1.5
Sphinx==1.1.3
Werkzeug==0.8.3
django-debug-toolbar==0.9.4
django-excel-response==1.0
django-extensions==0.8
docutils==0.9.1
ipython==0.12
wsgiref==0.1.2
Any suggestions as to what is going wrong?
Any help much appreciated. | 0 | [
2,
2863,
2523,
12737,
7019,
568,
11280,
16146,
37,
4786,
800,
3726,
3726,
4148,
31,
57,
114,
679,
21,
3180,
6599,
219,
710,
77,
56,
31,
259,
20,
485,
51,
11280,
16146,
9,
207,
15,
31,
22,
79,
1017,
48,
7019,
45,
3972,
1923,
2999... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Permission Denial: broadcasting Intent android.provider.Telephony.SMS_RECEIVED
===
Hello i am new to Android, I'm getting this problem even after having the required SMS permissions inside my manifest file. I tried a couple of ways but it doesn't work anymore got any idea?
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.phonefinder2"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<application android:icon="@drawable/ic_launcher">
<activity android:name=".PhoneFinder" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".FinderReceiver" android:enabled="true" android:exported="false">
<intent-filter android:priority="999">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
</manifest>
Error:
07-19 18:15:05.790: W/ActivityManager(66): Permission denied: checkComponentPermission() reqUid=10042
07-19 18:15:05.790: W/ActivityManager(66): Permission Denial: broadcasting Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } from com.android.phone (pid=124, uid=1001) requires null due to receiver com.example.phonefinder2/com.example.phonefinder2.FinderReceiver
| 0 | [
2,
5572,
16324,
45,
3647,
6936,
13005,
9,
26735,
139,
9,
14305,
22031,
9,
18,
79,
18,
1,
27700,
800,
3726,
3726,
10975,
31,
589,
78,
20,
13005,
15,
31,
22,
79,
1017,
48,
1448,
166,
75,
452,
14,
1390,
7613,
18,
5572,
18,
572,
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... |
Silverlight + WCF Service
===
I tried creating a WCF service in Visual Studio 2010 and it seems to work because when I debug is VS using WCF Test Client, I can connect to the service and run the commands. But, when I try to run the commands from my Silverlight app i get an error saying my cross domain doesn't work. I have included my code from my silverlight app and wcf client.
***SERVICE***
**clientaccesspolicy.xml**
`<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>`
**app.config**
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SqlServerServiceBinding" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<!--<behaviors>
<serviceBehaviors>
<behavior name="SqlServerServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>-->
<services>
<service name="SqlServerService.Service1">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8085/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address ="" binding="basicHttpBinding" contract="SqlServerService.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<!--<identity>
<dns value="localhost"/>
</identity>-->
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
**service1.cs**
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace SqlServerService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
public class Service1 : IService1
{
public CompositeType executeScriptWithReturn(String command_string)
{
CompositeType cs = new CompositeType();
Userful_Commands.sql_server_commands sql = new Userful_Commands.sql_server_commands("Server=localhost;Database=kenticoTest;Integrated Security=SSPI;");
cs.DtValue = command_string;//sql.executeScriptWithReturn("SELECT * FROM tblBugs");
return cs;
}
}
}
**IService1.cs**
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace SqlServerService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
[ServiceContract]
public interface IService1
{
[OperationContract]
CompositeType executeScriptWithReturn(String command_string);
// TODO: Add your service operations here
}
// Use a data contract as illustrated in the sample below to add composite types to service operations
[DataContract]
public class CompositeType
{
public String dt;
[DataMember]
public String DtValue
{
get { return dt; }
set { dt = value; }
}
}
}
***SILVERLIGHT***
**ServicesReferences.ClientConfig**
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8085/" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
</configuration>
**MainPage.xaml.cs**
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Silverlight;
using SilverlightSQLServer;
namespace SilverlightApplication1
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void loaded_up(object sender, RoutedEventArgs e)
{
//SilverlightApplication1.ServiceReference1.Service1Client sc = new ServiceReference1.Service1Client();
//sc.executeScriptWithReturnCompleted += completed;
//sc.executeScriptWithReturnAsync("TEST COMMAND");
ServiceReference1.Service1Client ws = new ServiceReference1.Service1Client();
ws.executeScriptWithReturnCompleted += completed;
ws.executeScriptWithReturnAsync("TESTCOMMAND");
}
private void completed(object sender, SilverlightApplication1.ServiceReference1.executeScriptWithReturnCompletedEventArgs e)
{
SilverlightApplication1.ServiceReference1.CompositeType serviceResp = e.Result;
e = e;
}
}
}
Thank you in advance.
| 0 | [
2,
1172,
3130,
2754,
11801,
410,
365,
800,
3726,
3726,
31,
794,
2936,
21,
11801,
410,
365,
19,
3458,
1120,
498,
17,
32,
2206,
20,
170,
185,
76,
31,
121,
16254,
25,
4611,
568,
11801,
410,
1289,
6819,
15,
31,
92,
6379,
20,
14,
365... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WinForm off screen preventing
===
Following my [previous post][1]
[1]: http://stackoverflow.com/questions/11531088/form-move-inside-client-desktop-area
I'm able to prevent winform off screen when user make some drag-drop,
however I notice that when I move my form, mouse cursor seems running fastly, more than winForm, in fact, when Drag-Drop is finished mouse cursors appears in a position off form.
Is there some way to prevent this? | 0 | [
2,
628,
4190,
168,
2324,
11520,
800,
3726,
3726,
249,
51,
636,
3515,
1755,
1291,
678,
500,
2558,
165,
500,
636,
165,
500,
45,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
11698,
14511,
17767,
12530,
4190,
8,
16598,
8,
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... |
Python subprocess package does not report errors from subprocess?
===
On some machine, for the following piece of code
p = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.STDOUT);
out, err = p.communicate()
This script would just hang at `p.communicate()` and does not return.
After I manually run the command, I finally see the error messages.
Why is this, and how should I solve it?
Thanks. | 0 | [
2,
20059,
972,
16835,
6030,
630,
52,
1330,
11908,
37,
972,
16835,
60,
800,
3726,
3726,
27,
109,
1940,
15,
26,
14,
249,
1855,
16,
1797,
351,
800,
972,
16835,
9,
6057,
219,
5,
9095,
43,
15,
354,
43,
1320,
800,
972,
16835,
9,
15185... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Converting b/w canvas to 2D array
===
I am working on a character recognizer app and trying to convert a canvas image to a 2d array of ints. The dimensions are 250x250 and is black and white. If the pixel is black, I want it to set the array value to 1. How can I determine the pixel color for each pixel to populate my array? (I am working with WPF and C#)
Thanks,
Joseph | 0 | [
2,
19583,
334,
118,
499,
9696,
20,
172,
43,
7718,
800,
3726,
3726,
31,
589,
638,
27,
21,
925,
5844,
139,
4865,
17,
749,
20,
8406,
21,
9696,
1961,
20,
21,
172,
43,
7718,
16,
19,
38,
18,
9,
14,
9913,
50,
6774,
396,
9798,
17,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I check the return value of a db query with mocking?
===
So for my unit testing I am using easymock. I have a findProject method which queries the db and returns a list of the projects. I have mocked the object which returns the entityManger(I am using JPA and Hibernate). So it is something like : mockedRepository.findList() which returns the projectList. So now that is a mocked object. So in these situations I cannot check the return value of findList. Right? Cuz that is a mocked object and it just returns what I want. So if you want to test this kind of methods which query the db we cannot use mocking. Right? I can just check whether the methods have been called with easyMocking. Right?
Thanks. | 0 | [
2,
92,
31,
2631,
14,
788,
1923,
16,
21,
13,
9007,
25597,
29,
18446,
60,
800,
3726,
3726,
86,
26,
51,
1237,
4431,
31,
589,
568,
2010,
79,
5668,
9,
31,
57,
21,
477,
21011,
2109,
56,
9386,
2829,
14,
13,
9007,
17,
4815,
21,
968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 request parameters for JSON store. ExtJS
===
I want to **string together some parameters into an address where I can view an AJAX request in browser**... I think this is what I mean, though I am not comfortable talking about AJAX. I am only a novice front-end web application programmer.
So to start, I have an extJS application with a combobox. It is populated by items in a JSON file, from what I can tell. Here is the application code snippet:
items: [{
xtype : 'combobox',
queryMode : 'remote',
fieldLabel: 'twittersearch',
typeAhead : true,
allowBlank : applicationtype === 'relatedanalysis' ? true : false,
hideTrigger : false,
editable : false,
multiSelect : true,
minChars : 1,
store : 'smcc.TwitterSearch',
displayField : 'id',
name : 'twittersearch',
listConfig: {
getInnerTpl: function() {
return '<div><img src="../media/com_concilium/images/twitter/{sn}-logo-med.png" />{id}</div>';
}
}
}
So I understand how store's work in the extJS MVC setup. Documentation here: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.ComboBox-cfg-store
So I searched 'twittersearch' at the root of my all component files with windows explorer to find the proper twittersearch.js store file. Here it is:
Ext.define('Container.store.smcc.TwitterSearch', {
extend : 'Ext.data.Store',
model : 'Container.model.smcc.TwitterSearch',
autoLoad : false,
proxy : {
type : 'ajax',
url : './',
extraParams : {
option : 'com_concilium',
view : 'smcc',
format : 'raw',
controller : 'smcc',
task : 'getSocalMediaStream'
},
reader : {
type : 'json',
root : 'rows',
totalProperty: 'row_count'
}
},
});
So is this enough information to create an address and perhaps look at the data? I assume it is something like urlbase/index.php?option=com_concilium&view=smcc&format=raw&controller=smcc&task=getSocialMediaStream
What the heck am I trying to learn? So in over my head... Will tip for knowledge :) | 0 | [
2,
20624,
3772,
12905,
26,
487,
528,
1718,
9,
1396,
38,
728,
18,
800,
3726,
3726,
31,
259,
20,
13,
1409,
11130,
429,
109,
12905,
77,
40,
3218,
113,
31,
92,
1418,
40,
20624,
3772,
19,
16495,
1409,
9,
9,
9,
31,
277,
48,
25,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Extending django-annoying to work with datetime.datetime
===
I'm using django-annoying, but now I have error with datatime.datetime encoding:
datetime.datetime(2012, 6, 22, 7, 40, 0, 161557) is not JSON serializable
It's standard exception of simplejson with encoding datetime type. And I find a lot of examples with redefining JsonEncoder structure. What is the better way to use hack django-annoying library?
I want just use standard @render_to, @ajax as usual. | 0 | [
2,
8176,
3857,
14541,
8,
28328,
68,
20,
170,
29,
1231,
891,
9,
8209,
891,
800,
3726,
3726,
31,
22,
79,
568,
3857,
14541,
8,
28328,
68,
15,
47,
130,
31,
57,
7019,
29,
1054,
891,
9,
8209,
891,
19608,
45,
1231,
891,
9,
8209,
891,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
get a key from an array in anonymous function
===
How can I get a key from an array in anonymous function , using 'array_map' ?
array_map(function($v) {
echo $v.'<br/>'; //get key (container..e.t.c)
},array(
'CONTAINER' => $this->CONTAINER ,
'CONTAINER_USE_KEY' => $this->CONTAINER_USE_KEY ,
'LINE' => $this->LINE
)); | 0 | [
2,
164,
21,
1246,
37,
40,
7718,
19,
10364,
1990,
800,
3726,
3726,
184,
92,
31,
164,
21,
1246,
37,
40,
7718,
19,
10364,
1990,
13,
15,
568,
13,
22,
8576,
93,
1,
15022,
22,
13,
60,
7718,
1,
15022,
5,
22359,
5,
4403,
710,
6,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
asp.net and scripts
===
Is it possible to have .net run WSF scripts on the server in the background?
I have IIS6 on the server. I have gotten it to run a script when I run the site on a localhost/debugg but never on the server?
Are there any IIS options to be configured to get it to work? | 0 | [
2,
28,
306,
9,
2328,
17,
17505,
800,
3726,
3726,
25,
32,
938,
20,
57,
13,
9,
2328,
485,
619,
18,
410,
17505,
27,
14,
8128,
19,
14,
2395,
60,
31,
57,
595,
18,
379,
27,
14,
8128,
9,
31,
57,
4094,
32,
20,
485,
21,
3884,
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... |
How to reference a leaf from a different root?
===
I have this design :
A product has many pricing grids, a grid has many pricing periods
Product
Id
Name
Grids[]
Name
Periods[]
Price
Start
End
Now I have special offers, when a seller create an offer (for instance -10%) he can choose to apply it to a Product or even to a Grid (for instance he doesn't want to apply the offer to the grid "www.apartnerwebsite.com" but he prefers to apply it to the grid "my website").
Offer
OfferId
OfferName
ProductIds[]
GridIds[] //??
But I can't do this because there is no grid ids and I can't reference a Leaf from a root aggregate. | 0 | [
2,
184,
20,
2801,
21,
5164,
37,
21,
421,
5900,
60,
800,
3726,
3726,
31,
57,
48,
704,
13,
45,
21,
2374,
63,
151,
24318,
7354,
18,
15,
21,
7354,
63,
151,
24318,
7302,
2374,
4924,
204,
7354,
18,
2558,
500,
204,
7302,
2558,
500,
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... |
Flip Image inside lightbox
===
I use this lightbox: http://lokeshdhakar.com/projects/lightbox2/
I would like to add another feature to it, so that I have
- prev image
- next image
- flip image
Is this somehow possible to do? I already tried a few things with simple hover effects using css but nothing seems to work. Hope that someone could help me here.
Many Thanks,
Klaus
(function() {
var $, Lightbox, LightboxOptions;
$ = jQuery;
LightboxOptions = (function() {
function LightboxOptions() {
this.fileLoadingImage = 'images/loading.gif';
this.fileCloseImage = 'images/close.png';
this.resizeDuration = 700;
this.fadeDuration = 500;
this.labelImage = "Image";
this.labelOf = "of";
}
return LightboxOptions;
})();
Lightbox = (function() {
function Lightbox(options) {
this.options = options;
this.album = [];
this.currentImageIndex = void 0;
this.init();
}
Lightbox.prototype.init = function() {
this.enable();
return this.build();
};
Lightbox.prototype.enable = function() {
var _this = this;
return $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox]', function(e) {
_this.start($(e.currentTarget));
return false;
});
};
Lightbox.prototype.build = function() {
var $lightbox,
_this = this;
$("<div>", {
id: 'lightboxOverlay'
}).after($('<div/>', {
id: 'lightbox'
}).append($('<div/>', {
"class": 'lb-outerContainer'
}).append($('<div/>', {
"class": 'lb-container'
}).append($('<img/>', {
"class": 'lb-image'
}), $('<div/>', {
"class": 'lb-nav'
}).append($('<a/>', {
"class": 'lb-prev'
}), $('<a/>', {
"class": 'lb-next'
})), $('<div/>', {
"class": 'lb-loader'
}).append($('<a/>', {
"class": 'lb-cancel'
}).append($('<img/>', {
src: this.options.fileLoadingImage
}))))), $('<div/>', {
"class": 'lb-dataContainer'
}).append($('<div/>', {
"class": 'lb-data'
}).append($('<div/>', {
"class": 'lb-details'
}).append($('<span/>', {
"class": 'lb-caption'
}), $('<span/>', {
"class": 'lb-number'
})), $('<div/>', {
"class": 'lb-closeContainer'
}).append($('<a/>', {
"class": 'lb-close'
}).append($('<img/>', {
src: this.options.fileCloseImage
}))))))).appendTo($('body'));
$('#lightboxOverlay').hide().on('click', function(e) {
_this.end();
return false;
});
$lightbox = $('#lightbox');
$lightbox.hide().on('click', function(e) {
if ($(e.target).attr('id') === 'lightbox') _this.end();
return false;
});
$lightbox.find('.lb-outerContainer').on('click', function(e) {
if ($(e.target).attr('id') === 'lightbox') _this.end();
return false;
});
$lightbox.find('.lb-prev').on('click', function(e) {
_this.changeImage(_this.currentImageIndex - 1);
return false;
});
$lightbox.find('.lb-next').on('click', function(e) {
_this.changeImage(_this.currentImageIndex + 1);
return false;
});
$lightbox.find('.lb-loader, .lb-close').on('click', function(e) {
_this.end();
return false;
});
};
Lightbox.prototype.start = function($link) {
var $lightbox, $window, a, i, imageNumber, left, top, _len, _ref;
$(window).on("resize", this.sizeOverlay);
$('select, object, embed').css({
visibility: "hidden"
});
$('#lightboxOverlay').width($(document).width()).height($(document).height()).fadeIn(this.options.fadeDuration);
this.album = [];
imageNumber = 0;
if ($link.attr('rel') === 'lightbox') {
this.album.push({
link: $link.attr('href'),
title: $link.attr('title')
});
} else {
_ref = $($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]');
for (i = 0, _len = _ref.length; i < _len; i++) {
a = _ref[i];
this.album.push({
link: $(a).attr('href'),
title: $(a).attr('title')
});
if ($(a).attr('href') === $link.attr('href')) imageNumber = i;
}
}
$window = $(window);
top = $window.scrollTop() + $window.height() / 10;
left = $window.scrollLeft();
$lightbox = $('#lightbox');
$lightbox.css({
top: top + 'px',
left: left + 'px'
}).fadeIn(this.options.fadeDuration);
this.changeImage(imageNumber);
};
Lightbox.prototype.changeImage = function(imageNumber) {
var $image, $lightbox, preloader,
_this = this;
this.disableKeyboardNav();
$lightbox = $('#lightbox');
$image = $lightbox.find('.lb-image');
this.sizeOverlay();
$('#lightboxOverlay').fadeIn(this.options.fadeDuration);
$('.loader').fadeIn('slow');
$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
$lightbox.find('.lb-outerContainer').addClass('animating');
preloader = new Image;
preloader.onload = function() {
$image.attr('src', _this.album[imageNumber].link);
$image.width = preloader.width;
$image.height = preloader.height;
return _this.sizeContainer(preloader.width, preloader.height);
};
preloader.src = this.album[imageNumber].link;
this.currentImageIndex = imageNumber;
};
Lightbox.prototype.sizeOverlay = function() {
return $('#lightboxOverlay').width($(document).width()).height($(document).height());
};
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
var $container, $lightbox, $outerContainer, containerBottomPadding, containerLeftPadding, containerRightPadding, containerTopPadding, newHeight, newWidth, oldHeight, oldWidth,
_this = this;
$lightbox = $('#lightbox');
$outerContainer = $lightbox.find('.lb-outerContainer');
oldWidth = $outerContainer.outerWidth();
oldHeight = $outerContainer.outerHeight();
$container = $lightbox.find('.lb-container');
containerTopPadding = parseInt($container.css('padding-top'), 10);
containerRightPadding = parseInt($container.css('padding-right'), 10);
containerBottomPadding = parseInt($container.css('padding-bottom'), 10);
containerLeftPadding = parseInt($container.css('padding-left'), 10);
newWidth = imageWidth + containerLeftPadding + containerRightPadding;
newHeight = imageHeight + containerTopPadding + containerBottomPadding;
if (newWidth !== oldWidth && newHeight !== oldHeight) {
$outerContainer.animate({
width: newWidth,
height: newHeight
}, this.options.resizeDuration, 'swing');
} else if (newWidth !== oldWidth) {
$outerContainer.animate({
width: newWidth
}, this.options.resizeDuration, 'swing');
} else if (newHeight !== oldHeight) {
$outerContainer.animate({
height: newHeight
}, this.options.resizeDuration, 'swing');
}
setTimeout(function() {
$lightbox.find('.lb-dataContainer').width(newWidth);
$lightbox.find('.lb-prevLink').height(newHeight);
$lightbox.find('.lb-nextLink').height(newHeight);
_this.showImage();
}, this.options.resizeDuration);
};
Lightbox.prototype.showImage = function() {
var $lightbox;
$lightbox = $('#lightbox');
$lightbox.find('.lb-loader').hide();
$lightbox.find('.lb-image').fadeIn('slow');
this.updateNav();
this.updateDetails();
this.preloadNeighboringImages();
this.enableKeyboardNav();
};
Lightbox.prototype.updateNav = function() {
var $lightbox;
$lightbox = $('#lightbox');
$lightbox.find('.lb-nav').show();
if (this.currentImageIndex > 0) $lightbox.find('.lb-prev').show();
if (this.currentImageIndex < this.album.length - 1) {
$lightbox.find('.lb-next').show();
}
};
Lightbox.prototype.updateDetails = function() {
var $lightbox,
_this = this;
$lightbox = $('#lightbox');
if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") {
$lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast');
}
if (this.album.length > 1) {
$lightbox.find('.lb-number').html(this.options.labelImage + ' ' + (this.currentImageIndex + 1) + ' ' + this.options.labelOf + ' ' + this.album.length).fadeIn('fast');
} else {
$lightbox.find('.lb-number').hide();
}
$lightbox.find('.lb-outerContainer').removeClass('animating');
$lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration, function() {
return _this.sizeOverlay();
});
};
Lightbox.prototype.preloadNeighboringImages = function() {
var preloadNext, preloadPrev;
if (this.album.length > this.currentImageIndex + 1) {
preloadNext = new Image;
preloadNext.src = this.album[this.currentImageIndex + 1].link;
}
if (this.currentImageIndex > 0) {
preloadPrev = new Image;
preloadPrev.src = this.album[this.currentImageIndex - 1].link;
}
};
Lightbox.prototype.enableKeyboardNav = function() {
$(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
};
Lightbox.prototype.disableKeyboardNav = function() {
$(document).off('.keyboard');
};
Lightbox.prototype.keyboardAction = function(event) {
var KEYCODE_ESC, KEYCODE_LEFTARROW, KEYCODE_RIGHTARROW, key, keycode;
KEYCODE_ESC = 27;
KEYCODE_LEFTARROW = 37;
KEYCODE_RIGHTARROW = 39;
keycode = event.keyCode;
key = String.fromCharCode(keycode).toLowerCase();
if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
this.end();
} else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
if (this.currentImageIndex !== 0) {
this.changeImage(this.currentImageIndex - 1);
}
} else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
if (this.currentImageIndex !== this.album.length - 1) {
this.changeImage(this.currentImageIndex + 1);
}
}
};
Lightbox.prototype.end = function() {
this.disableKeyboardNav();
$(window).off("resize", this.sizeOverlay);
$('#lightbox').fadeOut(this.options.fadeDuration);
$('#lightboxOverlay').fadeOut(this.options.fadeDuration);
return $('select, object, embed').css({
visibility: "visible"
});
};
return Lightbox;
})();
$(function() {
var lightbox, options;
options = new LightboxOptions;
return lightbox = new Lightbox(options);
});
}).call(this);
| 0 | [
2,
8805,
1961,
572,
471,
5309,
800,
3726,
3726,
31,
275,
48,
471,
5309,
45,
7775,
6903,
1415,
21381,
7977,
2423,
9,
960,
118,
21011,
18,
118,
3130,
5309,
9298,
31,
83,
101,
20,
3547,
226,
1580,
20,
32,
15,
86,
30,
31,
57,
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... |
Jboss terminating with "Listening to dt_socket at address:8787"
===
I am working with JBoss to communicate with Hibernate . But after starting of server when i run my hibernate script it gives me error and server closes.
Errors are:
<pre>
09 Jul 2012 15:15:40,211 +0530 INFO [Thread[main,5,jboss]] AjpProtocol - Starting Coyote AJP/1.3 on ajp-10.2.200.104-8009
09 Jul 2012 15:15:40,226 +0530 INFO [Thread[main,5,jboss]] Server - JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 4m:43s:248ms
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
ERROR: transport error 202: send failed: Software caused connection abort
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
09 Jul 2012 16:20:03,689 +0530 INFO [Thread STDOUT - Virtualizer used is SwapFileVirtualizer
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
09 Jul 2012 16:26:50,545 +0530 ERROR [WorkerThread#0[10.2.200.104:4412]] ServerThread - Worker thread initialization failure
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1793)
at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:699)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion2_2(JavaSerializationManager.java:121)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:95)
at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120)
at org.jboss.remoting.transport.socket.ServerThread.versionedWrite(ServerThread.java:841)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:641)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
ERROR: transport error 202: send failed: Software caused connection abort
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787
Listening for transport dt_socket at address: 8787</pre>
It may be because of heap size but i am not aware how to remove this error.
Please reply. | 0 | [
2,
487,
10349,
18,
25724,
29,
13,
7,
13891,
68,
20,
13,
43,
38,
1,
18,
5668,
1198,
35,
3218,
45,
3730,
3730,
7,
800,
3726,
3726,
31,
589,
638,
29,
487,
10349,
18,
20,
8709,
29,
4148,
2102,
8820,
13,
9,
47,
75,
1422,
16,
8128... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android Google map Trouble
===
everything was fine before the running other Google Map example(i found in the internet) on android emilator,i had finished and executed many android Google map example on my device,and i found example to try.Suddenly i met a error.Error say like this:"com.google is stopped that unknown".Any suggestion? | 0 | [
2,
13005,
8144,
2942,
2572,
800,
3726,
3726,
796,
23,
1123,
115,
14,
946,
89,
8144,
2942,
823,
5,
49,
216,
19,
14,
2620,
6,
27,
13005,
16122,
3457,
15,
49,
41,
842,
17,
5557,
151,
13005,
8144,
2942,
823,
27,
51,
3646,
15,
290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# is adding "this" optional within a class method
===
I have a class for an object that looks like this:
public class SomeObject
{
int SomeInt { get; set; }
public void SomeMethod()
{
var SomeVar = this.SomeInt;
var SomeVar2 = SomeInt;
}
}
When I'm referring to a class property within a class method, does it make the code better/faster/safer if I write `this.SomeInt` instead of `SomeInt` like I do when I assign `SomeVar2`?
Thanks for your suggestions. | 0 | [
2,
272,
5910,
25,
4721,
13,
7,
1565,
7,
12832,
363,
21,
718,
2109,
800,
3726,
3726,
31,
57,
21,
718,
26,
40,
3095,
30,
1879,
101,
48,
45,
317,
718,
109,
23793,
13,
1,
19,
38,
109,
6391,
13,
1,
164,
73,
309,
73,
13,
1,
317,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 display MongoDB query in the rails console/server
===
I trying to use MongoDB with Rails (I never tried MongoDB before).
And I want to display the queries made by mongomapper in the rails console or the rails server (like ActiveRecord does)
Is there a way ? Thank you! | 0 | [
2,
184,
92,
31,
3042,
3521,
5474,
220,
25597,
19,
14,
2240,
18,
8650,
118,
10321,
106,
800,
3726,
3726,
31,
749,
20,
275,
3521,
5474,
220,
29,
2240,
18,
13,
5,
49,
243,
794,
3521,
5474,
220,
115,
6,
9,
17,
31,
259,
20,
3042,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Facebook like with responsive confirm box for mobile/tablet
===
having a bit of difficulty with my first responsive site and the facebook like button. I have set the button to Recommend using the xfbml code and when it is clicked a confirmation / add personal message box appears as normal. Except it doesn't fit into my tablet nor mobile width. With sharer.php being withdrawn, I have to use this method for Liking, but I'm struggling to get things to work at the sizes I need.
I'm surprised Facebook hasn't looked into making Responsive=true a parameter of the Like button.
I read that this part cannot be bypassed until Facebook trusts the site, so I looked into finding the styling of the box with firebug so see if my responsive site can edit it but a whole bundle of code is loaded so I was wondering if anyone knew a list of the main styles to edit so I can apply some local responsive styling to the popup?
thanks
frank | 0 | [
2,
9090,
101,
29,
13,
22153,
10265,
1649,
26,
3241,
118,
5924,
38,
800,
3726,
3726,
452,
21,
1142,
16,
6967,
29,
51,
64,
13,
22153,
689,
17,
14,
9090,
101,
5167,
9,
31,
57,
309,
14,
5167,
20,
12360,
568,
14,
993,
13478,
8184,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Software version
===
imagine a sofware is released with version 1.8
Is it possible to release new version like this :
1.9
1.10
1.11
or is it disordered ?
Thanks
| 4 | [
2,
2306,
615,
800,
3726,
3726,
4382,
21,
86,
410,
5011,
25,
261,
29,
615,
137,
9,
457,
25,
32,
938,
20,
830,
78,
615,
101,
48,
13,
45,
137,
9,
518,
137,
9,
1036,
137,
9,
1306,
54,
25,
32,
7942,
69,
13,
60,
3669,
3,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to avoid a Drupal7 view to show the results at startup?
===
I have a Drupal7 View with 4 exposed filters.
It runs fine but i would like the results to be shown only when the user clicks the submit button and not when the view is loaded? How can i avoid this? | 0 | [
2,
184,
20,
2658,
21,
15708,
6720,
465,
1418,
20,
298,
14,
1736,
35,
20205,
60,
800,
3726,
3726,
31,
57,
21,
15708,
6720,
465,
1418,
29,
268,
5043,
21062,
9,
32,
1461,
1123,
47,
31,
83,
101,
14,
1736,
20,
44,
1721,
104,
76,
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... |
SQL 2000 TSQL - Creating Pivot Table
===
I am really struggling with figuring out how to convert a MS Access CrossTab query into T-SQL to run on SQL2000 or into Linq-to-SQL. What I have is a query that looks like this in Access:
![Access Cross Tab Query][1]
And produces this:
![Access Cross Tab Query Results][2]
The query basically groups by ItemID and StoreID and Sums the Qty sold, but with the CrossTab query in Access, I am able to have a unique ItemID for each row, a column for each StoreID, and the total Qty for each StoreID/ItemID combination as the value.
How do you construct this in T-SQL 2000? I can build a simple select query with grouping, but it gives me the data in three columns, StoreID, ItemID, and Qty. But what I need is a column for ItemID and a column for every StoreID in the result set
SELECT Trans.TranSID as StoreID, TransDetail.TranItemID as ItemID, SUM(TransDetail.Qty) AS TotalQtyForStore
FROM Trans INNER JOIN
TransDetail ON Trans.TranID = TransDetail.TranID INNER JOIN
Item ON TransDetail.TranItemID = Item.ItemID
WHERE (Trans.TranDate > CONVERT(DATETIME, '2005-01-01 00:00:00', 102)) AND (Trans.TranTypeID = 'so' OR
Trans.TranTypeID = 'ca') AND (Trans.TranStatus <> 'v') AND (Item.ItemClassID = 'RHM')
GROUP BY Trans.TranSID, TransDetail.TranItemID
Which produces this:
![enter image description here][3]
[1]: http://i.stack.imgur.com/b0Rhf.jpg
[2]: http://i.stack.imgur.com/hnUrt.jpg
[3]: http://i.stack.imgur.com/q3SRM.jpg | 0 | [
2,
4444,
255,
824,
13,
38,
18,
22402,
13,
8,
2936,
20670,
859,
800,
3726,
3726,
31,
589,
510,
7587,
29,
25379,
70,
184,
20,
8406,
21,
4235,
1381,
919,
15783,
25597,
77,
13,
38,
8,
18,
22402,
20,
485,
27,
4444,
255,
3050,
54,
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... |
Read file of size more than 1.5gb
===
I need to look into the content of json file whose size is 1.8gb. Whenever I am trying to open it in any text editor its unable to open it. Is there any way to see the content either by breaking the file into smaller chunks or any other powerful editor. | 0 | [
2,
1302,
3893,
16,
1072,
91,
119,
137,
9,
264,
11400,
800,
3726,
3726,
31,
376,
20,
361,
77,
14,
2331,
16,
487,
528,
3893,
1196,
1072,
25,
137,
9,
457,
11400,
9,
6634,
31,
589,
749,
20,
368,
32,
19,
186,
1854,
1835,
82,
2343,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Comparing Path String With Wildcard in PHP
===
Howto to compare this string :
commodity/search/oil/branch/index
with this :
commodity/search/*/branch/index
It should return true although "oil" is replace with other word. | 0 | [
2,
15047,
2013,
3724,
29,
23003,
19,
13,
26120,
800,
3726,
3726,
184,
262,
20,
11590,
48,
3724,
13,
45,
22845,
118,
25136,
118,
17157,
118,
23014,
118,
25671,
29,
48,
13,
45,
22845,
118,
25136,
118,
2483,
118,
23014,
118,
25671,
32,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
getting src element using domDocument
===
I am using domDocument. I am close but need help for the last little bit
I have this html just a snippet below.
There are a number of rows. I am trying to get the href.
so far i am doing the following:
I can get the table, tr, and td ok , but not sure what to do from there.
Thanks for any help
foreach ($dom->getElementsByTagName('table') as $tableitem) {
if ( $tableitem->getAttribute('class') == 'tableStyle02'){
$rows = $tableitem->getElementsByTagName('tr');
foreach ($rows as $row){
$cols = $row->getElementsByTagName('td');
$hrefs = $cols->item(0)->getElementsByTagName('a');
}
}
}
html snippet:
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="tableStyle02">
<tr>
<td><span class="Name"><a href="bin.php?cid=703&size=0">
<strong>Conference Facility</strong></a></span></td>
<td align="center" nowrap>0.00</td>
<td align="center"> 0 </td>
<td align="center"> </td>
<td align="center"> 0 </td>
<td align="center"> 0 </td>
<td align="center"> 0 - 0 </td>
<td align="center"> Wired Internet, </td>
<td align="center"> </td>
</tr>
| 0 | [
2,
1017,
13,
18,
5453,
4520,
568,
11859,
28132,
800,
3726,
3726,
31,
589,
568,
11859,
28132,
9,
31,
589,
543,
47,
376,
448,
26,
14,
236,
265,
1142,
31,
57,
48,
13,
15895,
114,
21,
13,
29061,
1021,
9,
80,
50,
21,
234,
16,
11295... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android: location detection by Cellular Network and WiFi
===
I would like to build a app which will provide current location using `cellular Network` and `WiFi`.
I like to get location from both provider simultaneously and then decide which provider give me best.
Now i am getting location from Network
LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
LocationListener locationlistenerforNetwork = new mylocationlistenerNetwork();
lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationlistenerforNetwork);
private class mylocationlistenerNetwork implements LocationListener {
@Override
public void onLocationChanged(Location location) {
if (location != null) {
Log.d("LOCATION CHANGED", location.getLatitude() + " ");
Log.d("LOCATION CHANGED", location.getLongitude() + " ");
Toast.makeText(LocationActivity.this,"latitude: "+
location.getLatitude() + "longitude: " + location.getLongitude()
+ " Provider:" + location.getProvider() + " Accuracy:" + location.getAccuracy(),
Toast.LENGTH_LONG).show();
}
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {}
}
I also want location from `WiFi`. Please help. | 0 | [
2,
13005,
45,
1474,
11643,
34,
14844,
982,
17,
4807,
1707,
800,
3726,
3726,
31,
83,
101,
20,
1895,
21,
4865,
56,
129,
1181,
866,
1474,
568,
13,
1,
25886,
982,
1,
17,
13,
1,
3976,
1707,
1,
9,
31,
101,
20,
164,
1474,
37,
156,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android StrictMode: False positive or what is wrong with this sample?
===
I have this ToggleButton that is enabled when a certain condition (Website content) is true.
getSystemOnState(..) connects to a webserver and this causes an exception because of strict mode. What is wrong about the way I am using the Handler class?
public class ReceiverToggleButton extends ToggleButton {
private Runnable mTicker;
private Handler mHandler;
private boolean mTickerStopped = false;
private String rxhost = null;
private Context context = null;
public ReceiverToggleButton(Context context) {
super(context);
this.context = context;
updateOnOffState(context);
}
private void updateOnOffState(final Context cxt) {
Runnable r = new Runnable() {
public void run() {
rxhost = cxt.getResources().getString(R.string.host_receiver);
mHandler = new Handler();
mTicker = new Runnable() {
public void run() {
if (mTickerStopped) {
return;
}
boolean isSystemOn = getSystemOnState(rxhost); // connects to webserver
setChecked(isSystemOn);
invalidate();
long now = SystemClock.uptimeMillis();
long next = now + 1000 * 10; // check every 10s
mHandler.postAtTime(this, next);
}
};
mHandler.post(mTicker);
}
};
new Thread(r).start();
}
} | 0 | [
2,
13005,
8170,
15570,
45,
4997,
2221,
54,
98,
25,
1389,
29,
48,
5717,
60,
800,
3726,
3726,
31,
57,
48,
20,
263,
4875,
811,
444,
30,
25,
9338,
76,
21,
1200,
2874,
13,
5,
14113,
9097,
2331,
6,
25,
1151,
9,
164,
10724,
218,
3859... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
FTP transfer corrupts file
===
I frequently have this problem where some files get corrupted when I upload them to my server via Filezilla or another client, winscp. By corrupted I mean that a charater or more gets swapped with something else, or an image might look wierd. I've set the transfer mode to binary and max tranfers to one. I transfer outside my application folder so that rules out the possiblity that PHP or Apache might corrupt it.
If it helps you, my site is hosted on hostgator and the link to it is [FunSubstance][1]. This is a big problem becuase I update my site multiple times a week. And as a side question, what is your process for updating your site?
[1]: http://funsubstance.com/ | 2 | [
2,
1187,
306,
2617,
11305,
18,
3893,
800,
3726,
3726,
31,
3086,
57,
48,
1448,
113,
109,
6488,
164,
11305,
69,
76,
31,
71,
8294,
105,
20,
51,
8128,
1197,
3893,
380,
3247,
54,
226,
6819,
15,
4041,
7439,
9,
34,
11305,
69,
31,
884,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Rest service and Auth schemes
===
I have been able to create a nice WCF service for an integration project that can return results in plain xml, json and soap. This works great up until the point where I start to implement security. The built in ws security features in wcf services are bypassed when using WebHttpBindings that work well with:
<webHttp defaultOutgoingResponseFormat="Json"/>
and
[OperationContract()]
[WebGet(UriTemplate = "GetSomething/{someID}/{anotherID}?somethingElse={somethingElse}")]
SomeResponse GetSomething(string someID,string anotherID, DateTime somethingElse)
I enjoyed playing with my first restful api but alas I need to finish a project and a requirement is to include a secure authentication policy. I am not required to return the results as json, nor must it be a rest service, but this has stoked my curiosity.
...any good ideas pertaining to authentication strategies/WCF REST services?
| 0 | [
2,
11801,
410,
760,
365,
17,
10343,
96,
13185,
800,
3726,
3726,
31,
57,
74,
777,
20,
1600,
21,
2210,
11801,
410,
365,
26,
40,
8078,
669,
30,
92,
788,
1736,
19,
3748,
23504,
15,
487,
528,
17,
6447,
9,
48,
693,
374,
71,
163,
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... |
Feed Dialog posts to wall not showing on the news feed
===
I am using Feed Dialog `http://developers.facebook.com/docs/reference/dialogs/feed/` and when a post is made it shows up on the target wall but not on the newsfeed. Also if someone then browsing the wall posts a "Like" or comment it does not show up on any newsfeed nor on the wall of the poster.
Here is an example of the URL to post `http://www.facebook.com/dialog/feed?app_id=417204058317545&link=http://www.kilcooleac.com&to=kilcooleac&picture=http://www.kilcooleac.com/images/fb3.jpg&name=Kilcoole%20AC&caption=Kilcoole%20ac& description=Fionnuala%20Britton%20running%2010k%20in%20the%20Olympics%20for%20Ireland%209:25pm%20Friday%203rd%20August&redirect_uri=http://www.facebook.com/kilcooleac`
I have searched and found two similar posts on SO but without solutions. Google search brings up a bug report that is similar `http://developers.facebook.com/bugs/405986669448307`
I have posted a bug on Facebook `https://developers.facebook.com/bugs/507380435954622`
All help/suggestions gratefully received.
Many thanks | 0 | [
2,
4063,
28223,
9868,
20,
769,
52,
3187,
27,
14,
996,
4063,
800,
3726,
3726,
31,
589,
568,
4063,
28223,
13,
1,
21127,
6903,
26051,
445,
9,
6413,
5199,
9,
960,
118,
13799,
18,
118,
28018,
118,
4286,
5567,
18,
118,
20954,
118,
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... |
Is it bad practice to use a mongo ObjectId as a user's id?
===
Seeing as this value is unique and present for all users in a mongo database, are there any particular caveats to using this as a user identifier in a web application?
Particular issues I may be considering include if in the future the users need to be transferred. | 0 | [
2,
25,
32,
896,
1345,
20,
275,
21,
3521,
839,
3095,
1340,
28,
21,
4155,
22,
18,
4924,
60,
800,
3726,
3726,
2078,
28,
48,
1923,
25,
2619,
17,
734,
26,
65,
3878,
19,
21,
3521,
839,
6018,
15,
50,
80,
186,
1498,
3542,
721,
18,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python sys.modules contains a module which is not yet imported
===
I'm trying to understand the difference between a loaded module vs. an imported module, if there is any.
I'm working in Python 2.7.3, and am just running Python from the command line.
If I execute:
`import sys`
`sys.modules`
I get a list which includes `os`, for example. The documentation says that sys.modules is a list of "loaded" modules. However, if I try to run something like `os.environ`, I get a NameError which tells me that os is not defined. However, if I then run `import os`, this resolves the issue. Can anyone explain why os exists in sys.modules prior to me actually importing the module? | 0 | [
2,
20059,
10315,
18,
9,
19673,
160,
1588,
21,
12613,
56,
25,
52,
768,
11808,
800,
3726,
3726,
31,
22,
79,
749,
20,
1369,
14,
2841,
128,
21,
8572,
12613,
4611,
9,
40,
11808,
12613,
15,
100,
80,
25,
186,
9,
31,
22,
79,
638,
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... |
Javascript join elements, having problems
===
I wasted 4 hours searching and trying, but no luck.
if ((navigator.plugins) && (navigator.plugins.length)) {
for (var xx = 0, l = navigator.plugins.length; xx < l; xx++) {
var tn = navigator.plugins[xx].name;
if (tn.indexOf("Java") != -1) {
document.write("Found ");
} else {
document.write("Nothing ");
}
}
}
Insteading of writing just "Found" or "Nothing" this script writes (there are 4 plugins btw, and Java(TM) is the 3rd):
NothingNothingFoundNothing
How do I fix this so that I only receive one answer? I don't want other way to find if Java is installed, just the above but working. | 0 | [
2,
8247,
8741,
1865,
2065,
15,
452,
1716,
800,
3726,
3726,
31,
17835,
268,
974,
5792,
17,
749,
15,
47,
90,
5419,
9,
100,
13,
5,
5,
16424,
15807,
9,
18527,
17040,
6,
279,
1569,
13,
5,
16424,
15807,
9,
18527,
17040,
9,
6325,
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... |
Using plt.txt to print calculated values in a plot
===
Hi Is there a way to print values calculated by a script directly into the plot that is being made?
For example say I have a data file that I read in. Then I want to calculate the total number of entries, the sum of the entries, the average and standard deviation. How can I then print these vales right on to the histogram that I then plot?
I looked here http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.text, but it was not very helpful. Thanks in advance
Example
d = np.loadtxt(file)
C = d[:,3]
S = sum(C))
avg = np.mean(C)
sigma = np.std(C)
N = len(C)
I tried this but it did not work
n, nbins, patches = plt.hist(C, 20)
plt.title("My Histogram")
plt.text(0,0, 'Sum of vales ='S '\n' 'Total number of entries = ' N '\n' 'Avg= 'avg '\n' 'Standard Deviation = ' sigma) | 0 | [
2,
568,
12443,
38,
9,
38,
396,
38,
20,
4793,
10785,
4070,
19,
21,
3798,
800,
3726,
3726,
4148,
25,
80,
21,
161,
20,
4793,
4070,
10785,
34,
21,
3884,
1703,
77,
14,
3798,
30,
25,
142,
117,
60,
26,
823,
395,
31,
57,
21,
1054,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
php varibales through links
===
I got those php files called: clients,type and info.
I know how to pass the variable through link but when i got this:
client?=1
*There is some info to show*
client?=1&type=2
*Should show diferent info but keep using that client=1*
client?=1&type=2&info=none
*same same *
And working always in the "client" file. I just didnt how to figure it out. I just can do it in diferent pages like:
client?=1 goes to type=2 goes to info=none
Any suggestion?
Thanks :) | 0 | [
2,
13,
26120,
4033,
9747,
1355,
120,
6271,
800,
3726,
3726,
31,
330,
273,
13,
26120,
6488,
227,
45,
7421,
15,
4474,
17,
15404,
9,
31,
143,
184,
20,
1477,
14,
7612,
120,
3508,
47,
76,
31,
330,
48,
45,
6819,
60,
3726,
165,
1637,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Coding for Google's Project Glass, is learning Google Android for mobile the way to go?
===
I am excited about the possibilities that come with Project Glass. Based on an article I read on the New York Times, they said it (Project Glass) will be based on the Android software -
> The glasses will use the same Android software that powers Android
> smartphones and tablets. Like smartphones and tablets, the glasses
> will be equipped with GPS and motion sensors. They will also contain a
> camera and audio inputs and outputs.
>
> Source:
> http://www.nytimes.com/2012/02/23/technology/google-glasses-will-be-powered-by-android.html?_r=2
I am a front/back-end web developer by profession. I learnt C++ and Java at university and actually retained this knowledge :). I've pretty much grasped the more advanced concepts of programming so let's skip the basics.
Would gaining experience coding on the Android for phones platform better prepare me for coding on project glass when it comes out?
| 0 | [
2,
13,
15458,
26,
8144,
22,
18,
669,
1350,
15,
25,
2477,
8144,
13005,
26,
3241,
14,
161,
20,
162,
60,
800,
3726,
3726,
31,
589,
7178,
88,
14,
13086,
30,
340,
29,
669,
1350,
9,
432,
27,
40,
2002,
31,
1302,
27,
14,
78,
305,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Have sphinx replace docustring text
===
I am documenting code in Sphinx that resembles this:
class ParentClass(object):
def __init__(self):
pass
def generic_fun(self):
"""
Call this function using /run/ParentClass/generic_fun()
"""
do_stuff()
class ChildClass(ParentClass):
def specific_fun(self):
"""
Call this function using /run/ChildClass/specific_fun()
"""
do_other_stuff()
I added the :inherited-members to the ChildClass documentation, so I have statements in there like "Call this function using /run/ParentClass/generic_fun()". Is there a way I can put something in the docstrings like <class_name> that sphinx will replace with the actual class that it's documenting? So in the ChildClass section, the code would read ... using /run/ChildClass/generic... and the ParentClass section would read ... using /run/ParentClass/generic...? Ideally I'd like to have the documentation on the same page, so the replacement string would be different for different sections. | 0 | [
2,
57,
27274,
3934,
107,
3987,
11130,
1854,
800,
3726,
3726,
31,
589,
4492,
68,
1797,
19,
27274,
30,
14920,
48,
45,
718,
4766,
1898,
5,
23793,
6,
45,
6312,
13,
1,
108,
242,
1,
5,
8411,
6,
45,
1477,
6312,
12733,
1,
16638,
5,
84... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery :parent selector doesn't work as expected with jQuery UI dialog
===
I have a jQuery UI dialogue box that I want to render without the title. I've got this working and that isn't the problem.
What I'm curious about is why the jQuery `:parent` selector won't select the dialogue content `div`'s parent but the `parent()` function does. Here's a worked example:
**HTML:**
<input id="example1" type="button" value="Use :parent selector">
<input id="example2" type="button" value="Use parent() function">
<!--
One of many dialogues on the page, but this one needs
the title removed.
-->
<div id="throbber" style="display:none">
<p>Doing work...be patient....</p>
<img src="http://i.stack.imgur.com/GUw9u.gif"/>
</div>
**Script:**
$("#example1").bind("click", function() {
$("#throbber").dialog("destroy"); // for jsfiddle example
$("#throbber").dialog({
resizable: false,
modal: false,
width: 150
});
$("#throbber:parent .ui-dialog-titlebar").hide();
});
$("#example2").bind("click", function() {
$("#throbber").dialog("destroy"); // for jsfiddle example
$("#throbber").dialog({
resizable: false,
modal: false,
width: 150
});
$("#throbber").parent().find(".ui-dialog-titlebar").hide();
});
Here's the above code in jsFiddle:
>http://jsfiddle.net/kevink/kPMQf/
In chrome, if I set a break-point after I've rendered the dialog, if I do `$("#throbber:parent")`, as expected, it selects itself:
![enter image description here][1]
If I try to select its `:parent` it doesn't, it just selects itself again:
![enter image description here][2]
If I use `$("#throbber").parent()`, this time it selects its parent:
![enter image description here][3]
What is happening here, why won't `:parent` select `#throbber`'s parent yet `.parent()` does?
[1]: http://i.stack.imgur.com/7ZJh5.png
[2]: http://i.stack.imgur.com/zXLT7.png
[3]: http://i.stack.imgur.com/RQ9bq.png | 0 | [
2,
487,
8190,
93,
13,
45,
18908,
23946,
1437,
22,
38,
170,
28,
1727,
29,
487,
8190,
93,
13,
5661,
28223,
800,
3726,
3726,
31,
57,
21,
487,
8190,
93,
13,
5661,
6402,
1649,
30,
31,
259,
20,
16535,
366,
14,
581,
9,
31,
22,
195,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Anybody know the idea to use System.Printing.PrintSystemJobInfo.NumberOfPagesPrinted in c# to count the number of pages printed
===
Anybody know the idea to use System.Printing.PrintSystemJobInfo.NumberOfPagesPrinted in c# to count the number of pages | 1 | [
2,
11181,
143,
14,
882,
20,
275,
329,
9,
10299,
68,
9,
10299,
10724,
1636,
4772,
4120,
9,
16299,
1041,
6486,
18,
10299,
69,
19,
272,
5910,
20,
2468,
14,
234,
16,
4434,
5317,
800,
3726,
3726,
11181,
143,
14,
882,
20,
275,
329,
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... |
Error (File to impor t not found or unreadable: bootstrap
===
I ran bundle install and bootstrap is installed but when I tried to upload the update onto website, I received an error message:We're sorry, but something went wrong. I think the problem is still about bootstrap but I don't know how to fix it, anybody could help me?
2012-07-27T15:41:51+00:00 app[web.1]: Started GET "/" for 68.195.252.46 at 2012-
07-27 15:41:51 +0000
2012-07-27T15:41:51+00:00 app[web.1]: Processing by ProjectsController#index as
HTML
2012-07-27T15:41:51+00:00 app[web.1]: Rendered projects/index.html.erb within
layouts/application (3.6ms)
2012-07-27T15:41:51+00:00 app[web.1]: Completed 500 Internal Server Error in 15m
s
2012-07-27T15:41:51+00:00 app[web.1]:
2012-07-27T15:41:51+00:00 app[web.1]: ActionView::Template::Error (File to impor
t not found or unreadable: bootstrap.
2012-07-27T15:41:51+00:00 app[web.1]: Load path: /app
2012-07-27T15:41:51+00:00 app[web.1]: (in /app/app/assets/stylesheets/custom.c
ss.scss)):
2012-07-27T15:41:51+00:00 app[web.1]: 2: <html>
2012-07-27T15:41:51+00:00 app[web.1]: 3: <head>
2012-07-27T15:41:51+00:00 app[web.1]: 4: <title>TlDashboard</title>
2012-07-27T15:41:51+00:00 app[web.1]: 5: <%= stylesheet_link_tag "appli
cation", :media => "all" %>
2012-07-27T15:41:51+00:00 app[web.1]: 6: <%= javascript_include_tag "appli
cation" %>
2012-07-27T15:41:51+00:00 app[web.1]: 7: <%= csrf_meta_tags %>
2012-07-27T15:41:51+00:00 app[web.1]: 8: </head>
2012-07-27T15:41:51+00:00 app[web.1]: app/assets/stylesheets/custom.css.scss:1
2012-07-27T15:41:51+00:00 app[web.1]: app/views/layouts/application.html.erb:5
:in `_app_views_layouts_application_html_erb___2559975338276890624_34153980'
2012-07-27T15:41:51+00:00 app[web.1]: app/controllers/projects_controller.rb:7
:in `index'
2012-07-27T15:41:51+00:00 app[web.1]:
2012-07-27T15:41:51+00:00 app[web.1]:
2012-07-27T15:41:51+00:00 heroku[router]: GET tl-dashboard.herokuapp.com/ dyno=w
eb.1 queue=0 wait=0ms service=50ms status=500 bytes=643
| 0 | [
2,
7019,
13,
5,
16877,
20,
5420,
248,
13,
38,
52,
216,
54,
367,
10647,
579,
45,
5894,
16514,
800,
3726,
3726,
31,
717,
10194,
16146,
17,
5894,
16514,
25,
4066,
47,
76,
31,
794,
20,
71,
8294,
14,
11100,
1204,
2271,
15,
31,
420,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Restricting git-submodules with gitosis?
===
For a commercial software project with multiple parts, I would like to implement a versioning scheme by including the parts as git-submodules in a superproject, and then tagging certain commits as releases. This seems to work well and avoids having to version every part separately and track the version dependencies explicitly.
On the other hand, some parts are highly proprietary and need to have restricted access (e.g., using gitosis).
Is there an elegant way to avoid either the splitting the superproject into two or more parts, or explictly calling "git submodule update repo1 repo2 ... repoN"? And can a developer who has no access to the proprietary projects make commits to the superproject?
Any suggestions to achieve my target alternatively and simply are also welcome. | 0 | [
2,
15436,
68,
13,
10404,
8,
7563,
19673,
160,
29,
13,
10404,
8076,
60,
800,
3726,
3726,
26,
21,
1439,
2306,
669,
29,
1886,
1341,
15,
31,
83,
101,
20,
8713,
21,
615,
68,
4276,
34,
215,
14,
1341,
28,
13,
10404,
8,
7563,
19673,
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... |
Removing .php file extension from the end of a url.
===
I am trying to achieve something very simple on my web server. I want urls that end in .php to end with / for example www.example.net/something.php to be www.example.net/something or www.example.net/folder/subfolder/something.php to be www.example.net/folder/subfolder/something. Additionally I don't mind if I have www.example.net/folder/something.php?something=whatever/. I am only concerned with removing the last .php in the url. I have used this code amongst many others.
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule .*[^/]$ $0/ [L,R=301]
RewriteRule (.*)/$ $1.php [L]
However this only works for some of my pages. For example it does not work on my www.example.com/folder/contactus.php page. Instead I get my 404 page. But it works on www.example/folder/faq.php perfectly.
Additionally I make some file_get_contents() php request within various parts of my code. Is there any way to tailor these rules so internal requests (my php functions) are not affected. Basically I only want the browser to display the url without the .php end without affecting my other php functions that are held in .php files. For further clarification of my intentions: I use a string processing functions to extract particular lines of text from a php file based on variables I have set up. But with the current rewrite rules the php file cannot be found because the extension has been removed from the filename (im guessing.
$file_contents = file_get_contents($filename);
I'm currently using a linux server on a shared godaddy host account. | 0 | [
2,
9096,
13,
9,
26120,
3893,
3896,
37,
14,
241,
16,
21,
287,
6362,
9,
800,
3726,
3726,
31,
589,
749,
20,
4689,
301,
253,
1935,
27,
51,
2741,
8128,
9,
31,
259,
13,
911,
7532,
30,
241,
19,
13,
9,
26120,
20,
241,
29,
13,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
undefined project property from library displays differently than undefined project property within project
===
I wrote a function to retrieve a project property. I pass the value of the variable
name.
I wrote a testing routine. In the test routine a do a similar getProperty with
the same variable name. The testing routine is in a different project than
the library function. I did this to test in the real situation. I know that
each project has its own project properties definitions.
Here is the get routine from the library:
function lib_get(pvar)
{
return ScriptProperties.getProperty(pvar);
}
Here is the testing routine:
function lib_test()
{
var u = ScriptProperties.getProperty("u");
var t = lib_get("u");
Browser.msgBox(" u:"+u+" t: "+t);
}
The variable "u" is not defined in either project.
The display shows "U" has a value of "null",
and "t" has a value of "undefined".
Is this the way the functions are suppose to work? Should I accept that
this difference is normal and operate under this assumption for all future time?
| 0 | [
2,
367,
13439,
669,
1354,
37,
1248,
9412,
12670,
119,
367,
13439,
669,
1354,
363,
669,
800,
3726,
3726,
31,
738,
21,
1990,
20,
11917,
21,
669,
1354,
9,
31,
1477,
14,
1923,
16,
14,
7612,
204,
9,
31,
738,
21,
4431,
8275,
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... |
getting text aligned by css or a php function to add space
===
does anyone have a nice solution to get de price wich is a variable aligned vertically to the left side? no tables please!
I try'd php's sprintf or str_pad but it does not really do anything.
Any solution is helpfull.
My vision is getting blurry now from looking at the php pages
this is the html
<div class="item-checkout">
<!--checkout item-->
<form class="fcheckoutform" id="<?php echo $id_checkoutform;?>" method="post" action="">
<div class="naam"><?php echo $naam;?></div>
<div class="fr al">
<input name="qty" rel="<?php echo $rel;?>" type="text" size="3" class="aantal"
value="<?php echo $aantal;?>" maxlength="4" id="<?php echo $id_aantal;?>">
<span class="btn">Toepassen</span>
<span class="price"><?php echo $price_lbl;?></span>
<span class="verwijder">Remove</span>
</div>
<div class="cbt"></div>
</form>
</div>
thanks, Richard | 0 | [
2,
1017,
1854,
13,
12740,
34,
272,
18,
18,
54,
21,
13,
26120,
1990,
20,
3547,
726,
800,
3726,
3726,
630,
1276,
57,
21,
2210,
4295,
20,
164,
121,
2162,
13,
13583,
25,
21,
7612,
13,
12740,
23300,
20,
14,
225,
270,
60,
90,
7484,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Game design: what is the approach of the functional, immutable language for developing classic games?
===
Imagine the classic 2d RPG game that has many instances of players that can change their positions, HP, inventory, skill-values, death lists and so on every time.

How would an immutable language approach the design of such game? That is, would the immutability factor limit the development as the game is something that is always changing, or could it be used to design that game as effectively as in a traditional language?
| 0 | [
2,
250,
704,
45,
98,
25,
14,
2141,
16,
14,
7652,
15,
797,
7903,
579,
816,
26,
3561,
2732,
466,
60,
800,
3726,
3726,
4382,
14,
2732,
172,
43,
22338,
250,
30,
63,
151,
13946,
16,
1007,
30,
92,
753,
66,
3062,
15,
5301,
15,
13875,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL LEFT JOIN combined with regular joins
===
I have the following query that joins a bunch of tables.
I'd like to get every record from the INDUSTRY table that has consolidated_industry_id = 1 regardless of whether or not it matches the other tables. I believe this needs to be done with a LEFT JOIN?
SELECT attr.industry_id AS option_id, attr.industry AS option_name, uj.ft_job_industry_id, AVG(CASE WHEN s.salary > 0 THEN s.salary END) AS average,
COUNT(CASE WHEN s.salary > 0 THEN attr.industry END) as count_non_zero, COUNT(attr.industry_id) as count_total
FROM industry attr, user_job_ft_job uj, salary_ft_job s, user_job_ft_job ut, [user] u, user_education_mba_school mba
WHERE u.user_id = uj.user_id
AND u.user_id = ut.user_id
AND u.user_id = mba.user_id
AND uj.ft_job_industry_id = attr.industry_id
AND uj.user_job_ft_job_id = s.user_job_id
AND u.include_in_student_site_results = 1
AND u.site_instance_id IN (1)
AND uj.job_type_id = 1
AND attr.consolidated_industry_id = 1
AND mba.mba_graduation_year_id NOT IN (8, 9)
AND uj.admin_approved = 1
GROUP BY attr.industry_id, attr.industry, uj.ft_job_industry_id
This returns only one row, but there are 8 matches in the industry table where consolidated_industry_id = 1. | 0 | [
2,
4444,
255,
225,
1865,
2461,
29,
1290,
10612,
800,
3726,
3726,
31,
57,
14,
249,
25597,
30,
10612,
21,
7653,
16,
7484,
9,
31,
22,
43,
101,
20,
164,
352,
571,
37,
14,
1230,
859,
30,
63,
10730,
1,
108,
18299,
622,
1,
1340,
800,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Flash Registration Form
===
I need help with my flash registration form. I made sure all my information is correct, but when I enter the information, it doesn't seem to enter it into the mysql database. Here is the flash code:
var lvSend:LoadVars = new LoadVars();
var lvReceive:LoadVars = new LoadVars();
register_btn.onRelease = function() {
var valid:Boolean = validateForm();
if(valid){
//gather information and put in loadvars object
lvSend.username = username.tInput.text;
lvSend.password = password.tInput.text;
lvSend.email = email.tInput.text;
//send information php script for insertion into database
lvSend.sendAndLoad("register.php", "POST");
}
};
function validateForm():Boolean{
if(username.tInput.text == "" || password.tInput.text == "" || email.tInput.text == ""){
return false;
}
return true;
}
function clearTextFields():Void{
username.tInput.text = "";
password.tInput.text = "";
email.tInput.text = "";
}
Here is the Php Code:
http://i.stack.imgur.com/cvvcO.png
Sorry that my code is in picture form. That was the best way I could make it readable by you guys.My problem is that all the information in both codes seem correct. All my text fields are called username, password, and email, same goes for the database columns. The database info isn't wrong because I used the php code with html, I just can't get it to work with flash. My php file is called register.php and my flash file is called play.swf. Thanks for your help!
| 0 | [
2,
4433,
8587,
505,
800,
3726,
3726,
31,
376,
448,
29,
51,
4433,
8587,
505,
9,
31,
117,
562,
65,
51,
676,
25,
4456,
15,
47,
76,
31,
2830,
14,
676,
15,
32,
1437,
22,
38,
2260,
20,
2830,
32,
77,
14,
51,
18,
22402,
6018,
9,
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... |
Webview AppCache not loading sourced non-html content
===
I'm using HTML5 AppCache to create an Android web app which can function offline. HTML which sources additional images, stylesheets, javascript and iframes is loaded into a WebView with loadDataWithBaseURL(). Unfortunately, when the device is offline only the HTML sourced in iframes is loaded from AppCache.
At this point, I know:
- This content does exist in the AppCache, since I dumped the content of the AppCache.db file with adb shell and found all the content in there.
- It's probably not a domain problem, since I'm specifying the correct path in the baseUrl field of loadDataWithBaseURL(). Also, a workaround to this problem succeeds without domain errors, as discussed below.
Here's some demo code:
public class ExampleActivity extends Activity {
...
// HTML to be inserted into the Webview with loadDataWithBaseURL()
public static final String ALL_HTML =
"<!DOCTYPE HTML><html>" +
"<head><script src='sourced_js.js' " +
"onload='console.log(\"sourced_js.js onload\");'>" +
"</script>" +
"<link rel='stylesheet' href='style.css' />" + // doesn't load offline
"</head><body>" +
"<iframe src='manifest.html'></iframe>" + // loads
"<img src='android.jpg' />" + // doesn't load
"<img src='android.gif' />" + // doesn't load
"</body></html>";
public void onCreate(Bundle savedInstanceState) {
...
WebView webView = new WebView(context);
webView.clearCache(true);
WebSettings settings = webView.getSettings();
settings.setAppCacheEnabled(true);
settings.setJavaScriptEnabled(true);
webView.loadDataWithBaseURL("http://my.website.com/path/to/content/",
ALL_HTML, "text/html", "utf-8", null);
}
}
`manifest.html` is just responsible for referencing the manifest. It looks like:
<html manifest="manifest.appcache">
<head></head>
<body></body>
</html>
`manifest.appcache` looks like:
CACHE MANIFEST
# Explicitly cached resources
# manifest.html automatically cached
sourced_js.js
android.jpg
android.gif
style.css
NETWORK:
*
When online, all content loads. When offline, only the iframe with `manifest.html` loads. The images, stylesheet and javascript are not loaded.
Strangely enough, if I source the exact same static content (`sourced_js.js`, `android.jpg`, ...) in `manifest.html`, they all load from AppCache in the iframe properly when the device is offline! As if these other resources have to be sourced secondarily from a static page.
Any clue why this content won't be loaded from the AppCache? | 0 | [
2,
2741,
4725,
4865,
793,
2569,
52,
12797,
1267,
43,
538,
8,
15895,
2331,
800,
3726,
3726,
31,
22,
79,
568,
13,
15895,
264,
4865,
793,
2569,
20,
1600,
40,
13005,
2741,
4865,
56,
92,
1990,
168,
1143,
9,
13,
15895,
56,
2662,
1351,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 an array from checkbox values PHP
===
I've many check-boxes. I'd like to pull their values into a comma separated array.
If checkbox is diselected value will be empty so:
bar,parking,,,,,tv,etc
how would I do this? after making an array I will submit into a db.
<p>
<label for="meta_box_check_bar">bar</label>
<input type="checkbox" id="meta_box_check_bar" name="meta_box_check_bar" value="bar" />
<label for="meta_box_check_parking">parking</label>
<input type="checkbox" id="meta_box_check_parking" name="meta_box_check_parking" value="parking" />
<label for="">accessible-for-disabled</label>
<input type="checkbox" id="meta_box_check_accessible-for-disabled" name="meta_box_check_accessible-for-disabled" value="accessible-for-disabled" />
<label for="">air-conditioning</label>
<input type="checkbox" id="meta_box_check_air-conditioning" name="meta_box_check_air-conditioning" value="air-conditioning" />
<label for="">frigobar </label>
<input type="checkbox" id="meta_box_check_frigobar" name="meta_box_check_frigobar" value="frigobar" />
<label for="">pets</label>
<input type="checkbox" id="meta_box_check_pets" name="meta_box_check_pets" value="pets" />
<label for="">phone</label>
<input type="checkbox" id="meta_box_check_phone" name="meta_box_check_phone" value="phone" />
<label for="">tv</label>
<input type="checkbox" id="meta_box_check_tv" name="meta_box_check_tv" value="tv" />
<label for="">typical-local-dishes</label>
<input type="checkbox" id="meta_box_check_typical-local-dishes" name="meta_box_check_typical-local-dishes" value="typical-local-dishes" />
</p> | 0 | [
2,
233,
40,
7718,
37,
2631,
5309,
4070,
13,
26120,
800,
3726,
3726,
31,
22,
195,
151,
2631,
8,
5309,
160,
9,
31,
22,
43,
101,
20,
2201,
66,
4070,
77,
21,
11951,
58,
4196,
7718,
9,
100,
2631,
5309,
25,
1460,
7138,
1923,
129,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ParseError: Unexpected end tag
===
I'm starting to learn web development and am using pyramid with chameleon. I just took some sites html source as a template in Dreamweaver and then copied the code into a chameleon .pt file.
The html code displays fine in dreamweaver but I get this error when running it in pyramid:
chameleon.exc.ParseError
ParseError: Unexpected end tag.
- String: "</div>"
I have tried dreamweavers cleanup function and it said it removed 2 empty tags but I still get this error. My traceback is all related to errors in the chameleon and doesn't show the specific line its having problems with in my template itself.
Is there a way to identify the actual line where the error is occurring?
I'm not sure if there's a pyramid or chameleon specific solution or if there are general methods to find errors in HTML tag. | 0 | [
2,
2017,
870,
29992,
45,
9380,
241,
3383,
800,
3726,
3726,
31,
22,
79,
1422,
20,
2484,
2741,
522,
17,
589,
568,
9565,
29,
28402,
9,
31,
114,
199,
109,
3259,
13,
15895,
1267,
28,
21,
22894,
19,
1868,
458,
11937,
17,
94,
18225,
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... |
Unable to setup MiniProfiler w/ Enity Framework 4.0 (Not code first)
===
I installed MiniProfiler and MiniProfiler.EF in my project via nuget.
Before using MiniProfiler I would open a connection using this in my model repository:
public class NotificationRepository
{
private CBNotificationModel.CB_NotificationEntities db;
public NotificationRepository()
{
db = new CB_NotificationEntities();
}
public NotificationContact GetNotificationContacts()
{
return db.NotificationContacts.ToList();
}
}
To use mini profiler I created:
public static class ConnectionHelper
{
public static CB_NotificationEntities GetEntityConnection()
{
var conn = new StackExchange.Profiling.Data.EFProfiledDbConnection(GetConnection(), MiniProfiler.Current);
return ObjectContextUtils.CreateObjectContext<CB_NotificationEntities>(conn); // resides in the MiniProfiler.EF nuget pack
}
public static EntityConnection GetConnection()
{
return new EntityConnection(ConfigurationManager.ConnectionStrings["CB_NotificationEntities"].ConnectionString);
}
}
The model repository now uses
db = ConnectionHelper.GetEntityConnection();
However this gives the error:
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
Am I missing a step? I tried adding MiniProfilerEF.Initialize() and MiniProfilerEF.Initialize_EF42() in Application_start() however that just changes the errors given.
There does not seem to be much information for setting up a entity framework project to use miniprofiler unless it is codefirst. | 0 | [
2,
2343,
20,
18161,
4236,
14503,
139,
619,
118,
1957,
856,
6596,
268,
9,
387,
13,
5,
1270,
1797,
64,
6,
800,
3726,
3726,
31,
4066,
4236,
14503,
139,
17,
4236,
14503,
139,
9,
6917,
19,
51,
669,
1197,
3152,
3060,
9,
115,
568,
4236... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 the Hough Transform be used in commercial software?
===
Can the Hough Transform be used in commercial software?
I mean, it is one of those things that seem research only and unstable.
You would not put it in a commercial compositing software for example
and have the user rely on it at all times.
Any opinions?
Thanks | 0 | [
2,
92,
14,
746,
14356,
8007,
44,
147,
19,
1439,
2306,
60,
800,
3726,
3726,
92,
14,
746,
14356,
8007,
44,
147,
19,
1439,
2306,
60,
31,
884,
15,
32,
25,
53,
16,
273,
564,
30,
2260,
527,
104,
17,
16571,
9,
42,
83,
52,
442,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular expression Skip message to,from patterns
===
I have this string in php i want to skip the ppattern
------------------------------------------
FROM:Andy;
SENT:Mon, Jun 18 2012 1:52pm
TO:Ali;
------------------------------------------
FROM:Ali;
SENT:Mon, Jun 18 2012 12:26pm
TO:Andy;
Some message text here
I want to use regular expression to skip first two patterns and return only "Some message text..." there can be more of above two pattern. In PHP | 0 | [
2,
1290,
1803,
12532,
2802,
20,
15,
2665,
6282,
800,
3726,
3726,
31,
57,
48,
3724,
19,
13,
26120,
31,
259,
20,
12532,
14,
3273,
721,
8766,
13,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android: will calling invalidate() from onDraw() cause a stack overflow?
===
After much struggling, I have determined that a `SurfaceView` won't do what I want it to do, namely, be above some UI elements and below others. I've also discovered that drawing all the UI elements on to the `SurfaceView` is actually significantly slower than the multi-layered hierarchy I was trying to replace. Therefore, I am trying to code my own animated `View` using `onDraw()`.
The simplest method I can think of for this is roughly as follows:
1. Measure the time now
2. Perform calculations about the animation state
3. Call `invalidate()`
4. Draw the animation at `onDraw()`
5. Return to 1.
I already have a `nextFrame()` function from my `SurfaceView` which does steps 1 and 2, and the draw function is actually trivial—a single path. I could make `nextFrame()` call `invalidate()` and I could make `onDraw()` call `nextFrame()` to signal that the drawing has completed and we are ready for the next frame. Unfortunately, I can imagine this causing problems.
Does `invalidate()` directly call `onDraw()`? Will I need to implement a calling thread as in `SurfaceView`? | 0 | [
2,
13005,
45,
129,
2555,
16671,
1373,
5,
6,
37,
27,
43,
12404,
5,
6,
1679,
21,
7566,
20285,
60,
800,
3726,
3726,
75,
212,
7587,
15,
31,
57,
2734,
30,
21,
13,
1,
18830,
4725,
1,
230,
22,
38,
107,
98,
31,
259,
32,
20,
107,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery UI: Specify location of internationalization files
===
I'm trying to set jQuery UI widgets up so that they can be internationalized. I configured the datepicker as follows:
$.datepicker.setDefaults($.datepicker.regional['fr']);
And that triggers an attempted AJAX load, but it is using a URL that I don't want to use (`http://jqueryui.com/ui/i18n/ui.datepicker-fr.js`).
The URL it's trying to use seems to be incorrect, as it returns a Not Found error. Besides, I have a local copy of the internationalization files and I want the datpicker to use that instead.
How do I configure where jQuery UI looks for its internationalization files? i've not managed to find it in the documentation, and googling hasn't so far turned up anything useful yet. | 0 | [
2,
487,
8190,
93,
13,
5661,
45,
19077,
1474,
16,
294,
1829,
6488,
800,
3726,
3726,
31,
22,
79,
749,
20,
309,
487,
8190,
93,
13,
5661,
4807,
43,
3060,
18,
71,
86,
30,
59,
92,
44,
294,
1333,
9,
31,
28895,
14,
1231,
16855,
106,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Function template instantiation failing
===
I've been trying to force instantiate the following:
//A.h
namespace A {
template <typename T>
bool foo (B::C<T>, D);
}
//1.cpp
namespace A {
template <typename T>
bool foo (B::C<T>, D) {
return false;
}
}
template bool A::foo<int> (B::C<int>, D);
// 2.cpp
#include "A.h"
using namespace A;
void foo()
{///
...
B::C<int> Alpha;
foo(Alpha, Beta);
}
The error messages I am getting are:
> C2785: different return types
> C4667: no function template defined that matches forced instantiation
Is there something strikingly wrong with this instantiation, because the error messages don't seem relevant. | 0 | [
2,
1990,
22894,
6322,
49,
857,
7250,
800,
3726,
3726,
31,
22,
195,
74,
749,
20,
558,
6322,
15882,
14,
249,
45,
12894,
58,
9,
252,
204,
5582,
21,
13,
1,
22894,
13,
1,
4474,
7259,
13,
38,
1,
1607,
1823,
4310,
111,
13,
5,
220,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Are there any tools for refactoring C++ to conform to coding standards?
===
I need to process a large C++ codebase, renaming pretty much everything (classes, parameters, fields, methods, etc.). Do you know of any tools that could assist me in this job (apart from a text editor and a coffee maker)? | 0 | [
2,
50,
80,
186,
4672,
26,
302,
17455,
68,
272,
20512,
20,
13620,
20,
13,
15458,
3364,
60,
800,
3726,
3726,
31,
376,
20,
953,
21,
370,
272,
20512,
1797,
8436,
15,
25934,
1772,
212,
796,
13,
5,
1898,
160,
15,
12905,
15,
2861,
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... |
XamlParseException
===
I have a UserControl in my WPF program. the control has a public array variable named c;
This is the code.
int n;
//I get n
Class1[] c = new Class1[n];
// I initialize c
UserControl1 uc = new UserControl1();
for(int i = 0; i < n; i++)
{
uc.sth[i] = c[i];
}
grid1.Children.Add(uc);
but when i start the program i see this XamlParseException:
**'The invocation of the constructor on type 'Name.MainWindow' that matches the specified binding constraints threw an exception.' Line number '4' and line position '53'.**
Whats wrong here?
thanks. | 1 | [
2,
13,
6791,
8184,
3574,
870,
10066,
872,
800,
3726,
3726,
31,
57,
21,
4155,
12898,
19,
51,
619,
7721,
625,
9,
14,
569,
63,
21,
317,
7718,
7612,
377,
272,
73,
48,
25,
14,
1797,
9,
19,
38,
13,
103,
73,
12894,
49,
164,
13,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Custom commands in user-extensions.js fail to load when starting Selenium RC
===
I'm using Selenium IDE to create some tests. In the options of the IDE i have specified an user-extensions.js file which is working as expected. Here are its contents:
Selenium.prototype.doactivateEnv = function(nomDeVariable){
storedVars[nomDeVariable] = "test";
}
When I start a test that uses the "activateEnv" command it runs perfectly fine, executing it and having the expected behaviour.
On the otherhand, when I start a Selenium RC server it completely fails to recognize the existence of this command. All my tests fail with the same error:
info: Starting test /selenium-server/tests/TestStaticID.html
info: Executing: |activateEnv | ENV | |
error: Unknown command: 'activateEnv'
warn: currentTest.recordFailure: Unknown command: 'activateEnv'
This is what I use to start the selenium RC server:
D:\__Miroslav\OMC\tests>java -jar selenium-server-standalone-2.24.1.jar
-userExtensions user-extensions.js -port 4545 -htmlsuite *chrome
"http://localhost:8080/" TestSuite\tests.html results\results.html
The user-extensions.js is in the same folder as the server's jar file, I have tried with and w/o absolute path to the file, it doesn't make any difference.
Also, I have tried with Firefox, Chrome and IE, all of them fail in the same way.
I feel that I'm missing something very very basic and stupid, but I just can't seem to find it.
Any help will be appriciated.
| 0 | [
2,
5816,
14294,
19,
4155,
8,
1706,
25573,
18,
9,
728,
18,
7476,
20,
6305,
76,
1422,
23027,
14311,
16462,
800,
3726,
3726,
31,
22,
79,
568,
23027,
14311,
13,
3448,
20,
1600,
109,
4894,
9,
19,
14,
6368,
16,
14,
13,
3448,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery JSON value
===
I have a REST service that returns a JSON like this:
[{"@id":"123","name":"Name"}]
and I'm tearing my hair out trying to figure out how the hell to get the value for @id. I've tried:
var temp = data['@id'];
var temp = data[0].'@id';
var temp = data[0].['@id'];
all of which return errors. Can someone please help me out here?
| 3 | [
2,
487,
8190,
93,
487,
528,
1923,
800,
3726,
3726,
31,
57,
21,
760,
365,
30,
4815,
21,
487,
528,
101,
48,
45,
636,
1,
7,
1,
1340,
7,
45,
7,
918,
240,
7,
15,
7,
7259,
7,
45,
7,
7259,
7,
1,
500,
17,
31,
22,
79,
14788,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
extJS: How to set a config options on field
===
why i can't set 'Config options' by methode SET and how i can set 'Properties' for a field
var name = {
fieldLabel:'Name',
value: 'Test',
id:'id-name',
xtype: 'textfield',
};
this.form= new Ext.FormPanel({
items:[name],
buttons: [{
text : 'set value',
handler: function() {
Ext.getCmp('id-name').set({value: 'new value',disabled:true});
}]
});
var win = new Ext.Window({
width:800,
items:this.form,
});
win.show(); | 0 | [
2,
1396,
38,
728,
18,
45,
184,
20,
309,
21,
13,
14093,
2816,
6368,
27,
575,
800,
3726,
3726,
483,
31,
92,
22,
38,
309,
13,
22,
14093,
2816,
6368,
22,
34,
2109,
62,
309,
17,
184,
31,
92,
309,
13,
22,
10890,
106,
3915,
22,
26,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Netbeans Startup option 'sun.java2d.opengl=true' not recognised
===
I'm trying to tweak the performance of Netbeans on a rather old PC I am using. I've followed some of the suggestions here but the one regarding
> sun.java2d.opengl=true
fails, giving
> Unknown option -Dsun.java2d.opengl=true
I'm using Linux WattOS distro version 5, Java 1.7 and Netbeans 7.1.2. Has this option become obsolete now as the above page seems to refer to Java 5?
Are there additional steps I need to do to enable Netbeans to use openGL? | 0 | [
2,
4275,
863,
5950,
20205,
4255,
13,
22,
7843,
9,
1004,
1385,
135,
43,
9,
10157,
8430,
3726,
13398,
22,
52,
7163,
800,
3726,
3726,
31,
22,
79,
749,
20,
28769,
14,
956,
16,
4275,
863,
5950,
27,
21,
864,
315,
5168,
31,
589,
568,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
alarm takes n multiple times
===
I am trying to make an alarm application that will take ‘n’ number of times from the user and buzz at those times and stores the difference in the timing so that the next user accesses the application, the stored difference is default. Here is the code of the main activity:
public void startAlert(View view) {
EditText textH = (EditText) findViewById(R.id.hours);
int h = Integer.parseInt(textH.getText().toString());
EditText textM = (EditText) findViewById(R.id.minutes);
int m = Integer.parseInt(textM.getText().toString());
EditText textS = (EditText) findViewById(R.id.seconds);
int s = Integer.parseInt(textS.getText().toString());
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR, h);
cal.set(Calendar.MINUTE, m);
cal.set(Calendar.SECOND, s);
Intent intent = new Intent(this, AlarmService.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this,
12345, intent, PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
pendingIntent);
Toast.makeText(this, "Alarm set", Toast.LENGTH_LONG).show();
}
I have no idea how to add n number of `editTexts` at the runtime? and for the `AlarmManager` class...shall i run a loop for creating n number of `AlarmManager` objects?
| 0 | [
2,
6490,
1384,
13,
103,
1886,
436,
800,
3726,
3726,
31,
589,
749,
20,
233,
40,
6490,
3010,
30,
129,
247,
13,
1,
103,
1,
234,
16,
436,
37,
14,
4155,
17,
9122,
35,
273,
436,
17,
4134,
14,
2841,
19,
14,
11812,
86,
30,
14,
328,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 C++ compilers support C++11 atomic, but not support C++11 memory model
===
While looking at Clang and g++ C++11 implementation status I noticed something strange:
they support C++11 atomics, but they dont support C++11 memory model.
I was under impression that you must have C++11 memory model to use atomics.
So what exactly is the difference between support for atomics and memory model?
Does a lack of memory model support means that legal C++11 programs that use `std::atomic<T>` arent seq consistent?
references:
http://clang.llvm.org/cxx_status.html
http://gcc.gnu.org/gcc-4.7/cxx0x_status.html | 0 | [
2,
184,
92,
272,
20512,
21486,
18,
555,
272,
20512,
1306,
9692,
15,
47,
52,
555,
272,
20512,
1306,
1912,
1061,
800,
3726,
3726,
133,
699,
35,
4258,
263,
17,
489,
20512,
272,
20512,
1306,
6123,
1782,
31,
2711,
301,
2578,
45,
59,
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... |
Setting bold with text field and parameter with string "&" scratch pdf
===
Im trying to set bold in some part of text field that concats with parameter (noCurso) but when this parameter comes with character "&" scratch my pdf print.
This prints style tag bold besides put in bold the text. And works when parameter not come with "&"
See below my text field
"Eu, "+$P{noAluno}.toUpperCase()+", portador(a) da Cédula de Identidade número "+$P{nuRg}+", <style isBold=\"true\" fontSize=\"12\" pdfFontName=\"Helvetica-Bold\">declaro</style>, sob as penas da lei, que entregarei todos os documentos necessários para a efetivação da matrícula no curso "+$P{noCurso}.toUpperCase()+". "
What is going on? | 0 | [
2,
2697,
5657,
29,
1854,
575,
17,
18906,
29,
3724,
13,
7,
1569,
7,
12395,
13,
11124,
800,
3726,
3726,
797,
749,
20,
309,
5657,
19,
109,
141,
16,
1854,
575,
30,
1065,
14626,
29,
18906,
13,
5,
251,
4734,
656,
6,
47,
76,
48,
1890... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 determine data's constructor from foreign code?
===
In my Haskell program i have an ADT with many constructors:
data MyData = Con1 |
Con2 |
...
Con20
I have an `foreign export ccall` function, which wraps `[MyData]` into array of `StablePtr's`. After calling it i need to determine which constructor have been used to construct each element.
It could be solved this way
foreign export ccall getType :: StablePtr MyData -> IO CInt
getType (Con1) = return 1
getType (Con2) = return 2
...
but then i would need to manually define these constants in C header. This is error-prone, so i wonder if there is a way to make GHC do this job for me. | 0 | [
2,
184,
20,
3746,
1054,
22,
18,
6960,
248,
37,
1228,
1797,
60,
800,
3726,
3726,
19,
51,
63,
16507,
625,
31,
57,
40,
21,
43,
38,
29,
151,
6960,
248,
18,
45,
1054,
51,
18768,
800,
1065,
165,
13,
1,
1065,
135,
13,
1,
13,
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... |
JQuery Chosen plugin - clear 'current_value' property
===
I am using the jquery chosen plugin, but am unable to access one of the properties which I need to clear, namely 'current_value' which is used to store the last selected value. I have a particular use case where I would like to clear this field. I have added a reset method to the plugin, but I am not able to get a reference to the instance of the chosen object to invoke the new method. I can see this field and change it in firebug, but I can't work out how to call it.
Thanks
Simon | 0 | [
2,
487,
8190,
93,
2519,
10922,
108,
13,
8,
1207,
13,
22,
17657,
1,
15165,
22,
1354,
800,
3726,
3726,
31,
589,
568,
14,
487,
8190,
93,
2519,
10922,
108,
15,
47,
589,
2343,
20,
1381,
53,
16,
14,
3704,
56,
31,
376,
20,
1207,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to select a directory and store the location using tkinter in Python
===
I am creating a gui with a browse button which I only want to return the path. I've been looking at solutions using code like below.
Tkinter.Button(subframe, text = "Browse", command = self.loadtemplate, width = 10).pack()
def loadtemplate(self):
filename = tkFileDialog.askopenfilename(filetypes = (("Template files", "*.tplate")
,("HTML files", "*.html;*.htm")
,("All files", "*.*") ))
if filename:
try:
self.settings["template"].set(filename)
except:
tkMessageBox.showerror("Open Source File", "Failed to read file \n'%s'"%filename)
However I know tkinter has a built in askopenfilename which is a super easy one line of code for opening files. Is there some way to modify this to return the directory instead of a file? Is there a smaller option than the larger chunk of code I posted? Thanks!
| 0 | [
2,
184,
20,
5407,
21,
16755,
17,
1718,
14,
1474,
568,
13,
38,
1767,
815,
19,
20059,
800,
3726,
3726,
31,
589,
2936,
21,
9457,
29,
21,
10175,
62,
5167,
56,
31,
104,
259,
20,
788,
14,
2013,
9,
31,
22,
195,
74,
699,
35,
6776,
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... |
Process.StandardOutput.ReadToEnd() and extraneous newline chars
===
I am trying to understand why, when I call the above function, I am getting hex 0D0A every 80th column on the output I am reading.
I have a powershell script, for testing that has two lines in it for brevity's sake:
$xmlSpew = "<IISAppPoolConfig><DefaultWebSite><ApplicationPoolName>DefaultAppPool</ApplicationPoolName></DefaultWebSite><AuthN>Basic</AuthN></IISAppPoolConfig>"
Write-Output $xmlSpew
I am calling the script using the Process object with ProcessStartInfo as follows:
var psi = new ProcessStartInfo
{
WorkingDirectory = Path.GetDirectoryName(FileToRun),
FileName = FileToRun,
Arguments = Arguments,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardError = true,
RedirectStandardOutput = true,
};
var process = new Process
{
StartInfo = psi,
EnableRaisingEvents = true,
};
FileToRun value is:
C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments value is:
-File "C:\Program Files\MyTest\MyProgInputs\read.d\IISAppPoolConfig.ps1"
The script runs fine and I get back exit code 0, but I have this mysterious (to me) 0D0A newline every 80th char in standard out that I capture using:
var Stdout = new List<string>;
...
Stdout.Add(process.StandardOutput.ReadToEnd());
This is wreaking havoc on my XML efforts once I have standard out stored in a string var. I expected to get exactly what I write to the stdout in the ps1 script, not the extra newline.
What am I missing? I've looked for others with this issue, but I have not found an answer. Hopefully it is not me being search-challenged.
Using .NET 4, C# on Windows 7 x64 for testing/development.
| 0 | [
2,
953,
9,
15566,
1320,
4881,
9,
10647,
262,
2451,
5,
6,
17,
2230,
556,
1291,
78,
1143,
4892,
18,
800,
3726,
3726,
31,
589,
749,
20,
1369,
483,
15,
76,
31,
645,
14,
784,
1990,
15,
31,
589,
1017,
24,
396,
713,
43,
387,
58,
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... |
MSSQL Can insert into child table
===
-- Referrals
CREATE TABLE RSSreferral
(
ReferralID INT PRIMARY KEY IDENTITY(1,1) NOT NULL,
RefType VARCHAR(25) NOT NULL,
RefName VARCHAR(25) NOT NULL,
RefPhysical_Add VARCHAR(25) NOT NULL,
RefPostal_Add VARCHAR(25),
RefEmail VARCHAR(25) NOT NULL,
RefTele VARCHAR(25)NOT NULL,
RefFax VARCHAR(25));
-- I want to take referral name from the referral table then add it the RSSclient_referral
--Client Referal Associate
CREATE TABLE RSSclient_referral
(
ReferralID INT FOREIGN KEY REFERENCES RSSreferral(ReferralID) NOT NULL,
RefDate DATE NOT NULL,
RefReason VARCHAR(45) NOT NULL,
CONSTRAINT [PK_ClientReferral] PRIMARY KEY CLUSTERED (ReferralID)
);
CREATE PROCEDURE Add_ClientsReferred
(
@RefDate DATE,
@RefReason VARCHAR(45)
)
AS
INSERT INTO RSSclient_referral (,RefDate,RefReason)
VALUES (@RefDate,@RefReason)
GO
| 1 | [
2,
4235,
18,
22402,
92,
14692,
77,
850,
859,
800,
3726,
3726,
13,
8,
8,
28679,
18,
1600,
859,
13,
1224,
18,
99,
19697,
255,
13,
5,
28679,
1340,
19,
38,
1256,
1246,
3270,
5,
165,
15,
165,
6,
52,
16203,
15,
13,
14057,
4474,
4033... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
why VS has so strange hotkeys, should i try to learn them or just reassigning?
===
Do you find that it's odd to have `Ctrl -` for NavigateBackward and `Ctrl Shift -` for NavigateForward while everyone else in the world uses `Alt left arrow` and `Alt right arrow` for that?
Also I've noticed that Resharper default hotkeys are very inconvenient. It's just hard to press `Alt \` to list members, I override this hotkey with `Ctrl - O` (default from Eclipse).
After all I've noticed that I have a lot of shortcurts to override.
The questions are:
1. Why default shortcuts are so odd? Obviosly it is not convinient to have "hard to press" shortcats for "often to use" features.
2. Probably somewhere I can download and apply ready-to-use shortcuts which proved to be "convenient"? What is most popular shortcuts scheme for VS + Resharper, where can I download and apply it? | 4 | [
2,
483,
4611,
63,
86,
2578,
1047,
4237,
18,
15,
378,
31,
1131,
20,
2484,
105,
54,
114,
302,
472,
11255,
68,
60,
800,
3726,
3726,
107,
42,
477,
30,
32,
22,
18,
4210,
20,
57,
13,
1,
4812,
6362,
13,
8,
1,
26,
20782,
1958,
2826,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Share on facebook outcome application / Image (random)
===
I have a facebook application that randomly generates an image with the result of the application.
I want that users can distribute the image generated in a random result on their wall with a simple click. (or automatically, without asking them permission to distribute)
(Example: http://uploadimage.ro/images/78610778070211278490.jpg )
I need a code to make this distribution. I need help.
Sorry for bad English.
Thanks in advance. | 1 | [
2,
1891,
27,
9090,
9774,
3010,
13,
118,
1961,
13,
5,
2195,
5555,
6,
800,
3726,
3726,
31,
57,
21,
9090,
3010,
30,
21324,
7920,
18,
40,
1961,
29,
14,
829,
16,
14,
3010,
9,
31,
259,
30,
3878,
92,
14751,
14,
1961,
6756,
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... |
Sqlmap dont work over TOR Vidalia in WindowsXP
===
D:\Python27>python sqlmap\sqlmap.py -u www.mail.ru --tor
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual
consent is illegal. It is the end user's responsibility to obey all applicable
local, state and federal laws. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program
[*] starting at 22:28:49
[22:28:49] [WARNING] increasing default value for option '--time-sec' to 10 beca
use switch '--tor' was provided
[22:28:49] [INFO] setting Tor HTTP proxy settings
[22:28:52] [CRITICAL] can't establish connection with the Tor proxy. Please make
sure that you have Vidalia, Privoxy or Polipo bundle installed for you to be ab
le to successfully use switch '--tor' (e.g. https://www.torproject.org/projects/
vidalia.html.en)
[*] shutting down at 22:28:52
[CRITICAL] can't establish connection with the Tor proxy.
Vidalia Tor already instaled and runing.
How to use TOR with sqlmap? | 0 | [
2,
4444,
255,
15022,
1049,
170,
84,
20,
139,
27108,
549,
19,
1936,
396,
306,
800,
3726,
3726,
13,
43,
45,
1,
6448,
11570,
2567,
1,
6448,
11570,
4444,
255,
15022,
1,
18,
22402,
15022,
9,
6448,
13,
8,
291,
13,
6483,
9,
8079,
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... |
Error while trying to push in git-gui
===
I'm trying to push a change to the wikimedia gerrit service ( https://gerrit.wikimedia.org), but am having some problems.
After clicking `push`, I carry on to the 'pushing' window.
It thinks for a while, and then asks for my username on 'https://gerrit.wikimedia.org', and I type it in, followed by my password.
It then fails, with the notice:
fatal:Authentication failed
This error, I assume is because of the SSH keys.
To get my key, I did this:
1. (In git-gui) went to Help>Show SSH key
1. Copied this to clipboard
1. Pasted it in Gerrit's Settings>Public SSH keys, and added the key.
**So where could I have gone wrong, and how can I try and make it right?** | 0 | [
2,
7019,
133,
749,
20,
3250,
19,
13,
10404,
8,
7215,
800,
3726,
3726,
31,
22,
79,
749,
20,
3250,
21,
753,
20,
14,
13,
17375,
8260,
5389,
8352,
365,
13,
5,
7775,
18,
6903,
1674,
8352,
9,
17375,
8260,
9,
5583,
6,
15,
47,
589,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 class change onClick relocates image
===
I am using a simple style rule...
.off { float: left; background: url(image.png); }
.on { background: url(different_image.png); }
in conjunction with a simple Javascript event...
<a href="#">
<div class="off" onclick="this.className='on'; return false;">
link
</div>
</a>
in order to change an image in my navigation bar upon being clicked. To give a bit more insight, I am using an image of an "admit one" ticket for the link, with an image of a torn ticket appearing once clicked. Essentially, I want the action of tearing the ticket once clicked, not just while " :active " (that only applies while the mouse is still clicked down). I need the image to change, and presumably would use the " :visited " pseudo element (is that what that's called?) to have the ticket remain torn once visited.
My problem is this: The Javascript seems to be functioning properly, except that when I click the link, my link moves from its floated position in the nav bar to some (seemingly, though not actually) random location near the top of my page.
It seems that the script ignores my CSS once it's clicked... What am I missing?
Do I need to specify a new set of rules, or duplicate them, for the "new" class? Does Javascript actually change the element in its entirety? I suck with JS, but I have a very firm grasp on CSS.
Thanks in advance!
| 0 | [
2,
8247,
8741,
718,
753,
27,
150,
10129,
21761,
18,
1961,
800,
3726,
3726,
31,
589,
568,
21,
1935,
1034,
1828,
9,
9,
9,
13,
9,
1299,
13,
1,
11510,
45,
225,
73,
2395,
45,
287,
6362,
5,
22039,
9,
306,
2723,
6,
73,
13,
1,
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... |
Enabling Camera LED alone without Camera.open in Android?
===
Is it possible to enable only LED of the device without using Camera.open() in Android?
since LED light is also a separate hardware in mobile, there should be way to access it alone without using Camera.open() and setting Torch parameter to it.
The reason why i am asking is I have a Video App which is built in AIR which requires FLash to enabled with Camera also. The camera will be made open by AIR and FLash will be enabled using Android Native extension. but its not working as we cannot have multiple camera instance opened at the same time.
Thanks,
Veeru | 0 | [
2,
13168,
3336,
481,
1056,
366,
3336,
9,
10157,
19,
13005,
60,
800,
3726,
3726,
25,
32,
938,
20,
9240,
104,
481,
16,
14,
3646,
366,
568,
3336,
9,
10157,
5,
6,
19,
13005,
60,
179,
481,
471,
25,
67,
21,
1725,
7610,
19,
3241,
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... |
Facebook credits exclusively mandatory for what?
===
short question, the terms of FB are a little bit unclear for me.
For what kind of games the exclusive usage of credits for payments is required?
a.) game app integrated inside the Facebook canvas ==> I think here it is clear I have to use credits
b.) game app only uses Facebook API to log in users (and only the users that want to do so)
So in my case I'm having an online game (with normal payment methods) for several years now and what I want to do now is FB integration. So in my understanding I would now let people, who use the game as a canvas app only do their payments by facebook credits, my existing users and new users, that even MIGHT USE THE FACEBOOK LOGON (by API) may pay by the usual ways. Is this okay for the terms of service?
What happens if someone uses the game as canvas app and changes later to website-based app using only API logon? | 0 | [
2,
9090,
5748,
7008,
12605,
26,
98,
60,
800,
3726,
3726,
502,
1301,
15,
14,
1663,
16,
13,
13478,
50,
21,
265,
1142,
11293,
26,
55,
9,
26,
98,
825,
16,
466,
14,
6753,
7514,
16,
5748,
26,
11161,
25,
1390,
60,
21,
9,
6,
250,
48... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Debugging htmlParse in R's XML library
===
This is not the first time I've encountered a problem while using `htmlParse` in the XML library, but in the past I've just given up and used a [tag:regex] to parse what I needed instead. I'd rather do it via parsing the XML/XHTML, since as we all know regexs aren't parsers.
That said, I find the error messages from the parse commands to be non-helpful at best, and I have no idea how to proceed. For instance:
> htmlParse(getForm("http://www.takecarehealth.com/LocationSearchResults.aspx", location_query="Deer Park",location_distance=50))
Error in htmlParse(getForm("http://www.takecarehealth.com/LocationSearchResults.aspx", :
File
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="ctl00_Head1">
<title></title>
<script language="JavaScript" type="text/javascript">
var s_pageName = document.title;
var s_channel = "Take Care";
var s_campaign = "";
var s_eVar1 = ""
var s_eVar2 = ""
var s_eVar22 = ""
var s_eVar23 = ""
</script>
<meta name="keywords" content="take care clinic, walgreens clinic, walgreens take care clinic, take care health, urgent care clinic, walk in clinic" />
<meta name="description" content="Information about simple, quality healthcare for the whole family from Take Care Clinics at select Walgreens, including Take Care Clinic hours, providers, offers, insurance and quality of care." />
<link rel="shortcut icon" hre
I'm glad it sees something in there, but where do I drill down past "Error: File"?
Note this is, as far as I can tell, well-formed XHTML. When I visit the [link manually](http://www.takecarehealth.com/LocationSearchResults.aspx?location_query=Deer%20Park&location_distance=50) I can run xpaths on it and Firebug does not complain.
How do I debug errors from htmlParse like this? | 0 | [
2,
121,
16254,
2762,
13,
15895,
3574,
870,
19,
761,
22,
18,
23504,
1248,
800,
3726,
3726,
48,
25,
52,
14,
64,
85,
31,
22,
195,
8208,
21,
1448,
133,
568,
13,
1,
15895,
3574,
870,
1,
19,
14,
23504,
1248,
15,
47,
19,
14,
640,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
taking strings from excel cells and entering them into a text box on a website
===
Hi I'm trying to write a program in java, with the jexcel api that takes the text in every cell in the first column of an excel spreadsheet, and then entering it into a text box online (for example, google translate), and then automatically processing (or for this example's sake, translating) it, taking the result, and putting them into the corresponding cells
is this possible? and if so, how would one do this?
thanks. | 0 | [
2,
741,
7887,
37,
20700,
2934,
17,
4604,
105,
77,
21,
1854,
1649,
27,
21,
2271,
800,
3726,
3726,
4148,
31,
22,
79,
749,
20,
2757,
21,
625,
19,
8247,
15,
29,
14,
487,
1706,
11040,
21,
2159,
30,
1384,
14,
1854,
19,
352,
1667,
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... |
Error 1001. InstallUtilLib.dll, Unknow error
===
I am getting this error after installing the MSI. it throws this 1001, unknown error. I have tried to debug and dont see any issue with the code. I am not sure what may be causing this.
I am using Visual Studio 2008. I am also finding that with some user id's installer works fine but with a test account, it has this problem. I am trying to find out if there are any addtional permissions that it is looking for. Looking for any ideas.
Thanks
Jay
| 0 | [
2,
7019,
808,
165,
9,
16146,
14255,
8326,
9,
43,
211,
15,
367,
17806,
7019,
800,
3726,
3726,
31,
589,
1017,
48,
7019,
75,
25429,
14,
4235,
49,
9,
32,
13566,
48,
808,
165,
15,
2562,
7019,
9,
31,
57,
794,
20,
121,
16254,
17,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android No XML content. Please add a root view or layout to your document
===
anytime i change my layout it throws me out.xml error
here is my xml code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"/>
<AutoCompleteTextView android:id="@+id/myautocomplete"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
/>
</LinearLayout> | 0 | [
2,
13005,
90,
23504,
2331,
9,
2247,
3547,
21,
5900,
1418,
54,
9106,
20,
154,
4492,
800,
3726,
3726,
19711,
31,
753,
51,
9106,
32,
13566,
55,
70,
9,
396,
8184,
7019,
235,
25,
51,
23504,
1797,
13,
1,
60,
396,
8184,
615,
3726,
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... |
graphviz with dot: put a node at top most
===
TODO: in a graph with top-down rank, specify that node "START" should be put at the top.
The graph is large (100 nodes) and there are some subgraphs (around 10).
Before using subgraphs, the "START" node is at placed at top. With subgraphs, the "START" node is placed somewhere around the center.
I tried to use
Start [root=true]
Start [rank=min]
Start [rank=1]
root=Start;
{rank=min; Start;}
But none of them worked. What's your ideas (i do not want to use 'pos', 'cause the graph size is not specific)?
Thanks!
| 0 | [
2,
7210,
1755,
380,
29,
14123,
45,
442,
21,
15421,
35,
371,
127,
800,
3726,
3726,
20,
537,
45,
19,
21,
7210,
29,
371,
8,
2968,
2839,
15,
19077,
30,
15421,
13,
7,
13680,
7,
378,
44,
442,
35,
14,
371,
9,
14,
7210,
25,
370,
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... |
Unable to open AlertDialog from QuickAction
===
I'm tried to display AlertDialog when an button in QuickAction is pressed.But my application crashes while trying to accomplish this task.I dont know what is causing the error.I also tried to use Thread.sleep to give time to QuickAction to dimiss properly and display AlertDialog but it didnt work.
I did research and found one question: http://stackoverflow.com/questions/4708098/starting-dialog-from-quickaction-button
This question is somewhat similar to mine but when i tried to replace getApplicationContext() with the MyClass.class i get an error saying that constructor AlertDialog.builder(Class) is undefined.
Following is the piece of code QuickAction and AlertDialog:
ActionItem editQItem = new ActionItem(ID_EDIT_Q, "Edit", getResources()
.getDrawable(R.drawable.qa_edit));
ActionItem deleteQItem = new ActionItem(ID_DELETE_Q, "Delete",
getResources().getDrawable(R.drawable.qa_delete_answer));
System.out.println("Blah 1");
mQuickActionQ = new QuickAction(this);
mQuickActionQ.addActionItem(editQItem);
mQuickActionQ.addActionItem(deleteQItem);
System.out.println("Blah 2");
// setup the action item click listener
mQuickActionQ
.setOnActionItemClickListener(new QuickAction.OnActionItemClickListener() {
public void onItemClick(QuickAction quickAction, int pos,
int actionId) {
ActionItem actionItem = quickAction.getActionItem(pos);
System.out.println("Blah 3");
if (actionId == ID_EDIT_Q) {
//Here im getting error from here onwards when trying to display AlertDialog
et_question = new EditText(getApplicationContext());
et_tag1 = new EditText(getApplicationContext());
et_tag2 = new EditText(getApplicationContext());
et_tag3 = new EditText(getApplicationContext());
et_question.setText(question);
et_tag1.setText(q_tag1);
et_tag2.setText(q_tag2);
et_tag3.setText(q_tag3);
tv_question = new TextView(getApplicationContext());
tv_question.setText("Question:");
tv_question.setTextSize(15);
tv_tags = new TextView(getApplicationContext());
tv_tags.setText("Tags:");
tv_tags.setTextSize(15);
ll_edit = new LinearLayout(getApplicationContext());
ll_edit.setOrientation(1);
ll_edit.addView(tv_question);
ll_edit.addView(et_question);
ll_edit.addView(tv_tags);
ll_edit.addView(et_tag1);
ll_edit.addView(et_tag2);
ll_edit.addView(et_tag3);
AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());
builder.setMessage("Edit");
builder.setCancelable(true);
builder.setView(ll_edit);
builder.setPositiveButton("Save Changes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
boolean Success = true;
Editable ttv = et_question.getText();
final String answer = new StringBuilder().append(
ttv).toString();
if (answer.equals("")) {
Dialog mTag = new Dialog(
getApplicationContext());
mTag.setTitle("One of the field is empty!");
TextView tv2 = new TextView(
getApplicationContext());
tv2.setText("Blank fields are not allowed.");
mTag.setContentView(tv2);
mTag.setCancelable(true);
mTag.show();
} else {
String uname = qun.getText().toString();
String question = qu.getText().toString();
String question_time = qpo.getText().toString();
String new_question = et_question.getText()
.toString();
String new_tag1 = et_tag1.getText().toString();
String new_tag2 = et_tag2.getText().toString();
String new_tag3 = et_tag3.getText().toString();
uf = new UserFunctions();
HashMap<String, String> hm = new HashMap<String, String>();
db = new DatabaseHandler(
getApplicationContext());
db.getReadableDatabase();
hm = db.getUserDetails();
db.close();
String username = hm.get("username");
JSONObject json = uf.updateQuestion(username,
question, question_time, new_question,
new_tag1, new_tag2, new_tag3);
dialog.dismiss();
pd = ProgressDialog.show(ViewMyQuestion.this,
"Please wait...",
"Updating your question!", true, false);
Thread thread = new Thread(ViewMyQuestion.this);
thread.start();
tagcombo = new_tag1 + "," + new_tag2 + ","
+ new_tag3;
qun.setText(username);
qtag.setText(tagcombo);
qu.setText(new_question);
}// end of if else
}
});
builder.setNegativeButton("Cancel",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
} else {
System.out.println("Blah 4");
Toast.makeText(getApplicationContext(),
actionItem.getTitle() + " selected",
Toast.LENGTH_SHORT).show();
}
}
});
mQuickActionQ.setOnDismissListener(new QuickAction.OnDismissListener() {
public void onDismiss() {
Toast.makeText(getApplicationContext(), "Ups..dismissed",
Toast.LENGTH_SHORT).show();
}
});
Following is the Logcat messages:
07-05 18:01:27.158: E/AndroidRuntime(389): FATAL EXCEPTION: main
07-05 18:01:27.158: E/AndroidRuntime(389): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
07-05 18:01:27.158: E/AndroidRuntime(389): at android.view.ViewRoot.setView(ViewRoot.java:509)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.app.Dialog.show(Dialog.java:241)
07-05 18:01:27.158: E/AndroidRuntime(389): at com.vervecoders.cuqu.ViewMyQuestion$3.onItemClick(ViewMyQuestion.java:222)
07-05 18:01:27.158: E/AndroidRuntime(389): at com.vervecoders.cuqu.QuickAction$2.onClick(QuickAction.java:162)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.view.View.performClick(View.java:2408)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.view.View$PerformClick.run(View.java:8816)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.os.Handler.handleCallback(Handler.java:587)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.os.Handler.dispatchMessage(Handler.java:92)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.os.Looper.loop(Looper.java:123)
07-05 18:01:27.158: E/AndroidRuntime(389): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-05 18:01:27.158: E/AndroidRuntime(389): at java.lang.reflect.Method.invokeNative(Native Method)
07-05 18:01:27.158: E/AndroidRuntime(389): at java.lang.reflect.Method.invoke(Method.java:521)
07-05 18:01:27.158: E/AndroidRuntime(389): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-05 18:01:27.158: E/AndroidRuntime(389): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-05 18:01:27.158: E/AndroidRuntime(389): at dalvik.system.NativeStart.main(Native Method)
Thank You | 0 | [
2,
2343,
20,
368,
7863,
4286,
5567,
37,
2231,
8645,
800,
3726,
3726,
31,
22,
79,
794,
20,
3042,
7863,
4286,
5567,
76,
40,
5167,
19,
2231,
8645,
25,
2931,
9,
811,
51,
3010,
21563,
133,
749,
20,
14570,
48,
3005,
9,
49,
1049,
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... |
Exclude Columns From MySQL CSV Export
===
I am attempting to add a function that will create a csv for download from a certain table in the db. I have got it partially working but cannot figure out how to exclude certain columns from the rows section of the csv. Here is my code so far,
$host = 'xxx';
$user = 'xxxx';
$pass = 'xxxx';
$db = 'xxxx';
$table = 'headers';
$file = 'export';
$filename = $file."_".date("Y-m-d_H-i",time());
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename=".$filename.".csv");
$link = mysql_connect($host, $user, $pass) or die("Can not connect." . mysql_error());
mysql_select_db($db) or die("Can not connect.");
$result = mysql_query("SHOW COLUMNS FROM ".$table." WHERE Field NOT IN ('invhead_id', 'note');");
$i = 0;
if (mysql_num_rows($result) > 0)
{
while ($row = mysql_fetch_assoc($result))
{
$csv_output .= $row['Field'].", ";
$i++;
}
}
$csv_output .= "\n";
$values = mysql_query("SELECT * FROM ".$table."");
while ($rowr = mysql_fetch_row($values))
{
for ($j=0;$j<$i;$j++)
{
$csv_output .= $rowr[$j].", ";
}
$csv_output .= "\n";
}
print $csv_output;
exit;
I have excluded the columns invhead_id and note from the $result output but also need to exlude them from the $values output as well however this is the bit I cannot get to work. Can anyone point me in the right direction?
Thanks
| 0 | [
2,
21077,
7498,
37,
51,
18,
22402,
272,
18,
710,
7487,
800,
3726,
3726,
31,
589,
6314,
20,
3547,
21,
1990,
30,
129,
1600,
21,
272,
18,
710,
26,
7121,
37,
21,
1200,
859,
19,
14,
13,
9007,
9,
31,
57,
330,
32,
5933,
638,
47,
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... |
Maven Logging SLF4J Binding Error
===
Im am new to maven and the last two days i try to integrate maven into a small web project.
(I use Eclipse Juno as IDE).
First I generated a new project (structure) with the "mvn-archetype-webapp" command and copied the sources from the project into this structure.
Then I added all dependencies to the pom.xml so that I could compile and start the project with the tomcat7 plugin.
So far everything works fine except the SLF4J Error Messages at the start of every maven command:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
My pom.xml dependencies looks like this:
<!-- properties -->
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
</properties>
<!-- dependencies -->
<dependencies>
<!-- logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.6</version>
<scope>runtime</scope>
</dependency>
<!-- junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Spring 3 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- jee -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<!-- tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.2.2</version>
</dependency>
<!-- jstl -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
Can somebody help me with this issue?
| 0 | [
2,
1216,
3124,
13,
13919,
13,
18,
9641,
300,
728,
8728,
7019,
800,
3726,
3726,
797,
589,
78,
20,
1216,
3124,
17,
14,
236,
81,
509,
31,
1131,
20,
18399,
1216,
3124,
77,
21,
284,
2741,
669,
9,
13,
5,
49,
275,
11652,
21715,
28,
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... |
XSLT to select elements that don't match something?
===
I have the following XML :-
<inventory>
<item>
<name_element>
<!--some structure-->
</name_element>
<some_element1>val1</some_element1>
<some_element2>val2</some_element2>
<!-- some more elements -->
</item>
<!-- lots of items -->
</inventory>
Now I want to convert this to :-
<inventory>
<item some_element1="val1" some_element2="val2" ... >
<name_element>
<!-- as it is -->
</name_element>
</inventory>
Basically I don't know anything about the names/types of some_elements and any item could have any number of these elements. I do know that they are all simple types and convertible to attributes.
I've read http://stackoverflow.com/questions/655411/converting-xml-elements-to-xml-attributes-using-xslt/655463#655463 which tells how I can convert all child elements to attributes but it's not clear from that how I could exclude a specific 'name_element' from being converted to an attribute. | 0 | [
2,
993,
18,
255,
38,
20,
5407,
2065,
30,
221,
22,
38,
730,
301,
60,
800,
3726,
3726,
31,
57,
14,
249,
23504,
13,
45,
8,
13,
1,
108,
6645,
7159,
1,
13,
1,
2119,
79,
1,
13,
1,
7259,
1,
27567,
1,
13,
1,
187,
8,
8,
3220,
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... |
When I add a new field I get a null pointer
===
I have my ORMlite service working fine. All CRUD operations work fine.
However when I add a new nullable field to my entity the whole thing goes pear shaped. I get null pointers ant the app dies
this is the field I added
@DatabaseField( canBeNull = true )
private String newField;
If I drop my DB and recreate it then everything is fine.
What I would like to know is why does a simple schema change cause this? I'm thiinking ahead where a DB is full with data and I don't want a new nullable field to break it or is this to be expected?
| 0 | [
2,
76,
31,
3547,
21,
78,
575,
31,
164,
21,
16203,
454,
106,
800,
3726,
3726,
31,
57,
51,
54,
79,
10601,
365,
638,
1123,
9,
65,
11498,
43,
1311,
170,
1123,
9,
207,
76,
31,
3547,
21,
78,
16203,
579,
575,
20,
51,
9252,
14,
979,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which is most memory efficient to store map in java?
===
i have to store key value pairs in java which is more memory efficient and which is more time efficient while reading and writing directly in file?
1) Table in guava `<string,double,double>`
2) map in guava `<string,object>` where object contain two double values.
3) Hashmap in java `<string,object>` where object contain two double values.
also u can suggest some other methods.
Thanks in advance. | 0 | [
2,
56,
25,
127,
1912,
8243,
20,
1718,
2942,
19,
8247,
60,
800,
3726,
3726,
31,
57,
20,
1718,
1246,
1923,
7473,
19,
8247,
56,
25,
91,
1912,
8243,
17,
56,
25,
91,
85,
8243,
133,
1876,
17,
1174,
1703,
19,
3893,
60,
137,
6,
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... |
Chamilo 2.1 API
===
I am trying to find some documentation about the Chamilo 2.1 API and can´t find anything. Is there an API? Please help me.
Thanks in advance. | 0 | [
2,
12778,
10016,
172,
9,
165,
21,
2159,
800,
3726,
3726,
31,
589,
749,
20,
477,
109,
13945,
88,
14,
12778,
10016,
172,
9,
165,
21,
2159,
17,
92,
13,
38,
477,
602,
9,
25,
80,
40,
21,
2159,
60,
2247,
448,
55,
9,
3669,
19,
3612... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Bind Combo Box based on another Combo Box's selected item - MVVM WPF
===
I currently have a Combo Box which is populated with Artist names and I need to bind it to another once the Artist is selected. These are set up as follows in my view:
<ComboBox Height="23" HorizontalAlignment="Left" Margin="65,81,0,0" Name="comboBox1" ItemsSource="{Binding Artists}" SelectedItem="{Binding SelectedArtist}" VerticalAlignment="Top" Width="120" />
<ComboBox Height="23" HorizontalAlignment="Left" Margin="65,115,0,0" Name="comboBox2" VerticalAlignment="Top" ItemsSource="{Binding Albums}" SelectedItem="{Binding SelectedAlbums}" Width="120" />
In my ViewModel I have the following:
private void initialiseArtists()
{
MusicDataClassesDataContext dataClasses = new MusicDataClassesDataContext();
artistList = (from m in dataClasses.tblArtists select m.ArtistName).ToList();
}
public List<String> Artists
{
get
{
return this.artistList;
}
}
public string SelectedArtist
{
set
{
this.selectedArtist = value;
initialiseAlbums();
}
}
private void initialiseAlbums()
{
if (selectedArtist != null)
{
MusicDataClassesDataContext dataClasses = new MusicDataClassesDataContext();
var getArtist = dataClasses.tblArtists.FirstOrDefault(band => band.ArtistName == selectedArtist);
albumList = (from album in dataClasses.tblAlbums
where album.ArtistID == getArtist.ArtistID
select album.AlbumName).ToList();
//dataClasses.tblAlbums.SelectMany(album => album.ArtistID == getArtist.ArtistID).ToList();
}
}
public List<String> Albums
{
set
{
initialiseAlbums();
}
get
{
return this.albumList;
}
}
I was assuming that the Selected Item event would populate the second Combo Box but I was mistaken. | 0 | [
2,
10193,
22621,
1649,
432,
27,
226,
22621,
1649,
22,
18,
1704,
9101,
13,
8,
17967,
20147,
619,
7721,
800,
3726,
3726,
31,
871,
57,
21,
22621,
1649,
56,
25,
11111,
29,
1169,
1817,
17,
31,
376,
20,
10193,
32,
20,
226,
382,
14,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Confuse about jquery queue and dequeue
===
I have an array, I want use jquery queue and a print function to print them out:
var show = function (el) { //print function
console.log('el', el);
}
var arr = ["a", "b", "c", "d", "e"];
var que = $({});
for (var i in arr) {
que.queue('custom', function (next) {
show(arr[i]);
next();
})
}
que.dequeue('custom');
but the all the print info is `e`, Why this happened?How can print is like the array order?
The second question is when I try to change the way of the `for` loop writing,like:
for (var i = 0; i < arr.length; i++) {
//...
}
All the print info will be `undefined` . Is there difference between the two writing way? It always like the same ,doesn't it?
Here is the demo:[http://jsfiddle.net/hh54188/L8ExM/][1]
[1]: http://jsfiddle.net/hh54188/L8ExM/ | 0 | [
2,
26465,
88,
487,
8190,
93,
22521,
17,
121,
2005,
4185,
800,
3726,
3726,
31,
57,
40,
7718,
15,
31,
259,
275,
487,
8190,
93,
22521,
17,
21,
4793,
1990,
20,
4793,
105,
70,
45,
4033,
298,
800,
1990,
13,
5,
532,
6,
13,
1,
12894,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Displaying Text Content
===
Pretty simple one I hope. I have an article of text that I want to display in a window. Now rather than have this massive load of text in the centre of my code, can I add it as a Resource and read it out to the window somehow?
Thanks | 0 | [
2,
17418,
1854,
2331,
800,
3726,
3726,
1772,
1935,
53,
31,
1376,
9,
31,
57,
40,
2002,
16,
1854,
30,
31,
259,
20,
3042,
19,
21,
1463,
9,
130,
864,
119,
57,
48,
3787,
6305,
16,
1854,
19,
14,
861,
16,
51,
1797,
15,
92,
31,
3547... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Dylib ok at link time but not at runtime
===
I have a problem linking correctly my project. The project is build with CMAKE.
Linking seems fine, but run time throws an error.
The command I use to link:
$ /usr/bin/clang -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/tNETacle.dir/src/conf.c.o CMakeFiles/tNETacle.dir/src/tun-compat.c.o CMakeFiles/tNETacle.dir/src/compress.c.o CMakeFiles/tNETacle.dir/src/mc.c.o CMakeFiles/tNETacle.dir/src/hexdump.c.o CMakeFiles/tNETacle.dir/src/server.c.o CMakeFiles/tNETacle.dir/sys/unix/log.c.o CMakeFiles/tNETacle.dir/sys/unix/imsg.c.o CMakeFiles/tNETacle.dir/sys/unix/imsg-buffer.c.o CMakeFiles/tNETacle.dir/sys/unix/tnetacle.c.o CMakeFiles/tNETacle.dir/sys/unix/tnetacled.c.o CMakeFiles/tNETacle.dir/sys/unix/util.c.o CMakeFiles/tNETacle.dir/sys/unix/conf.c.o CMakeFiles/tNETacle.dir/sys/unix/tntsocket.c.o -o bin/tNETacle /opt/local/lib/libevent_openssl.dylib /opt/local/lib/libevent_core.dylib /usr/lib/libz.dylib /opt/local/lib/libyajl.dylib /opt/local/lib/libtapcfg.dylib
The error I get:
$ ./bin/tNETacle
dyld: Library not loaded: build/libtapcfg.dylib
Referenced from: /Users/Antoine/tNETacle/./bin/tNETacle
Reason: image not found
zsh: trace trap ./bin/tNETacle
Additional infos:
$ dyldinfo -dylibs bin/tNETacleattributes
dependent dylibs
/opt/local/lib/libevent_openssl-2.0.5.dylib
/opt/local/lib/libevent_core-2.0.5.dylib
/usr/lib/libz.1.dylib
/opt/local/lib/libyajl.2.dylib
build/libtapcfg.dylib
/usr/lib/libSystem.B.dylib
It looks like black magic to me. The linker is able to find the symbols, but end up by changing the path of the library even if I can't see any difference in the way it is handled in the linking command...
The lib location is /opt/local/lib/libtapcfg.dylib
$ ls -lhF /opt/local/lib/libtapcfg.dylib
-rwxr-xr-x 1 root admin 20K 14 jui 18:05 /opt/local/lib/libtapcfg.dylib*
Maybe the problem come from the lib I am linking ? | 0 | [
2,
9841,
8326,
5854,
35,
3508,
85,
47,
52,
35,
485,
891,
800,
3726,
3726,
31,
57,
21,
1448,
12585,
12044,
51,
669,
9,
14,
669,
25,
1895,
29,
272,
11115,
9,
12585,
2206,
1123,
15,
47,
485,
85,
13566,
40,
7019,
9,
14,
1202,
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 set text color of webview in android
===
i am trying to change text color of webview with this code
String message ="<font color='white'>"+"<u>"+
"text in white"+ "<br>" +
"<font color='cyan'>"+"<font size='2'>"+
" text in blue color "+"</font>";
webview.loadData(message, "text/html", "utf8");
but i have some html pages. store in my sdcard then how can i change text color..
i use
webViewRead.loadUrl(url);
url is path of my file. | 0 | [
2,
184,
309,
1854,
1665,
16,
2741,
4725,
19,
13005,
800,
3726,
3726,
31,
589,
749,
20,
753,
1854,
1665,
16,
2741,
4725,
29,
48,
1797,
3724,
2802,
800,
7,
1,
21931,
1665,
3726,
22,
5051,
22,
1,
7,
2430,
7,
1,
291,
1,
7,
2430,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
BarCode Rearder Zxing
===
i want to Scan Qr on button Click , problem is when i Run code on my device Activity Result Intent variable retrun 0 always , here is my code
Some other question are
1) how i know if barcode reader Scan Qr image Successfly , Currently i m seeing yellow dots on Device screen
private OnClickListener scanner = new OnClickListener() {
public void onClick(View v) {
IntentIntegrator.initiateScan(BarCodeScannerActivity.this);
}
};
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanResult != null) {
// handle scan result
String s = "http://www.google.com/search?q=";
s += scanResult.getContents();
Intent myIntent1 = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
startActivity(myIntent1);
} | 0 | [
2,
748,
9375,
2275,
1157,
2052,
18222,
800,
3726,
3726,
31,
259,
20,
8313,
2593,
139,
27,
5167,
10840,
13,
15,
1448,
25,
76,
31,
485,
1797,
27,
51,
3646,
2358,
829,
6936,
7612,
13,
6239,
3169,
713,
550,
13,
15,
235,
25,
51,
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... |
display div for JQuery toggleClass
===
I'm trying something very simple. Upon page load the data in content div is dsplayed and menu(ul elements) are hidden. upon clicking the menu button created via css, the menu loads and the content div becomes hidden. when i click on the menu button again it hides the menu using toggleClass(). at this point its meant to display the data in the content div but this is not working as expected.
hopefully you can tell me what i'm doing wrong.
android.js:
// JavaScript Document
if (window.innerWidth && window.innerWidth <= 480){
//when the document is ready run this code. wait for the page to load completely. otherwise javascript will run and because the uls don't exist
//yet it will fail. because the js has failed the uls will load (not good)
$(document).ready(function() {
$('#header ul').addClass('hide'); //hide ul elements which is the menu on page load (see android.css #header ul.hide..)
$('#header').append('<div class="leftButton" onclick="toggleMenu()">Menu</div>');
});
//currently the menu (ul) elements are hidden as set on page load
//toggleClass() works by checking what class its set to. if its already set to that class it changes it to the other.
function toggleMenu(){
if($('#header ul').toggleClass('hide')){//adding hide class to the object
$('#content').show();
}
if ($('#header .leftButton').toggleClass('pressed')){
$('#content').hide();
}
}
}
hopefully the above is sufficient to identify why its not working. Thanks! | 0 | [
2,
3042,
13,
12916,
26,
487,
8190,
93,
20,
263,
4875,
1898,
800,
3726,
3726,
31,
22,
79,
749,
301,
253,
1935,
9,
685,
2478,
6305,
14,
1054,
19,
2331,
13,
12916,
25,
13,
43,
18,
11061,
17,
11379,
5,
1287,
2065,
6,
50,
3689,
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... |
"Compact" function in Bourbon with SASS not called
===
I have a problem using mixins included in Bourbon.
When this mixin uses the "compact" function of Bourbon, it just compile it into the css without using it.
Here is a screenshot of the rendred CSS for a box-shadow :
http://i.stack.imgur.com/YF1JB.png
I use it on a non-static site, with the latest Sass version. I use Codekit to compile.
Thanks for help ! | 0 | [
2,
13,
7,
11103,
5183,
7,
1990,
19,
17776,
29,
9233,
18,
52,
227,
800,
3726,
3726,
31,
57,
21,
1448,
568,
2917,
108,
18,
506,
19,
17776,
9,
76,
48,
2917,
108,
2027,
14,
13,
7,
11103,
5183,
7,
1990,
16,
17776,
15,
32,
114,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
php on windows server
===
I am trying to create my first dynamic site on windows server 2008 r2. I have created other dynamic sites successfully on linux based systems but am having a little bit of trouble with this.
So i have php, mysql and phpmyadmin installed on the server.
I have a page (index.php) with the following:
<?php
include 'php/index.php';
mysql_set_charset('utf8');
?>
This works fine and does not show when i do 'view source' on the displayed page in a web browser.
Further down my page i have the following:
<?=$obj->get_email()?>
This statement is t be used to pull information from a database. When i do view source it shows the get_email command as seen above. Instead of what it should be replaced with should php be working properly. Is this a PHP issue? Is this type of command not suitable with widows server or am i just doing something completely stupid??
| 0 | [
2,
13,
26120,
27,
1936,
8128,
800,
3726,
3726,
31,
589,
749,
20,
1600,
51,
64,
7782,
689,
27,
1936,
8128,
570,
761,
135,
9,
31,
57,
679,
89,
7782,
3259,
3673,
27,
13024,
432,
1242,
47,
589,
452,
21,
265,
1142,
16,
2572,
29,
48... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
post body in REST
===
I was referring to the O'Reilly book on REST api design, that clearly lays down the message format specifically around the areas of how links should be used to represent interrelated resources and stuff. But all the examples are for reading a resource (GET) and how the server structures the message. But what about a Create (POST) ? Should the message structure for create of a similarily inter-connected object be similar i.e through links ?? <br/>
By the way of an example, let us consider we want to create a Person object with a Parent field . Should the json message format sent to server thru POST (Post msg body) be like :-
{
name:'test',
age:12,
links:[
{
rel:'parent',
href:'/people/john'
}
]
} | 0 | [
2,
678,
358,
19,
760,
800,
3726,
3726,
31,
23,
7378,
20,
14,
635,
22,
15382,
360,
27,
760,
21,
2159,
704,
15,
30,
2885,
1815,
18,
125,
14,
2802,
2595,
3524,
140,
14,
924,
16,
184,
6271,
378,
44,
147,
20,
3501,
1480,
6203,
2566... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.