unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
PHP: Properly storing image names in MySQL DB
===
I am storing images name insid MySQL database. Everytime I perform an upload, I have it return a link back with the image name attached which then I extract the image name and saved to the database. I have corrections to some critical flaws but I am still facing issues of having blank spaces/ duplicate names inserted into my database even though I have established checkpoints.
How can I avoid duplication/blank spaces of file names?
Is there a better approach in storing names in DB?
![enter image description here][1]
Location of iamge inside webserver:
http://www.example.com/imageupload/uploads/medium/50038dc14afb7.jpg
Link in the browser:
http://www.example.org/imageupload/index.php?i=50038dc14afb7.jpg
PHP
<?
$images = retrieve_images();
insert_images_into_database($images);
function retrieve_images()
{
$images = explode(',', $_POST['i']);
return $images;
}
function insert_images_into_database($images)
{
if(!$images)//There were no images to return
return false;
$db = dbConn::getConnection();
foreach($images as $image)
{
$sql = "INSERT INTO `urlImage` (`image_name`) VALUES ( ? )";
$prepared = $db->prepare($sql);
$prepared->execute(array($image));
}
}
?>
[1]: http://i.stack.imgur.com/8WG6T.jpg | 0 | [
2,
13,
26120,
45,
7428,
25615,
1961,
1817,
19,
51,
18,
22402,
13,
9007,
800,
3726,
3726,
31,
589,
25615,
3502,
204,
19,
18,
1340,
51,
18,
22402,
6018,
9,
352,
891,
31,
2985,
40,
71,
8294,
15,
31,
57,
32,
788,
21,
3508,
97,
29,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you build an IntelliJ project from the command line?
===
I'm looking for the best way to build an IntelliJ project from command line. | 0 | [
2,
184,
107,
42,
1895,
40,
19,
4213,
9999,
669,
37,
14,
1202,
293,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
14,
246,
161,
20,
1895,
40,
19,
4213,
9999,
669,
37,
1202,
293,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Not getting the features of sdk version 15 while using the cutome title bar
===
My applications minSdkVersion is 15. So the buttons in the application will get a light blue color when the user touches it. Later i added a custom title for the application. After that my application components color is changed to orange when the user touches it. I found that it is the problem with the custom title. How to solve it. I need the features of sdk version 15. Please see how i added the custom title bar.
My Manifest.
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/CustomTheme">
My style used for the custome title bar (custom_style.xml)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomTheme" parent="android:Theme">
<item name="android:windowTitleSize">30dip</item>
</style>
</resources>
Activity code where it changes to the Custome title bar
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title);
My title bar layout(window_title.xml)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:background="#FF0000" >
<ImageView
android:id="@+id/header"
android:src="@drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="left"/>
<Switch
android:id="@+id/laodAutomatically"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MirrorLink auto-connect"
style="@android:style/Theme.Holo"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
| 0 | [
2,
52,
1017,
14,
967,
16,
13,
18,
43,
197,
615,
357,
133,
568,
14,
1077,
6651,
581,
748,
800,
3726,
3726,
51,
3767,
4232,
18,
43,
197,
10898,
25,
357,
9,
86,
14,
12861,
19,
14,
3010,
129,
164,
21,
471,
705,
1665,
76,
14,
415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP variable value in ColdFusion file
===
I have implemented a captcha on a ColdFusion page. I want the value of those PHP variable to validate the captcha submission by user. I am trying to do it by ajax in jQuery..but not getting any success. Here is the code:-
PHP Code:
<?php
session_start();
$word_1 = '';
for ($i = 0; $i < 4; $i++)
{
$word_1 .= chr(rand(97, 122));
}
for ($i = 0; $i < 4; $i++)
{
$word_2 .= chr(rand(97, 122));
}
$_SESSION['random_number'] = $word_1.' '.$word_2;
$dir = 'fonts/';
$image = imagecreatetruecolor(165, 50);
$font = "recaptchaFont.ttf";
$color = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
imagefilledrectangle($image, 0,0, 709, 99, $white);
imagettftext ($image, 22, 0, 5, 30, $color, $dir.$font, $_SESSION['random_number']);
header("Content-type: image/png");
imagepng($image);
$var = $word_1;
//echo "http://ed-s2:81/iucn_assets/custom/rangers/reCaptcha/get_captcha.php?var=".$var;
$word_1 = $_POST['firstRanNo'];
?>
ColdFusion file code(in jQuery to fetch PHP variable):
function change_captcha()
{
document.getElementById('captcha').src="http://ed-s2:81/iucn_assets/custom/rangers/reCaptcha/get_captcha.php?rnd=" + Math.random();
var getNo = random_no();
var num= "abc";
function random_no(){
var res="";
$.ajax
({
type:"POST",
data:{"firstRanNo":num},
url:"http://ed-s2:81/iucn_assets/custom/rangers/reCaptcha/get_captcha.php",
async:false,
success:function(result){
alert(result);
}
});
}
}
});
What may be the problem ?
| 0 | [
2,
13,
26120,
7612,
1923,
19,
1191,
9818,
3893,
800,
3726,
3726,
31,
57,
6807,
21,
13960,
1651,
27,
21,
1191,
9818,
2478,
9,
31,
259,
14,
1923,
16,
273,
13,
26120,
7612,
20,
7394,
1373,
14,
13960,
1651,
10923,
34,
4155,
9,
31,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to get fb user id if someone install app from other wall
===
I am new to facebook application.so,i am little confuse. First i will tell you what i do in my app.
I have create one app.Anybody install my app then i will post on his wall.
Now i tell you What i want?
If anybody click on his post and install our app then i want to store facebook id of user whose post refer by current user?
For example: Jack install our app.After install app we post app link,message etc on jack wall.After that Mark see the post on Jack wall and mark install the app.At that time i want Jack FB userid. it is possible? | 0 | [
2,
184,
20,
164,
13,
13478,
4155,
4924,
100,
737,
16146,
4865,
37,
89,
769,
800,
3726,
3726,
31,
589,
78,
20,
9090,
3010,
9,
656,
15,
49,
589,
265,
26465,
9,
64,
31,
129,
494,
42,
98,
31,
107,
19,
51,
4865,
9,
31,
57,
1600,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 to hide a HTML tag if the database value is NULL
===
I am using Dreamweaver's inbuilt PHP capabilities to build a small application. I am retrieving the data in a repeated ul, li structure which looks like this.
<ul>
<li>Client Name</li>
<li>Job Description</li>
<li>Year of Completion</li>
</ul>
Client Name and Job description will always have values and year of completion may have null values. If Year of Completion has null value the 'li' should not be displayed.
I am trying to do this with jQuery but looks complicated for me. Can I achieve this in PHP? | 0 | [
2,
487,
8190,
93,
20,
3077,
21,
13,
15895,
3383,
100,
14,
6018,
1923,
25,
16203,
800,
3726,
3726,
31,
589,
568,
1868,
458,
11937,
22,
18,
19,
8607,
13,
26120,
10209,
20,
1895,
21,
284,
3010,
9,
31,
589,
13,
6239,
3272,
8397,
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... |
Should be possible to be warned when a deprecated OSX API is used?
===
I'm working to an app using code written many time ago (project started for OSX 10.5) and continues to works fine.
Now the app is compatible with 10.6 or above but on Mountain Lion many API calls fill the system log console reporting deprecated API usage (eg `- (void)compositeToPoint:(NSPoint)aPoint operation:(NSCompositingOperation)op`)
Is it possible to analyze in some automated manner the code (for example at compile time) to determine all the deprecated calls? | 0 | [
2,
378,
44,
938,
20,
44,
6676,
76,
21,
121,
3515,
150,
1669,
13,
759,
396,
21,
2159,
25,
147,
60,
800,
3726,
3726,
31,
22,
79,
638,
20,
40,
4865,
568,
1797,
642,
151,
85,
1464,
13,
5,
21011,
373,
26,
13,
759,
396,
332,
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... |
getting name from blameble behaviour extension in Yii
===
By using [Blameble Behaviour][1] extension on Yii Framework I wanted to track the creator and updater.Here I am able to record the id of them.So I want to know how to get the name from that?
[1]: http://www.yiiframework.com/extension/blameable-behavior/ | 0 | [
2,
1017,
204,
37,
6149,
2854,
7727,
3896,
19,
7679,
49,
800,
3726,
3726,
34,
568,
636,
10754,
790,
2854,
7727,
500,
2558,
165,
500,
3896,
27,
7679,
49,
6596,
31,
417,
20,
792,
14,
9247,
17,
11100,
139,
9,
6836,
31,
589,
777,
20,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to embed the Spotify Play Button
===
**I need BETTER instructions on how to embed the Spotify Play button. "Copy embed code and paste on your blog site" just isn't detailed (something you yourself require from those asking questions) enough. I follow the directions and after pressing the "copy embed code" button, I go to my blog site which is hosted by WordPress and attempting to paste into the page is problematic** | 0 | [
2,
184,
20,
11911,
69,
14,
1999,
8612,
418,
5167,
800,
3726,
3726,
13,
1409,
49,
376,
574,
7650,
27,
184,
20,
11911,
69,
14,
1999,
8612,
418,
5167,
9,
13,
7,
19625,
11911,
69,
1797,
17,
640,
62,
27,
154,
8146,
689,
7,
114,
253... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
DynamoDB Conditional Checks on Arrays of Strings
===
Can I check if part of an element exists in an Array of Strings, or check if multiple elements exist in one query? So:
1) Does an element start with `'aaa:'` in the array `['aaa:1', 'bab:0', 'aab:1']`
2) Does the element `'aaa:1' OR 'aaa:0'` exist in the array `['aaa:1', 'bab:0','aab:1']`
If so, do not execute the API operation.
Is this possible? The Documentation isn't clear if UPDATE_ITEM is this robust or not. | 0 | [
2,
18120,
9007,
21206,
16602,
27,
7718,
18,
16,
7887,
800,
3726,
3726,
92,
31,
2631,
100,
141,
16,
40,
4520,
5636,
19,
40,
7718,
16,
7887,
15,
54,
2631,
100,
1886,
2065,
3182,
19,
53,
25597,
60,
86,
45,
137,
6,
630,
40,
4520,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
dataform validation before EditEnding event
===
I'm using DataForm with a ria domain services which uses a table called country. As the dataform doesn't automaticly adds a new country to the table after clicking Ok I've written code doing it in the EditEnding Event of the DataForm.
But why comes the validation of the user input after the EditEnding event?
If I add a new country without a name it should push up a validation error before entering EditEnding but at this time there are no validation errors. After the Event is fired I'm getting the validation error.
How can I use the automatic validation to make my code working?
private void CountryDataForm_EditEnding(object sender, DataFormEditEndingEventArgs e)
{
if (e.EditAction == DataFormEditAction.Commit)
{
if (CountryDataForm.Mode == DataFormMode.AddNew)
{
if (!CountryDataForm.ValidationSummary.HasErrors)
{
Country item = CountryDataForm.CurrentItem as Country;
item.CountryID = Guid.NewGuid();
GridData.SubmitChanges();
}
}
}
} | 0 | [
2,
1054,
4190,
27999,
115,
9392,
7601,
807,
800,
3726,
3726,
31,
22,
79,
568,
1054,
4190,
29,
21,
13,
2548,
4603,
687,
56,
2027,
21,
859,
227,
475,
9,
28,
14,
1054,
4190,
1437,
22,
38,
6715,
102,
10621,
21,
78,
475,
20,
14,
85... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
xstring, FP, evaluting
===
I try to write my own function to expand more variables to functions (>9)
instead of
\newcommand{\mycommand}[9]{CODE}
I wanted to write a command like this
\newcommand{\mycommandnew}[2]{CODE}
To call the function you have to call
\mycommandnew{werta|wertb|wertc}{1|2|3}
the arguments are therefor
werta should be 1
wertb should be 2
wertc should be 3
In the future i want to call multido 3 times, so that i ca make the assignments for numerical arguments.....
\multido{...}{3}{ASSIGNCODE}
(3 because of 3 arguments)
or in an for loop....
My first try is the following...
\documentclass[
12pt, % Schriftgröße
DIV10,
paper=A4, % Papierformat
final % Status des Dokuments (final/draft)
]{scrreprt}
\usepackage{scrpage2}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{datatool}
\usepackage{xstring}
\begin{document}
% Angabe für eine Funktion beispielsweise \newcommand{\meincommando}[2]{\StrRight{#1} {128}[\bsA]\StrRight{#2}{128}[\CsA]} % Dient als Test ohne Command... Angabe zweier Variablen....
\StrRight{AA|B|C}{128}[\bsA]
\StrRight{-0.004|-0.005|0.006}{128}[\csA]
%
\StrCount{\csA}{|}[\argcount] % Zähle Anzahl der Trennstriche (+1 = Anzahl der Variablen)
%\argcount \\ % Ausgabe
%
\StrPosition{\csA}{|}[\first] % Finde den ersten Trennstrich
\StrSplit{\csA}{\first}{\csA}{\csB} % Splitte die Variable
\StrLen{\csA}[\cal] % Ermittle die Länge
\FPupn{cal}{cal 1 - neg} % Subtrahiere den Trennstrich
\FPclip\cal\cal % Entferne unnötige Nullen (Ohne gehts nicht)
\StrLeft{\csA}{\cal}[\csA] % Gebe den Variablenwert aus....
\StrPosition{\bsA}{|}[\first] % Finde den ersten Trennstrich
\StrSplit{\bsA}{\first}{\bsA}{\bsB}
\StrLen{\bsA}[\bal]
\FPupn{bal}{bal 1 - neg}
\FPclip\bal\bal
\StrLeft{\bsA}{\bal}[\bsA] % Gebe den Variablennamen aus....
\chapter{Test}
%\verbtocs{\antislash}|\|
bsA: \bsA \\ csA: \csA \\ % Test des Outputs....
% my Idea....
\FPupn{\bsA}{\csA}
\AA
But it doesn't work, don't know why....
\end{document}
But it cant be done, why???
LG Goldnas
| 0 | [
2,
993,
11130,
15,
13,
12087,
15,
6805,
2377,
1203,
800,
3726,
3726,
31,
1131,
20,
2757,
51,
258,
1990,
20,
6073,
91,
12157,
20,
3719,
13,
5,
1,
518,
6,
700,
16,
13,
1,
2681,
16239,
1,
915,
16239,
1,
2558,
518,
500,
1,
9375,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Compile in ubuntu for use in windows 7
===
I have a `Windows 7` laptop with an `Ubuntu 12.04` installation on the same machine.
I am trying to compile a program from source (`VowPal Wabbit`). I tried using `Cygwin` but had no luck getting it to work. I ended up installing `Ubuntu 12.04` to get access to get a functioning compiler.
It worked on the `Ubuntu` side but I am curious if there is a way to bring the compiled files over to `Windows` as that's where I actually do most of my work.
Any suggestions? | 0 | [
2,
26561,
19,
287,
12968,
2473,
26,
275,
19,
1936,
453,
800,
3726,
3726,
31,
57,
21,
13,
1,
27508,
18,
453,
1,
12294,
29,
40,
13,
1,
4502,
1020,
2473,
390,
9,
3277,
1,
7758,
27,
14,
205,
1940,
9,
31,
589,
749,
20,
26561,
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... |
[JSF]How to read HTTP error description
===
how to read from an error page the error description? This information are present in FacesContext? I want read this information from a managed bean.
Example:
http://postimage.org/image/mz3lrwpqf/
I read all this info(type,Description,exception,..) from a managed bean? So they are printed on a page with my formatting?
Thanks for help
| 0 | [
2,
636,
728,
18,
410,
500,
1544,
20,
1302,
7775,
7019,
5318,
800,
3726,
3726,
184,
20,
1302,
37,
40,
7019,
2478,
14,
7019,
5318,
60,
48,
676,
50,
734,
19,
4904,
1126,
11969,
60,
31,
259,
1302,
48,
676,
37,
21,
1471,
15322,
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... |
Java application connecting to replicated mysql databases
===
We have a java application that connects to mysql database. We are now going to change the database to replication mode by adding another DB instance. The idea is to provide DB high availability. The application should be able to switch to the standby DB in case it is unable to connect to the main database. One way to implement this is to maintain 2 sets of connections, keep monitoring both the databases and in case the app is unable to connect to the main DB, switch to the next set of connections and continue.
My question is is there a transparent way of switching the connections through mysql connector itself? OR is there any utility app that can sit between my app and the mysql connector and do this job? | 0 | [
2,
8247,
3010,
6440,
20,
22156,
43,
51,
18,
22402,
6018,
18,
800,
3726,
3726,
95,
57,
21,
8247,
3010,
30,
8534,
20,
51,
18,
22402,
6018,
9,
95,
50,
130,
228,
20,
753,
14,
6018,
20,
23841,
3740,
34,
4721,
226,
13,
9007,
4851,
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... |
Height of string when unicode text is in the string in iPhone
===
When I try to use this function having unicode text, it returns wrong height as its calculating height according the font size but emoticons are coming bigger and taking more height than without unicode.
> [text sizeWithFont:[UIFont systemFontOfSize:12.0] constrainedToSize:CGSizeMake(233.0f, 999.0f) lineBreakMode:UILineBreakModeWordWrap];
can real height be calculated having unicodes in the string? | 0 | [
2,
2947,
16,
3724,
76,
28010,
1854,
25,
19,
14,
3724,
19,
21024,
800,
3726,
3726,
76,
31,
1131,
20,
275,
48,
1990,
452,
28010,
1854,
15,
32,
4815,
1389,
2947,
28,
82,
22937,
2947,
496,
14,
9978,
1072,
47,
3579,
9440,
4710,
50,
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... |
I want my output to be on beowser rather than console. How do i shift the code to view from controller
===
This code is working correctly. The problem is everything is getting printed on console. I want to show it on browser. How to do that? Do i need a template called create.html.erb. How to access the variables and basically the whole controller code in the view? Please help!!
require File.join(Rails.root, 'config/myconfig')
puts Rails.root
class UsersController < ApplicationController
layout 'admin'
#require File.expand_path('././myconfig') #=> C:/ruby/require/expand_path/ok.rb loaded
def list
@users = User.all
end
def new
@user = User.new
end
def create
if EntityList::ENTITIES.include?(params[:user][:entity_name])
puts " Entered entity is: "
@entity = params[:user][:entity_name]
@var = EntityList::RELATION_SHIPS[@entity.to_sym]
puts "Entered entity is related to"
if(@var.nil?)
#do nothing
else
puts @var
checking(@var)
end
#@var.split(" ")
#@len = @var.length
#puts @var[0]
#puts @var[1]
#puts @var[1]
#@var.each {|@var| puts @var}
#for index in 0 ... @var.size
# puts EntityList::RELATION_SHIPS[@var[index].to_sym]
# end
# @var.each_with_index {|val, index| puts "#{val} => #{index}" }
#@var2= EntityList::RELATION_SHIPS[@var.to_sym]
#puts "Entity2 is related to"
#puts @var2
flash[:notice] = "The entity you entered is valid!!"
puts "Before Redirection"
redirect_to(:action => "helloworld")
puts "After redirection"
puts "done"
else
redirect_to(:action => "SorryPage")
end
end
def checking(array)
array.split(" ")
for index2 in 0 ... array.size
if EntityList::RELATION_SHIPS[array[index2].to_sym].nil?
# do nothing
else
puts EntityList::RELATION_SHIPS[array[index2].to_sym]
some = EntityList::RELATION_SHIPS[array[index2].to_sym]
checking(some)
end
end
end
end | 0 | [
2,
31,
259,
51,
5196,
20,
44,
27,
44,
3581,
4104,
864,
119,
8650,
9,
184,
107,
31,
4471,
14,
1797,
20,
1418,
37,
9919,
800,
3726,
3726,
48,
1797,
25,
638,
12044,
9,
14,
1448,
25,
796,
25,
1017,
5317,
27,
8650,
9,
31,
259,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SYSTEM_UI_FLAG_LOW_PROFILE doesn't work
===
I have one `Activity` which has content view having its root view as **`FrameLayout`**, i want to hide bottom bar's soft keys for which i have added following code inside onCreate of myActivity but it doesn't effect anything.
FrameLayout frameLayout = (FrameLayout)this.findViewById(R.id.myframe);
frameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
Is there any permission or extra code which i need to add?
Thanks in advance :)
**Note** : I am trying this on Android HoneyComb | 0 | [
2,
329,
1,
5661,
1,
22868,
1,
4121,
1,
14503,
1437,
22,
38,
170,
800,
3726,
3726,
31,
57,
53,
13,
1,
19348,
1,
56,
63,
2331,
1418,
452,
82,
5900,
1418,
28,
13,
1409,
1,
8361,
4414,
1320,
1,
1409,
15,
31,
259,
20,
3077,
2129,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does AppFabric Caching Support Persistance for WCF Durable Service?
===
We have Durable Service which is configured to use SqlPersistenceProvider. For each and every call to the WCF Durable service is taking around 3 to 4 seconds totally out of which, just 200 ms is actual processing time. rest of the timing are solely used for Serizlization (its big object) or Saving the big object to sqlserver.
Anyone, Please guide me to set up AppFabric caching 1.1 to use instead of default sqlpersistenceprovider?
Is this supported by AppFabric ? I am very new to AppFabric.
Attached is the trace screenshot showing the processing time 200 ms <br>
SQL Server saving , Loading time is 3,2 seconds respectively.
![enter image description here][1]
[1]: http://i.stack.imgur.com/3Agu6.png | 0 | [
2,
630,
4865,
14364,
2988,
1658,
7192,
555,
22084,
2416,
26,
11801,
410,
26901,
365,
60,
800,
3726,
3726,
95,
57,
26901,
365,
56,
25,
28895,
20,
275,
4444,
255,
7490,
702,
2940,
26735,
139,
9,
26,
206,
17,
352,
645,
20,
14,
11801,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WindowBuilder Pro: i18n with Factory
===
I redisign my localisation to be able to use it within WindowBuilder Pro.
The problem is, since I moved the `Messages.getString()` part out of my Frame class WindowBuilder Pro does not display the Locales which are available.
This is in my Frame class:
mnData = MenuFactory.createJMenu("Mainframe.mnData.text"); //$NON-NLS-1$
MenuFactory:
/**
* @wbp.factory
* @wbp.factory.parameter.source messageKey The KeyString mentioned in the language file
*/
public static JMenu createJMenu(String messageKey) {
JMenu menu = new JMenu(Messages.getString(messageKey));
return menu;
}
The Messages class was created by WindowBuilder.
public class Messages {
// //////////////////////////////////////////////////////////////////////////
//
// Constructor
//
// //////////////////////////////////////////////////////////////////////////
private Messages() {
// do not instantiate
}
// //////////////////////////////////////////////////////////////////////////
//
// Bundle access
//
// //////////////////////////////////////////////////////////////////////////
private static final String BUNDLE_NAME = "language.messages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = loadBundle();
private static ResourceBundle loadBundle() {
return ResourceBundle.getBundle(BUNDLE_NAME);
}
// //////////////////////////////////////////////////////////////////////////
//
// Strings access
//
// //////////////////////////////////////////////////////////////////////////
public static String getString(String key) {
try {
ResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;
return bundle.getString(key);
} catch (MissingResourceException e) {
return "!" + key + "!";
}
}
}
The other Question is, how I switch the locale here (without vm-Arguments). I considered to change `ResourceBundle.getBundle(BUNDLE_NAME)` to `ResourceBundle.getBundle(BUNDLE_NAME, actualLocale)` (and refresh the Components) but I think this won't work together with WindowBuilder Pro.
| 0 | [
2,
1463,
20904,
895,
45,
31,
1087,
103,
29,
3129,
800,
3726,
3726,
31,
402,
49,
11255,
51,
375,
4330,
20,
44,
777,
20,
275,
32,
363,
1463,
20904,
895,
9,
14,
1448,
25,
15,
179,
31,
385,
14,
13,
1,
3845,
18,
14465,
9,
3060,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to call previous page without ajax
===
Hi all i am developing an application for blackberr5 which does not support ajax. By using `window.location.href = "MainMenu.html";` I am navigating from one html into another. Now in MainMenu.html file I have header as :
<div data-role="header" align="center">
<a href="#" data-rel="back" data-icon="arrow-l">Back</a>
<h1>Test.html</h1>
<a href="MainMenu.html" data-icon="grid">Menu</a>
</div>
But when I click on back it is not going to previous page. And if I use `$.mobile.changePage('MainMenu.html');` then back button works fine. Then for blackberry5 how to handle back button. Any suggestion will be appreciated. | 0 | [
2,
184,
20,
645,
1158,
2478,
366,
20624,
800,
3726,
3726,
4148,
65,
31,
589,
3561,
40,
3010,
26,
319,
2102,
139,
264,
56,
630,
52,
555,
20624,
9,
34,
568,
13,
1,
27508,
9,
19032,
9,
252,
14057,
800,
13,
7,
6232,
755,
291,
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... |
Getting detected data from the UITextView
===
I am using UITextView in my application.For textview i am using data detection as follow:
UITextView *tv=[[UITextView alloc]init];
tv.dataDetectorTypes=UIDataDetectorTypePhoneNumber;
Its fine . It is detecting the phone no. But I want to extract this phone no into another variable. Is there any provision to get detected data from UITextView ? | 0 | [
2,
1017,
11968,
1054,
37,
14,
13,
5661,
11969,
4725,
800,
3726,
3726,
31,
589,
568,
13,
5661,
11969,
4725,
19,
51,
3010,
9,
1106,
1854,
4725,
31,
589,
568,
1054,
11643,
28,
1740,
45,
13,
5661,
11969,
4725,
1637,
1709,
3726,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Share javascript and stylesheet files
===
Is it possible to share stylesheets and javascript files between projects in the same visual studio solution. I want to create sort of a base for all my commonly used scripts and stylesheets. So that i can only reference them.
| 0 | [
2,
1891,
8247,
8741,
17,
1034,
17627,
6488,
800,
3726,
3726,
25,
32,
938,
20,
1891,
1034,
17627,
18,
17,
8247,
8741,
6488,
128,
2314,
19,
14,
205,
3458,
1120,
4295,
9,
31,
259,
20,
1600,
2058,
16,
21,
1000,
26,
65,
51,
2524,
147... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Share URL of video in lightbox, instead of page's URL
===
I have a page with a series of links to YouTube videos that display in a lightbox when clicked. I'm using prettyPhoto.
On the lightbox are share links - Facebook, Twitter, and such. Unfortunately the default behaviour of these share links is to share the whole page - I want to share the URL of the YouTube video specifically.
The HTML output is customisable, as a variable in the prettyPhoto JS, so I think what I need to do is take the URL you've just clicked on (which obviously PP knows, because it can play the video) and stick it in the share link.
I'm not great at JS, so hopefully this is a relatively simple thing! I'm even hoping PP has a variable somewhere in the code already that stores this info, and I can somehow just add it into the HTML variable... but don't know how!
Thanks :) | 0 | [
2,
1891,
287,
6362,
16,
763,
19,
471,
5309,
15,
700,
16,
2478,
22,
18,
287,
6362,
800,
3726,
3726,
31,
57,
21,
2478,
29,
21,
231,
16,
6271,
20,
7330,
6610,
30,
3042,
19,
21,
471,
5309,
76,
15802,
9,
31,
22,
79,
568,
1772,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In the format of date and time in php, the timing is not correct
===
when i am fetching the date n time using this function
date("d-M-Y h:i A");
it gives the wrong timing.
the current correct timing is 04.30 pm but my function is showing 11.00 am.
that means showing 5.30 hours early.
plz help me out to fetch the correct timing. | 0 | [
2,
19,
14,
2595,
16,
1231,
17,
85,
19,
13,
26120,
15,
14,
11812,
25,
52,
4456,
800,
3726,
3726,
76,
31,
589,
18312,
68,
14,
1231,
13,
103,
85,
568,
48,
1990,
1231,
5,
7,
43,
8,
79,
8,
93,
746,
45,
49,
21,
7,
6,
73,
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... |
Align contents to center
===
How to make the contents of a div aligned to center if the width of the outer div is given in percent?
I have the following code:
<div class='container'>
//contents
</div>
When I give the container's width in `px` it works fine but i have to define it in `percent` for all resolutions where it doesnt work..How can I do this? | 0 | [
2,
23389,
8478,
20,
459,
800,
3726,
3726,
184,
20,
233,
14,
8478,
16,
21,
13,
12916,
13,
12740,
20,
459,
100,
14,
9456,
16,
14,
4896,
13,
12916,
25,
504,
19,
2091,
60,
31,
57,
14,
249,
1797,
45,
13,
1,
12916,
718,
3726,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Selenim RC with safari issues - Selenium::WebDriver::Error::UnknownError: Executor has not been started yet
===
I am trying to open safari using Selenium RC.
However, Safari instance is created and stays in Requesting connection mode
(SafariDriver requesting connection at ws://localhost:3078/wd).
require "selenium-webdriver"
caps = Selenium::WebDriver::Remote::Capabilities.safari
browser = Selenium::WebDriver.for :remote, :url=>"http://localhost:4444/wd/hub", :desired_capabilities=>caps
above stuff hung up and fails with -
Selenium::WebDriver::Error::UnknownError: Executor has not been started yet (java.lang.IllegalStateException)
from [remote server] com.google.common.base.Preconditions(Preconditions.java):145:in `checkState'
from [remote server] org.openqa.selenium.safari.SafariDriverCommandExecutor(SafariDriverCommandExecutor.java):123:in `execute'
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):432:in `execute'
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):140:in `startSession'
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):95:in `<init>'
from [remote server] org.openqa.selenium.safari.SafariDriver(SafariDriver.java):33:in `<init>'
from [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):-2:in `newInstance0'
from [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):39:in `newInstance'
from [remote server] sun.reflect.DelegatingConstructorAccessorImpl(DelegatingConstructorAccessorImpl.java):27:in `newInstance'
from [remote server] java.lang.reflect.Constructor(Constructor.java):513:in `newInstance'
from [remote server] java.lang.Class(Class.java):355:in `newInstance0'
from [remote server] java.lang.Class(Class.java):308:in `newInstance'
from [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):61:in `callConstructor'
from [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):52:in `newInstance'
from [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):197:in `call'
from [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):1:in `call'
... 4 levels...
from [remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):908:in `run'
from [remote server] java.lang.Thread(Thread.java):680:in `run'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/default.rb:59:in `request'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:92:in `create_session'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/common/driver.rb:33:in `new'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/common/driver.rb:33:in `for'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver.rb:65:in `for'
from (irb):7
| 0 | [
2,
13,
18,
20110,
1660,
16462,
29,
25055,
1549,
13,
8,
23027,
14311,
45,
45,
14113,
21752,
45,
45,
29992,
45,
45,
1020,
2929,
29992,
45,
1396,
17194,
2153,
63,
52,
74,
373,
768,
800,
3726,
3726,
31,
589,
749,
20,
368,
25055,
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... |
Click on LiveTile doesn't show/run my app
===
In a background agent I create (or update) one of application live tiles and this works as expected.
Problem is that when I click this live tile my app is not "restarted" nor "shown".
What's wrong?
I attach small part of the code, but ask for more is you need.
**MAIN PAGE**
public partial class MainPage : PhoneApplicationPage
{
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
}
public MainPage()
{
InitializeComponent();
// Runs background agent: code is simplified
StartAgent();
}
}
**BACKGROUND AGENT**
public class TileAgent : ScheduledTaskAgent
{
protected override void OnInvoke(ScheduledTask task)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
Vars.UpdateTiles();
});
NotifyComplete();
}
}
**STATIC CLASS**
public class Vars
{
private static Uri uri = new Uri(
"/MainPage.xaml?tile",
UriKind.RelativeOrAbsolute);
private static RadExtendedTileData ExtendedData
{
get
{
return new RadExtendedTileData()
{
VisualElement = frontTile,
BackVisualElement = backTile,
};
}
}
public static void UpdateTiles()
{
// I perform some task here
// Then create/update live tile
PinToStart();
}
public static void PinToStart()
{
Telerik.Windows.Controls.LiveTileHelper.CreateOrUpdateTile(
ExtendedData, uri);
}
}
| 0 | [
2,
10840,
27,
515,
9802,
1437,
22,
38,
298,
118,
3169,
51,
4865,
800,
3726,
3726,
19,
21,
2395,
2267,
31,
1600,
13,
5,
248,
11100,
6,
53,
16,
3010,
515,
14836,
17,
48,
693,
28,
1727,
9,
1448,
25,
30,
76,
31,
10840,
48,
515,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
If a unicode character displays in a web safe font, is it safe to use
===
Sorry if this is a dumb question but searching around has hurt my brain so I'd like someone to clear this up.
Say I won't to use a unicode character. Say one of the arrows. I'm using a font that is web safe so will be on 99% of computers (For example arial, georgia etc). I paste the symbol into my editor, press save and preview on the browser and it shows. Is that it? will this be safe as long as everyone has the same font?
Should I paste the character entity instead to make sure that it doesn't mess with code?
Thanks! | 0 | [
2,
100,
21,
28010,
925,
9412,
19,
21,
2741,
1834,
9978,
15,
25,
32,
1834,
20,
275,
800,
3726,
3726,
1875,
100,
48,
25,
21,
9317,
1301,
47,
5792,
140,
63,
1500,
51,
1964,
86,
31,
22,
43,
101,
737,
20,
1207,
48,
71,
9,
395,
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... |
Passing strings from R to C++
===
I am trying to use some C++ functions in R. I have placed all my C++ functions in a DLL.
My R code is
#load the c++ DLL
dyn.load("PathToDLL\\MyCPlusPlus.dll")
#call the C++ function from R
a <- .C("MyFunc",as.character("Hello world"))
my C++ DLL function is
char ** _stdcall MyFunc(char ** strInput)
{
//display the string received from R
MessageBox(NULL, LPCWSTR(*strInput), L"C++ program", NULL);
return strInput;
}
The problem I am having is that the strings that I pass from R to C++ are mangled when displayed in the message box. Has anyone had experience with passing strings to C++ from R and if so, can you point me in the right direction?
Thanks | 0 | [
2,
2848,
7887,
37,
761,
20,
272,
20512,
800,
3726,
3726,
31,
589,
749,
20,
275,
109,
272,
20512,
3719,
19,
761,
9,
31,
57,
1037,
65,
51,
272,
20512,
3719,
19,
21,
13,
43,
211,
9,
51,
761,
1797,
25,
6926,
8294,
14,
272,
20512,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 MVC3 C# I have this error Member modifier 'public' must precede the member type and name
===
net newbie here.
I have a problem with my viewresult for My index page. I have searched here and on google for the solution. So here is My code.
public ViewResult Index()
{
var model = from p in db.Projects where p.UserName == User.Identity.Name select p;
return View(model);
}
And this is MY error: Member modifier 'public' must precede the member type and name.
What am I doing wrong?
Thanks in advance!
| 0 | [
2,
28,
306,
9,
2328,
307,
8990,
240,
272,
5910,
31,
57,
48,
7019,
322,
7226,
16292,
13,
22,
12259,
22,
491,
27466,
14,
322,
1001,
17,
204,
800,
3726,
3726,
4275,
78,
5893,
235,
9,
31,
57,
21,
1448,
29,
51,
1418,
29955,
26,
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... |
Is Google App Engine Cost Effective?
===
I'm making a small mobile game where the player can choose to connect to facebook and in that case, see his friend's score and statistics.
I'm trying to calculate in advance how much does GAE will cost per user and will the income from ads will cover these expenses.
* The player can update his profile statistics, happens whenever a higher stat was achieved (higher score, etc...). There are a total of 6 statistics the game keep track of.
* The player can request to view friends profiles
Assuming an average player that plays for 30 minutes per day as a basis for calculations, and has 5 friends playing the game:
* The total number of updates to his own profile doesn't exceed 300 life.
* The number of profile requests is about 100/month (I cache profiles using memcache for 2 hours)
* According to GAE, the datastore pricing are $0.10/100K write ops and $0.07/100K read ops.
* The data structure of a player profile, consists of 7 fields and requires 16 ops to store/retrieve it.
The monthly cost per player:
* Write - [ (300 * 16) / 100000 ] * $0.10 = $0.0048 life
* Read - [ (10 * 10 * 16) / 100000 ] * $0.07 = $0.0016 monthly // 10 profile views per day times 10 days per month
So the average monthly cost per user, assuming the retention is 3 months will be $0.0032 and that consists of the datastore api pricing alone.
Assuming the retention is 3 months, the total play time per day is 30 minutes and the player plays for 10 days per month.
Does the earning from advertisements will cover the $0.0036/month cost ?
I will appreciate any insights or tips.
Thanks! | 2 | [
2,
25,
8144,
4865,
1406,
1516,
3140,
60,
800,
3726,
3726,
31,
22,
79,
544,
21,
284,
3241,
250,
113,
14,
517,
92,
3538,
20,
6379,
20,
9090,
17,
19,
30,
610,
15,
196,
33,
860,
22,
18,
1618,
17,
5818,
9,
31,
22,
79,
749,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
FB PHP SDK and mod_rewrite: getUser returns 0
===
I am using the Facebook PHP SDK in order to allow users to log in to my site using Facebook.
In my test below (assume the URL is http://mysite.com/test/fbtest.php),
<!-- language: lang-php -->
<?php
require_once("facebook.php");
$fb = new Facebook(array('appId' => 'APP_ID', 'secret' => 'APP_SECRET'));
$fbuser = false;
$fbuserid = $fb->getUser();
$fblogin = $fb->getLoginUrl(array(
'redirect_uri' => "http://{$_SERVER['HTTP_HOST']}/test/fbtest.php"));
if($fbuserid)
{
try
{
$fbuser = $fb->api("/me");
print_r($fbuser);
echo "<br/>\n";
}
catch (FacebookApiException $e)
{
$fbuser = false;
$fbuserid = 0;
}
}
if(!$fbuser)
echo "<a href=\"$fblogin\">FB Login</a>\n";
?>
This seems to work as expected. However, when I add the following rewrite rule,
RewriteRule ^/FBtest/(.*)$ http://%{HTTP_HOST}/test/fbtest.php$1
Then change my login redirect to the following,
<!-- language: lang-php -->
$fblogin = $fb->getLoginUrl(array(
'redirect_uri' => "http://{$_SERVER['HTTP_HOST']}/FBtest/"));
Then `$fb->getUser()` always returns 0. I feel that I am missing something important. | 0 | [
2,
13,
13478,
13,
26120,
13,
18,
43,
197,
17,
7226,
1,
99,
23716,
45,
164,
16704,
4815,
713,
800,
3726,
3726,
31,
589,
568,
14,
9090,
13,
26120,
13,
18,
43,
197,
19,
389,
20,
1655,
3878,
20,
6738,
19,
20,
51,
689,
568,
9090,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
onCreate always called if navigating back with intent
===
I have an activity called HomeActivity that has a SurfaceView and shows a camera preview picture. This activity is quiet heavy and feels slow if you are starting/restarting it.
So I made some investigations and found out, that somehow always the onCreate method is being called. In my opinion this should not happen if the Activity has already been started?
The [documentation] says :
Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity's previously frozen state, if there was one.
Always followed by onStart().
Here is the method, that handles going back:
protected void gotoHome() {
final Intent intent = new Intent(SomeOtherActivity.this, HomeActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
[documentation]: http://developer.android.com/reference/android/app/Activity.html | 0 | [
2,
27,
6037,
1373,
550,
227,
100,
1775,
13227,
1880,
97,
29,
6936,
800,
3726,
3726,
31,
57,
40,
2358,
227,
213,
19348,
30,
63,
21,
1490,
4725,
17,
1285,
21,
3336,
16121,
2151,
9,
48,
2358,
25,
2401,
1278,
17,
5121,
2276,
100,
42... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to make several custom looks of jScrollbar in Synth LaF?
===
In our application we have to use css to customize the look of Swing components. Right now we have some manually written css engine, but it is slow and requires a lot of additional code to apply one more css file. So now we try to use Synth look and feel to make ui changes more *native*.
For the most of components we set names and use them for binding to styles. But also there are several scrollbars, which have different css and though different look. The only way to affect scrollbars' thumb is to user region ScrollBarThumb, we can't set a name to it as it is not a JComponent. Due to using region instead of name it's not possible to have different looking thumbs. Is there any workaround? | 0 | [
2,
184,
20,
233,
238,
5816,
1879,
16,
487,
3862,
8694,
1850,
19,
13973,
13,
21645,
60,
800,
3726,
3726,
19,
318,
3010,
95,
57,
20,
275,
272,
18,
18,
20,
5816,
2952,
14,
361,
16,
5587,
5090,
9,
193,
130,
95,
57,
109,
23671,
642... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Django, nose and selenium .. the initial state error
===
I have installed everything for Django 1.3.1 : `django-nose` , `django-nose-selenium` , and set the test-runner as well:
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
**First** it seems that by running the command: `$./manage.py test`, Django's internal test starts to run instead of Nose.
Second, by running `$nosetests` I get this :
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium = noseselenium.plugins:SeleniumPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin djangoliveserver = noseselenium.plugins:DjangoLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin cherrypyliveserver = noseselenium.plugins:CherryPyLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium_fixtures = noseselenium.plugins:SeleniumFixturesPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
Any Idea ?? | 0 | [
2,
3857,
14541,
15,
2689,
17,
23027,
14311,
13,
9,
9,
14,
2104,
146,
7019,
800,
3726,
3726,
31,
57,
4066,
796,
26,
3857,
14541,
137,
9,
240,
9,
165,
13,
45,
13,
1,
14365,
14541,
8,
22626,
1,
13,
15,
13,
1,
14365,
14541,
8,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I query an XDocument with a 'path'?
===
I have an XDocument that I need to get values from.
I can be supplied with a 'path', e.g. "/path/to/element/I/want" but I don't know how to query the XDocument object with this. | 0 | [
2,
184,
92,
31,
25597,
40,
993,
28132,
29,
21,
13,
22,
8353,
22,
60,
800,
3726,
3726,
31,
57,
40,
993,
28132,
30,
31,
376,
20,
164,
4070,
37,
9,
31,
92,
44,
7949,
29,
21,
13,
22,
8353,
22,
15,
13,
62,
9,
263,
9,
13,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Saving binary xna, problems saving certain numbers
===
I'm a bit confused, here's what I've done so far:
public class SaveLoadSystem
{
String SAVEFILENAME = "gameSave2.sav";
Stats stats = new Stats();
GameProgressInformation gameInfo = new GameProgressInformation();
public SaveLoadSystem()
{
IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForApplication();
// open isolated storage, and write the savefile.
if (savegameStorage.FileExists(SAVEFILENAME))
{
IsolatedStorageFileStream fs = null;
try
{
fs = savegameStorage.OpenFile(SAVEFILENAME, System.IO.FileMode.Open);
}
catch (IsolatedStorageException e)
{
}
if (fs != null)
{
byte[] saveBytes = new byte[256];
int count = fs.Read(saveBytes, 0, 256);
if (count > 0)
{
for (int i = 0; i < stats.GetLevels; i++)
{
GameProgressInformation.LevelUnlockInfo levelInfo = new GameProgressInformation.LevelUnlockInfo();
// Think line below is wrong.
levelInfo.score = saveBytes[i * 4];
GameProgressInformation.levels.Add(levelInfo);
}
fs.Close();
}
}
}
else
{
for (int i = 0; i < stats.GetLevels; i++)
{
GameProgressInformation.LevelUnlockInfo levelInfo = new GameProgressInformation.LevelUnlockInfo();
GameProgressInformation.levels.Add(levelInfo);
}
}
}
public void Save()
{
// Save the game.
IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForApplication();
// open isolated storage, and write the savefile.
IsolatedStorageFileStream fs = null;
fs = savegameStorage.OpenFile(SAVEFILENAME, System.IO.FileMode.Create);
if (fs != null)
{
for (int i = 0; i < GameProgressInformation.levels.Count; i++)
{
byte[] scoreBytes = System.BitConverter.GetBytes(GameProgressInformation.levels[i].score);
fs.Write(scoreBytes, 0, scoreBytes.Length);
}
fs.Close();
}
}
}
My confusion is how when loading to get all the necessary binary data but also ensure the correct data is assigned to the correct level. I'm thinking it would have to be taken in sets of 4. Any help is appreciated. | 0 | [
2,
7599,
14171,
993,
325,
15,
1716,
7599,
1200,
2116,
800,
3726,
3726,
31,
22,
79,
21,
1142,
4230,
15,
235,
22,
18,
98,
31,
22,
195,
677,
86,
463,
45,
317,
718,
2079,
8294,
10724,
13,
1,
3724,
2079,
16877,
7259,
800,
13,
7,
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... |
jQuery - Sticky header and animated logo when scrolling
===
I've have a div with id="header" with another div id="logo" ("position:absolute") inside witch is higher than the header div is.
When scrolling down the page I want to stick the header to the top of the window - no problem so far - **AND** slide the logo to top -125px so, that only a small part of the logo is visible.
Sliding up when scrolling down causes no error, but when I scroll back to the top I have a big delay sliding the #logo back to its original positon.
I hope you can help me.
Greets
jQuery:
var top = jQuery('#header').offset().top;
jQuery(window).scroll(function() {
if(jQuery(this).scrollTop() > top) {
jQuery('#header').addClass('header_fixed');
jQuery('#content').addClass('content_fixed');
} else {
jQuery('#header').removeClass('header_fixed');
jQuery('#content').removeClass('content_fixed');
}
if(jQuery('#header').hasClass('header_fixed')) {
jQuery('#logo').animate({top:'-125px'}, 500);
} else {
jQuery('#logo').animate({top:'0px'}, 500);
}
});
| 0 | [
2,
487,
8190,
93,
13,
8,
19087,
157,
106,
17,
5784,
6449,
76,
13,
28166,
800,
3726,
3726,
31,
22,
195,
57,
21,
13,
12916,
29,
4924,
3726,
7,
1743,
106,
7,
29,
226,
13,
12916,
4924,
3726,
7,
5567,
111,
7,
13,
5,
7,
9339,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
using json-framework for iphone
===
I'm trying to read my json data, but it crashes.
NSString *hostStr = @"http://www.myIP.com/notices.php";
NSLog(@"%@",hostStr);
NSData *dataURL = [NSData dataWithContentsOfURL: [ NSURL URLWithString: hostStr ]];
//NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding];
NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding];
id object = [serverOutput JSONValue];
NSMutableDictionary *dictionary = [object JSONRepresentation];
NSLog(@"serverOutput %@", serverOutput);
NSLog(@"Dictionary %@", dictionary);
I got,
2012-06-27 12:47:51.138 usualBike[1520:f803] serverOutput [{"id":"128","title":"Usual Bike llega a Tres Cantos"},{"id":"127","title":"Sol y Bicis "},{"id":"126","title":"Usual Bike reduce los tiempos de espera"}]
2012-06-27 12:47:51.139 usualBike[1520:f803] Dictionary [{"id":"128","title":"Usual Bike llega a Tres Cantos"},{"id":"127","title":"Sol y Bicis "},{"id":"126","title":"Usual Bike reduce los tiempos de espera"}]
Should dictionary be the same than serverOutput?
Now I add this:
for (id key in [dictionary allKeys]) {
NSLog(@"key: %@, value: %@", key, [dictionary objectForKey:key]);
}
And it crashes:
2012-06-27 12:51:40.652 usualBike[1550:f803] -[__NSCFString allKeys]: unrecognized selector sent to instance 0x88683f0
2012-06-27 12:51:40.653 usualBike[1550:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString allKeys]: unrecognized selector sent to instance 0x88683f0'
*** First throw call stack:
(0x13e7022 0x1578cd6 0x13e8cbd 0x134ded0 0x134dcb2 0x2b2a 0xf8a1e 0x1140a9 0x113edd 0x1124aa 0x11234f 0x113e14 0x13e8e99 0x3414e 0x340e6 0x25c4bd 0x13e8e99 0x3414e 0x340e6 0xdaade 0xdafa7 0xdab13 0x25ec48 0x13e8e99 0x3414e 0x340e6 0xdaade 0xdafa7 0xda266 0x593c0 0x595e6 0x3fdc4 0x33634 0x12d1ef5 0x13bb195 0x131fff2 0x131e8da 0x131dd84 0x131dc9b 0x12d07d8 0x12d088a 0x31626 0x1f8d 0x1ef5)
terminate called throwing an exception(lldb)
How can I read the json data?
thank you in advance
| 0 | [
2,
568,
487,
528,
8,
8361,
3783,
26,
21024,
800,
3726,
3726,
31,
22,
79,
749,
20,
1302,
51,
487,
528,
1054,
15,
47,
32,
21563,
9,
13,
2172,
11130,
1637,
11694,
9729,
800,
13,
1,
7,
21127,
6903,
6483,
9,
915,
4307,
9,
960,
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... |
Archiving using Docs API truncates file name and doesn't archive hidden sheets
===
When archiving documents using Google Docs API it truncates the file name to around 50 characters and doesn't archive any hidden sheets. Is there anything that can be done about these two serious shortcomings? | 0 | [
2,
13,
25328,
68,
568,
9765,
18,
21,
2159,
22328,
160,
3893,
204,
17,
1437,
22,
38,
9250,
3689,
8801,
800,
3726,
3726,
76,
13,
25328,
68,
4374,
568,
8144,
9765,
18,
21,
2159,
32,
22328,
160,
14,
3893,
204,
20,
140,
1222,
1766,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Error deploying spring and jax-ws application in jboss server
===
I'm getting this error when I deploying spring+JAX-WS application in jboss server 6.1.0.
09:14:38,175 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot create inner bean '(inner bean)' of type [org.jvnet.jax_ws_commons.spring.SpringService] while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of <bootloader>) for the field's resolved type, loader constraint violation: when resolving field "DATETIME" the class loader
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230) [:2.5.6]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) [:2.5.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [:2.5.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [:2.5.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [:2.5.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [:2.5.6]
at java.security.AccessController.doPrivileged(Native Method) [:1.7.0_05]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [:2.5.6]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [:2.5.6]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [:2.5.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [:2.5.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [:2.5.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [:2.5.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [:2.5.6]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [:2.5.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [:2.5.6]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [:2.5.6]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [:2.5.6]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [:2.5.6]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3369) [:6.1.0.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3828) [:6.1.0.Final]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.1.0.Final]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.1.0.Final]
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:476) [:6.1.0.Final]
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.1.0.Final]
at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.1.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0_05]
at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0_05]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.SP2]
at $Proxy41.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.SP2]
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [:2.2.0.SP2]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.system.ServiceController.doChange(ServiceController.java:671) [:6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)]
at org.jboss.system.ServiceController.start(ServiceController.java:443) [:6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)]
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189) [:6.1.0.Final]
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102) [:6.1.0.Final]
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49) [:6.1.0.Final]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:63) [:2.2.2.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:98) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:101) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168) [:0.2.2]
at org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74) [:6.1.0.Final]
at org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156) [:6.1.0.Final]
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967) [:6.1.0.Final]
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791) [:6.1.0.Final]
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744) [:6.1.0.Final]
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548) [:6.1.0.Final]
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234) [:6.1.0.Final]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of <bootloader>) for the field's resolved type, loader constraint violation: when resolving field "DATETIME" the class loader
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127) [:2.5.6]
at java.security.AccessController.doPrivileged(Native Method) [:1.7.0_05]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) [:2.5.6]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98) [:2.5.6]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:223) [:2.5.6]
... 89 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of <bootloader>) for the field's resolved type, loader constraint violation: when resolving field "DATETIME" the class loader
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:263) [:2.2]
at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:65) [:2.2]
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:133) [:2.2]
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:85) [:2.2]
at com.sun.xml.bind.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:156) [:2.2]
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:93) [:2.2]
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:473) [:2.2]
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:319) [:2.2]
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1170) [:2.2]
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188) [:2.2]
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:111) [:2.2]
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:113) [:2.2.3]
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:166) [:2.2.3]
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159) [:2.2.3]
at java.security.AccessController.doPrivileged(Native Method) [:1.7.0_05]
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158) [:2.2.3]
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:99) [:2.2.3]
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:250) [:2.2.3]
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:343) [:2.2.3]
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:205) [:2.2.3]
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:513) [:2.2.3]
at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:333) [:]
at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:45) [:]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) [:2.5.6]
... 93 more
*** DEPLOYMENTS IN ERROR: Name -> Error
vfs:///usr/jboss/jboss-6.1.0.Final/server/default/deploy/SpringWS.war -> org.jboss.deployers.spi.DeploymentException: URL file:/usr/jboss/jboss-6.1.0.Final/server/default/tmp/vfs/automountb159aa6e8c1b8582/SpringWS.war-4ec4d0151b4c7d7/ deployment failed
DEPLOYMENTS IN ERROR:
Deployment "vfs:///usr/jboss/jboss-6.1.0.Final/server/default/deploy/SpringWS.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/usr/jboss/jboss-6.1.0.Final/server/default/tmp/vfs/automountb159aa6e8c1b8582/SpringWS.war-4ec4d0151b4c7d7/ deployment failed
But this application is workinng correctly in glassfish 3.x server and web service is up and running. I'm using Netbeans IDE in Ubuntu 12.04 to build and deploy the application and I couldn't figure out what is the issue here. I guess its about spring and jboss because its working in glassfish smoothly. Please help me to solve this issue. Thanks all in advance.
| 0 | [
2,
7019,
17617,
68,
1573,
17,
11712,
8,
10268,
3010,
19,
487,
10349,
18,
8128,
800,
3726,
3726,
31,
22,
79,
1017,
48,
7019,
76,
31,
17617,
68,
1573,
2430,
1004,
396,
8,
10268,
3010,
19,
487,
10349,
18,
8128,
400,
9,
165,
9,
387,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery $.ajax function stops mid execution
===
I'm making an attempt at a RESTful application but my $.ajax function stops in the middle of its execution.
function addEntry()
{
$.ajax({
type: 'POST',
contentType: 'application/json',
url: passAPI,
dataType: "json",
data: dataToJSON(),
success: hideform
})
}
function hideform()
{
$('#form').hide();
}
The data is put correctly in the database but the form doesn't get hidden. Anyone know why that happens ? | 0 | [
2,
487,
8190,
93,
5579,
9,
6881,
7522,
1990,
6604,
907,
5769,
800,
3726,
3726,
31,
22,
79,
544,
40,
1735,
35,
21,
760,
1566,
3010,
47,
51,
5579,
9,
6881,
7522,
1990,
6604,
19,
14,
772,
16,
82,
5769,
9,
1990,
3547,
18195,
5,
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... |
how to stop form submit if empty fields?
===
my website is based off of only one `php` index file that changes the contents of the site based on the header variables. `www.mydomain.com/?page=contact` loads and brings up a form that i am having the user fill out.
i have some `jQuery` that SHOULD detect if there are any missing fields:
$("form").submit(function() {
var isFormValid = true;
$(".required").each(function() {
if ($.trim($(this).val()) == "") {
$(this).addClass("highlight");
isFormValid = false;
} else {
$(this).removeClass("highlight");
}
if (!isFormValid) alert("Please fill in all the required fields (indicated by *)");
return isFormValid;
});
});
but it is not working.... | 0 | [
2,
184,
20,
747,
505,
12298,
100,
2424,
2861,
60,
800,
3726,
3726,
51,
2271,
25,
432,
168,
16,
104,
53,
13,
1,
26120,
1,
4348,
3893,
30,
1693,
14,
8478,
16,
14,
689,
432,
27,
14,
157,
106,
12157,
9,
13,
1,
6483,
9,
915,
537,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CakePHP 1.1.6 how to break out of ajax layout to the default layout
===
I have a legacy application using CakePHP 1.1.6 and I am updating it. I have an ajax form submission which updates a div after a series of ajax requests. All is working well until I want to return to the main menu page of the app. I can't figure how to get out of the ajax layout with the final redirect into the default layout on the menu page.
I've tried various methods of overwriting the redirect() method without success. Has anyone managed this in v1.1.6?
Thanks. | 0 | [
2,
8390,
26120,
137,
9,
165,
9,
379,
184,
20,
1442,
70,
16,
20624,
9106,
20,
14,
12838,
9106,
800,
3726,
3726,
31,
57,
21,
7780,
3010,
568,
8390,
26120,
137,
9,
165,
9,
379,
17,
31,
589,
71,
43,
1880,
32,
9,
31,
57,
40,
2062... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to reduce the incoming bandwidth?
===
We have a small application that was use mostly as an API. It's basically **an image extractor**. You submit a url to it, and it will return its largest image url. Feel free to [check the source code][1].
It runs smoothly, except that we bump into the *incoming bandwidth* limit quite frequently". What's odd, is that there shouldn't be that much incoming bandwidth.
For example, today, we received `64,308 requests` and `we consumed 1.00 GBytes of the incoming bandwidth`. All the other quotas are in the green.
We're looking for ways to debug this, and hopefully ways to reduce that. Any idea?
[1]: https://github.com/superfeedr/image-extrator | 0 | [
2,
184,
20,
4136,
14,
17126,
23392,
60,
800,
3726,
3726,
95,
57,
21,
284,
3010,
30,
23,
275,
1555,
28,
40,
21,
2159,
9,
32,
22,
18,
11374,
13,
1409,
210,
1961,
10962,
248,
1409,
9,
42,
12298,
21,
287,
6362,
20,
32,
15,
17,
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... |
Is sleep method is accurate as hell in timing precision?
===
We all know of sleep method available in java threads..
I understand that the precision in timing depends on the precision of hardware clock in the system..
So my question is how accurate is this method or better say what is the error in milliseconds or nanoseconds considering a general pc.
My requirement its to synchronise data transfer using sleep for timing.. The data is to be sent in fixed in intervals (10-20 millis) and if there is a delay of more than 1sec due to successive error in timing it may be hell bad !
So is it advisable to use the also method? | 0 | [
2,
25,
1742,
2109,
25,
8137,
28,
1094,
19,
11812,
13133,
60,
800,
3726,
3726,
95,
65,
143,
16,
1742,
2109,
904,
19,
8247,
20396,
9,
9,
31,
1369,
30,
14,
13133,
19,
11812,
9597,
27,
14,
13133,
16,
7610,
4229,
19,
14,
329,
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... |
Multiple Java Threads access the same DB record when run concurrently
===
I have a fairly straightforward Java class here which creates 2 thread pools....
- Connects to a running URL stream and reads in entries line by line submitting each entry into a back end MySQL DB.
- Spawns several threads each of which will carry out the same process (below)
>1.Get the oldest DB entry from above
>2.Parse and process it accordingly
>3.Save several sections to another DB table
>4.Delete this DB entry from the running table to signify that analysis is complete for it
>5.End Thread
The reason I need 2 pools is because the read process is MUCH faster than the analyse and if I read & analyse each entry as it comes through the entries back up too fast and the incoming stream breaks. By putting in this separation the read can happen as fast as it needs to and the analyse can proceed as fast as it can knowing that the records to catch up with are safe and available to catch up on.
The problem I have is that **each concurrent thread is getting the same oldest record**. I need to know what the best way would be to ensure the separate threads all run concurrently but each access unique oldest DB entries.
Thanks in advance. | 0 | [
2,
1886,
8247,
20396,
1381,
14,
205,
13,
9007,
571,
76,
485,
17651,
800,
3726,
3726,
31,
57,
21,
6647,
22262,
8247,
718,
235,
56,
9695,
172,
9322,
15230,
9,
9,
9,
9,
13,
8,
8534,
20,
21,
946,
287,
6362,
3766,
17,
11137,
19,
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... |
Android ListView - Unable to go back to ListView after calling onItemClickListener
===
This question is actually a 3 Part Question. Please suggest the valid solution for my problem.
**Application Overview**
I'm creating an application having a splash screen and a ListView. On click of the launcher icon, first the splash screen is shown and then after 3-4 seconds later, the splash screen calls the ListView activity and user is left with ListView items on the phone screen. On click of each item, respective textual content will be visible to the user. After reading the content user will click the "Back" button and will be returned to hte ListView items section again. If he/she wants to read any other item content, will be taken to that page on the click of that item. If not willing, then will click "Back" button on phone and application will close.
**Part 1 - What I actually want to do**
I want to show different textual content (not normal text but styled (bold/italized/containing images and all) on the click of different listView items. I can create the html pages and store them in my resource folder locally but don't know how to call those pages while calling onItemClickListener. I'm not sure if this is a valid approach to do this sort of work or not. Please advice. **It's not working so far**
**Part 2 - What I'm doing instead now**
Since I was not able to call the textual content so I wrote the content on some text editor, did all the fancy work on the editor and when the content was ready, I took the screenshot and then call that image instead while calling onItemClickListener. **It's working fine and I'm able to see the image on click of my ListView item.**
**Part 3 - The problem I'm facing**
When the image is shown to the user, on click of "Back" button, the application is closed instead of going back to the ListView Section. Apparently the image opening on click of the listview item is in the same activity as is the ListView itself. **What I want is that** user should be able to go back to the ListView section after he/she finishes reading the textual content.
**Below is the code of the ListView Activity:**
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ListView listView = (ListView) findViewById(R.id.menulist);
String[] values = new String[] { "1. First Article Here", "2. Second Article Here", "3. Third Article Here"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
R.layout.custom_listview, R.id.text1, values);
// Assign adapter to ListView
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, android.view.View view, int position, long id){
//
if(0==position)
{
setContentView(R.layout.splashscreen);
}
else if (1==position)
{
}
}
});
**The code works fine upto setContentView(R.layout.splashscreen);
** But after this I want the application to return back to the ListView section on click of "Back" button but it closes instead. Please guide.
| 0 | [
2,
13005,
968,
4725,
13,
8,
2343,
20,
162,
97,
20,
968,
4725,
75,
2555,
27,
2119,
4829,
10129,
13891,
106,
800,
3726,
3726,
48,
1301,
25,
1121,
21,
203,
141,
1301,
9,
2247,
5601,
14,
7394,
4295,
26,
51,
1448,
9,
13,
1409,
2552,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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: Project.Properties - do not edit, your changes with be erased?
===
I seem to have an issue.
I wanted to add some additional config info into project.properties in an android project but i notice when i open it there are comments telling me not to edit it
Is it safe to edit
Would it get regenerated at some point so i would loose my changes?
Is there an alternative?
| 0 | [
2,
13005,
45,
669,
9,
10890,
106,
3915,
13,
8,
107,
52,
9392,
15,
154,
1693,
29,
44,
25513,
60,
800,
3726,
3726,
31,
2260,
20,
57,
40,
1513,
9,
31,
417,
20,
3547,
109,
1351,
13,
14093,
2816,
15404,
77,
669,
9,
10890,
106,
3915... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIBarButtonItem - Invalid tap glow size
===
I have a strange problem with glow that appears when pressing on a UIBarButtonItem in the UIToolbar control. When I set `ImageInsets` property to `4,0,0,0` the glow gets smaller every time I tap on it. Here is an illustration:
![Tap glow problem][1]
The problem doesn't appear if I don't set imageInsets. The problem appears for all buttons in the UIToolbar. I've an empty tap handler that does nothing.
I appreciate any suggestions on how to solve the problem.
[1]: http://i.stack.imgur.com/uOAV1.png | 0 | [
2,
13,
5661,
1850,
811,
444,
2119,
79,
13,
8,
16671,
5526,
6839,
1072,
800,
3726,
3726,
31,
57,
21,
2578,
1448,
29,
6839,
30,
1780,
76,
7196,
27,
21,
13,
5661,
1850,
811,
444,
2119,
79,
19,
14,
13,
5661,
20799,
1850,
569,
9,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Prevent partial localization in webapp2
===
A website has most pages fully translated in 2 languages.
For any new (yet untranslated) page, some strings that appeared elsewhere on the website are automatically translated when rendering the page. In that case, there's a mix of translated and untranslated strings. Which is worse than providing just the original text.
Is there a way in webapp2 and Jinja2 to check if all strings on the page that is about to be rendered exist in the chosen language? If so, render the localized page. If not, use only the original strings. | 0 | [
2,
2501,
7284,
375,
1829,
19,
2741,
7753,
135,
800,
3726,
3726,
21,
2271,
63,
127,
4434,
2337,
4331,
19,
172,
2556,
9,
26,
186,
78,
13,
5,
16480,
367,
26390,
6,
2478,
15,
109,
7887,
30,
682,
6040,
27,
14,
2271,
50,
7499,
4331,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
add minor changes to a commit?
===
I just made a commit and push it to master. There was a minor typo and I want to fix it as part of this commit, not another one. Is it possible to append this change to the current and pushed commit?
Thanks! | 0 | [
2,
3547,
1689,
1693,
20,
21,
9686,
60,
800,
3726,
3726,
31,
114,
117,
21,
9686,
17,
3250,
32,
20,
1129,
9,
80,
23,
21,
1689,
22550,
17,
31,
259,
20,
6098,
32,
28,
141,
16,
48,
9686,
15,
52,
226,
53,
9,
25,
32,
938,
20,
486... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Problems using etree in Python scraper
===
I'm a newbie in Python looking to build a screen scraper in Scraperwiki but I'm struggling with an error I can't work out how to fix.
Essentially, I want to parse an xml file but can't work out how to have my gp_indicators_scrape function access the getroot() method.
Can anyone fix it, and more importantly, point me towards an explanation so I can avoid the problem in future?
Here's the scraper: https://scraperwiki.com/scrapers/choiceshu1
The key bits of code:
import lxml.html
import urlparse
from urlparse import urlparse
from lxml.etree import etree
def gp_indicators_scrape(org_URL):
indicator_xml = etree.parse(org_URL)
root = lxml.etree.getroot(indicator_XML)
print root
html = scraperwiki.scrape(combined_URL_for_first_scrape)
print html
root = lxml.html.fromstring(html)
links = root.cssselect("dd a")
And here's the error when it runs
Line 5 - from lxml.etree import etree
ImportError: cannot import name etree
| 0 | [
2,
1716,
568,
13,
62,
8101,
19,
20059,
10241,
106,
800,
3726,
3726,
31,
22,
79,
21,
78,
5893,
19,
20059,
699,
20,
1895,
21,
2324,
10241,
106,
19,
10241,
106,
17375,
47,
31,
22,
79,
7587,
29,
40,
7019,
31,
92,
22,
38,
170,
70,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Find files/folders that are modified after a specific date in Python
===
Problem ; find files/folders that are changed after a specific date from a directory structure and copy these to another location (as stated clearly in title as well) (:
By the following ;
def mod():
"""Find files modified today, given a file path."""
latest = 0
now = time.strftime('%Y-%m-%d', time.localtime())
dir = "/home/y33t/"
for fname in os.listdir(dir):
if fname.endswith(''):
modtime = os.stat(os.path.join(dir, fname)).st_mtime
if modtime > latest:
latest = modtime
out = time.strftime('%Y-%m-%d', time.localtime(latest))
if out == now:
print fname, "has changed today. "
else:
pass
I can determine which files are changed at a specific date and copy these to a location. What I would like to achieve is to keep the directory structure as well. An example is as following ;
/testfolder
..somefile1
..somefile2
../testfolder2
....somefile3
....somefile4
and so on...
lets say somefile3 is changed at the specified date and I will save it to another location but while saving, cascaded directory structure should be maintained as well. How can I achieve this in an elegant way ?
| 0 | [
2,
477,
6488,
118,
8814,
445,
30,
50,
5372,
75,
21,
1903,
1231,
19,
20059,
800,
3726,
3726,
1448,
13,
73,
477,
6488,
118,
8814,
445,
30,
50,
1015,
75,
21,
1903,
1231,
37,
21,
16755,
1411,
17,
4344,
158,
20,
226,
1474,
13,
5,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript GetElementById from a different file
===
I have a webpage with a `href` linking to a second page. The second page has an SWF. I want the `a` tag in the first webpage to be able to `GetElementById`, the SWF object. Is this possible? | 0 | [
2,
8247,
8741,
164,
27567,
779,
1340,
37,
21,
421,
3893,
800,
3726,
3726,
31,
57,
21,
2741,
6486,
29,
21,
13,
1,
252,
14057,
1,
12585,
20,
21,
153,
2478,
9,
14,
153,
2478,
63,
40,
13,
18,
15263,
9,
31,
259,
14,
13,
1,
58,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Binding image based on database id
===
I'm using SQLite and I have table which contains table with fields: id and name
In my project I have folder graphics/pictures and there my pictures are named like: 1.png, 2.png etc.
I save all records into ObservableCollection and then I set this as a source to my ListBox.
Is there any chance to bind that photos to each item on the list based on id from table and the name of picture in folder?
I have tried smth like source="graphic/pictures/{Binding id}.png but that seems to be bad way. | 0 | [
2,
8728,
1961,
432,
27,
6018,
4924,
800,
3726,
3726,
31,
22,
79,
568,
4444,
10601,
17,
31,
57,
859,
56,
1588,
859,
29,
2861,
45,
4924,
17,
204,
19,
51,
669,
31,
57,
19294,
8351,
118,
25602,
18,
17,
80,
51,
3104,
50,
377,
101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Passing parameters to T4 Toolbox & get a Type from string value
===
Yesterday I asked for some suggestions on tools for generating ASCX & ASCX.cs files from a class definition and people recommended T4 & T4Toolbox, which works great. However I've got 2 questions that I've not been able to find answers to in the documentation.
### 1 Passing Params
I have a some templates that are controlled via a script. The script currently uses a hard-coded type, I'd like to be able to select a class in some way and use it's `Type` when the script is executed.
How do I pass variables to the Script? I know when using External Tools, the following variable are some that are available :
$(ItemDir)
$(ItemFileName)
$(ItemExt)
Where `$(ItemFileName)` is the file that's focused in Visual Studio when the external tool is executed.
The only way I've seen to initiate the T4 Script was via a right click or re-save the script, I can't see any other way to start it and pass some variables.
### 2 Get `Type` from string of a Volatile Assembly
Assuming I can pass a string, somehow to the script, how can I get `Type` for the class that the string refers to?
The Assembly is Volatile and the only way I've been able to create an instance of `Type` for the class that is used by the templates has been to create an instance of it.
My.Name.Space.ClassName obj = new My.Name.Space.ClassName();
Type myType = obj.GetType();
How would I take `"My.Name.Space.ClassName"` as a string & get `Type` from it?
Many thanks again.
| 0 | [
2,
2848,
12905,
20,
13,
38,
300,
5607,
5309,
279,
164,
21,
1001,
37,
3724,
1923,
800,
3726,
3726,
7124,
31,
411,
26,
109,
18389,
27,
4672,
26,
13500,
28,
150,
396,
279,
28,
150,
396,
9,
6824,
6488,
37,
21,
718,
5465,
17,
148,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I specify that my app only supports iPhone 4 and iPhone 4s?
===
I'm really confused by the parameters I need to place in my plist file. I want to support only iPhone 4 and iPhone 4s. I don't want to support any other iPhone models, iPads or iPod Touch.
What settings do I need? | 0 | [
2,
184,
107,
31,
19077,
30,
51,
4865,
104,
6747,
21024,
268,
17,
21024,
268,
18,
60,
800,
3726,
3726,
31,
22,
79,
510,
4230,
34,
14,
12905,
31,
376,
20,
209,
19,
51,
351,
5739,
3893,
9,
31,
259,
20,
555,
104,
21024,
268,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How event handling systems work?
===
This question bugs me. How event handling systems works?
what i understand is that there is must be a loop that waits for a message or something then activates a portion of a code. I know it is most likely a wrong idea but i need to understand how it works (abstractly)?
if there are diagrams that can explain it that would be good ! | 2 | [
2,
184,
807,
7988,
1242,
170,
60,
800,
3726,
3726,
48,
1301,
13925,
55,
9,
184,
807,
7988,
1242,
693,
60,
98,
31,
1369,
25,
30,
80,
25,
491,
44,
21,
5293,
30,
1760,
18,
26,
21,
2802,
54,
301,
94,
18163,
18,
21,
2980,
16,
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... |
Android "first time" app user tutorial
===
I'm trying to create an opening tutorial that consists of four panes for my application, but since I'm new to Android, I want to make sure I'm considering all of my options before marking this task as "complete". I know of three ways, I can only really accomplish one. There are no requirements for this tutorial, but some "wanted features" would be a sliding action to each pane would be nice as well as the image and the bottom (navigation circles) not moving and the title on top not moving.
One Way
-------------
**4 separate activities and 4 separate layouts**
![First attempt][1]
The red circled items are `textViews` that are centered horizontally and pushed off the top.
The white circled items are `imageViews` that are centered horizontally and vertically.
The purple circled are `imageViews` that are centered horizontally and pushed off the bottom.
Second Way
--------------
**4 fragments on one activity**
Fragments were difficult to learn, but the more I read about them/see tutorials on them, they seem to only really be used for tablets. Would it be a valid way to accomplish this?
Third Way
---------
**ViewPager?**
http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
I've never used this before, but I know it's an option.
Final Question
--------------
Which way is used more often/what's the proper way to implement this? Is there any way to only have the middle part (the image) slide in, but the title (top) and the navigation images (bottom) just change once the image slides in?
[1]: http://i.stack.imgur.com/tDjjT.png | 0 | [
2,
13005,
13,
7,
3552,
85,
7,
4865,
4155,
29724,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
40,
1214,
29724,
30,
2043,
16,
222,
1809,
160,
26,
51,
3010,
15,
47,
179,
31,
22,
79,
78,
20,
13005,
15,
31,
259,
20,
233,
562,
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... |
Adding user input text to .txt file
===
I'm trying to update a .txt file containing a list of movies and some information by asking the user said information.
The file is organized like this:
0000-Movie Title Goes Here-9.99-ClientID
0001-Same thing here-9.99-CLIENTID2
And so on.
Here's the code I'm using:
BufferedWriter output = new BufferedWriter(new FileWriter("movies.txt", true));
System.out.println("Inserte numero de la pelicula:\n");
String pelNum = CTeclado.ReadString();
System.out.println("Inserte el titulo de la pelicula:\n");
String pelName = CTeclado.ReadString();
System.out.println("Inserte el precio de la pelicula:\n");
String pelPrice = CTeclado.ReadString();
output.append(pelNum + "-" + pelName + "-" + pelPrice + "-null");
output.close();
ReadM();
System.out.println("Pelicula agregada!\n");
MainMenu();
(The CTeclado thing is used for reading input)
This compiles without error, however, there's no change in the actual file....
What's wrong with my code? | 0 | [
2,
4721,
4155,
6367,
1854,
20,
13,
9,
38,
396,
38,
3893,
800,
3726,
3726,
31,
22,
79,
749,
20,
11100,
21,
13,
9,
38,
396,
38,
3893,
3503,
21,
968,
16,
4795,
17,
109,
676,
34,
3379,
14,
4155,
87,
676,
9,
14,
3893,
25,
2518,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Acr122 p2p sample program ready for NFC p2p with snep
===
recently I bought acr122 reader and want to sent ndef message between android phone. Can I use the acr122 p2p sample program in c# to sent ndef message to the phone and vice versa?
What is the command to initialize reader as initiator and phone as target?
What is the command to sent ndef message?
Is the acr122 development kit ready for NFC p2p mode? | 0 | [
2,
21,
6711,
918,
135,
351,
135,
306,
5717,
625,
1451,
26,
25161,
351,
135,
306,
29,
8912,
3492,
800,
3726,
3726,
1989,
31,
2448,
21,
6711,
918,
135,
7765,
17,
259,
20,
795,
13,
103,
13862,
2802,
128,
13005,
1132,
9,
92,
31,
275... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rewrite apache .htaccess URL
===
I am trying to learn how to create SEF URLs on my website using the Apache .HTACCESS file. I am using Joomla website. I have two examples of URLs I would like to transform:
Current URL1:
www.tennisladders.net/tennisladders/index.php?option=com_search&views=search&layout=reglink&uid=258&Itemid=73&city=Santa%20Monica&rank=6
Desired URL1:
www.tennisladders.net/member/258
Current URL2:
www.tennisladders.net/tennisladders/index.php?option=com_search&views=search&layout=city_list&uid=21&Itemid=73&city=Santa%20Monica
Desired URL2:
www.tennisladders.net/rankings/santa-monica
Can anyone help me compose the "rewritecond" statements I need in my .HTACCESS file to accomplish this? TIA! | 2 | [
2,
27891,
17140,
13,
9,
9020,
20604,
287,
6362,
800,
3726,
3726,
31,
589,
749,
20,
2484,
184,
20,
1600,
13,
16141,
13,
911,
7532,
27,
51,
2271,
568,
14,
17140,
13,
9,
9020,
20604,
3893,
9,
31,
589,
568,
2640,
2636,
531,
2271,
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... |
Clojure: single machine, Clojure <-> ClojureScript, Ring, websocket communication
===
## Context
I like Clojure. I like Clojure more than I like ClojureScript.
I like the DOM more than I like Swing.
I intend to build a GUI application mainly in Clojure, but using a web browser's DOM as for the GUI. [I have tried JavaFX, it crashes on me, often, I don't like it.]
Now, I'm familiar with ring + ajax requests + setup web socket once. What I want to know is -- what is the lowest latency setup I can come up with?
Both the client (web browser) and server (clojure stuff) run on the same machine. I have root access on the machine. I just want merely to setup the minimal latency communication channel.
## Question:
How do I setup minimal latency communication between clojurescript / clojure when I have full control over the machine?
Thanks. | 0 | [
2,
7383,
2142,
99,
45,
345,
1940,
15,
7383,
2142,
99,
13,
1,
8,
1,
7383,
2142,
99,
8741,
15,
1765,
15,
2741,
18,
5668,
1198,
3291,
800,
3726,
3726,
6926,
5910,
4141,
31,
101,
7383,
2142,
99,
9,
31,
101,
7383,
2142,
99,
91,
119... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Method to get index of element returned by sample
===
Hopefully a quick and easy question here.
I'm using Array.sample to return a random element from an array. I want to then get the index of that element to generate a permalink. Is there a built in method to do this? Or will I need to roll my own? | 0 | [
2,
2109,
20,
164,
4348,
16,
4520,
587,
34,
5717,
800,
3726,
3726,
13416,
21,
2231,
17,
2010,
1301,
235,
9,
31,
22,
79,
568,
7718,
9,
6101,
5106,
20,
788,
21,
5477,
4520,
37,
40,
7718,
9,
31,
259,
20,
94,
164,
14,
4348,
16,
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... |
$this->Post = ClassRegistry::init('Post');
===
Suppose I have the classic Post model and I've created an Author model too.
I have some basic questions:
(1) The Post object is automatically created whithin the PostsController ?
(2) In order to create an instance of Post whithin AuthorsController, is the only way with
$this->Post = ClassRegistry::init('Post');
Please notice that by doing " $this->Post " I assume the Post variable will be created in this line. Am I right ?
Thank you in advance! | 0 | [
2,
5579,
1565,
8,
1,
6962,
800,
718,
12463,
702,
622,
45,
45,
108,
242,
5,
22,
6962,
22,
6,
73,
800,
3726,
3726,
5787,
31,
57,
14,
2732,
678,
1061,
17,
31,
22,
195,
679,
40,
1314,
1061,
266,
9,
31,
57,
109,
2125,
2346,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to add "search" function to the messaging gem "Mailboxer"?
===
I'd like to implement "text search function" over body part of tons messages.
If anyone knows how to implement that to "Mailboxer", please show me how.
I have no idea how it goes. | 0 | [
2,
25,
32,
938,
20,
3547,
13,
7,
25136,
7,
1990,
20,
14,
26437,
8551,
13,
7,
8079,
5309,
106,
7,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
8713,
13,
7,
11969,
2122,
1990,
7,
84,
358,
141,
16,
5278,
7561,
9,
100,
1276,
3620,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Set cron jobs for a xx.php file in localhost unix os
===
> How Can I Set Cron Jobs for a file xxx.php in my localhost in Unix Os | 2 | [
2,
184,
20,
309,
13,
19587,
4844,
26,
21,
13,
8962,
9,
26120,
3893,
19,
375,
11694,
22540,
13,
759,
800,
3726,
3726,
13,
1,
184,
92,
31,
309,
13,
19587,
4844,
26,
21,
3893,
13,
13290,
9,
26120,
19,
51,
375,
11694,
19,
22540,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Running all test classes with JUnitServlet in CQ5 integration testing
===
i have a question about JUnitServlet in CQ5 integration testing. I dont understand 2 things and i need help from somebody that had similar problem. So far I have package with only one test class with several testing methods. Everything works fine but there are this 2 problems:
1. Why when I change the name of the testing class, the JunitServlet doesn't find it anymore. Even though i am doing building again and exporting the package and everything but just doesn't find it. It doesn't want to accept any other name different than the first one that i gave to the testing class. I want to change it because in the beginning i gave very specific name and than i added several testing methods and I want to change it to more general one for example "TestScenarioOne.java" ...
2. The second problem is that after I finished this testing class I created new one to continue to test different scenarios. JUnitServlet finds just the first one but not and the new one as well ... Even though they are in the same package. I don't know what is the problem...
Thanks a lot and I am waiting for your answers ... | 0 | [
2,
946,
65,
1289,
2684,
29,
7446,
242,
10321,
1336,
19,
13,
21980,
264,
8078,
4431,
800,
3726,
3726,
31,
57,
21,
1301,
88,
7446,
242,
10321,
1336,
19,
13,
21980,
264,
8078,
4431,
9,
31,
1049,
1369,
172,
564,
17,
31,
376,
448,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Open Twitter Setting from ACAccountStore/
===
in iOS 5.0 i was opening Twitter setting from my app by
`[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];`
but , this features is removed in iOS 5.1 , hence i can not able to open twitter setting .
Now i am using
+ (void)makeRequestsWithURL: (NSURL *)url {
// Create an account store object.
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
// Create an account type that ensures Twitter accounts are retrieved.
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[self canTweetStatus];
// Request access from the user to use their Twitter accounts.
[accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) {
if(granted) {
// Get the list of Twitter accounts.
NSArray *accountsArray = [accountStore accountsWithAccountType:accountType];
// For the sake of brevity, we'll assume there is only one Twitter account present.
// You would ideally ask the user which account they want to tweet from, if there is more than one Twitter account present.
if ([accountsArray count] > 0) {
// Grab the initial Twitter account to tweet from.
ACAccount *twitterAccount = [accountsArray objectAtIndex:0];
// Create a request, which in this example, posts a tweet to the user's timeline.
// This example uses version 1 of the Twitter API.
// This may need to be changed to whichever version is currently appropriate.
TWRequest *postRequest = [[TWRequest alloc] initWithURL:url parameters:nil requestMethod:TWRequestMethodPOST];
// Set the account used to post the tweet.
[postRequest setAccount:twitterAccount];
// Perform the request created above and create a handler block to handle the response.
[postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
NSString *output = [NSString stringWithFormat:@"HTTP response status: %i", [urlResponse statusCode]];
iOS5Twitter *twitter5 = [[iOS5Twitter alloc] init];
[twitter5 performSelectorOnMainThread:@selector(displayText:) withObject:output waitUntilDone:NO];
[twitter5 release]; }];
}
}
}];
}
for making request, i am able to check wether i am loged in or not by the
` if ([TWTweetComposeViewController canSendTweet])`
but now i want : if i am not loged in it would be show an alert like shown in image and want to move to the twitter setting . is it possible ? or i have to manually go ti twitter setting ?![enter image description here][1]
[1]: http://i.stack.imgur.com/GyU86.png | 0 | [
2,
368,
10623,
2697,
37,
21,
150,
29148,
16828,
118,
800,
3726,
3726,
19,
13,
7760,
331,
9,
387,
31,
23,
1214,
10623,
2697,
37,
51,
4865,
34,
13,
1,
2558,
2558,
5661,
2552,
20669,
2592,
2552,
20669,
500,
368,
911,
255,
45,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I use Group By based on a Case statement in Oracle?
===
I have an SQL-query where I use Oracle `CASE` to compare if a date column is *less than* or *greater than* current date. But how do I use that `CASE`-statement in a `GROUP BY`-statement? I would like to count the records in each case.
E.g.
select
(case
when exp_date > sysdate then 1
when exp_date <= sysdate then 2
else 3
end) expired, count(*)
from mytable
group by expired
But I get an error when trying this: `ORA-00904`. Any suggestions? | 0 | [
2,
184,
107,
31,
275,
214,
34,
432,
27,
21,
610,
3331,
19,
15759,
60,
800,
3726,
3726,
31,
57,
40,
4444,
255,
8,
8190,
93,
113,
31,
275,
15759,
13,
1,
10325,
1,
20,
11590,
100,
21,
1231,
4698,
25,
1637,
923,
119,
2483,
54,
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... |
Mongodb's indexes performance
===
I'm reading about [Mongodb's indexes][1] for my Mongodb project
I am well aware that inserting data into a traditional relation database would cause a large slow down if the table was very large as the indexes are rebuilt.
If I choose to add indexes to Mongodb collections: **Is rebuilding an index in Mongodb roughly as expensive as rebuilding an index in a traditional relational database?** or does the fact that it uses a [B-Tree for indexing][2] improve rebuild time?
[1]: http://www.mongodb.org/display/DOCS/Indexes
[2]: http://www.mongodb.org/display/DOCS/Indexes#Indexes-Basics | 0 | [
2,
3521,
5474,
220,
22,
18,
4348,
160,
956,
800,
3726,
3726,
31,
22,
79,
1876,
88,
636,
2111,
5474,
220,
22,
18,
4348,
160,
500,
2558,
165,
500,
26,
51,
3521,
5474,
220,
669,
31,
589,
134,
3854,
30,
14692,
68,
1054,
77,
21,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android sql query
===
i have this selection query to fetch rows from the sqlite database of android phone contacts.
String selection = ContactsContract.Data.MIMETYPE + " = '" + ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE + "'"
+ " AND "+ContactsContract.Data.DATA10+ " = '" + select + "'";
Log.d(LOG_TAG,"selection in update data"+selection);
c = mContext.getContentResolver().query(CONTENT_URI, Projection,selection, null, null);
where select = +12244004242
I am successfully able to fetch the reqd data. However my requirement is if i have more than one string. i.e an array of strings.how do i write the query?
I was tring with
String selection = ContactsContract.Data.DATA10 IN ("+select+")";
where select = +12244004242,+12244004245,+12244004248
however i am not getting any values.please help me write the selection query. | 0 | [
2,
13005,
4444,
255,
25597,
800,
3726,
3726,
31,
57,
48,
3155,
25597,
20,
18312,
11295,
37,
14,
4444,
10601,
6018,
16,
13005,
1132,
11894,
9,
3724,
3155,
800,
11894,
23311,
9,
18768,
9,
1435,
790,
4474,
2754,
13,
7,
800,
13,
22,
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... |
Syntax error when updating sqlite database
===
I', trying to update my database using this.
String dd = "1-PC CHICKEN & RICE";
SQLiteDatabase db2 = openOrCreateDatabase("order",MODE_PRIVATE,null);
ContentValues values = new ContentValues();
values.put("Description",(((TextView) findViewById(R.id.etoriginal)).getText().toString()));
db1.update("list", values, "Description ="+ dd ,null);
But i got this error in my log cat
07-04 16:20:00.659: E/AndroidRuntime(21504): android.database.sqlite.SQLiteException: near "CHICKEN": syntax error: , while compiling: UPDATE list SET Image=? WHERE Description =1-PC CHICKEN & RICE
I can't figure out what is causing this
| 0 | [
2,
22649,
7019,
76,
71,
43,
1880,
4444,
10601,
6018,
800,
3726,
3726,
31,
22,
15,
749,
20,
11100,
51,
6018,
568,
48,
9,
3724,
13,
8096,
800,
13,
7,
165,
8,
5779,
6360,
279,
4561,
7,
73,
4444,
10601,
18768,
8436,
13,
9007,
135,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 launch a colobox with jquery and its content with CakePHP
===
the purpose of my program is to open a colorbox with JQuery clicking on a link.
Here's the code :
<a href="<?= $html->url(array('controller' => 'competitions', 'action' => 'index')) ?>" class="game-popup">
<?= $this->Html->image('image-link.jpg') ?>
</a>
<script type="text/javascript">
$(document).ready(function(){
$('.game-popup').colorbox({'iframe':true, 'width':'690px', 'height':'670px'});
});
</script>
This code works perfectly. Now for an other reason I need to open a colorbox automatically with a special condition without any click. I tried with the code below but I can't access to my controller.
<a href="<?= $html->url(array('controller' => 'competitions', 'action' => 'index')) ?>" class="game-popup">
<?= $this->Html->image('competition-galaxy-s3.jpg') ?>
</a>
<script type="text/javascript">
$(document).ready(function(){
$.colorbox({'iframe':true, 'width':'690px', 'height':'670px'});
document.location.href="/ArgusDuMobile/competitions/index";
});
</script>
The line of code with '$.colorbox' seems to be good because when I refresh the page the colorbox is being opened but without its content. To do the link with the controller I tried the following line of code with 'document' but it open the correct content of the view in an other page but not into the colorbox. Does anyone could help me? Thanks in advance for your answer. | 0 | [
2,
184,
20,
3394,
21,
13,
12805,
5309,
29,
487,
8190,
93,
17,
82,
2331,
29,
8390,
26120,
800,
3726,
3726,
14,
2131,
16,
51,
625,
25,
20,
368,
21,
1665,
5309,
29,
487,
8190,
93,
25590,
27,
21,
3508,
9,
235,
22,
18,
14,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Select top and order from two tables
===
I am doing an e-commerce marketplace. There are many sellers selling in this marketplace. For each seller, I would like to display a Best Sellers list.
Database is in SQL Server. There are 2 main tables in this case:
Table 1: Stores each order's ordered products. Fields include SellerID, OrderID, ProductID, and Quantity.
Table 2: The products master table. Fields include ProductID, ...
How can I do a query to get the top 10 products with the most orders? My SQL below doesn't seem to work...
SELECT TOP (10) SUM(d.Quantity) AS total, d.ProductID, p.Title
From OrderDetails d, Products p
WHERE d.SellerID = 'xxx' AND
d.ProductID = p.ProductID
GROUP by d.ProductID
ORDER BY total DESC
Any help is much appreciated. Thank you!
| 0 | [
2,
5407,
371,
17,
389,
37,
81,
7484,
800,
3726,
3726,
31,
589,
845,
40,
13,
62,
8,
26470,
19408,
9,
80,
50,
151,
22304,
4355,
19,
48,
19408,
9,
26,
206,
3344,
106,
15,
31,
83,
101,
20,
3042,
21,
246,
22304,
968,
9,
6018,
25,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can i move my objects on the screen randomly on Corona?
===
I want my display objects to move on the screen with a velocity and without any interactions. How can i do that with corona? Thanks. | 0 | [
2,
184,
92,
31,
780,
51,
3916,
27,
14,
2324,
21324,
27,
13538,
60,
800,
3726,
3726,
31,
259,
51,
3042,
3916,
20,
780,
27,
14,
2324,
29,
21,
10700,
17,
366,
186,
11224,
9,
184,
92,
31,
107,
30,
29,
13538,
60,
3669,
9,
3,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Can I treat CryptoStream as a replacement for SslStream?
===
I need to send data between SilverLight applications. I've got requirement that says that data should be transmitted using secure protocol such as SSL/TLS. Data is sent using TCP sockets due to performance reasons. Unfortunately SilverLight doesn't support [SslStream][1]. If I want to transmit data over SSL/TLS I need to buy third party library e.g. [SecureBlackbox][2]. I don't want to be dependent on third party libraries when it comes to handling transport layer.
However, SilverLight has [CryptoStream][3] class. I'm thinking of exchanging the key for symmetric encryption using WCF over SSL (SilverLight supports that) and then encrypt the data with AES using CryptoStream.
Is this solution safe? Can it be compared to using SSL/TLS in terms of security? Is there some obvious security hole that I'm missing?
[1]: http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx
[2]: http://www.eldos.com/sbb/
[3]: http://msdn.microsoft.com/en-us/library/system.security.cryptography.cryptostream.aspx | 0 | [
2,
92,
31,
5752,
16277,
11260,
28,
21,
4610,
26,
13,
18,
18,
255,
11260,
60,
800,
3726,
3726,
31,
376,
20,
2660,
1054,
128,
1172,
3130,
3767,
9,
31,
22,
195,
330,
8981,
30,
898,
30,
1054,
378,
44,
13377,
568,
4315,
8494,
145,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Start new line with serial communication
===
I am trying to get an arduino to tell my computer what the state of it's relays is. And for some reason every time it sends a new string PuTTY leaves the horizontal position of the last text. This makes for a very ugly display.
I would like PuTTY to look like the arduino serial manager.
Here is what it looks like from the arduino serial manager
![enter image description here][1]
This is what it looks like in PuTTY
![enter image description here][2]
This is the code I am using to send to computer from arduino.
![enter image description here][3]
[1]: http://i.stack.imgur.com/O6pvP.png
[2]: http://i.stack.imgur.com/i9Mqo.png
[3]: http://i.stack.imgur.com/m5Dsq.png | 0 | [
2,
799,
78,
293,
29,
5956,
3291,
800,
3726,
3726,
31,
589,
749,
20,
164,
40,
13,
1514,
291,
3252,
20,
494,
51,
1428,
98,
14,
146,
16,
32,
22,
18,
6953,
18,
25,
9,
17,
26,
109,
1215,
352,
85,
32,
11350,
21,
78,
3724,
442,
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... |
CUDA - how to pad kernel before convolution?
===
I know that frequency multiplication = circular convolution in time space for discrete signals (vectors).
I also know that "the convolution theorem yields the desired linear convolution result only if x(n) and h(n) are padded with zeros prior to the DFT such that their respective lengths are Nx+Nh-1, essentially zeroing out all circular artifacts."
and everything works with vectors.. but my goal is circular convolution with matrices as in this paper:
http://developer.download.nvidia.com/compute/cuda/2_2/sdk/website/projects/convolutionFFT2D/doc/convolutionFFT2D.pdf
If you watch the first two figures (figure 1 and 2) you'll see that the kernel is padded in a weird way I've never seen before, what's this?
| 0 | [
2,
272,
5729,
13,
8,
184,
20,
4432,
17007,
115,
1065,
16261,
3309,
60,
800,
3726,
3726,
31,
143,
30,
5328,
25432,
800,
8155,
1065,
16261,
3309,
19,
85,
726,
26,
18563,
7616,
13,
5,
28033,
18,
6,
9,
31,
67,
143,
30,
13,
7,
124,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Parse text/html part of email source using Javascript
===
Using javascript, I need to parse the Content-Type `text/html` portion of an email message and extract just the HTML part. Here's an example of the part of the mail source in question:
------=_Part_1504541_510475628.1327512846983
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<html ... a bunch of html ...
/html>
I want to extract everything between (and including) the `<html>` tags after `text/html`. How do I do this?
NOTE: I'm OK with a hacky regex. I don't expect this to be bulletproof.
| 0 | [
2,
2017,
870,
1854,
118,
15895,
141,
16,
8517,
1267,
568,
8247,
8741,
800,
3726,
3726,
568,
8247,
8741,
15,
31,
376,
20,
2017,
870,
14,
2331,
8,
4474,
13,
1,
11969,
118,
15895,
1,
2980,
16,
40,
8517,
2802,
17,
10962,
114,
14,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Spring class not found
===
I'm certain this is a maven missing dependency but I've googled an can't find anything similar.
I've got the following exception when I start tomcat...
ERROR: org.springframework.security.config.SecurityNamespaceHandler - Failed to load required web classes
java.lang.ClassNotFoundException: org.springframework.security.web.FilterChainProxy
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.security.config.SecurityNamespaceHandler.loadParsers(SecurityNamespaceHandler.java:145)
at org.springframework.security.config.SecurityNamespaceHandler.init(SecurityNamespaceHandler.java:127)
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:130)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1414)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1409)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
ERROR: org.springframework.security.config.SecurityNamespaceHandler - Failed to load required web classes
java.lang.ClassNotFoundException: org.springframework.security.web.FilterChainProxy
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.security.config.SecurityNamespaceHandler.loadParsers(SecurityNamespaceHandler.java:145)
at org.springframework.security.config.SecurityNamespaceHandler.parse(SecurityNamespaceHandler.java:74)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1419)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1409)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
My pom.xml is below...
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.assessme</groupId>
<artifactId>com</artifactId>
<name>assessme</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.6</java-version>
<org.springframework-version>3.1.0.RELEASE</org.springframework-version>
<org.aspectj-version>1.6.9</org.aspectj-version>
<org.slf4j-version>1.5.10</org.slf4j-version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- AspectJ -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
<!-- @Inject -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Persistence -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.11.0.GA</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.18</version>
</dependency>
<!-- Jackson JSON Mapper -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.5</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>org.test.int1.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
Finally, security-app-context.xml is below, I know I'm missing something but I don't know what.
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<http use-expressions="true">
<intercept-url pattern="/**" access="permitAll" />
<form-login />
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="rod" password="koala" authorities="supervisor, teller, user" />
<user name="dianne" password="emu" authorities="teller, user" />
<user name="scott" password="wombat" authorities="user" />
<user name="peter" password="opal" authorities="user" />
</user-service>
</authentication-provider>
</authentication-manager>
</beans:beans>
| 0 | [
2,
1573,
718,
52,
216,
800,
3726,
3726,
31,
22,
79,
1200,
48,
25,
21,
1216,
3124,
2863,
26835,
47,
31,
22,
195,
8144,
43,
40,
92,
22,
38,
477,
602,
835,
9,
31,
22,
195,
330,
14,
249,
5391,
76,
31,
799,
2067,
5782,
9,
9,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Monitor wordpress installations remotely
===
I would like to monitor all our wordpress installations on a single page to show the current version of the installation...
I don't know where to start... does we need to install a small plugin in the wordpress to push the version number to our monitor page?
I would like that our monitor page detect automaticaly when we add our monitor plugin to the wordpress intallation...
Thanks all... | 0 | [
2,
7626,
833,
5890,
16885,
23288,
800,
3726,
3726,
31,
83,
101,
20,
7626,
65,
318,
833,
5890,
16885,
27,
21,
345,
2478,
20,
298,
14,
866,
615,
16,
14,
7758,
9,
9,
9,
31,
221,
22,
38,
143,
113,
20,
799,
9,
9,
9,
630,
95,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add coma after some text added in EditText on Android
===
I limited my EditText for 5 characters and set it in to 'number', so i need automatic adding coma after 3 characters which user typing.
Thank you! | 0 | [
2,
184,
20,
3547,
13987,
75,
109,
1854,
905,
19,
9392,
11969,
27,
13005,
800,
3726,
3726,
31,
1317,
51,
9392,
11969,
26,
331,
1766,
17,
309,
32,
19,
20,
13,
22,
16299,
22,
15,
86,
31,
376,
6715,
4721,
13987,
75,
203,
1766,
56,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
arduino nano with gravitech USB host shield, google adk
===
I am working on a project based on an arduino Nano v2.3 hooked up to a Gravitech USB host shield. I want to connect the Nano setup to a android phone using a USB cable and make use of the Google ADK.
I read several linked describing how to use the ADK but i cant get it to work. Is there someone how has played with this setup and can give me some pointers?
If i run the demokit i get compile errors:
demokit.cpp: In function 'void init_buttons()':
demokit.pde:-1: error: 'A8' was not declared in this scope
demokit.pde:-1: error: 'A9' was not declared in this scope
Gravitech say the usbhost shield works with the ADK but i am missing a crucial bit in the puzzle.
Suggestions are welcome :)
Many thanks,
Arnaud | 0 | [
2,
13,
1514,
291,
3252,
10371,
29,
23213,
6524,
182,
220,
2015,
4179,
15,
8144,
21,
43,
197,
800,
3726,
3726,
31,
589,
638,
27,
21,
669,
432,
27,
40,
13,
1514,
291,
3252,
10371,
566,
135,
9,
240,
14988,
71,
20,
21,
23213,
6524,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does should_receive do something I don't expect?
===
<!-- language-all: lang-ruby -->
Consider the following two trivial models:
class Iq
def score
[Some Irrelevant Code]
end
end
class Person
def iq_score
Iq.new(self).score #error here
end
end
And the following Rspec test:
describe "#iq_score" do
let(:person) { Person.new }
it "creates an instance of Iq with the person" do
Iq.should_receive(:new).with(person)
Iq.any_instance.stub(:iq_score).and_return(100.0)
person.iq_score
end
end
When I run this test (or, rather, an analogous one), it appears the stub has not worked:
Failure/Error: person.iq_score
NoMethodError:
undefined method `iq_score' for nil:NilClass
The failure, as you might guess, is on the line marked "error here" above. When the `should_receive` line is commented out, this error disappears. What's going on? | 0 | [
2,
630,
378,
1,
99,
1105,
1284,
107,
301,
31,
221,
22,
38,
4186,
60,
800,
3726,
3726,
13,
1,
187,
8,
8,
816,
8,
1233,
45,
4544,
8,
1820,
779,
13,
8,
8,
1,
3563,
14,
249,
81,
13,
19712,
2761,
45,
718,
13,
9908,
6312,
1618,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Prevent a user from Deleting, Moving, or Renaming a file in C#
===
So, what I am trying to do is while my program is using a file, I want to keep the user from renaming, deleting, or moving the file (well... a move is a delete and a create at a different location according to Windows [FileSystemWatcher](http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx), but I digress).
It has been suggested that I use [FileStream.Lock](http://msdn.microsoft.com/en-us/library/system.io.filestream.lock.aspx) or use a [Mutex](http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx). However, FileStream.Lock seems only to prevent the file from being modified *which I am trying to allow*. Also, I am very unsure as to if a mutex can lock a file, although I am still reading on it with in the .Net 4.0 library.
Does anyone have any advice on utilizing either one and if there is a code based solution to this problem? | 0 | [
2,
2501,
21,
4155,
37,
121,
1336,
68,
15,
1219,
15,
54,
25934,
21,
3893,
19,
272,
5910,
800,
3726,
3726,
86,
15,
98,
31,
589,
749,
20,
107,
25,
133,
51,
625,
25,
568,
21,
3893,
15,
31,
259,
20,
643,
14,
4155,
37,
25934,
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... |
Windows HTML Help File not displaying possibly because of security
===
I am wondering if anybody has previously had this problem and hopefully a solution. The program I am currently developing is an MFC application and is distributed as an `.exe` (no install shield) due to dependency issues. I am including an HTML Help File: `.chm` extension, embedded within the resources. When the user asks for the help file, it is extracted from the resources as binary and copied onto the filesystem. `FindResource`, `LoadResource`, and `LockResource` calls are made. After the file is extracted, I make a call to `ShellExecute` like this:
ShellExecute(m_hWnd, L"open", pathToFile, NULL, NULL, SW_SHOWDEFAULT);
The HTML Help Viewer is launched with no problems. However, on certain computers the pages in the file cannot be viewed. I see a "Cannot Display the Webpage" message.
I have noticed two things:
1. The error occurs only after a "Do you want to run this file?" dialog appears when the user first tries to enter the program.
2. The HTML Help File is viewable if the .exe is run off of a USB (and not downloaded from an e-mail)
Has anybody had anything like this happen? Any suggestions? | 0 | [
2,
1936,
13,
15895,
448,
3893,
52,
17418,
2879,
185,
16,
1221,
800,
3726,
3726,
31,
589,
5712,
100,
11181,
63,
1343,
41,
48,
1448,
17,
13416,
21,
4295,
9,
14,
625,
31,
589,
871,
3561,
25,
40,
307,
7061,
3010,
17,
25,
4387,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Header not appearing in IE 7...what could be wrong?
===
As usual, we have an issue in IE.
For whatever reason, the header is not appearing at ALL in IE7.
http://stevens.usc.edu/innovationatUSC/
Any help at all would be appreciated! | 0 | [
2,
157,
106,
52,
4870,
19,
13,
660,
453,
9,
9,
9,
608,
110,
44,
1389,
60,
800,
3726,
3726,
28,
3820,
15,
95,
57,
40,
1513,
19,
13,
660,
9,
26,
2099,
1215,
15,
14,
157,
106,
25,
52,
4870,
35,
65,
19,
13,
660,
465,
9,
7775... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 write a select statement for Filtering the Grid in MVC3?
===
HI All i have to write a select statement for filtering my grid ,where my grid is filled with multiple tables,
my grid looks like this
BugID|Title|ProjectName|CreatedBY|Priority|AssignetTo|Status
And my tables look like this
**Bugs**
BugID|Title|ProjectID|CreatedBYID|PriorityID
here in this table [CreatedBYID] column is a Foreign key for [EmployeeID] of EmployeeDetials
**Projects**
ProjectID|ProjectName|
**Priorities**
PriorityID|Priority
**EmployeeDetails**
EmployeeID|EmployeeName
**BugHistory**
BugHistoryID|BugID|AssignetTo|Status
here in this table [AssignedTo ] column is a Foreign key for [EmployeeID] of EmployeeDetials
now i want to write a select statement for filtering my Grid my filters Should be [Title]|ProjectName|CreatedBY|AssigneTo|Status
How can i write the select statement for this can any one help me here...thanks in advance | 0 | [
2,
184,
20,
2757,
21,
5407,
3331,
26,
25272,
14,
7354,
19,
307,
8990,
240,
60,
800,
3726,
3726,
4148,
65,
31,
57,
20,
2757,
21,
5407,
3331,
26,
25272,
51,
7354,
13,
15,
2798,
51,
7354,
25,
1943,
29,
1886,
7484,
15,
51,
7354,
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... |
Looking for a training center in Canada
===
I am looking for a good Training Center that has MCPD Bootcamp courses, anywhere in Canada. | 3 | [
2,
699,
26,
21,
838,
459,
19,
836,
800,
3726,
3726,
31,
589,
699,
26,
21,
254,
838,
459,
30,
63,
1324,
9251,
6801,
8789,
4392,
15,
4922,
19,
836,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
how to remove google chrome browser download status
===
in windows 7 when we download a file from google chrome , the google chrome icon taskbar shows Green Highlight corresponding to the percent how much is downloaded.
I dont want chrome to show that, what should i do? | 2 | [
2,
184,
20,
4681,
8144,
13,
12985,
16495,
7121,
1782,
800,
3726,
3726,
19,
1936,
453,
76,
95,
7121,
21,
3893,
37,
8144,
13,
12985,
13,
15,
14,
8144,
13,
12985,
9801,
3005,
1850,
1285,
647,
14373,
7265,
20,
14,
2091,
184,
212,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
How do I do a regex search and replace in sublime text 2?
===
I want to remove inline style from an html document in ST2.
I imagine my regex will be something like this
style=\"*\"
If that's wrong, it doesn't matter. I'm sure I'll figure out the expression I'll need.
What I haven't been able to figure out, is how to actually use a regex to find or to find and replace text in ST2. The docs say that it can be done. But I can't find the documentation for how to do it.
| 0 | [
2,
184,
107,
31,
107,
21,
7953,
1706,
2122,
17,
3934,
19,
27644,
1854,
172,
60,
800,
3726,
3726,
31,
259,
20,
4681,
19,
1143,
1034,
37,
40,
13,
15895,
4492,
19,
354,
135,
9,
31,
4382,
51,
7953,
1706,
129,
44,
301,
101,
48,
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... |
Is this a memory leak under ARC?
===
Im running this code under ARC.
@interface WebServiceBase
{
NSString *strResponseData; // simillar to NSString __weak *strResponseData;
}
in WebService.m file
- (void) someMethod
{
WebServiceBase * __weak selfBlock = self;
dispatch_queue_t serialQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(serialQueue, ^{
[selfBlock processResponse];
});
}
-(void) processResponse
{
//NOTE:strResponseData is a public ivar by default its __strong)
NSData *responseData = [strResponseData dataUsingEncoding:NSUTF8StringEncoding];
//set these response data to NSXMLParser and then start parsing
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:responseData];
parser.delegate = self;
[parser parse];
} | 3 | [
2,
25,
48,
21,
1912,
11724,
131,
4686,
60,
800,
3726,
3726,
797,
946,
48,
1797,
131,
4686,
9,
13,
1,
6280,
6413,
2741,
11449,
8436,
13,
1,
13,
2172,
11130,
1637,
9729,
99,
18,
8782,
18,
69,
4375,
73,
12894,
4861,
3247,
139,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Disabling Holidays in a Calender
===
I was trying to disabling the holidays and weekends in my calender.I was tried the below code and additional some code to achieve the purpose.This will disable all weekends and holidays in the current month(say July).And also will disable all weekends in the next month(say august).But it is not disabling holiday lists in the next month after changing the month to July to august.For example i need to disable 25-Dec-2012 in my calender.How can do that? After changing the month the event "OnDayRender" not firing and disabling the days.Please help me?
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
bool IsAlreadyLoaded = false;
if (!Page.IsPostBack)
{
}
if (!IsAlreadyLoaded)
{
Raddatepicker2.Calendar.SpecialDays.Clear();
Raddatepicker2.SelectedDate = DateTime.Now;
IsAlreadyLoaded = true;
}
}
protected void Calendar_OnDayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
{
if (e.Day.Date.DayOfWeek == DayOfWeek.Saturday || e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
{
string otherMonthCssClass = "rcOutOfRange";
e.Cell.Text = "";
e.Cell.CssClass = "rcOutOfRange";
Label label = new Label();
label.Text = e.Day.Date.Day.ToString();
e.Cell.Controls.Add(label);
RadCalendarDay calendarDay = new RadCalendarDay();
calendarDay.Date = e.Day.Date;
calendarDay.IsSelectable = false;
calendarDay.ItemStyle.CssClass = otherMonthCssClass;
Raddatepicker2.Calendar.SpecialDays.Add(calendarDay);
}
//Checking for holidays
if(e.Day.Date==HolidayDate)
{
string otherMonthCssClass = "rcOutOfRange";
e.Cell.Text = "";
e.Cell.CssClass = "rcOutOfRange";
Label label = new Label();
label.Text = e.Day.Date.Day.ToString();
e.Cell.Controls.Add(label);
RadCalendarDay calendarDay = new RadCalendarDay();
calendarDay.Date = e.Day.Date;
calendarDay.IsSelectable = false;
calendarDay.ItemStyle.CssClass = otherMonthCssClass;
Raddatepicker2.Calendar.SpecialDays.Add(calendarDay);
}
}
</script>
<!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 runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>RadControls for ASP.NET AJAX</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<script type="text/javascript">
function OnDayRender(calendarInstance, args)
{
var jsDate = new Date(args._date[0], args._date[1] - 1, args._date[2]);
if (jsDate.getDay() == 0 || jsDate.getDay() == 6) {
var otherMonthCssClass = "rcOutOfRange";
args.get_cell().className = otherMonthCssClass;
args.get_cell().innerHTML = "<span>" + args._date[2] + "</span>";
args.get_cell().DayId = "";
}
}
</script>
<telerik:RadDatePicker ID="Raddatepicker2" Skin="Office2007" Width="200px" MinDate="2009-01-01"
runat="server" MaxDate="2099-12-16">
<DateInput ID="DateInput1" DateFormat="d" runat="server">
</DateInput>
<Calendar ID="Calendar1" DayNameFormat="FirstTwoLetters" FirstDayOfWeek="Monday"
runat="server" OnDayRender="Calendar_OnDayRender" Skin="Office2007">
<ClientEvents OnDayRender="OnDayRender" />
</Calendar>
</telerik:RadDatePicker>
</form>
</body>
</html> | 0 | [
2,
1460,
58,
8599,
13596,
19,
21,
1658,
21607,
800,
3726,
3726,
31,
23,
749,
20,
1460,
58,
8599,
14,
13596,
17,
16303,
19,
51,
1658,
21607,
9,
49,
23,
794,
14,
1021,
1797,
17,
1351,
109,
1797,
20,
4689,
14,
2131,
9,
1565,
129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Two Texfield in uitableview issue
===
I have a uitableview with **2 rows n 4 sections** and i have a **label and texfield in each cells**. And the problems is my label comes in all section where as my textfield is not repeating in other sections. Actually i have two textfield one for each cell, one is normal textfield and another is picker textfield(when i clicked TF the picker will pop up). **For one section both the TF coming but its not repeating in other section**.
My code
static NSString *CellIdentifier = @"Cell";
UITextField *textField;
NSString *string=[NSString stringWithFormat:@"ident_%d",indexPath.row];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:string];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.selectionStyle=UITableViewCellSelectionStyleNone;
UILabel *lbl1 = [[UILabel alloc]initWithFrame:CGRectMake(50, 10, 100, 35)];
[lbl1 setFont:[UIFont systemFontOfSize:16]];
[lbl1 setTextColor:[UIColor blackColor]];
[lbl1 setBackgroundColor:[UIColor clearColor]];
if (indexPath.row==0) {
lbl1.text = @"Quantity";
[cell.contentView addSubview:self.qntTF];
}
if (indexPath.row==1) {
lbl1.text = @"Unit";
[cell.contentView addSubview:self.unitTF];
}
// Configure the cell...;
textField =[self.tableArray objectAtIndex:indexPath.row];
[cell.contentView addSubview:textField];
cell.textLabel.text = nil;
textField.tag = TextFieldTag;
cell.detailTextLabel.text = nil;
[cell addSubview:lbl1];
[lbl1 release];
return cell;
| 0 | [
2,
81,
14012,
1109,
19,
13,
11193,
579,
4725,
1513,
800,
3726,
3726,
31,
57,
21,
13,
11193,
579,
4725,
29,
13,
1409,
135,
11295,
13,
103,
268,
4501,
1409,
17,
31,
57,
21,
13,
1409,
21018,
17,
14012,
1109,
19,
206,
2934,
1409,
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... |
vb.net windows app - how to read database name from another web.config file?
===
I have a windows application & need to read the database name from an external web.config file located in c:\test\web.config
Here is an example of my connection settings in my web.config file
<connectionStrings>
<add name="SiteSqlServer" connectionString="Data Source=CP5-1234\SQLEXPRESS;Initial Catalog=demo_db;User ID=demo_dbusr;Password=MyPass#1234;" providerName="System.Data.SqlClient" />
<!-- Connection String for SQL Server 2005 Express -->
<!-- Connection String for SQL Server 2000/2005
<add
name="SiteSqlServer"
connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
providerName="System.Data.SqlClient" />
-->
</connectionStrings>
Any help would be appreciated ;) | 0 | [
2,
13,
20468,
9,
2328,
1936,
4865,
13,
8,
184,
20,
1302,
6018,
204,
37,
226,
2741,
9,
14093,
2816,
3893,
60,
800,
3726,
3726,
31,
57,
21,
1936,
3010,
279,
376,
20,
1302,
14,
6018,
204,
37,
40,
4886,
2741,
9,
14093,
2816,
3893,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 compare two list based on a common string value?
===
I have two list collection of objects as in a format:
list1{
new Object1{ State= "AL" , Value = 3.123}
new Object2{ State= "CO", Value = 2.111}
}
list2{
new Object1{State="AL", Value=2.123}
new Object2{State="CO", Value=3.111}
}
I need to compare these two lists and generate another list like the following:
list3{
new Object1{State="AL", Value= (3.123 + 2.123)}
new Object2{ State="CO", Value =(2.111 + 3.111) }
}
Can somebody tell me how can i do this?
| 0 | [
2,
184,
20,
11590,
81,
968,
432,
27,
21,
757,
3724,
1923,
60,
800,
3726,
3726,
31,
57,
81,
968,
1206,
16,
3916,
28,
19,
21,
2595,
45,
968,
165,
1,
78,
3095,
165,
1,
146,
3726,
13,
7,
192,
7,
13,
15,
1923,
800,
203,
9,
918,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 uninstall sql 2008 multiple instances without restarting server ?
===
how to uninstall sql 2008 multiple instances without restarting server ?
SQl installer failing with error : server need restart after one instance uninstalled .
Its not practical for us to restrart the server to uninstall every single instance, thank you . | 2 | [
2,
184,
20,
367,
108,
21300,
4444,
255,
570,
1886,
13946,
366,
22767,
68,
8128,
13,
60,
800,
3726,
3726,
184,
20,
367,
108,
21300,
4444,
255,
570,
1886,
13946,
366,
22767,
68,
8128,
13,
60,
4444,
255,
16146,
106,
7250,
29,
7019,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.