unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Links within UILabels to Native Functions
===
As the title conveys, I want to have a UILabel that will contain phone number, address, email, etc. and I am looking for a way to link to native functions (i.e. when a user clicks on phone number, the dialer is launched and when the address is clicked, the Maps are launched). I've tried to research this and seems like UILabels may not be formattable. One way I could do this is to create custom UIButtons, but that seems tedious in terms of scalability, and may not be the best solution.
Just to give some context, the same exact thing is possible in Android:
TextView someText = (TextView) findViewById(R.id.about);
someText.setAutoLinkMask(Linkify.ALL);
contact.setText("Toll Free: 888-888-8888");
Will work just fine and link the number to the phone dialer. It works the same with an address by redirecting to the Maps application.
Is this possible in iOS and if not, what are the workarounds?
Cheers.
| 0 | [
2,
6271,
363,
13,
5661,
21018,
18,
20,
1275,
3719,
800,
3726,
3726,
28,
14,
581,
11266,
18,
15,
31,
259,
20,
57,
21,
13,
5661,
21018,
30,
129,
3717,
1132,
234,
15,
3218,
15,
8517,
15,
2722,
9,
17,
31,
589,
699,
26,
21,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
image context generating huge memory allocations and not released
===
I am subclassing a UILabel in which instead of using drawRect I am rendering the text to UIImage in the background.. here's the code:
- (UIImage *)imageForText
{
UIGraphicsBeginImageContextWithOptions(self.frameSize, NO, 0);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSaveGState(ctx);
CGAffineTransform transform = [self _transformForCoreText];
CGContextConcatCTM(ctx, transform);
if (nil == self.textFrame) {
CFAttributedStringRef attributedString = (__bridge CFAttributedStringRef)attributedStringWithLinks;
CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(attributedString);
CGMutablePathRef path = CGPathCreateMutable();
// We must tranform the path rectangle in order to draw the text correctly for bottom/middle
// vertical alignment modes.
CGPathAddRect(path, &transform, rect);
if (nil != self.shadowColor) {
CGContextSetShadowWithColor(ctx, self.shadowOffset, self.shadowBlur, self.shadowColor.CGColor);
}
self.textFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, 0), path, NULL);
CGPathRelease(path);
CFRelease(framesetter);
}
// Draw the tapped link's highlight.
if ((nil != self.touchedLink || nil != self.actionSheetLink) && nil != self.highlightedLinkBackgroundColor) {
[self.highlightedLinkBackgroundColor setFill];
NSRange linkRange = nil != self.touchedLink ? self.touchedLink.range : self.actionSheetLink.range;
CFArrayRef lines = CTFrameGetLines(self.textFrame);
CFIndex count = CFArrayGetCount(lines);
CGPoint lineOrigins[count];
CTFrameGetLineOrigins(self.textFrame, CFRangeMake(0, 0), lineOrigins);
for (CFIndex i = 0; i < count; i++) {
CTLineRef line = CFArrayGetValueAtIndex(lines, i);
CFRange stringRange = CTLineGetStringRange(line);
NSRange lineRange = NSMakeRange(stringRange.location, stringRange.length);
NSRange intersectedRange = NSIntersectionRange(lineRange, linkRange);
if (intersectedRange.length == 0) {
continue;
}
CGRect highlightRect = [self _rectForRange:linkRange inLine:line lineOrigin:lineOrigins[i]];
if (!CGRectIsEmpty(highlightRect)) {
CGFloat pi = (CGFloat)M_PI;
CGFloat radius = 5.0f;
CGContextMoveToPoint(ctx, highlightRect.origin.x, highlightRect.origin.y + radius);
CGContextAddLineToPoint(ctx, highlightRect.origin.x, highlightRect.origin.y + highlightRect.size.height - radius);
CGContextAddArc(ctx, highlightRect.origin.x + radius, highlightRect.origin.y + highlightRect.size.height - radius,
radius, pi, pi / 2.0f, 1.0f);
CGContextAddLineToPoint(ctx, highlightRect.origin.x + highlightRect.size.width - radius,
highlightRect.origin.y + highlightRect.size.height);
CGContextAddArc(ctx, highlightRect.origin.x + highlightRect.size.width - radius,
highlightRect.origin.y + highlightRect.size.height - radius, radius, pi / 2, 0.0f, 1.0f);
CGContextAddLineToPoint(ctx, highlightRect.origin.x + highlightRect.size.width, highlightRect.origin.y + radius);
CGContextAddArc(ctx, highlightRect.origin.x + highlightRect.size.width - radius, highlightRect.origin.y + radius,
radius, 0.0f, -pi / 2.0f, 1.0f);
CGContextAddLineToPoint(ctx, highlightRect.origin.x + radius, highlightRect.origin.y);
CGContextAddArc(ctx, highlightRect.origin.x + radius, highlightRect.origin.y + radius, radius,
-pi / 2, pi, 1);
CGContextFillPath(ctx);
}
}
CTFrameDraw(self.textFrame, ctx);
CGContextRestoreGState(ctx);
self.renderedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return self.renderedImage;
}
Now here's a snapshot of what I am getting at on allocations tool on Instruments.
![enter image description here][1]
I am not sure how to dig down deeper into this, but it seems that the image is not getting released and is kept at memory and it is increasing as I scroll the UIScrollView I have and call this method more and more. Any ideas? Is something wrong with my code above?
[1]: http://i.stack.imgur.com/jjv3s.png
| 0 | [
2,
1961,
4141,
13500,
2329,
1912,
16840,
18,
17,
52,
261,
800,
3726,
3726,
31,
589,
972,
1898,
68,
21,
13,
5661,
21018,
19,
56,
700,
16,
568,
2003,
14673,
38,
31,
589,
15307,
14,
1854,
20,
13,
5661,
22039,
19,
14,
2395,
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... |
PHP: Efficient way of retrieving database info to a class
===
Let's say you have a class, with certain properties, and that you tried your best so those properties would match the column names in a database in a way that you could fit each row of a db into your class object.
The way I usually do this, is by creating a method ***$class->get_all()*** to query the database for all the rows that match a specific query. From the resource set, I then create several sql objects, with mysql_fetch_object($resource) and store them in one array which is then returned. Basically something like this usually happens:
<?php
while($row = mysql_fetch_object($result_set)){
$class->id = $row->id;
$class->name = $row->name;
$class->birthdate = $row->birthdate;
$output[] = $class;
}
return $output;
?>
... which means I have 2 objects ($row and $class), with the same properties, and I am copying one of them into the other.
Is there a way to optimize this? Like, instead of copying the values from one to the other, maybe set them as a pointer to the same sql object property? | 0 | [
2,
13,
26120,
45,
8243,
161,
16,
13,
6239,
3272,
8397,
6018,
15404,
20,
21,
718,
800,
3726,
3726,
408,
22,
18,
395,
42,
57,
21,
718,
15,
29,
1200,
3704,
15,
17,
30,
42,
794,
154,
246,
86,
273,
3704,
83,
730,
14,
4698,
1817,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Enable input language programatically on Windows 7
===
I'm writing a windows installer for an application that depends on spanish input language being enabled which is not default on Windows 7. Is there a way I can programatically detect if Spanish input language is enabled on the host machine running Win 7 and enable it if it's not? | 0 | [
2,
9240,
6367,
816,
625,
721,
8438,
27,
1936,
453,
800,
3726,
3726,
31,
22,
79,
1174,
21,
1936,
16146,
106,
26,
40,
3010,
30,
9597,
27,
1273,
6367,
816,
142,
9338,
56,
25,
52,
12838,
27,
1936,
453,
9,
25,
80,
21,
161,
31,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 url wrong
===
I'm new in django and I'm reading a tutorial and it have an example but I think is a old Django version and now I'm using Django 1.4
views.py
from django.http import HttpResponse
import datetime
def current_datetime(request):
now = datetime.datetime.now()
html = "<html><body>It is now %s.</body></html>" % now
return HttpResponse(html)
def hours_ahead(request, offset):
offset = int(offset)
dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
html = "<html><body>In %s hour(s), it will be %s.</body></html>" % (offset, dt)
return HttpResponse(html)
and the urls.py file
from django.conf.urls.defaults import *
from mysite.views import current_datetime, hours_ahead
urlpatterns = patterns('',
(r'^time/$', current_datetime),
(r'^time/plus/\d{1,2}/$', hours_ahead),
)
| 0 | [
2,
3857,
14541,
287,
6362,
1389,
800,
3726,
3726,
31,
22,
79,
78,
19,
3857,
14541,
17,
31,
22,
79,
1876,
21,
29724,
17,
32,
57,
40,
823,
47,
31,
277,
25,
21,
315,
3857,
14541,
615,
17,
130,
31,
22,
79,
568,
3857,
14541,
137,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Converting a for loop to a recursive function
===
I have a code block I would like to convert to a recursive block of code that doesn't use for or while loops. Suggestions?
sprite = function(dataset, pos){
var size ={nrows : 3, ncolumns :3};
var data = [];
for(row = pos.row0; row < pos.row0+size.nrows; row++) {
for(column = pos.column0; column < pos.column0+size.ncolumns; column++) {
if(column == pos.column0) {
data.push([dataset[row][column]]);
} else {
data[row].push(dataset[row][column]);
}
}
}
return data;
} | 0 | [
2,
19583,
21,
26,
5293,
20,
21,
302,
24244,
1990,
800,
3726,
3726,
31,
57,
21,
1797,
1921,
31,
83,
101,
20,
8406,
20,
21,
302,
24244,
1921,
16,
1797,
30,
1437,
22,
38,
275,
26,
54,
133,
19661,
9,
18389,
60,
27902,
800,
1990,
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... |
SVN repository has changes, but 'svn up' does not apply these to our filesystem
===
I'll start by saying that we're new to Subversion, so we're not 100% on the processes and terminology, but it seems something is not working as it should so we're looking for help.
We're using Aptana with the Subversion plugin and we have connected to our Subversion 1.6.1 repository just fine.
We can make a change and sync and commit this change to our SVN server. We can see using websvn that it has correctly recorded the changes against a version number and shows which files are edited and our comments, so I think this is fine up to here.
When we then use SSH and we navigate to the file system directory and run 'svn update' it gives us a message to say 'at revision 53' for example. This revision number corresponds with the revision we've commited via Aptana and can see with the websvn.
But.... no files are changed on the server following this 'svn up' command :-(
Does anyone have any ideas please? It feels like we're missing something obvious, but can't work it out.
We've tried it with '--depth infinity' but no difference.
thanks in advance, | 0 | [
2,
13,
18,
16578,
24869,
63,
1693,
15,
47,
13,
22,
18,
16578,
71,
22,
630,
52,
5645,
158,
20,
318,
3893,
10724,
800,
3726,
3726,
31,
22,
211,
799,
34,
1148,
30,
95,
22,
99,
78,
20,
972,
10898,
15,
86,
95,
22,
99,
52,
12849,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reusable skinning code?
===
I am a .net developer learning DNN and wanted to know how I can make reusable code for my skins. What I would like to do is have the header and footer sections created in a file (like a masterpage) and then create my skin I will use for the website bringing in the header/footer file and adding to it ( like a nested master page). Is there a way to do this when skinning ? I am trying to prevent making a Home page skin and a skin for the rest of the website. Where the header and the footer parts are always the same for the home page and the website.
One if the biggest things is that I do not want to have to make changes in multiple places.
Any suggestions on how to do this ?
| 0 | [
2,
302,
267,
579,
1188,
2981,
1797,
60,
800,
3726,
3726,
31,
589,
21,
13,
9,
2328,
10058,
2477,
13,
43,
9377,
17,
417,
20,
143,
184,
31,
92,
233,
302,
267,
579,
1797,
26,
51,
1188,
18,
9,
98,
31,
83,
101,
20,
107,
25,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
First() method returns wrong string
===
How to tell the First method which is part of LINQ library to return proper value. I have smth like this:
var query = db.SinglePageContent.Where(q => q.Lang == zm1 && q.PageName == zm2).Select(s => new { s.Content});
//var reqUrl = query.FirstOrDefault(item => item.Content);
ViewBag.requestUrl = query.First();
and now the ViewBag.requestUrl has value "{ Content = bla bla bla }", but I want to have only "bla bla bla". I just don;t know how to get there to only retrieve value. Any ideas? | 0 | [
2,
64,
5,
6,
2109,
4815,
1389,
3724,
800,
3726,
3726,
184,
20,
494,
14,
64,
2109,
56,
25,
141,
16,
6294,
1251,
1248,
20,
788,
4119,
1923,
9,
31,
57,
7613,
96,
101,
48,
45,
4033,
25597,
800,
13,
9007,
9,
14031,
6486,
25424,
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... |
.net mvc integrating with Active Directory and using a data model to access System.DirectoryServices.AccountManagement
===
I am building an Intranet application and I am using Windows authentication. I have this setup and working and I am able to see the current users username via @Context.User.Identity.Name
I would like to query the Active Directory to retrieve the Display Name, email address, etc.
I have looked at System.DirectoryServices.AccountManagement and from this have created a basic example. I am not clear though on how to display this information throughout my application.
What I have so far is as follows:
public class searchAD
{
// Establish Domain Context
PrincipalContext domainContext = new PrincipalContext(ContextType.Domain);
public searchAD()
{
// find the user
UserPrincipal user = UserPrincipal.FindByIdentity(domainContext, HttpContext.Current.User.Identity.Name);
if (user != null)
{
var userGuid = user.Guid;
var DisplayName = user.DisplayName;
var GivenName = user.GivenName;
var EmailAddress = user.EmailAddress;
}
}
}
I am assuming I need to create a ViewModel like so?
public class domainContext
{
public Nullable<Guid> userGuid { get; set; }
public string DisplayName { get; set; }
public string GivenName { get; set; }
public string EmailAddress { get; set; }
}
I want to be able to access this information in various sections of the application.
I am not getting any errors just seem to be missing something that ties all this together. | 0 | [
2,
13,
9,
2328,
307,
8990,
24529,
29,
1348,
16755,
17,
568,
21,
1054,
1061,
20,
1381,
329,
9,
10197,
93,
11449,
18,
9,
29148,
23502,
800,
3726,
3726,
31,
589,
353,
40,
14369,
2328,
3010,
17,
31,
589,
568,
1936,
27963,
9,
31,
57,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Redirect to directory not working
===
I have added the following two lines to my .htaccess, the first one seems to be working as expected, however, the second line keeps redirecting to /index.php instead of /admin/index.php
RewriteRule ^ajax.html /index.php?option=com_ajax
RewriteRule ^admin-ajax.html /admin/index.php?option=com_ajax
Both /index.php and /admin/index.php are of course different files in different directories.
What am I missing?
Thanks in advance! | 0 | [
2,
302,
14706,
20,
16755,
52,
638,
800,
3726,
3726,
31,
57,
905,
14,
249,
81,
1560,
20,
51,
13,
9,
9020,
20604,
15,
14,
64,
53,
2206,
20,
44,
638,
28,
1727,
15,
207,
15,
14,
153,
293,
8968,
302,
14706,
68,
20,
13,
118,
25671... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
calculating excess flow and overflowing in max flow algorithm
===
I am reading push flow algorithms at following link.
[http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=maxflowPushRelabel][1]
It is mentioned that
Excess Flow - We define the excess flow e as e(u) = f(V,u), the net flow into u. A vertex u ∊ V-{s,t} is overflowing / active if e(u) > 0.
I am looking for example with simple flow network how do we calculate e(u) ?
Thanks for your time and help.
[1]: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=maxflowPushRelabel | 0 | [
2,
22937,
9521,
3312,
17,
20285,
68,
19,
2049,
3312,
9083,
800,
3726,
3726,
31,
589,
1876,
3250,
3312,
15935,
35,
249,
3508,
9,
636,
21127,
6903,
28360,
9,
3880,
716,
1157,
9,
960,
118,
6668,
60,
19673,
62,
3726,
18077,
1569,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to review thise email we are in TO at outlook software
===
I am receiving tons of email everyday, I want to know is there any way I filter just those emails that I am in TO address bar? not Those I am in CC address bar?
| 0 | [
2,
184,
20,
1487,
48,
62,
8517,
95,
50,
19,
20,
35,
19837,
2306,
800,
3726,
3726,
31,
589,
3396,
5278,
16,
8517,
10789,
15,
31,
259,
20,
143,
25,
80,
186,
161,
31,
11945,
114,
273,
8517,
18,
30,
31,
589,
19,
20,
3218,
748,
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,
0,
0,
0,
0,
0,
0,
0... |
Getting the logs of the script executing on a selenium grid2 node?
===
Hi people I am using selenium grid2 to test my scripts and my problem is that I need to extract the log of the script that is executing on a particular node of the grid and for that I have written the following code
/* THIS CODE STARTS THE HUB AND ATTACHES A NODE TO THE HUB */
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.apache.bcel.util.ClassLoader;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.mortbay.jetty.servlet.AbstractSessionManager.Session;
import org.openqa.grid.common.GridRole;
import org.openqa.grid.common.RegistrationRequest;
import org.openqa.grid.common.SeleniumProtocol;
import org.openqa.grid.internal.utils.GridHubConfiguration;
import org.openqa.grid.internal.utils.SelfRegisteringRemote;
import org.openqa.grid.web.Hub;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.server.log.LoggingManager;
import org.seleniumhq.jetty7.util.log.LoggerLog;
import org.testng.TestListenerAdapter;
import com.beust.testng.TestNG;
import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.condition.DefaultConditionRunner.Log4jMonitor;
public class StartHubProgrammatically {
Hub myHub;
// static final Logger logger = Logger.getLogger(StartHubProgrammatically.class);
public static void main(String s[]) throws Exception{
StartHubProgrammatically startHub=new StartHubProgrammatically();
startHub.startHub();
}
public void startHub() throws Exception{
final Logger logger = Logger.getLogger(StartHubProgrammatically.class);
PropertyConfigurator.configure("log4j.properties");
GridHubConfiguration gridHubConfig = new GridHubConfiguration();
gridHubConfig.setHost("localhost");
gridHubConfig.setPort(4444);
myHub = new Hub(gridHubConfig);
myHub.start();
DesiredCapabilities chrome = DesiredCapabilities.internetExplorer();
chrome.setBrowserName("*iexplore");
SelfRegisteringRemote remoteWebDriverNode = attachNodeToHub(DesiredCapabilities.internetExplorer(),
GridRole.REMOTE_CONTROL, 5555, SeleniumProtocol.WebDriver);
}
private SelfRegisteringRemote attachNodeToHub(
DesiredCapabilities capability, GridRole role, int nodePort,
SeleniumProtocol protocol) throws Exception {
SelfRegisteringRemote node = null;
RegistrationRequest registrationRequest = RegistrationRequest
.webdriverNoCapabilities();
capability.setCapability("seleniumProtocol", protocol);
registrationRequest.addDesiredCapabilitiy(capability);
registrationRequest.setRole(role);
registrationRequest.setConfiguration(fetchNodeConfiguration(role,
nodePort, protocol));
node = new SelfRegisteringRemote(registrationRequest);
node.startRemoteServer();
node.startRegistrationProcess();
return node;
}
private Map<String, Object> fetchNodeConfiguration(GridRole role,
int portToRun, SeleniumProtocol protocol)
throws MalformedURLException {
Map<String, Object> nodeConfiguration = new HashMap<String, Object>();
nodeConfiguration.put(RegistrationRequest.AUTO_REGISTER, true);
nodeConfiguration.put(RegistrationRequest.HUB_HOST, myHub.getHost());
nodeConfiguration.put(RegistrationRequest.HUB_PORT, myHub.getPort());
nodeConfiguration.put(RegistrationRequest.PORT, portToRun);
URL remoteURL = new URL("http://" + myHub.getHost() + ":" + portToRun);
nodeConfiguration.put(RegistrationRequest.PROXY_CLASS,
"org.openqa.grid.selenium.proxy.WebDriverRemoteProxy");
nodeConfiguration.put(RegistrationRequest.MAX_SESSION, 1);
nodeConfiguration.put(RegistrationRequest.CLEAN_UP_CYCLE, 2000);
nodeConfiguration.put(RegistrationRequest.REMOTE_URL, remoteURL);
nodeConfiguration.put(RegistrationRequest.MAX_INSTANCES, 1);
return nodeConfiguration;
}
}
/* THIS IS THE TEST SCRIPT WE EXECUTE THIS SCRIPT USING TESTNG WHICH SENDS A REQUEST ON TO THE HUB AND THE HUB ROUTES THE THIS SCRIPT TO A NODE THAT IS COMPATIBLE WITH THE CONFIGURATION SPECIFIED IN THE SCRIPT */
package com.qait.testrunner1;
import java.net.MalformedURLException;
import java.net.URL;
import org.testng.annotations.*;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
public class GridWithWebdriver {
public Selenium selenium;
@Parameters( { "browser" })
@BeforeClass
public void setup(String browser) {
selenium = new DefaultSelenium("localhost", 4444, browser,"http://google.com");
selenium.start();
}
@AfterClass
public void tearDown() {
selenium.stop();
}
@Test
public void test_first() {
selenium.open("/");
selenium.type("q", "First");
selenium.click("btnG");
}
@Test
public void test_second() {
selenium.open("/");
selenium.type("q", "second");
selenium.click("btnG");
}
}
Now the above script executes on the node of the selenium grid2 and I need to extract the logs of the script execution on the node.
We tried to use Logger to extract the logs of the nodes but what we get are the logs of the hub which is undesirable. Please suggest a way out for extracting the logs of the script executing on the node of the selenium grid. A sample code snippet will be really helpful
We referred this SO post -: http://stackoverflow.com/questions/11310735/how-to-get-test-activity-logs-from-selenium-grid-2-programatically
but in the above post the method requires a session-id attribute but we aren't able to retrieve the session id as we have made it a standalone system. | 0 | [
2,
1017,
14,
18893,
16,
14,
3884,
25836,
27,
21,
23027,
14311,
7354,
135,
15421,
60,
800,
3726,
3726,
4148,
148,
31,
589,
568,
23027,
14311,
7354,
135,
20,
1289,
51,
17505,
17,
51,
1448,
25,
30,
31,
376,
20,
10962,
14,
6738,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mongoose ODM, change variables before saving
===
I want to create a model layer with mongoose for my user documents, which does:
1. validation (unique, length)
2. canonicalisation (username and email are converted to lowercase to check uniqueness)
3. salt generation
4. password hashing
5. (logging)
All of these actions require to be executed before persistment. Fortunatly mongoose supports validation, plugins and middleware.
The bad thing is just that I don't find any usable documentation about this topic.
The official docs on mongoosejs.com are to short...
So has somebody an example about pre actions with mongoose (or a complete plugin which does all, if exists)?
Regards | 0 | [
2,
3521,
839,
6641,
12340,
79,
15,
753,
12157,
115,
7599,
800,
3726,
3726,
31,
259,
20,
1600,
21,
1061,
5385,
29,
3521,
839,
6641,
26,
51,
4155,
4374,
15,
56,
630,
45,
137,
9,
27999,
13,
5,
1020,
5312,
15,
1476,
6,
172,
9,
574... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rendering C1 functions in an external page - data missing
===
I have a sub-application (YetAnotherForum.NET) living in a child directory of my Composite C1 site. In order to maintain a consistent look and feel I want to pull in C1 functions for the navigation elements.
**Note:** All html mark-up in code below has had pointy brackets replaced with square brackets in order to allow posting here.
I've figured out I can call C1 functions using this syntax:
<pre>
[f:function ID="Function1" name="Custom.Layout.FooterLinks" runat="server"/]
</pre>
However, the data behind the function seems to be unavailable. Any ideas what the data issue might be? Perhaps I need the external page to inherit from some form of Composite C1 page?
Here's the function code:
<pre>
@using Composite.Data;
@using Composite.Data.Types;
@using Composite.Data.ProcessControlled.ProcessControllers.GenericPublishProcessController;
@using CompositeC1Contrib.RazorFunctions;
@inherits CompositeC1WebPage
@functions {
private IEnumerable<IPage> FooterLinkPages()
{
IEnumerable<IPage> pages = DataFacade.GetData<IPage>();
IEnumerable<IPage> returnPages;
using (DataConnection connection = new DataConnection())
{
returnPages = (from l in connection.Get<Custom.Layout.FooterLink>()
join p in pages on l.Page equals p.Id
where l.PublicationStatus == GenericPublishProcessController.Published
&& p.PublicationStatus == GenericPublishProcessController.Published
orderby l.Position ascending
select p).ToList();
}
return returnPages;
}
}
[ul class="unstyled"]
@foreach (IPage page in FooterLinkPages())
{
[li]<a href="@Html.C1().PageUrl(page)">@(String.IsNullOrWhiteSpace(page.MenuTitle) ? page.Title : page.MenuTitle)[/a][/li]
}
[/ul]
</pre> | 0 | [
2,
15307,
272,
165,
3719,
19,
40,
4886,
2478,
13,
8,
1054,
2863,
800,
3726,
3726,
31,
57,
21,
972,
8,
2552,
20669,
13,
5,
16480,
14945,
1106,
723,
9,
2328,
6,
634,
19,
21,
850,
16755,
16,
51,
12639,
272,
165,
689,
9,
19,
389,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rectangle Area GWT selection
===
Can I show a highlighted over my Flextable in GWT. The basic idea is that user can click on Flextable and drag around so that he can be able to see the area as a selected rectangle. Is there a drag event for get cell or should I use the mouseEvents and modify them according to my requirements?
| 0 | [
2,
27181,
217,
14094,
38,
3155,
800,
3726,
3726,
92,
31,
298,
21,
12528,
84,
51,
14409,
5924,
19,
14094,
38,
9,
14,
2125,
882,
25,
30,
4155,
92,
10840,
27,
14409,
5924,
17,
5501,
140,
86,
30,
24,
92,
44,
777,
20,
196,
14,
217,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any way or any framework in python to create an object model from a xml?
===
for example my xml file contains :
<layout name="layout1">
<grid>
<row>
<cell colSpan="1" name="cell1"/>
</row>
<row>
<cell name="cell2" flow="horizontal"/>
</row>
</grid>
</layout>
and I want to retrieve an object from the xml
for example returned object structure be like this
class layout(object):
def __init__(self):
self.grid=None
class grid(object):
def __init__(self):
self.rows=[]
class row(object):
def __init__(self):
self.cels=[] | 0 | [
2,
25,
80,
186,
161,
54,
186,
6596,
19,
20059,
20,
1600,
40,
3095,
1061,
37,
21,
23504,
60,
800,
3726,
3726,
26,
823,
51,
23504,
3893,
1588,
13,
45,
13,
1,
4414,
1320,
204,
3726,
7,
4414,
1320,
165,
7,
1,
13,
1,
16375,
1,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Inner Join, Two Tables
===
This has probably been asked before, but i really need the answer so..
I have a table called CURRENT_ACTIVITY and FIRST_NAME and LAST_NAME field in an employee table, i need to join the FIRST_NAME and LAST_NAME to the left-most side of the CURRENT_ACTIVITY table using LINQ, can you guys help?
Thanks,
Sam | 0 | [
2,
3754,
1865,
15,
81,
7484,
800,
3726,
3726,
48,
63,
910,
74,
411,
115,
15,
47,
31,
510,
376,
14,
1623,
86,
9,
9,
31,
57,
21,
859,
227,
866,
1,
19348,
17,
64,
1,
7259,
17,
236,
1,
7259,
575,
19,
40,
7362,
859,
15,
31,
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... |
Scroll WinRT ListView to particular group
===
I have a ListView and grouped items inside of it. User has different ways of navigating into the page, and according to the way he navigates, I wish to have a certain group in view when the page opens.
I tried setting these:
itemGridView.ScrollIntoView(....);
itemGridView.SelectedIndex = ....;
itemGridView.SelectedItem = ....;
where itemGridView is the name of the ListView, but none of that seems to work.
Any help appreciated, thanks. | 0 | [
2,
12159,
628,
5256,
968,
4725,
20,
1498,
214,
800,
3726,
3726,
31,
57,
21,
968,
4725,
17,
19511,
3755,
572,
16,
32,
9,
4155,
63,
421,
2847,
16,
1775,
13227,
1880,
77,
14,
2478,
15,
17,
496,
20,
14,
161,
24,
20782,
18,
15,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
admin console log search using options since
===
I'm trying to filter my logs in the admin console for only recent entries.
I tried selecting the "Since:" option and putting in a date but it doesn't seem to work.
It seems to be filtering entries "until" the date I enter and not "since"? Is this just mislabeled or does it only work in conjuction with the "Filter:" option that I left empty as I only want to filter by date?
If the "Since:" option functionality is in fact "until", then can anyone suggest a filter that would return entries after a specific date.
| 0 | [
2,
21,
43,
2160,
8650,
6738,
2122,
568,
6368,
179,
800,
3726,
3726,
31,
22,
79,
749,
20,
11945,
51,
18893,
19,
14,
21,
43,
2160,
8650,
26,
104,
1764,
11399,
9,
31,
794,
20764,
14,
13,
7,
7412,
45,
7,
4255,
17,
3873,
19,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to Deal with files in actual phone
===
Please help to creating files in actual android phone.
If i have created files in emulator with DDMS then can that files/folders are also be present
in real android phone after deploy?
Please answer me about where do i create file system in android system. | 0 | [
2,
184,
20,
1183,
29,
6488,
19,
3463,
1132,
800,
3726,
3726,
2247,
448,
20,
2936,
6488,
19,
3463,
13005,
1132,
9,
100,
31,
57,
679,
6488,
19,
3579,
14868,
29,
13,
8096,
79,
18,
94,
92,
30,
6488,
118,
8814,
445,
50,
67,
44,
734... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Application running only on pc with visual studio
===
I've a VS solution which contains two projects, one is c++ and other is GUI in c#. This c# project calls c++ project for calculations. When I'm running this on my machine its running fine in debug mode but when I'm trying to run it on machine without visual studio(debug build) its not able to get c++ dll, but if I build the solution in release mode and then try to run then it runs fine on both the machine. Can someone explain why is this happening ?
| 0 | [
2,
3010,
946,
104,
27,
5168,
29,
3458,
1120,
800,
3726,
3726,
31,
22,
195,
21,
4611,
4295,
56,
1588,
81,
2314,
15,
53,
25,
272,
20512,
17,
89,
25,
9457,
19,
272,
5910,
9,
48,
272,
5910,
669,
3029,
272,
20512,
669,
26,
19186,
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 the device interface orientation in viewWillAppear
===
I need to get the interface orientation in the viewWillAppear method of my UIViewController. What I did is:
if (self.interfaceOrientation == UIInterfaceOrientationPortrait)
NSLog(@"Portrait");
else
NSLog(@"Landscape");
When in landscape, I'm always getting Portrait in the viewWillAppear and Landscape in the viewDidAppear. Why?
So, I tried using [[UIApplication sharedApplication] statusBarOrientation], but the same happens. I also tried another solution posted here in Stack Overflow:
UIDevice* device = [UIDevice currentDevice];
[device beginGeneratingDeviceOrientationNotifications];
UIDeviceOrientation currentOrientation = device.orientation;
[device endGeneratingDeviceOrientationNotifications];
This seems to correctly return the orientation, but now I'm left with the problem of mapping UIDeviceOrientation to UIInterfaceOrientation, which is not possible as far as I know (face up and face down cannot be mapped).
Any solution to this issue? | 0 | [
2,
1017,
14,
3646,
6573,
10245,
19,
1418,
5580,
22306,
512,
800,
3726,
3726,
31,
376,
20,
164,
14,
6573,
10245,
19,
14,
1418,
5580,
22306,
512,
2109,
16,
51,
13,
5661,
4725,
12898,
1252,
9,
98,
31,
144,
25,
45,
100,
13,
5,
8411,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
shortening Axis values with Kendo UI
===
I am using Kendo UI in particular dataviz to show some charts, and what I'm looking to do is shorten axis values specifically turning 10,000 into 10k and so on I'm not sure if this is possible any help would be appreciated.
Adam | 0 | [
2,
502,
6286,
8577,
4070,
29,
2639,
537,
13,
5661,
800,
3726,
3726,
31,
589,
568,
2639,
537,
13,
5661,
19,
1498,
1054,
1755,
380,
20,
298,
109,
5158,
15,
17,
98,
31,
22,
79,
699,
20,
107,
25,
502,
219,
8577,
4070,
3524,
2101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NHibernate vs. Entity Framework
===
TLDR - Which is a better option between EF and NHibernate if all you know is that it needs to work with oracle db, dynamic schema change at run time, some tables don't have primary keys, learning curve cant be too long.
We have written a MVC 4 application that uses EF for retrieving data from the database. We knew going into this project that some of our tables don't have primary keys (and some wont be getting them ever) so we also have a persistence project to run regular queries against tables without primary keys. That has been our solution around the primary key issue but I read that NHibernate is more forgiving and has some work arounds for querying tables without primary keys. Is this the case?
**A question was posed to me about whether or not we would be able to alter the schema at run time based on what customer logs in. Each customer will have identical sets of tables, but they have separate schema. This is for security purposes. The tables will never be different so we will have one "master" schema that we use for generating our poco's and building in dev. When the application is deployed though, customers log in and they should only be able to retrieve orders from tables within their respective schema. This would be done by changing the schema that is used in the context...unless someone has a better suggestion for doing this? Essentially we want to change what tables the user connects to based on what customer they belong too but still be able to view all of the entities in the model designer and generate poco's when working inside the solution.**
We use oracle as our database provider and have it working with EF so far, but EF requires 3rd party tools in order to work whereas NHibernate works well with oracle out the box. Since we have an oracle DB should we be looking at other ORM tools over EF or is EF still a strong tool regardless?
Like I said, we already have a mocked up application running with EF. It was relatively straight forward and easy to understand. After we finish designing the architecture and back bone it would be fairly easy for the rest of the team to dive right in and work with EF based on my experience. That could be because there is a plethora of reference materials available and even tutorial projects that show EF in action with MVC. I have already found it difficult to find good documentation and support for NHibernate. Has anyone experienced frustration due to the lack of documentation and since decided to forget all about NHibernate as an ORM tool and would it be difficult for other developers to learn it quickly?
ps. The bold question above has been the most frustrating thing that I cant solve so far and is the cause of me looking at NHibernate as an alternative solution. If you can propose a solution that allows me to change the schema dynamically at run time then I can forget all about NHibernate. So if nothing else I am really looking for the bold section to get answered.
Thank you in advance for the assistance | 4 | [
2,
12109,
15191,
8820,
4611,
9,
9252,
6596,
800,
3726,
3726,
13,
7786,
3807,
13,
8,
56,
25,
21,
574,
4255,
128,
11599,
17,
12109,
15191,
8820,
100,
65,
42,
143,
25,
30,
32,
2274,
20,
170,
29,
15759,
13,
9007,
15,
7782,
23874,
75... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
importing csv file to mysql
===
I'm using MySQL with php. Through a php script i'm trying to import a csv file with the following query
LOAD DATA LOCAL INFILE '$file'
INTO TABLE userstable
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n' IGNORE 1 LINES (name, univ, mobile);
I'm successfully able to import the file in to the database tables but i'm able to see
hidden formatting symbols (as in word, powerpoint, etc..) in all the cells under the last column i.e mobile.
How to avoid those from inserting in the table
| 0 | [
2,
9010,
68,
272,
18,
710,
3893,
20,
51,
18,
22402,
800,
3726,
3726,
31,
22,
79,
568,
51,
18,
22402,
29,
13,
26120,
9,
120,
21,
13,
26120,
3884,
31,
22,
79,
749,
20,
9010,
21,
272,
18,
710,
3893,
29,
14,
249,
25597,
6305,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Conditional updateItem on DynamoDB
===
I am fighting with updating an item in the DynamoDB table. In the documentation I noticed the next sentence:
> UpdateItem – Edits an existing item's attributes. You can also use
> conditional operators to perform an update only if the item’s
> attribute values match certain conditions.
I am writing on Objective-C and I cannot find any possibility for developer to set any conditions to the updateItem operation. I need the condition to be applied to the range-key.
Has anyone succeeded in conditional updating in DynamoDB?
PS. I cannot instantiate the correct writeBatchItem arguments structure. There is no info in the internet about working with DynamoDB on Objective-C :(
Thanks in advance for any help! | 0 | [
2,
21206,
11100,
2119,
79,
27,
18120,
9007,
800,
3726,
3726,
31,
589,
1849,
29,
71,
43,
1880,
40,
9101,
19,
14,
18120,
9007,
859,
9,
19,
14,
13945,
31,
2711,
14,
328,
5123,
45,
13,
1,
11100,
2119,
79,
13,
10,
9392,
18,
40,
314... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 JSON object to Controller but loose model binding
===
I am trying to pass a simple JSON object to a controller using MVC3 and JSON. The object gets passed but I loose all the properties. I see all the properties in firebug on the request but am not sure why I am loosing them on the server. Do all the properties of the object need to be set in order for the mapping to work? I am using MVC3 so the binding should be build in. What am I missing?
Class:
[Serializable]
public class StoryNote
{
public int Id { get; set; }
public string Note { get; set; }
public Nullable<int> StoryCardId { get; set; }
public string CreatedBy { get; set; }
public Nullable<System.DateTime> CreateDate { get; set; }
public virtual StoryCard StoryCard { get; set; }
}
JSON:
$(document).ready(function () {
$('#newNote').click(function (e) {
e.preventDefault();
var storynote = {
StoryNote: {
Note: $('#Note').val(),
StoryCardId: $('#StoryCard_Id').val(),
CreatedBy: 'Xyz', }
};
$.ajax({
url: '@Url.Action("PostNote")',
type: 'POST',
data: JSON.stringify(storynote),
dataType: 'json',
contentType: 'application/json; charset=utf-8',
success: function (data) {
$('#previousNotes').append(data.Note + '<br/>' + data.CreatedBy + '<br/><hr/>');
},
});
});
});
Controller:
[HttpPost]
public JsonResult PostNote(StoryNote newStoryNote)
{
StoryNote newNote = new StoryNote { Note = newStoryNote.Note, CreatedBy = newStoryNote.CreatedBy, StoryCardId = newStoryNote.StoryCardId, CreateDate = DateTime.Now };
db.StoryNotes.Add(newStoryNote);
return Json(newStoryNote, JsonRequestBehavior.AllowGet);
}
| 0 | [
2,
2848,
487,
528,
3095,
20,
9919,
47,
4675,
1061,
8728,
800,
3726,
3726,
31,
589,
749,
20,
1477,
21,
1935,
487,
528,
3095,
20,
21,
9919,
568,
307,
8990,
240,
17,
487,
528,
9,
14,
3095,
3049,
1100,
47,
31,
4675,
65,
14,
3704,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
easy ui with null data bug
===
I am using easyui for my application. I need to show empty grids for some reasons and I send null data to easyui. However it doesn't show empty grid but a sort number and a button at the first column.
Here is my code:
$('#GRID_PT_TARIFF_CONTRACT').datagrid({
singleSelect: true,
remoteSort: false,
fitcolumns: true,
columns: [[
{ field: 'action', title: 'İşlem', width: (_width * 0.08).toString(), sortable: false, formatter: function (value, row, index) {
var button = "";
button = '<input type="button" value="Tarifeyi aç" class="BttnWindow" onclick="DESIGN.OPEN_SEGMENT_FRAME_BY_BUTTON(\'' + row.TariffId+ '\',\'' + row.TariffName + '\',\'' + row.ContractName + '\',\'' + row.Supplier + '\') "/>';
return button;
}
},
{ field: 'TariffName', title: 'Taslak Tarife Tanımı', width: '100%', sortable: true },
{ field: 'TariffStat', title: 'Taslak Tarife Durumu', width: '100%', sortable: true },
{ field: 'Supplier', title: 'Tedarikçi', width: '100%', sortable: true },
{ field: 'ContractName', title: 'Sözleşme Tanımı', width: '100%', sortable: true },
{ field: 'ContractStat', title: 'Sözleşme Durumu', width: '100%', sortable: true },
{ field: 'StartDate', title: 'Başlangıç Tarihi', width: '100%', sortable: true },
{ field: 'EndDate', title: 'Bitiş Tarihi', width: '100%', sortable: true },
{ field: 'NoticePeriod', title: 'İhbar Süresi', width: '100%', sortable: true, formatter: function (value, row, index) {
var val;
if (row.TariffId != null) {
val = value + ' Gün';
}
return val;
}
},
{ field: 'ValidityPeriod', title: 'Geçerilik Süresi', width: '100%', sortable: true, formatter: function (value, row, index) {
var val;
if (row.TariffId != null) {
val = value + ' Ay';
}
return val;
}
}
]],
onClickRow: function () {
var row = $('#GRID_PT_TARIFF_CONTRACT').datagrid('getSelected');
if (row.TariffId != null) {
GLOBALS.SelectedTariffId = row.TariffId.toString();
//DEGIGN.ROWCLICKEVENT
}
},
onDblClickRow: function () {
var row = $('#GRID_PT_TARIFF_CONTRACT').datagrid('getSelected');
if (row.TariffId != null) {
GLOBALS.SelectedTariffId = row.TariffId.toString();
GLOBALS.SelectedTariffName = row.TariffName.toString();
GLOBALS.SelectedContractName = row.ContractName.toString();
GLOBALS.SelectedSupplier = row.Supplier.toString();
DESIGN.CREATE_TARIFF_WIN(row.TariffId);
}
},
onLoadSuccess: function (data) {
var panel = $(this).closest(".datagrid");
var dg = $(this);
panel.find("div.datagrid-view2 > div.datagrid-body tr:first > td[field]").each(function (k, v) {
var bodyCol = $(v);
var field = bodyCol.attr("field");
var headerCol = panel.find("div.datagrid-view2 > div.datagrid-header tr:first > td[field='" + field + "']");
var bodyContent = bodyCol.children(":first");
var headerContent = headerCol.children(":first");
var content = null;
if (bodyCol.width() > headerCol.width()) {
content = bodyCol.children(":first");
} else {
content = headerCol.children(":first");
}
var col = dg.datagrid("getColumnOption", field);
col.width = content.outerWidth();
col.boxWidth = $.boxModel == true ? content.width() : content.outerWidth();
bodyContent.width(col.boxWidth);
headerContent.width(col.boxWidth);
});
dg.datagrid("fitColumns");
dg.datagrid("fixColumnSize");
}
});
And here is the image:
![Like this image][1]
[1]: http://i.stack.imgur.com/WZR7P.png | 0 | [
2,
2010,
13,
5661,
29,
16203,
1054,
6256,
800,
3726,
3726,
31,
589,
568,
2010,
5661,
26,
51,
3010,
9,
31,
376,
20,
298,
2424,
7354,
18,
26,
109,
2932,
17,
31,
2660,
16203,
1054,
20,
2010,
5661,
9,
207,
32,
1437,
22,
38,
298,
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... |
Rhino ETL - loading large pipe-delimited files
===
We've got to load large pipe-delimited files. When loading these into a SQL Server DB by using Rhino ETL (relying upon FileHelpers), is it mandatory to provide a record class?
We have to load files to different tables which have dozens of columns - it might take us a whole day to generate them. I guess we can write a small tool to generate the record classes out of the SQL Server tables.
Another approach would be to write an IDataReader wrapper for a FileStream and the pass it on to a SqlBulkCopy.
SqlBulkCopy does require column mappings as well but it does allow column ordinals - that's easy.
Any ideas/suggestions?
Thanks.
| 0 | [
2,
18642,
2133,
255,
13,
8,
12797,
370,
7642,
8,
546,
23012,
6488,
800,
3726,
3726,
95,
22,
195,
330,
20,
6305,
370,
7642,
8,
546,
23012,
6488,
9,
76,
12797,
158,
77,
21,
4444,
255,
8128,
13,
9007,
34,
568,
18642,
2133,
255,
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... |
Triggers sql(change type column)
===
i need select data, end i need change column `date_payment` with `DateTime` to `Text`, please help...
i write this query
SELECT r.id, user_name, user_phone, date_create, REPLACE( date_payment, '0000-00-00 00:00:00', 'No payment' ) , payment_method, amount, rs.name_ru
FROM request AS r, request_status AS rs
WHERE r.status = rs.id
LIMIT 0 , 30
in sql console query is valid, and `date_payment` is replase, but:
MySqlCommand cmd = new MySqlCommand(query, conn);
dt.Load(cmd.ExecuteReader());
GetList();
source.DataSource = dt;
dataGrid1.ItemsSource = source;
then column(date_payment) in datagrid is null - why? | 0 | [
2,
7286,
18,
4444,
255,
5,
16229,
1001,
4698,
6,
800,
3726,
3726,
31,
376,
5407,
1054,
15,
241,
31,
376,
753,
4698,
13,
1,
8209,
1,
12224,
1130,
1,
29,
13,
1,
8209,
891,
1,
20,
13,
1,
11969,
1,
15,
2247,
448,
9,
9,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why this code wont work? XML with .StartsWith
===
Why this work like this:
XDocument dataFeed = XDocument.Parse(e.Result);
var guide = from query in dataFeed.Descendants("MaxPayne3")
select new NewGamesClass
{
GameID = (string)query.Element("ID"),
GameTitle = (string)query.Element("Title"),
GameDescription = (string)query.Element("Description"),
GameGuide = (string)query.Element("Guide")
};
if (NavigationContext.QueryString.TryGetValue("selectedItem", out selectedIndex))
{
if (selectedIndex == "0")
GuidesListBox.ItemsSource = guide.Where(ngc => ngc.GameTitle.StartsWith("Feel"));
else if (selectedIndex == "1")
GuidesListBox.ItemsSource = guide.Where(ngc => ngc.GameTitle.StartsWith("Serious"));
But not like this:
if (selectedIndex == "0")
GuidesListBox.ItemsSource = guide.Where(ngc => ngc.GameID.StartsWith("000"));
else if (selectedIndex == "1")
GuidesListBox.ItemsSource = guide.Where(ngc => ngc.GameID.StartsWith("001"));
i want to use the GameID Instead The GameTitle. | 0 | [
2,
483,
48,
1797,
7290,
170,
60,
23504,
29,
13,
9,
13680,
18,
1410,
800,
3726,
3726,
483,
48,
170,
101,
48,
45,
993,
28132,
1054,
20954,
800,
993,
28132,
9,
3574,
870,
5,
62,
9,
29955,
6,
73,
4033,
3378,
800,
37,
25597,
19,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to load helper into another helper in symfony
===
I want to use the distance_of_time_in_words function from DateHelper into another Helper.
How to use symfony DateHelper into my custom Helper?
Any hint is very much appreciated. | 0 | [
2,
184,
20,
6305,
448,
106,
77,
226,
448,
106,
19,
13,
7261,
10229,
93,
800,
3726,
3726,
31,
259,
20,
275,
14,
1583,
1,
1041,
1,
891,
1,
108,
1,
12827,
1990,
37,
1231,
14593,
106,
77,
226,
448,
106,
9,
184,
20,
275,
13,
7261... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 ISSET Function Not Excuted
===
In My Source When I press the Remove Button,inside isset code not excuted.can any one help me,
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<?php
$dbc=mysqli_connect("localhost","root","","elvis_store") or die("Error Connecting to Mysql Database");
if(isset($_POST['submit'])){
echo "Hello";
foreach($_POST['todelete'] as $delete_id){
$query="DELETE FROM email_list WHERE id=$delete_id";
mysqli_query($dbc,$query) or die("Error Querying Database");
}
echo "Customer(s) Removed";
}
$query="SELECT * FROM email_list";
$result=mysqli_query($dbc,$query)or die("Query Syntaxt is Incorrect");
while($row=mysqli_fetch_array($result)){
echo '<input type="checkbox" value="' . $row['id'] . '" name="todelete[]" />';
echo $row['first_name']." ".$row['last_name']." ".$row['email'];
echo "<br/>";
}
mysqli_close($dbc);
?>
<input type="submit" name"submit" value="Remove"/>
</form>
</body> | 0 | [
2,
13,
26120,
25,
3554,
1990,
52,
1396,
4118,
69,
800,
3726,
3726,
19,
51,
1267,
76,
31,
901,
14,
4681,
5167,
15,
108,
1416,
25,
3554,
1797,
52,
1396,
4118,
69,
9,
1245,
186,
53,
448,
55,
15,
13,
1,
9760,
1,
13,
1,
4190,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Loading a raster data of map PNG on ggmaps of R
===
I have the map as a png, so I won't be using the `get_map` function.
I have extracted the raster data from the png, and I wish to load the map as it is on the display of R, and then I would like to plot a point on it.
So, here's the way I have tried `ggmaps`. The program is compiling fine. Problem here is that there isn't any output being shown.
library (png)
library (ggmap)
latitude = c(40.702147,40.718217,40.711614)
longitude = c(-74.012318,-74.015794,-73.998284)
# Reads a PNG and outputs a raster array.
img <- readPNG (system.file ("img", "My.png", package="png"))
df <- data.frame (latitude, longitude)
# img: raster array read from the map png.
ggimage (img, fullpage = TRUE) + geom_point (data = df, aes_auto (df), size = 2)
geom_point (aes_auto (df), colour = "red", size = 2, shape = 1)
qplot (latitude, longitude, data = df, colour = I("red"), size = I(3))
**Of course I am doing something wrong. Please point out.**
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggmap_2.1 ggplot2_0.9.1 png_0.1-4
loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 grid_2.15.1
[5] labeling_0.1 MASS_7.3-18 memoise_0.1 munsell_0.3
[9] plyr_1.7.1 proto_0.3-9.2 RColorBrewer_1.0-5 reshape2_1.2.1
[13] RgoogleMaps_1.2.0 rjson_0.2.8 scales_0.2.1 stringr_0.6
[17] tools_2.15.1
>
**Also, what terms of statistics or maths should I know to understand the R functions better?**
| 0 | [
2,
12797,
21,
7172,
815,
1054,
16,
2942,
351,
2723,
27,
13,
4572,
15022,
18,
16,
761,
800,
3726,
3726,
31,
57,
14,
2942,
28,
21,
351,
2723,
15,
86,
31,
230,
22,
38,
44,
568,
14,
13,
1,
3060,
1,
15022,
1,
1990,
9,
31,
57,
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... |
Post location on facebook with latitude and longitude coordinates only
===
I am creating a native Windows Phone App, and I would like to have a functionality that enables making facebook wall posts with location displayed on the map(like when you tag some place).
It might seem a duplicate question but I haven't managed to find C# code for that.
So I need to post place, but I have only latitude and longitude, **no facebook placeId**
here is sample code that doesn't work:
var parameters = new Dictionary<string, object>();
parameters["message"] = txtMessage.Text;
var place = new Dictionary<string, object>();
place["location"] = new GeoCoordinate { Latitude = 60.1654712,
Longitude = 24.9220499 };
parameters["place"]=place;
fb.PostAsync("me/feed", parameters);
| 0 | [
2,
678,
1474,
27,
9090,
29,
16337,
17,
22291,
13714,
104,
800,
3726,
3726,
31,
589,
2936,
21,
1275,
1936,
1132,
4865,
15,
17,
31,
83,
101,
20,
57,
21,
18548,
30,
14645,
544,
9090,
769,
9868,
29,
1474,
6115,
27,
14,
2942,
5,
1403... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Session Fixation Attack With Tomcat 7
===
According to the docs, tomcat7 is not vulnerable to session fixation attack. But my tomcat 7.0.25 as well as 7.0.27 is vulnerable to this attack.
JSESSIONID cookie value is not getting changed on successful login.
I added following Valves to my conf/context.xml. But this didn't work. Please help me.
<Valve className="org.apache.catalina.authenticator.BasicAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.SSLAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.SpnegoAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.DigestAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.FormAuthenticator" changeSessionIdOnAuthentication="true" />
Thanks in advance. Please let me know if you need more info.
Regards,
Prashant Gupta | 0 | [
2,
3723,
6098,
857,
991,
29,
2067,
5782,
453,
800,
3726,
3726,
496,
20,
14,
9765,
18,
15,
2067,
5782,
465,
25,
52,
8107,
20,
3723,
6098,
857,
991,
9,
47,
51,
2067,
5782,
453,
9,
387,
9,
1811,
28,
134,
28,
453,
9,
387,
9,
256... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
formula error in spreadsheet
===
I have a google spreadsheet with the following formula
=IFERROR(IF(AA3="","",MID((LEFT(AA3,LEN(AA3)-1)),FIND("|",AA3)+1,30)))
now this returns a number.
Weird thing is it works in 100% of the cases and returns the appropriate number, if however I try and calculate with this number in a few odd occasions the new formula fails, telling me the "number" is not a number..
example..
(-121|102) -121 102 -->the first is a combination which i then break apart into -121 and 102
copy the formulas down and all work 100%
I then carry on to process these numbers and on the odd occasion the formula tells me the "102" is not a number.
below a sample output..
(-121|102) -121 102 76.00
(-238|139) -238 139 #VALUE!
(-297|52) -297 52 395.73
(-127|201) -127 201 186.81
(-186|149) -186 149 336.89
(-141|120) -141 120 290.08
(-106|97) -106 97 #VALUE!
(-238|139) -238 139 #VALUE!
(-297|52) -297 52 #VALUE!
(-160|221) -160 221 290.06
(-197|200) -197 200 294.55
(-238|139) -238 139 #VALUE!
(-19|10) -19 10 #VALUE!
(-21|22) -21 22 323.83
Is there anything i can put in the formula that would force the output to be a number ? =IFERROR(IF(AA3="","",MID((LEFT(AA3,LEN(AA3)-1)),FIND("|",AA3)+1,30)))
thanks
| 0 | [
2,
3729,
7019,
19,
1789,
17627,
800,
3726,
3726,
31,
57,
21,
8144,
1789,
17627,
29,
14,
249,
3729,
800,
821,
29992,
5,
821,
5,
6887,
240,
3726,
7,
7,
15,
7,
7,
15,
7825,
5,
5,
9742,
5,
6887,
240,
15,
2284,
5,
6887,
240,
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 run an attribute value through a regular expression after extracting via BeautifulSoup?
===
I have a URL that I want to parse a part of, particularly the widgetid:
<a href="http://www.somesite.com/process.asp?widgetid=4530">Widgets Rock!</a>
I've written this Python (I'm a bit of a newbie at Python -- version is 2.7):
import re
from bs4 import BeautifulSoup
doc = open('c:\Python27\some_xml_file.txt')
soup = BeautifulSoup(doc)
links = soup.findAll('a')
# debugging statements
print type(links[7])
# output: <class 'bs4.element.Tag'>
print links[7]
# output: <a href="http://www.somesite.com/process.asp?widgetid=4530">Widgets Rock!</a>
theURL = links[7].attrs['href']
print theURL
# output: http://www.somesite.com/process.asp?widgetid=4530
print type(theURL)
# output: <type 'unicode'>
is_widget_url = re.compile('[0-9]')
print is_widget_url.match(theURL)
# output: None (I know this isn't the correct regex but I'd think it
# would match if there's any number in there!)
I think I'm missing something with the regular expression (or my understanding of how to use them) but I can't figure it out.
Thanks for your help! | 0 | [
2,
184,
20,
485,
40,
35,
14755,
1923,
120,
21,
1290,
1803,
75,
10962,
68,
1197,
1632,
656,
576,
60,
800,
3726,
3726,
31,
57,
21,
287,
6362,
30,
31,
259,
20,
2017,
870,
21,
141,
16,
15,
1653,
14,
619,
21292,
13647,
45,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to switch from Apple University to regular Developer
===
I'm currently enrolled in two Apple University Developer Programs. Now I would like to sign up for the regular (99$) Developer Program.
Unfortunately, when I try to do so, I'm asked whether I already have an Apple-ID and am registered as Apple Developer (which I am). After that I have to sign up with this ID, and I'm redirected to the Member Center. Inside the Member Center I don't have any possibility to switch to Developer Program (at least I can't find it!).
So basically I don't know how to proceed. What do I miss?
I would really appreciate some help!
Cheers | 0 | [
2,
184,
20,
5521,
37,
4037,
155,
20,
1290,
10058,
800,
3726,
3726,
31,
22,
79,
871,
7846,
19,
81,
4037,
155,
10058,
1726,
9,
130,
31,
83,
101,
20,
1676,
71,
26,
14,
1290,
13,
5,
3483,
4403,
6,
10058,
625,
9,
6200,
15,
76,
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... |
memdump on android
===
Is there a way to perform a memdump of an android device? I need the content of the entire memory (RAM). Maybe there is a shell command (meminfo will not do because it displays only memory information, not the content of RAM) or maybe somebody has a program which does this. | 0 | [
2,
55,
79,
43,
11134,
27,
13005,
800,
3726,
3726,
25,
80,
21,
161,
20,
2985,
21,
55,
79,
43,
11134,
16,
40,
13005,
3646,
60,
31,
376,
14,
2331,
16,
14,
1078,
1912,
13,
5,
2781,
6,
9,
913,
80,
25,
21,
3593,
1202,
13,
5,
790... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UItableView plist data ordering
===
Hi I have created a table view which filled with a plist data , I need re ordering the cells , I mean instead of showing data like this :
1
2
3
4
5
should be like this :
5
4
3
2
1
I am using this code :
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"self" ascending:NO];
titles = [[titles sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] retain];
in this method :
`- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath`
but the result is something like this
1
5
2
4
3
how can I fix it ?
| 0 | [
2,
13,
11193,
579,
4725,
351,
5739,
1054,
15775,
800,
3726,
3726,
4148,
31,
57,
679,
21,
859,
1418,
56,
1943,
29,
21,
351,
5739,
1054,
13,
15,
31,
376,
302,
15775,
14,
2934,
13,
15,
31,
884,
700,
16,
3187,
1054,
101,
48,
13,
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... |
What do the Visual Studio watch window icons represent
===
What do the each of the watch window icons and overlays in Visual Studio represent? Is there a legend on an MSDN page somewhere?
![Example of some icons][1]
[1]: http://i.stack.imgur.com/Ky4x4.png | 0 | [
2,
98,
107,
14,
3458,
1120,
1455,
1463,
9801,
18,
3501,
800,
3726,
3726,
98,
107,
14,
206,
16,
14,
1455,
1463,
9801,
18,
17,
84,
4414,
18,
19,
3458,
1120,
3501,
60,
25,
80,
21,
4393,
27,
40,
4235,
43,
103,
2478,
3493,
60,
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... |
using lineTo in a movieclip having a some shape already
===
This is quite silly, but still i am scratching my head on this :
mc.graphics.lineStyle(2,0xff0000)
mc.graphics.lineTo(100,100);
mc.setChildIndex((mc.getChildAt(0)),0)
In the above mc is a filled rectangle shape. But when i use lineTo, it draws line at the back of the shape. I tried to use the setChildIndex method, but of no use.
Any suggestions ?
Thanks
V. | 0 | [
2,
568,
293,
262,
19,
21,
1308,
150,
6013,
452,
21,
109,
2539,
614,
800,
3726,
3726,
48,
25,
1450,
10752,
15,
47,
174,
31,
589,
22202,
51,
157,
27,
48,
13,
45,
1324,
9,
12084,
18,
9,
1143,
4381,
5,
135,
15,
387,
396,
2460,
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... |
rotating doesn't work as expected
===
i add a sprite to my main layer like this
CCSprite *sprite = [CCSprite spriteWithBatchNode:_batchNode5 rect:CGRectMake(0,0,755,1021)];
sprite.position = location;
[sprite setAnchorPoint:CGPointMake(0.5f, 0.5f)];
[_batchNode5 addChild:sprite z:1000 tag:treeTextureTag]; // good
the problem is that instead of rotating around the center, the image rotates around the right bottom corner;
another weird thing is that the image is placed from the location to the left.
What could this be about? | 0 | [
2,
16164,
1437,
22,
38,
170,
28,
1727,
800,
3726,
3726,
31,
3547,
21,
27902,
20,
51,
407,
5385,
101,
48,
8093,
3401,
8011,
1637,
3401,
8011,
800,
636,
3384,
3401,
8011,
27902,
1410,
4900,
673,
251,
546,
45,
1,
4900,
673,
251,
546,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bundling a non-open-source dependency with Maven
===
Suppose I have two Java projects in Maven / Eclipse:
- An open source application hosted in GitHub
- A small private library containing utility functions which is *not* open source (but which I do have the rights to modify, build, and redistribute)
I'd like to make it possible for others to build and run the application, but this means that they will also need the library as a dependency.
I'd like to keep things simple, so that builds are easy both for myself and users of the application.
What's the most practical way to make this work? | 0 | [
2,
5502,
11371,
21,
538,
8,
10157,
8,
12097,
26835,
29,
1216,
3124,
800,
3726,
3726,
5787,
31,
57,
81,
8247,
2314,
19,
1216,
3124,
13,
118,
11652,
45,
13,
8,
40,
368,
1267,
3010,
2812,
19,
13,
10404,
20926,
13,
8,
21,
284,
932,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Processing the attributes and split them based on string
===
I need to take the attribute of "a" tag and process them.
Source:
<Data>
<AAA>
<strong xmlns="http://www.w3.org/1999/xhtml">some Text
<a href="#" name="Value1,Value2,Value3,Value4,Value5,Value6" id="Functionaldata">Value6</a>
</strong>
hello
<a title="google" href="http://google.com">Hey</a> all <a href="#" name="element1,element2,element3,element4,element5,element6" id="Functionaldata">element6</a>
<AAA>
</Data>
Output
<Content>
<Information>
<text>
<strong xmlns="http://www.w3.org/1999/xhtml">some Text
<dynamicinfo type="Value1" name="Value2" group="Value3" id="Value4" link="Value5" display="Value6"/>
</strong>
hello<a title="google" href="http://google.com">Hey</a> all
<dynamicinfo type="element1" name="element2" group="element3" id="element4" link="element5" display="element6"/>
</text>
</Information>
</Content>
I am struck at processing "a" tags with id=Functionaldata.
Can any help their views on it.
Thank you.
| 0 | [
2,
5511,
14,
13422,
17,
2132,
105,
432,
27,
3724,
800,
3726,
3726,
31,
376,
20,
247,
14,
35,
14755,
16,
13,
7,
58,
7,
3383,
17,
953,
105,
9,
1267,
45,
13,
1,
18768,
1,
13,
1,
22160,
1,
13,
1,
15004,
23504,
2172,
3726,
7,
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... |
Customize maxNumberOfFiles of jQuery File Upload
===
I want to allow user upload only 1 file on some pages and > 1 file on other pages. How can I customize the option maxNumberOfFiles to achieve this purpose. | 0 | [
2,
5816,
2952,
2049,
16299,
1299,
3599,
18,
16,
487,
8190,
93,
3893,
71,
8294,
800,
3726,
3726,
31,
259,
20,
1655,
4155,
71,
8294,
104,
137,
3893,
27,
109,
4434,
17,
13,
1,
137,
3893,
27,
89,
4434,
9,
184,
92,
31,
5816,
2952,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
jQuery cross site login to Sharepoint
===
Hi Im trying to get jQuery to handle a cross site WWW-Authenticate:NTLM request from an Sharepoint 2010 server. Does anybody know how to do this? It seems kinda impossible...
My code looks like this.
<code>
$(document).ready(function(){
$("#clickme").click(function(){
$.ajax({
type: "POST",
url: "http://10.10.5.99/",
crossDomain:true,
async:true,
username:"Administrator",
password:"asd123",
success: function(msg){
alert( "Data Saved: " + msg );
},
statusCode: {
401: function() {
alert("Unauthorized");
}
}
});
});
});
</code>
Patrick. | 0 | [
2,
487,
8190,
93,
919,
689,
6738,
108,
20,
1891,
3132,
800,
3726,
3726,
4148,
797,
749,
20,
164,
487,
8190,
93,
20,
3053,
21,
919,
689,
13,
6483,
8,
1346,
2504,
1786,
1373,
45,
2877,
10363,
3772,
37,
40,
1891,
3132,
498,
8128,
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... |
play video from rtsp link +iphone
===
I want to play video in my application. For this I have used following code:
NSURL *fileURL = [NSURL URLWithString:@"http://www.boxmusiq.com/ThiruvasakamVideo /VTS_01_2_converted.mp4"];
moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[moviePlayerController.view setFrame:CGRectMake(0, 70, 320, 270)];
[self.view addSubview:moviePlayerController.view];
moviePlayerController.fullscreen = YES;
[moviePlayerController play];
Now above url is a http link but I want to play video from rtsp link.
My rtsp link is:
rtsp://v8.cache3.c.youtube.com/CjYLENy73wIaLQlxYJvp0_b1wxMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYIiCgqTg6_XeTww=/0/0/0/video.3gp
If someone has any idea that how to play video from rtsp link. Please provide me some solution.
Thanks to all. | 0 | [
2,
418,
763,
37,
13,
5256,
3401,
3508,
2754,
49,
7709,
800,
3726,
3726,
31,
259,
20,
418,
763,
19,
51,
3010,
9,
26,
48,
31,
57,
147,
249,
1797,
45,
13,
103,
4082,
255,
1637,
16877,
911,
255,
800,
636,
103,
4082,
255,
287,
6362... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 part of constructor parameters to castle windsor container
===
I have constructor
Foo(IColor c , int someNumber)
and I know the some number only during the run time, and I want to call this constructor during the resolving and to pass `someNumber` value and the `IColor` to be resolved autocratically.
Something like this:
container.Resolve<IFoo>(someNumber);
Is it possible to be done ?
| 0 | [
2,
2848,
141,
16,
6960,
248,
12905,
20,
1339,
10784,
12147,
800,
3726,
3726,
31,
57,
6960,
248,
4310,
111,
5,
49,
11282,
272,
13,
15,
19,
38,
109,
16299,
6,
17,
31,
143,
14,
109,
234,
104,
112,
14,
485,
85,
15,
17,
31,
259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery UI autocomplete: how to prefetch from ajax data source
===
I have a auto-complete form that fetches result from server, but on slow connection it becomes erratic as data loading takes time. Is there anyway we can prefetch data from ajax source | 0 | [
2,
487,
8190,
93,
13,
5661,
3108,
15990,
45,
184,
20,
782,
410,
19913,
37,
20624,
1054,
1267,
800,
3726,
3726,
31,
57,
21,
3108,
8,
15990,
505,
30,
18312,
160,
829,
37,
8128,
15,
47,
27,
2276,
2760,
32,
2633,
23187,
28,
1054,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
Does an IIS web garden use threads or processes?
===
When you set an application pool's Maximum Worker Processes attribute in IIS are you actually setting the number of processes or the number of threads? | 0 | [
2,
630,
40,
595,
18,
2741,
1986,
275,
20396,
54,
5102,
60,
800,
3726,
3726,
76,
42,
309,
40,
3010,
3067,
22,
18,
2979,
7444,
5102,
35,
14755,
19,
595,
18,
50,
42,
1121,
2697,
14,
234,
16,
5102,
54,
14,
234,
16,
20396,
60,
3,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Installing php* with mysql-server conflict
===
I am a Linux newb, trying to install php5 and httpd into my amazon ec2 linux instance with: yum -y install php* httpd;
I got hit with the following conflicts:
---> Package unixODBC.i686 0:2.2.14-11.5.amzn1 will be installed
--> Running transaction check
---> Package ghostscript.i686 0:8.70-11.20.amzn1 will be installed
--> Processing Dependency: urw-fonts >= 1.1 for package: ghostscript-8.70-11.20.amzn1.i686
--> Processing Dependency: libcupsimage.so.2 for package: ghostscript-8.70-11.20.amzn1.i686
--> Processing Dependency: libjasper.so.1 for package: ghostscript-8.70-11.20.amzn1.i686
--> Processing Dependency: libcairo.so.2 for package: ghostscript-8.70-11.20.amzn1.i686
--> Processing Dependency: libcups.so.2 for package: ghostscript-8.70-11.20.amzn1.i686
--> Processing Dependency: ghostscript-fonts for package: ghostscript-8.70-11.20.amzn1.i686
---> Package gnutls.i686 0:2.8.5-4.6.amzn1 will be installed
--> Processing Dependency: libtasn1.so.3 for package: gnutls-2.8.5-4.6.amzn1.i686
--> Processing Dependency: libtasn1.so.3(LIBTASN1_0_3) for package: gnutls-2.8.5-4.6.amzn1.i686
---> Package lcms-libs.i686 0:1.19-1.5.amzn1 will be installed
---> Package libXt.i686 0:1.0.7-1.6.amzn1 will be installed
---> Package libgomp.i686 0:4.6.2-1.27.amzn1 will be installed
---> Package libtiff.i686 0:3.9.4-6.10.amzn1 will be installed
---> Package libwmf-lite.i686 0:0.2.8.4-22.7.amzn1 will be installed
--> Running transaction check
---> Package cairo.i686 0:1.8.8-3.1.4.amzn1 will be installed
--> Processing Dependency: libpixman-1.so.0 for package: cairo-1.8.8-3.1.4.amzn1.i686
---> Package cups-libs.i686 1:1.4.2-44.10.amzn1 will be installed
--> Processing Dependency: libavahi-common.so.3 for package: 1:cups-libs-1.4.2-44.10.amzn1.i686
--> Processing Dependency: libavahi-client.so.3 for package: 1:cups-libs-1.4.2-44.10.amzn1.i686
---> Package ghostscript-fonts.noarch 0:5.50-23.1.6.amzn1 will be installed
--> Processing Dependency: xorg-x11-font-utils for package: ghostscript-fonts-5.50-23.1.6.amzn1.noarch
---> Package jasper-libs.i686 0:1.900.1-15.5.amzn1 will be installed
---> Package libtasn1.i686 0:2.3-3.4.amzn1 will be installed
---> Package urw-fonts.noarch 0:2.4-10.7.amzn1 will be installed
--> Running transaction check
---> Package avahi-libs.i686 0:0.6.25-11.12.amzn1 will be installed
---> Package pixman.i686 0:0.18.4-1.5.amzn1 will be installed
---> Package xorg-x11-font-utils.i686 1:7.2-11.5.amzn1 will be installed
--> Processing Dependency: libXfont.so.1 for package: 1:xorg-x11-font-utils-7.2-11.5.amzn1.i686
--> Processing Dependency: libfontenc.so.1 for package: 1:xorg-x11-font-utils-7.2-11.5.amzn1.i686
--> Running transaction check
---> Package libXfont.i686 0:1.4.1-2.6.amzn1 will be installed
---> Package libfontenc.i686 0:1.0.5-2.6.amzn1 will be installed
--> Processing Conflict: php-mysql-5.3.14-2.21.amzn1.i686 conflicts php-mysqlnd
--> Finished Dependency Resolution
Error: php-mysql conflicts with php-mysqlnd
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I have previously installed mysql-server, and the version is 5.5.24.
Please advice on how to get over this. Thanks in advance! | 0 | [
2,
25429,
13,
26120,
2483,
29,
51,
18,
22402,
8,
10321,
106,
2930,
800,
3726,
3726,
31,
589,
21,
13024,
78,
220,
15,
749,
20,
16146,
13,
26120,
264,
17,
7775,
43,
77,
51,
8059,
6695,
135,
13024,
4851,
29,
45,
13,
18105,
13,
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... |
Allowing script access to flash movies loading from local disk
===
I have a simple web page that displays a flash movie and allows basic control on the movie like play, pause and go to frame. I hosted the page and swf file on a server and it works perfectly fine. However when I load a local swf file "file:///<path to file>" the movie loads fine but the javascript controls don't work. I get "Error calling function on NPObject". I researched the error and found it occurs when the swf file and webpage are on different domains. I am not sure why flash thinks they are on different domains since they are both stored on disk. (localhost).
I am trying to load the page in a webview control of an android app.
| 0 | [
2,
2719,
3884,
1381,
20,
4433,
4795,
12797,
37,
375,
8582,
800,
3726,
3726,
31,
57,
21,
1935,
2741,
2478,
30,
9412,
21,
4433,
1308,
17,
2965,
2125,
569,
27,
14,
1308,
101,
418,
15,
6911,
17,
162,
20,
3523,
9,
31,
2812,
14,
2478,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 use AES/ECB/PKCS7Padding algorithm in Windows Phone 7?
===
I am new in windows phone development. How can I use AES/ECB/PKCS7Padding algorithm in WP7 ?.
While googled I saw many suggested about Bouncy Castle. But I did not clearly understood about this Bouncy Castle. Is this an algorithm ?.
I need to encrypt/decrypt password for sending to server. In all other phone (Android, iPhone, Blackberry), we use AES/ECB/PKCS7Padding algorithm for this. They all give same ecrypted/decrypt result for our input. But in windows phone I used AesManaged Class for the encryption. But it gives different encrypted result. In the msdn documentation ([MSDN documentation][1]) about AESManaged class they said "The cipher mode is always CBC, and the padding mode is always PKCS7". I think maybe thats why here I am getting different encrypted result comparing to other phones.
Is that the problem here ?. If its, then how can I use AES/ECB/PKCS7Padding algorithm in WP7 ?
I dont see any property for setting the cipher mode in AesManaged class.
Thanks.
[1]: http://msdn.microsoft.com/en-us/library/system.security.cryptography.aesmanaged%28v=VS.95%29.aspx | 0 | [
2,
184,
275,
21,
160,
118,
3319,
220,
118,
17244,
6824,
465,
1060,
11365,
9083,
19,
1936,
1132,
453,
60,
800,
3726,
3726,
31,
589,
78,
19,
1936,
1132,
522,
9,
184,
92,
31,
275,
21,
160,
118,
3319,
220,
118,
17244,
6824,
465,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't add database reference to VS2012 project
===
I have a SQL Server CLR trigger project that was created in VS2008. Opening the project in VS2012 does not present any problem, but on build of the solution, I get SQL71501 errors, with Trigger: [...] has an unresolved reference to object [...].
Based on my reading, this is due to a missing database reference in the project. When I try to add a database reference, I get the Add Database Reference dialog that gives me three options:
- Database projects in the current solution ** this option is grayed out/disabled
- System database (only shows system DBs)
- Data-tier Application (.dapac) ** there are no options to select as this was not how I created the project.
Further reading suggested that the reason there are no database projects to select for the first option, is because no Data Connections have been added via the Server Explorer. In my case there are certainly Data Connections present, and while my project is open, I can quite happily browse the database, look at data etc.
I thought it might have something to do with the Target Framework, so I have tried targeting 3.5 and even 2, but the same problem occurs.
I feel like I'm missing something fundamental, but just can't quite work it out. Any help would be GREATLY appreciated.
Ta
Chris | 0 | [
2,
92,
22,
38,
3547,
6018,
2801,
20,
4611,
3212,
669,
800,
3726,
3726,
31,
57,
21,
4444,
255,
8128,
10842,
139,
7286,
669,
30,
23,
679,
19,
4611,
2753,
9,
1214,
14,
669,
19,
4611,
3212,
630,
52,
734,
186,
1448,
15,
47,
27,
189... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 links in a webpage automatically and copy their contents into a text file?
===
Is there a way in Linux to click on links in a webpage automatically and copy their contents into a text file? | 2 | [
2,
10840,
27,
6271,
19,
21,
2741,
6486,
7499,
17,
4344,
66,
8478,
77,
21,
1854,
3893,
60,
800,
3726,
3726,
25,
80,
21,
161,
19,
13024,
20,
10840,
27,
6271,
19,
21,
2741,
6486,
7499,
17,
4344,
66,
8478,
77,
21,
1854,
3893,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Set UIDatePickerModeCountDownTimer
===
I have a button in my view with the UIDatePickerModeCountDownTimer. How do I actually get it to start counting down? Examples would be fantastic. | 0 | [
2,
309,
13,
5661,
8209,
16855,
106,
15570,
16549,
2968,
891,
139,
800,
3726,
3726,
31,
57,
21,
5167,
19,
51,
1418,
29,
14,
13,
5661,
8209,
16855,
106,
15570,
16549,
2968,
891,
139,
9,
184,
107,
31,
1121,
164,
32,
20,
799,
11195,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
HTTPS and Zend Framework
===
I am trying to convert a functional ZF application to use SSL. The certificate is valid and works, but I am having trouble configuring the application.
Here's what's in .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
SetEnv APPLICATION_ENV development
IndexController is really simple:
class IndexController extends Zend_Controller_Action
{
public function indexAction() {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$this->_helper->redirector('index', 'dash');
} else {
$this->_helper->redirector('index', 'auth');
}
}
}
When I browse to the site without specifying https or port, it accurately routes me to https://app-url.com, but then tries to redirect to https://app-url.com/auth and returns a 403. What am I missing?
| 0 | [
2,
7775,
18,
17,
10526,
43,
6596,
800,
3726,
3726,
31,
589,
749,
20,
8406,
21,
7652,
2052,
410,
3010,
20,
275,
13,
18,
18,
255,
9,
14,
6259,
25,
7394,
17,
693,
15,
47,
31,
589,
452,
2572,
1065,
13549,
68,
14,
3010,
9,
235,
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... |
Get Midi Messages in Java while sequencer playing
===
basically, i want to be able to see an event handler on the ShortMessage component (for ON_NOTE and OFF_NOTE). Or, from the track, how to view all the events by the tick number (not some vector index?)
basically a great way to show the current note playing Live, while it its actually playing on the screen | 0 | [
2,
164,
907,
49,
7561,
19,
8247,
133,
4030,
139,
791,
800,
3726,
3726,
11374,
15,
31,
259,
20,
44,
777,
20,
196,
40,
807,
24641,
27,
14,
502,
3845,
18,
1303,
5912,
13,
5,
1106,
27,
1,
10280,
17,
168,
1,
10280,
6,
9,
54,
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... |
application run slowly under uwsgi threaded mode
===
we use uwsgi + nginx to build the web site. recently, we want to improve the qps of our site, so we decide to switch uwsgi mode from prefork to threaded. but we found something very bad.
when using prefork mode with workers setting 5, we get the request time is 10-20ms. but in threaded mode(one worker 5 threads), the value increase to 100-200ms. this is too bad.
we find memcache.Client take the most time which makes the request time increasing.
please help me to know where the problem is and how to solve, thank you!
PS:
code:
import memcache
client = memcache.Client(['127.0.0.1:11211'])
client.get('mykey') | 0 | [
2,
3010,
485,
1447,
131,
13,
14524,
18,
2234,
9322,
69,
3740,
800,
3726,
3726,
95,
275,
13,
14524,
18,
2234,
2754,
13,
2723,
108,
396,
20,
1895,
14,
2741,
689,
9,
1989,
15,
95,
259,
20,
3545,
14,
2593,
1919,
16,
318,
689,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to update Android App Widget?
===
I am newbie in android programing. In my android widget, i like to update data from a method named getdetails. I tried with below code but it not work. Please point out is any error in my code
Android Manifest xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="study.samples"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<receiver android:name=".MyW" android:label="WatchWidget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_ENABLED"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_provider" />
</receiver>
</application>
</manifest>
Widget source
public class MyW extends AppWidgetProvider {
public String deviceinfo = null;
public Context mContext = null;
public int asu = 0;
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
mContext = context;
RemoteViews remoteViews;
ComponentName watchWidget;
remoteViews = new RemoteViews( context.getPackageName(), R.layout.main );
watchWidget = new ComponentName( context, MyW.class );
remoteViews.setTextViewText( R.id.widget_textview, "OK -> " + deviceinfo);
appWidgetManager.updateAppWidget( watchWidget, remoteViews );
}
@Override
public void onReceive(Context context, Intent intent) {
mContext = context;
RemoteViews remoteViews;
ComponentName watchWidget;
remoteViews = new RemoteViews( context.getPackageName(), R.layout.main );
watchWidget = new ComponentName( context, MyW.class );
remoteViews.setTextViewText( R.id.widget_textview, "OK => " + deviceinfo);
AppWidgetManager.getInstance(context).updateAppWidget( watchWidget, remoteViews );
}
@Override
public void onEnabled(Context context) {
mContext = context;
getDetails();
}
public void getDetails(){
deviceinfo = "Hi friends";
Intent i = new Intent(mContext, MyW.class);
mContext.sendBroadcast(i);
}
}
thanks | 0 | [
2,
184,
20,
11100,
13005,
4865,
4807,
43,
3060,
60,
800,
3726,
3726,
31,
589,
78,
5893,
19,
13005,
625,
68,
9,
19,
51,
13005,
4807,
43,
3060,
15,
31,
101,
20,
11100,
1054,
37,
21,
2109,
377,
164,
546,
8682,
18,
9,
31,
794,
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... |
Inserting div at right position
===
i have page structure like ( html5)
<article id="article_id">
<div></div>
<div> </div>
<div> </div>
<form id="form_id">
<input id="" onsubmit="submit()"/></form>
</article>
now i want to add new div after div and before form, how should i do it
i have tried :
$("#form_id").befor('<div id="div_id" class="block">');
$("#form_id").parent().befor();
$("#form_id").after('<div id="div_id" class="block">');
html code works fine. Kindly help me, | 0 | [
2,
14692,
68,
13,
12916,
35,
193,
649,
800,
3726,
3726,
31,
57,
2478,
1411,
101,
13,
5,
13,
15895,
264,
6,
13,
1,
20360,
4924,
3726,
7,
20360,
1,
1340,
7,
1,
13,
1,
12916,
1,
118,
12916,
1,
13,
1,
12916,
1,
13,
1,
118,
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... |
Check hotfolder in php and ajax
===
Hello I would like to do a track of my files.
I send 2 files by ftp to a hotfolder.
In my page I check the folder "IN" and the folder OUT.
I use ajax with jquery to see on live the evolution every seconds.
So when my 2 files are in the folder "IN", I write on my page "50%".
The files are deleting by the server during the processing and put after in the folder "OUT".
If the files are in folder "OUT", I write "100%".
So, the flow is :
1s = nothing<br >
2s = "50%"<br >
3s = "50%"<br >
4s = nothing<br >
5s = nothing<br >
6s = nothing<br >
7s = nothing<br >
8s = nothing<br >
9s = nothing<br >
10s = "100%"<br >
11s = "100%"<br >
12s = nothing<br >
13s = nothing<br >
14s = nothing<br >
...<br >
In my php I do this :
> $ftp_path_IN = $_GET["path"]."\/IN\/";
> $ftp_files_IN = ftp_nlist($ftp_connect, $ftp_path_IN);
> $nb = count($ftp_files_IN);
> if ($nb==2) {
> $p = 50;
> }
> $ftp_path_OUT = $_GET["path"]."\/OUT\/";
> $ftp_files_OUT = ftp_nlist($ftp_connect, $ftp_path_OUT);
> $nb = count($ftp_files_OUT);
> if ($nb==2) {
> $p = 100;
> }
>
> echo $p.'%';
But It's a problem that my script in execute every second because when the files is changing there folder, I see nothing, so I write nothing.
How can I remember every second that the files passed in my two folders ?
thanks for your help! | 0 | [
2,
2631,
1047,
8814,
106,
19,
13,
26120,
17,
20624,
800,
3726,
3726,
10975,
31,
83,
101,
20,
107,
21,
792,
16,
51,
6488,
9,
31,
2660,
172,
6488,
34,
1187,
306,
20,
21,
1047,
8814,
106,
9,
19,
51,
2478,
31,
2631,
14,
19294,
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... |
better way to handle the below code
===
private bool CheckMemberCountry(string country)
{
string[] countries = new string[] { "AF", "BD", "CA", "IN", "IR", "RO", "AN", "CY", "IL", "PH" };
foreach (string memberCountry in countries)
{
if (memberCountry.Equals(country))
{
return true;
}
}
return false;
} | 0 | [
2,
574,
161,
20,
3053,
14,
1021,
1797,
800,
3726,
3726,
932,
1607,
1823,
2631,
6990,
10741,
5,
11130,
475,
6,
13,
1,
3724,
2558,
500,
1166,
800,
78,
3724,
2558,
500,
13,
1,
13,
7,
2565,
7,
15,
13,
7,
220,
43,
7,
15,
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... |
Upload a file from one server to another server
===
I have to site on two different servers.
I want to upload a file www.myserver.com/thefile.txt to www.myotherserver.com/thesamefile.txt
Although the easiest way is to download the file to my computer and then upload, I would like to know if I can automate and make the server download it | 0 | [
2,
71,
8294,
21,
3893,
37,
53,
8128,
20,
226,
8128,
800,
3726,
3726,
31,
57,
20,
689,
27,
81,
421,
17595,
9,
31,
259,
20,
71,
8294,
21,
3893,
13,
6483,
9,
915,
10321,
106,
9,
960,
118,
124,
16877,
9,
38,
396,
38,
20,
13,
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... |
Extract X and Y Coordinates from String
===
I'm having a problem with extracting b2vec2 coordinates from a CCString these are from cocos2dx and box2d.
I have tried using strtk but i could not get it to work
Any help would be great.
Thanks
The Layout of the string is "x,y x,y x,y"
i want to put the x and y's into an array of b2vec2 | 0 | [
2,
10962,
993,
17,
13,
93,
13714,
37,
3724,
800,
3726,
3726,
31,
22,
79,
452,
21,
1448,
29,
10962,
68,
334,
135,
195,
150,
135,
13714,
37,
21,
8093,
11130,
158,
50,
37,
22470,
18,
135,
43,
396,
17,
1649,
135,
43,
9,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Maven versioning of multi-module projects with parent POM
===
This is a slightly different version of this previous question, in that I have separate multi-module and parent POMs: http://stackoverflow.com/questions/2341906/maven-multi-module-versioning
I am trying to update my POMs to go from a development snapshot version to a released version number. I have googled the issue to death, tried the release and version plug-in, and nothing seems to be able to handle my fairly simple setup.
Following published Maven best practices, and trying not to duplicate information when I can avoid to, I ended up with the structure below for my multi-module project.
There is a single version defined by the common pom-parent.xml; and B depends on A.
I find it a bit surprising that the standard plug-ins can't handle what seems to be a fairly basic setup, am I missing something?
None of the workarounds I have come up with are completely satisfactory:
- define the product version as a property is a bit flaky, the same module source could get different versions because of a user settings.xml or other trick
- merge the root pom.xml and pom-parent.xml and move the product-wide build steps I currently maintain in the root pom into a dedicated module; and hope that the std plug-ins will then work... not tried.
Any suggestion?
root/pom-parent.xml: parent of all the POMs below
<project...>
<groupId>acme</groupId>
<artifactId>ParentPom</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
root/pom.xml: multi-module projects with A and B as submodules
<project ...>
<parent>
<groupId>acme</groupId>
<artifactId>ParentPom</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>acme</groupId>
<artifactId>Product</artifactId>
<packaging>pom</packaging>
<modules>
<module>A</module>
<module>B</module>
</modules>
root/A/pom.xml:
<project ...>
<parent>
<groupId>acme</groupId>
<artifactId>ParentPom</artifactId>
<relativePath>../parent-pom.xml</relativePath>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>acme</groupId>
<artifactId>A</artifactId>
<packaging>jar</packaging>
root/B/pom.xml:
<project ...>
<parent>
<groupId>acme</groupId>
<artifactId>ParentPom</artifactId>
<relativePath>../parent-pom.xml</relativePath>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>acme</groupId>
<artifactId>B</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>acme</groupId>
<artifactId>A</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies> | 0 | [
2,
1216,
3124,
615,
68,
16,
1889,
8,
19673,
62,
2314,
29,
4766,
16214,
800,
3726,
3726,
48,
25,
21,
1847,
421,
615,
16,
48,
1158,
1301,
15,
19,
30,
31,
57,
1725,
1889,
8,
19673,
62,
17,
4766,
16214,
18,
45,
7775,
6903,
25325,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UpdateProgress Fires On Button Click
===
I have a very simple form with a GridView with CheckBoxes on it and a Button.
Also I have a UpdateProgress and a ModalPopuExtender asociated to it.
I would like to show UpdateProgress ONLY when on Click Button NOT when I select a CheckBox in the GridView.
I tried to use two UpdatePanels (one from GridView and another for the Button) and asociate UpdateProgress to Button's UpdatePanel but stills updating both UpdatePanels.
I also tried to use an AsyncPostBackTrigger to Button click but doesn't work too.
If you have any idea, I will appreciate them :-)
Thanks in advance.
P.D: Heres my code
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="PnlGV" runat="server" Visible="True">
<asp:GridView ID="GVAmenazas" runat="server" AutoGenerateColumns="False" AllowPaging="True"
OnPageIndexChanging="GVAmenazas_PageIndexChanging">
<Columns>
<asp:BoundField DataField="IdInforme" HeaderText="IdInforme" ReadOnly="true" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ReadOnly="true" />
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="LblToolOpciones" runat="server" Text="Opciones" ToolTip='Opciones'></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" OnCheckedChanged="CheckBox_Changued" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Button ID="BtnConsultar" runat="server" Text="Button" Enabled="False" OnClick="BtnConsultar_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnConsultar" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2"
DisplayAfter="0">
<ProgressTemplate>
<div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;
left: 35%; top: 25%; visibility: visible; vertical-align: middle; border-style: inset;
border-color: black; background-color: #c8d1d4;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon_inprogress.gif" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:ModalPopupExtender ID="ModalProgress" runat="server" TargetControlID="UpdateProgress1"
BackgroundCssClass="modalBackground" PopupControlID="UpdateProgress1" />
<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(activaProgreso);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(desactivaProgreso);
function activaProgreso(sender, args) {
// shows the Popup
$find(ModalProgress).show();
}
function desactivaProgreso(sender, args) {
// shows the Popup
$find(ModalProgress).hide();
}
var ModalProgress = '<%= ModalProgress.ClientID %>';
</script>
| 0 | [
2,
11100,
2740,
13026,
11327,
27,
5167,
10840,
800,
3726,
3726,
31,
57,
21,
253,
1935,
505,
29,
21,
7354,
4725,
29,
2631,
5309,
160,
27,
32,
17,
21,
5167,
9,
67,
31,
57,
21,
11100,
2740,
13026,
17,
21,
13,
20756,
6057,
291,
1706... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 set the ApplicationController in Ember.Router
===
I there any other possibility to handle with Ember.Router controllers and views? My app structure generally depends on require.js which takes care of the corresponding dependencies.
In my example i'm doing the App.ApplicationController thing as the main router controller.
Here's a jsfiddle: http://jsfiddle.net/mediastuttgart/uMKGt/1/
But is there any chance to set this manually? I've found this commit message https://github.com/emberjs/ember.js/commit/be69395f5eec4187b1df052d7386bcda45f79475 where i can see, how to set the controller and view manually (anyway couldn't get this working). But couldn't find any example like:
App = Ember.Application.create();
App.MyApplicationController = Ember.Controller.extend({});
Router = Ember.Router.extend({
controller : App.MyApplicationController.create({});
root : Ember.Route.extend({
index : Ember.Route.extend({
route : '/',
connectOutlets : function (router) {
router.get('controller').connectOutlet({
viewClass : Ember.View.create({}),
controller : Ember.Controller.create({}),
context : // what should i submit here?
})
}
})
}),
...
}); | 0 | [
2,
184,
92,
31,
309,
14,
3010,
12898,
1252,
19,
13,
19603,
9,
20179,
139,
800,
3726,
3726,
31,
80,
186,
89,
4813,
20,
3053,
29,
13,
19603,
9,
20179,
139,
9919,
18,
17,
4146,
60,
51,
4865,
1411,
1469,
9597,
27,
4077,
9,
728,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to make CSRF protection works with rails3.2.x and single page web application(by ajax)?
===
I know rails provided CSRF protection by default from rails3.
but my web application is a single page application, and all communication depend on ajax.
So, how can I get CSRF token from server before each ajax calling?
or what I can do is just take off CSRF protection, right?
BTW, we don't use any rails view to produce the web page, we use javascript framework within one page.
my env: rails3.2.3, devise2.0.4, dojo1.7.2 | 0 | [
2,
184,
20,
233,
272,
18,
8291,
2057,
693,
29,
2240,
18,
240,
9,
135,
9,
396,
17,
345,
2478,
2741,
3010,
5,
779,
20624,
6,
60,
800,
3726,
3726,
31,
143,
2240,
18,
1173,
272,
18,
8291,
2057,
34,
12838,
37,
2240,
18,
240,
9,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I iterate over two or more template indexes with Haystack, Whoosh and Django
===
I was reading the docs and some questions around here and couldn't understand how can I return a query that has fields indexed in two different classes. Let me put the code below:
Here I have the classes:
class T031003Index(RealTimeSearchIndex):
text = CharField(document=True, use_template=True)
C003INST = IntegerField(model_attr='C003INST')
C003CHCD = CharField(model_attr='C003CHCD')
C003MTR = CharField(model_attr='C003MTR')
C003RZSC = CharField(model_attr='C003RZSC')
def index_queryset(self):
return T031003.objects.all()
def prepare(self, obj):
self.prepared_data = super(T031003Index, self).prepare(obj)
self.prepared_data['text'] = obj.C003CHCD
return self.prepared_data
site.register(T031003, T031003Index)
And the second one:
class T031002Index(RealTimeSearchIndex):
text = CharField(document=True, use_template=True)
C002USER = CharField(model_attr='C002USER')
def index_queryset(self):
return T031002.objects.all()
def prepare(self, obj):
self.prepared_data = super(T031002Index, self).prepare(obj)
self.prepared_data['text'] = obj.C002USER
return self.prepared_data
site.register(T031002, T031002Index)
And I have two template indexes for each of them:
T031003_text:
{{ object.C003INST }}
{{ object.C003CHCD }}
{{ object.C003MTR }}
{{ object.C003RZSC }}
T031002_text:
{{ object.C002USER }}
{{ object.C002INST }}
My template code:
{% if page.object_list %}
{% for object in page.object_list %}
<br>
<li><font class="font">
{{ object.C003RZSC }}, {{ object.C003INST }}, {{ object.C003CHCD }}, {{ object.C003MTR }}, {{ object.C002USER }}
</li>
{% endfor %}
My view:
def search(req):
return SearchView(template='search.html')(req)
If I type in the search box a value from a field, let's say, that belongs to class T031002Index (like user = "vane"), it gives me the result:
"None, None, None, None, vane"
And, if I type a value from a field in class T031003Index, it gives me the result:
"pencil, 1, school material, general, None"
I have between these two classes in models.py a Foreign Key field, which is C002INST.
Could you guys give me an explanation? It seems easy, but I can't figure it out by myself.
Thanks in advance! | 0 | [
2,
184,
92,
31,
32,
106,
1373,
84,
81,
54,
91,
22894,
4348,
160,
29,
4301,
25325,
15,
72,
10636,
17,
3857,
14541,
800,
3726,
3726,
31,
23,
1876,
14,
9765,
18,
17,
109,
2346,
140,
235,
17,
711,
22,
38,
1369,
184,
92,
31,
788,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
rails: how to reset a users password with the click of a button?
===
**requirement:** i want a button to reset the password of any user to "password" in the users#index page
**what i've tried**:
i didnt need a show action! so i replaced the name of show in the view as "reset password" and in the user_controller, i made the following changes
def show
@user = User.find(params[:id])
@user.password = "password"
@user.password_confirmation = "password"
if @user.save
redirect_to users_url, notice: "Password was successfully reset!"
else
redirect_to users_url, notice: "Password reset failed"
end
end
**result**: it doesnt work! no errors or anything. it reloads the page with "password reset failed" notice..
how to make it work? is it something to do with the http method called in the route? | 0 | [
2,
2240,
18,
45,
184,
20,
23422,
21,
3878,
20884,
29,
14,
10840,
16,
21,
5167,
60,
800,
3726,
3726,
13,
1409,
99,
3003,
99,
1130,
45,
1409,
31,
259,
21,
5167,
20,
23422,
14,
20884,
16,
186,
4155,
20,
13,
7,
6201,
9587,
7,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Checking if a lists' items are in the same order in another list
===
I have a list, say `[1, 5, 2, 6, 2, 5, 1]`.<br>
The items in this list are in the same order in this list: `[4, 1, 5, 2, 6, 2, 5, 1, 6, 2, 3]`
What's an easy way finding out if a 1-nested lists' items are in the same order in another 1-nested lists' items? | 0 | [
2,
9886,
100,
21,
7227,
22,
3755,
50,
19,
14,
205,
389,
19,
226,
968,
800,
3726,
3726,
31,
57,
21,
968,
15,
395,
13,
1,
2558,
165,
15,
331,
15,
172,
15,
400,
15,
172,
15,
331,
15,
137,
500,
1,
9,
1,
5145,
1,
14,
3755,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CISC machines - don't they just convert complex instructions to RISC?
===
Perhaps I'm a t a misunderstanding in architecture - but if a machine has, say, a multiply instruction - is that instruction not translated to smaller instructions or is so complex such that it ultimately is the same speed as the equivalent RISC instructions? | 0 | [
2,
13,
7654,
150,
6035,
13,
8,
221,
22,
38,
59,
114,
8406,
1502,
7650,
20,
13,
2777,
150,
60,
800,
3726,
3726,
1774,
31,
22,
79,
21,
13,
38,
21,
13,
21558,
19,
2607,
13,
8,
47,
100,
21,
1940,
63,
15,
395,
15,
21,
26314,
73... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 - solving problems larger than memory limit
===
I was recently pondering the following scenario: suppose you have a huge database and you want to perform some calculations while loading some of its part. It can be the case, that even small part of that database might not fit into Java's heap memory which is quite limited. How do people go about solving these obstacles? How does google perform analysis on Terabytes of data with limited memory space?
Thanks in advance for your replies. | 0 | [
2,
8247,
13,
8,
17533,
1716,
1662,
119,
1912,
4496,
800,
3726,
3726,
31,
23,
1989,
14197,
68,
14,
249,
12705,
45,
5787,
42,
57,
21,
2329,
6018,
17,
42,
259,
20,
2985,
109,
19186,
133,
12797,
109,
16,
82,
141,
9,
32,
92,
44,
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... |
Bouncycastle elliptic curve encryption on Android
===
I'm trying to decrypt an X509 cert on an android device using Bouncycastle. However, I am consistently getting
java.lang.RuntimeException: algorithm identifier 1.2.840.10045.2.1 in key not recognised.
However, when I run the exact same code on my own computer, it works perfectly fine. Is android overriding some of the bouncycastle libraries with an outdated version? | 0 | [
2,
5963,
14386,
16736,
931,
6013,
1786,
7101,
24420,
27,
13005,
800,
3726,
3726,
31,
22,
79,
749,
20,
121,
11435,
40,
993,
264,
2545,
13,
17580,
27,
40,
13005,
3646,
568,
5963,
14386,
16736,
9,
207,
15,
31,
589,
11852,
1017,
8247,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jquery ui dialog in asp.net mvc3 doesn't open on second time
===
when i click the New Trade button in the form it opens jquery ui dialog. but, i have link button in the gridview when i click the link button it should open jquery ui dialog, it opens jquery ui dialog before clicking the new trade button. but, after clicking the new trade button, if i click link button in the gridview it invoke "ViewTradeDialog(id)" function, the dialog doesn't open, it shows error message "$vwdia.html(data).dialog is not a function". my code follows:
@using (Html.BeginForm("NewTrade", "Trade", FormMethod.Post, new { id = "searchForm" }))
{
<div id="searchbtn">
<input id="btn_newtrade" type="submit" value="New Trade" />
</div>
}
jquery code
<script type="text/javascript">
$(function () {
var $loading = $('<img src="../../loading.gif" alt="loading">');
var $dialog = $('<div></div>').append($loading);
$('#searchForm').submit(function (e) {
var url = this.action;
$.ajax({
autoOpen: false,
url: url,
success: function (data) {
$dialog.html(data).dialog({
zIndex:1,
width: 1400,
height: 600,
resizable: false,
title: 'New Trade Details',
modal: true,
buttons: {
"close": function () {
$dialog.dialog('close');
},
"Add Trade": function () {
$dialog.dialog('close');
$.ajax({
type: 'POST',
url: url
});
}
}
});
}
});
return false;
});
});
function ViewTradeDialog(id) {
alert(id);
var $vwdia = $('<div></div>');
var url = '/Trade/ViewTrades?tradeid=' + id;
$.ajax({
url: url,
success: function (data) {
$vwdia.html(data).dialog({
width: 600,
height: 600,
resizable: false,
title: 'View Trade Details',
modal: false,
buttons: {
"close": function () {
$vwdia.dialog('close');
}
}
});
}
});
return false;
}
</script>
| 0 | [
2,
487,
8190,
93,
13,
5661,
28223,
19,
28,
306,
9,
2328,
307,
8990,
240,
1437,
22,
38,
368,
27,
153,
85,
800,
3726,
3726,
76,
31,
10840,
14,
78,
1238,
5167,
19,
14,
505,
32,
8965,
487,
8190,
93,
13,
5661,
28223,
9,
47,
15,
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... |
database synchronization for iOS with its web server
===
How to maintain a sync of database between my iPhone app and web server, If there is a update on the web server database there should be a update alert on my app. is that possible please help me on this, help would be greatly appreciated.
Thanks
Deepesh
| 0 | [
2,
6018,
13,
16023,
1829,
26,
13,
7760,
29,
82,
2741,
8128,
800,
3726,
3726,
184,
20,
4027,
21,
6063,
150,
16,
6018,
128,
51,
21024,
4865,
17,
2741,
8128,
15,
100,
80,
25,
21,
11100,
27,
14,
2741,
8128,
6018,
80,
378,
44,
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... |
Simplify boolean logic
===
Simple question, can the following logic
A && !(A && B)
be simplified into this?
A && !B
If not can it be simplified at all? | 0 | [
2,
28257,
9827,
413,
210,
7085,
800,
3726,
3726,
1935,
1301,
15,
92,
14,
249,
7085,
21,
279,
1569,
13,
187,
5,
58,
279,
1569,
334,
6,
44,
13,
11268,
77,
48,
60,
21,
279,
1569,
13,
187,
220,
100,
52,
92,
32,
44,
13,
11268,
35... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to set message priority using TOS?
===
The IP header has type of service (TOS) field. It can be used to set for Classful Queueing Disciplines, i.e. PRIO.
I have tested the following codes.
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char**argv)
{
int listenfd, connfd, optval;
struct sockaddr_in servaddr, cliaddr;
socklen_t clilen;
pid_t childpid;
char mesg[16];
listenfd = socket(AF_INET, SOCK_STREAM, 0);
bzero(&servaddr, sizeof(servaddr));
bzero(mesg, 0, sizeof(mesg));
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr=htonl(INADDR_ANY);
servaddr.sin_port = htons(32000);
bind(listenfd,(struct sockaddr *)&servaddr, sizeof(servaddr));
listen(listenfd, 1024);
for (;;)
{
clilen = sizeof(cliaddr);
connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &clilen);
if ((childpid = fork()) == 0)
{
close(listenfd);
for (;;)
{
optval = 0x28;
setsockopt(cliaddr, IPPROTO_IP, IP_TOS, &optval, sizeof(optval));
strcpy(mesg, "tos=0x28");
sendto(connfd, mesg, sizeof(mesg), 0, (struct sockaddr *)&cliaddr, sizeof(cliaddr));
sleep(2);
optval = 0x58;
strcpy(mesg, "tos=0x58");
setsockopt(cliaddr, IPPROTO_IP, IP_TOS, &optval, sizeof(optval));
sendto(connfd, mesg, sizeof(mesg), 0, (struct sockaddr *)&cliaddr, sizeof(cliaddr));
sleep(2);
}
}
close(connfd);
}
}
The packets can be sent with TOS field set successfully. But what shall I do to make message priority take efforts? Thanks! | 0 | [
2,
184,
20,
309,
2802,
9857,
568,
20,
18,
60,
800,
3726,
3726,
14,
15735,
157,
106,
63,
1001,
16,
365,
13,
5,
262,
18,
6,
575,
9,
32,
92,
44,
147,
20,
309,
26,
718,
1566,
22521,
68,
14469,
15,
31,
9,
62,
9,
4566,
111,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Custom JavaScript CSS Animated Bar Graph
===
I need to fix a few bugs in code that has been written by another developer and I'm really struggling at the moment to work out what to do. We have a site at http://www.olympicsbuzz.com/ and if you click on Olympic Mentions you'll see an animated bar graph appear. Basically, this shows the positive, neutral and negative social mentions for each day of a specific week, and the user can slide between different weeks.
You'll notice as you slide to the next week, it animates. Slide to the week after and it doesn't, then the animation stops completely for all weeks.
Here's the code:
var olympics_mentions_data;
var global_olympics_current_week;
var total_weeks = 0;
function animateOlympicsWeek(week)
{
var heights;
var height;
var week_container = $('#olympics-mentions #blocks #weeks .week[week="'+week+'"]');
$(week_container).find('.days .day').each(function(i, day){
$(day).find('.block').each(function(j, block){
heights = $(block).attr('style').match(/height(\w)?:[^;]*;/);
heights = heights[0].split(':');
heights[1] = $.trim(heights[1]);
height = heights[1].substring(0,heights[1].length-3);
$(block).css('height',0);
$(block).css('display','block');
$(block).delay((i*100)+(j*600)).animate({height: height},{easing: 'easeOutBounce', duration: 600});
});
});
}
$(document).ready(function() {
// OLYMPICS MENTIONS
olympics_mentions_data = new Array();
olympics_mentions_data["2012/06/21"] = [
[4700,8500,3750],
[6000,5700,1350],
[4000,4900,5150],
[4100,8500,1750],
[6100,5700,1350],
[4000,4900,5150],
[4000,4900,5150]
];
olympics_mentions_data["2012/06/28"] = [
[4700,8500,3750],
[6000,5700,1350],
[4000,4900,5150],
[4100,8500,1750],
[6100,5700,1350],
[4000,4900,5150],
[4000,4900,5150]
];
olympics_mentions_data["2012/07/05"] = [
[4700,8500,3750],
[6000,5700,1350],
[4000,4900,5150],
[4100,8500,1750],
[6100,5700,1350],
[4000,4900,5150],
[4000,4900,5150]
];
total_weeks = 0;
for(week in olympics_mentions_data)
{
total_weeks++;
}
for(week in olympics_mentions_data)
{
global_olympics_current_week = week;
break;
}
buildOlympicsMentions(olympics_mentions_data);
$("#olympics-mentions #bar #blocks #controller").jFlow({
controller: ".jFlowControl-olympics",
slides: "#olympics-mentions #bar #blocks #weeks",
width: "772px",
height: "282px",
prev: "#olympics-mentions .prev",
next: "#olympics-mentions .next",
duration: '600',
easing: "easeInOutExpo",
loop: false
});
function buildOlympicsMentions(data)
{
var max_mentions = 20000;
var week_number = 0;
var controller_item;
var week_container;
var total_daily_mentions;
var days_container;
var day_left;
var day_container;
var block_bottom;
var mention_num;
var mention_type;
var percentage;
var block_height;
var block;
// Populate scale
$('#olympics-mentions #bar #scale .upper').text((max_mentions>1000)?max_mentions/1000+'k':max_mentions);
$('#olympics-mentions #bar #scale .middle').text((max_mentions/2)>1000?max_mentions/2000+'k':max_mentions/2);
$('#olympics-mentions #bar #scale .lower').text('0');
// Loop through each week's worth of data
for(week in data)
{
week_number++;
day_left = 2;
// Build new controller item for jFlow slider
controller_item = document.createElement('span');
controller_item.setAttribute('class','jFlowControl-olympics');
controller_item.innerHTML = week;
// Build new week block container
week_container = document.createElement('div');
if(week==global_olympics_current_week)
week_container.setAttribute('class','week current');
else
week_container.setAttribute('class','week');
week_container.setAttribute('week',week);
days_container = document.createElement('div');
days_container.setAttribute('class','days');
infos_container = document.createElement('div');
infos_container.setAttribute('class','infos');
// Loop through each day of the week
for(var day=0; day<data[week].length; day++)
{
// Get total number of mentions in the day
total_daily_mentions = 0;
for(var j=0; j<data[week][day].length; j++)
{
total_daily_mentions += data[week][day][j];
}
// Build new day block container and set position
day_container = document.createElement('div');
day_container.setAttribute('class','day');
day_container.setAttribute('style','left: '+day_left+'px');
daily_percentage = total_daily_mentions / max_mentions;
block_bottom = 0;
// Build and position day mentions blocks
mention_num = 0;
for(var j=0; j<data[week][day].length; j++)
{
if(mention_num==0)
mention_type = 'positive';
if(mention_num==1)
mention_type = 'neutral';
if(mention_num==2)
mention_type = 'negative';
percentage = (data[week][day][j] / total_daily_mentions) * daily_percentage;
block_height = Math.round(percentage * 250);
block = document.createElement('div');
block.setAttribute('class', 'block '+mention_type);
block.setAttribute('style', 'height: '+block_height+'px; bottom: '+block_bottom+'px; display: none;');
day_container.appendChild(block);
block_bottom += block_height;
mention_num++;
}
// Build and position day info blocks
day_date = new Date(week);
day_info_container = document.createElement('div');
day_info_container.setAttribute('class','info');
day_info_container.setAttribute('style', 'left: '+day_left+'px;');
day_info_container.innerHTML = $.datepicker.formatDate('DD<br />dd MM', day_date);
infos_container.appendChild(day_info_container);
days_container.appendChild(day_container);
week_container.appendChild(days_container);
week_container.appendChild(infos_container);
day_left += 108 + 2;
}
// Append week block to mentions
$('#olympics-mentions #blocks #weeks').append(week_container);
// Append jFlow controller item to controller container
$('#olympics-mentions #blocks #controller').append(controller_item);
}
}
$('#olympics-mentions #bar .previous').click(function(){
$('#olympics-mentions #bar #weeks').find('.week').each(function(current_week_number, current_week){
if($(current_week).hasClass('current')){
if(current_week_number!=0){
$(current_week).removeClass('current');
$('#olympics-mentions #bar #weeks').find('.week').each(function(week_number, week){
if(week_number==(current_week_number-1)){
global_olympics_current_week = $(week).attr('week');
$(week).addClass('current');
setTimeout(function(){
animateOlympicsWeek($(week).attr('week'));
}, 600);
}
});
setTimeout(function(){
$('#olympics-mentions #bar #weeks .week[week="'+$(global_olympics_current_week).attr('week')+'"]').find('.days .day').each(function(i, day){
$(day).find('.block').each(function(j, block){
$(block).css('display','none');
})
});
}, 600);
}
}
});
});
$('#olympics-mentions #bar .next').click(function(){
$('#olympics-mentions #bar #weeks').find('.week').each(function(current_week_number, current_week){
if($(current_week).hasClass('current')){
if(current_week_number!=(total_weeks-1)){
$(current_week).removeClass('current');
$('#olympics-mentions #bar #weeks').find('.week').each(function(week_number, week){
if(week_number==(current_week_number+1)){
global_olympics_current_week = $(week).attr('week');
$(week).addClass('current');
setTimeout(function(){
animateOlympicsWeek($(week).attr('week'));
}, 600);
}
});
setTimeout(function(){
$('#olympics-mentions #bar #weeks .week[week="'+$(global_olympics_current_week).attr('week')+'"]').find('.days .day').each(function(i, day){
$(day).find('.block').each(function(j, block){
$(block).css('display','none');
})
});
}, 600);
}
}
});
});
});
I also have another issue with the individual days, they all seem to show the exact same day when what is required is each day within that week.
I would really appreciate any help you guys can offer as I'm certainly no JavaScript expert. Thanks. | 0 | [
2,
5816,
8247,
8741,
272,
18,
18,
5784,
748,
7210,
800,
3726,
3726,
31,
376,
20,
6098,
21,
310,
13925,
19,
1797,
30,
63,
74,
642,
34,
226,
10058,
17,
31,
22,
79,
510,
7587,
35,
14,
688,
20,
170,
70,
98,
20,
107,
9,
95,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to check textfield for whitespaces in jquery
===
I have a form. I want to put validation so that It will check if user enters white spaces or not. If its white spaces then show error. How could I do this? | 0 | [
2,
184,
20,
2631,
1854,
1109,
26,
359,
5582,
18,
19,
487,
8190,
93,
800,
3726,
3726,
31,
57,
21,
505,
9,
31,
259,
20,
442,
27999,
86,
30,
32,
129,
2631,
100,
4155,
8104,
359,
7644,
54,
52,
9,
100,
82,
359,
7644,
94,
298,
701... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to identify the bug from iPhone Crash log
===
I am using TestFlight SDK. I got the crash log from a user and I cant reproduce the issue. I like to know how to identify the bug location from crash log. Any help is greatly appreciated.. Thanks in advance.
I have masked my project name from the log.
Sorry if my question is so basic.
![enter image description here][1]
[1]: http://i.stack.imgur.com/jaUuD.png | 0 | [
2,
184,
20,
5808,
14,
6256,
37,
21024,
4597,
6738,
800,
3726,
3726,
31,
589,
568,
1289,
14750,
13,
18,
43,
197,
9,
31,
330,
14,
4597,
6738,
37,
21,
4155,
17,
31,
2973,
21509,
14,
1513,
9,
31,
101,
20,
143,
184,
20,
5808,
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... |
sort list of list depends on size of the subList?
===
I have a List of List. I want to sort the Super List depends on the sub list size. The Lists are dynamic. Now they are coming like this.
[ ["sdf","dasf"],[],["asdff"],["sdfdf","sadfdf","sdfd"] ]
After The sorting it should display
[ ["sdfdf","sadfdf","sdfd"],["sdf","dasf"],["asdff"],[] ]
Can you help how to sort this?
Here i have taken sub list elements are of type Strings, But they are Actually Map type. For simplification i took like this..
Thanks in advance.
Laxman chowdary | 0 | [
2,
2058,
968,
16,
968,
9597,
27,
1072,
16,
14,
972,
5739,
60,
800,
3726,
3726,
31,
57,
21,
968,
16,
968,
9,
31,
259,
20,
2058,
14,
1026,
968,
9597,
27,
14,
972,
968,
1072,
9,
14,
7227,
50,
7782,
9,
130,
59,
50,
880,
101,
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... |
Write bytes, ints and byte buffers easily? C#
===
My code looks like
mem.WriteByte(4);
mem.WriteByte(1);
mem.Write(HostPortBuf, 0, 2);
//more
Is it possible to write it like
mem.MyWrite(4, 1, HostPortBuf, //more);
Mem is currently a memorystream but i can easily build the array in one go so it doesn't need to be a stream. Is there anything like this? in C#? | 0 | [
2,
2757,
34,
3231,
15,
19,
38,
18,
17,
34,
591,
17497,
18,
2351,
60,
272,
5910,
800,
3726,
3726,
51,
1797,
1879,
101,
55,
79,
9,
23716,
23246,
5,
300,
6,
73,
55,
79,
9,
23716,
23246,
5,
165,
6,
73,
55,
79,
9,
23716,
5,
116... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating events for CustomControl
===
I am working on a UserControl for selecting special files, in this control there is a `TreeView` which gets populated with nodes when user selects some file. Also user can remove the files from this treeview!
I am using this control in a wizard form. In this wizard form there is a button named `buttonNext` and this button is disabled by default.
How can I create an event for the treeview in the usercontrol that when it gets populated it notify the next button in wizard form to get enabled and if user removes all files from that treeview it notify the button to get disabled again.
P.S: Selecting files (browser dialog and stuff like that) are all done within this usercontrol, so in my wizard form I have no access to the things that is going on in this component, but only I set the TreeView itself as public so I can read its nodes in my wizard form.
I know how to subscribe to events but never created any event myself :( | 0 | [
2,
2936,
963,
26,
5816,
12898,
800,
3726,
3726,
31,
589,
638,
27,
21,
4155,
12898,
26,
20764,
621,
6488,
15,
19,
48,
569,
80,
25,
21,
13,
1,
8101,
4725,
1,
56,
3049,
11111,
29,
16272,
76,
4155,
5407,
18,
109,
3893,
9,
67,
4155... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Get command and eventually PhoneGap
===
Ive been making a site that interacts with a Java Servlet to get data.
And its been going really well. Im running tomcat to run the site.
So at the moment im getting data like this:
$.get('data',{some parameters}, function(data) {
do stuff...
});
Ive also changed the 'data' to 'MYIP:8080/WebPortal/data' and it still works fine.
But anything seems to only work if I go to 'MYIP:8080/WebPortal/index.html' in my browser rather than just opening the index.html file on its own. This wasn't really an issue until I started thinking using a Phonegap App to get data in the same way.
I assumed making the url of the servlet absolute would make it aok but phonegap behaves just like opening the .html file straight up, which *is* what its supposed to do.
Ive heard about crossdomain policies and Phonegap's white list but I dont really understand them fully yet and dont know if they are relevant here.
So if anyone knows why my jquery commands only work through a server would be appreciated
Thanks | 0 | [
2,
487,
8190,
93,
164,
1202,
17,
878,
1132,
1136,
306,
800,
3726,
3726,
5568,
74,
544,
21,
689,
30,
10001,
18,
29,
21,
8247,
13,
10321,
1336,
20,
164,
1054,
9,
17,
82,
74,
228,
510,
134,
9,
797,
946,
2067,
5782,
20,
485,
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... |
How to VBA change value (display text) without change formula in cell?
===
I've a problem with this VBA macro.
Sub demoChangeText()
Application.Range("B2").Value = "Overidden text"
End Sub
[Test Here][1]. You can open in excel, press `Ctrl+F8` and choose `demoChangeText`.
As you see, this macro make losted formula in cell `B2` in cell, so user must re-type formula.
**How to change display text on cell without change formula?**
[1]: https://dl.dropbox.com/u/60740207/TestChangeText.xlsm | 0 | [
2,
184,
20,
566,
969,
753,
1923,
13,
5,
2906,
5438,
1854,
6,
366,
753,
3729,
19,
1667,
60,
800,
3726,
3726,
31,
22,
195,
21,
1448,
29,
48,
566,
969,
9069,
9,
972,
8376,
16229,
11969,
5,
6,
3010,
9,
8366,
5,
7,
220,
135,
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... |
Why navigationMovement for FOCUSABLE LabeField is bypassed in Blackberry?
===
I have a [LabelField][1] whith style [FOCUSABLE][2] and many focusable [Field][3]s after it, and I overrided the [navigationMovement][4] method of the [LabelField][5].<br><br> The problem is that: the code never enters in the new implementation of [navigationMovement][6] but the focus is normally moved from [LabelField][7] to next [Field][8] without passing by [navigationMovement][6] implementation !<br><br>
PS, I also tested using debugger to ensure that it never gets into its implementation. <br><br>
**Why is this happening and how to catch navigationMovement event for FOCUSABLE LabelField ?**
[1]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/component/LabelField.html
[2]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Field.html#FOCUSABLE
[3]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Field.html
[4]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Field.html#navigationMovement%28int,%20int,%20int,%20int%29
[5]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/component/LabelField.html
[6]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Field.html#navigationMovement%28int,%20int,%20int,%20int%29
[7]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/component/LabelField.html
[8]: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Field.html | 0 | [
2,
483,
8368,
16598,
1130,
26,
1776,
579,
4343,
62,
1109,
25,
8900,
69,
19,
27367,
60,
800,
3726,
3726,
31,
57,
21,
636,
21018,
1109,
500,
2558,
165,
500,
5558,
252,
1034,
636,
23371,
579,
500,
2558,
135,
500,
17,
151,
1776,
579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to parse xml file and grab text values
===
The following is just a snipplet of code from a large fxg file, which is basically just a xml file:
<RichText x="14.1655" y="46.5674" columnGap="18" columnCount="1" textAlign="left" fontFamily="Bootstrap" color="#53836A" whiteSpaceCollapse="preserve" width="202.712" height="13.334" s7:caps="none" s7:colorName="" s7:colorValue="#B24FA41C" s7:colorspace="cmyk" s7:elementID="line1" s7:fill="true" s7:fillOverprint="false" s7:firstBaselineOffset="ascent" s7:joints="miter" s7:maxFontSize="12" s7:miterLimit="10" s7:referencePoint="inherit" s7:rowCount="1" s7:rowGap="18" s7:rowMajorOrder="true" s7:stroke="false" s7:strokeOverprint="false" s7:warpBend="0.5" s7:warpDirection="horizontal" s7:warpHorizontalDistortion="0" s7:warpStyle="none" s7:warpVerticalDistortion="0" s7:weight="1" ai:aa="2" ATE:C_charRotation="0" ATE:C_horizontalScale="1" ATE:C_kerning="metric" ATE:C_verticalScale="1" ATE:P_autoHyphenate="true" ATE:P_consecutiveHyphenLimit="0" ATE:P_hyphenateCapitalized="true" ATE:P_hyphenatedWordSize="6" ATE:P_hyphenationPreference="0.5" ATE:P_hyphenationZone="36" ATE:P_postHyphenSize="2" ATE:P_preHyphenSize="2" d:userLabel="id:line1">
<content><p><span>Address Line 1</span></p></content>
</RichText>
There are many nodes in the xml file that have a similar structure. But each RichText node has a unique element id, s7:elementID="line1" in this case.
using php or javascript, how can I grab either:
1. the text "Address Line 1"
2. the whole line including content,p,span tags
if I specify the elementID I want the content from?
I'm not very familiar with xml so I'm not sure if this is even possible? | 0 | [
2,
184,
20,
2017,
870,
23504,
3893,
17,
4931,
1854,
4070,
800,
3726,
3726,
14,
249,
25,
114,
21,
8912,
19128,
1336,
16,
1797,
37,
21,
370,
13,
16488,
263,
3893,
15,
56,
25,
11374,
114,
21,
23504,
3893,
45,
13,
1,
3920,
11969,
99... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 limit the size of div to window dimensions?
===
I have a menubar(div) which houses bookmarks and when too many bookmarks are inserted this menu bar(div) becomes too wide for the preferred page size(1280, 720) and becomes scrollabe, leaving half of the bookmarks out of view.
![enter image description here][1]
I want to ensure that all the bookmarks are in view and the best option seems to be that I have to make the extra bookmarks appear on the next line. can someone guide me in the right direction or better yet provide a working sample. Im just learning to use jquery and am finding this very difficult.
[Example code in jsfiddle][2]
[1]: http://i.stack.imgur.com/g7QsC.png
[2]: http://jsfiddle.net/ftaran/y9a64/8/ | 0 | [
2,
184,
20,
4496,
14,
1072,
16,
13,
12916,
20,
1463,
9913,
60,
800,
3726,
3726,
31,
57,
21,
11379,
1850,
5,
12916,
6,
56,
1947,
360,
4527,
18,
17,
76,
266,
151,
360,
4527,
18,
50,
14215,
48,
11379,
748,
5,
12916,
6,
2633,
266,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Convert a piecewise function to a CSV file using Java
===
I'm trying to create a Java function that will convert a string containing a piecewise function to a csv file that can be used for graphing. For example this expression:
if (time < 60) then (0.1) else ( if (time > 66.0115) then (0.1) else 1)
would be converted to:
File pwl.csv
time , output
0 , 0.1
59.9, 0.1
60, 1
66.0115, 1
66.11149999999999, 0.1
132.023, 0.1
End File
The converter needs to be able to handle a variety of piecewise functions, including:
if (t > 0.5) then (2) else 3
if (t >= 0.5) then (2) else 3
if (t < 0.5) then (2) else 3
if (t <= 0.5) then (2) else 3
if ((t >= 3600) & (t <= 3660)) then (25) else 0
I've been able to write code that converted the first example, but it really only works for that specific function, and I'm looking for a more general solution. Any thoughts on the problem?
These piecewise functions originally came from a MathML file, so any suggestions for a direct conversion from MathML to CSV are welcome as well.
| 0 | [
2,
8406,
21,
1855,
10474,
1990,
20,
21,
272,
18,
710,
3893,
568,
8247,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
8247,
1990,
30,
129,
8406,
21,
3724,
3503,
21,
1855,
10474,
1990,
20,
21,
272,
18,
710,
3893,
30,
92,
44,
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... |
SELECT DISTINCT STATEMENT
===
For some reason, my query is returning dup rows. I am trying to create a SELECT DISTINCT query. Can someone please tell me what is wrong with my query? Thanks for your help.
SELECT DISTINCT
PT_AGCY_DTL.MLM_AGCY_NBR AS AgencyID
, AGENCY.ORG_NM AS Agency
, AGCY_ADDR.CTY_NM as AgencyCity
, AGCY_ADDR.ST_PRVN_CDE_CID as AgencyST
, AG_AGCY_CNTCT.AGCY_CNTCT_ID as ContactID
, AG_AGCY_CNTCT.CNTCT_DT AS ContactDt
, AG_AGCY_CNTCT.AGCY_RESULTS_TXT AS AgencyResults
, AG_AGCY_CNTCT.GEN_OVERVIEW_TXT AS GeneralOverview
, AG_AGCY_CNTCT.NB_RNWL_BUS_DISCUSSION_TXT AS NewAndRenewalBusinessDiscussions
, AG_AGCY_CNTCT.NB_RNWL_BUS_DISCUSSION_TXT AS NewAndRenewalBusinessDiscussions
, AG_AGCY_CNTCT.MKT_INTELLIGENCE_TXT AS MarketIntelligence
, AG_AGCY_CNTCT.AGCY_PERSONNEL_CHG_TXT AS AgencyPersonnelChanges
, AG_AGCY_CNTCT.MM_ISSUE_TXT AS MyMonitorIssues
, AG_AGCY_CNTCT.UW_CLM_ISSUE_TXT AS UnderwritingClaimIssues
, AG_AGCY_CNTCT.FOLLOW_UP_ITEM_TXT AS FollowUpActionItems
, AG_AGCY_CNTCT.NXT_CNTCT_DT AS NextScheduledVisitDate
, CONTACT_TYPE.CODE_NM AS ContactType
, CONVERT(VARCHAR, AG_AGCY_CNTCT.CNTCT_DT,101) + ' - ' + CONTACT_TYPE.CODE_NM AS ContactDtType
, AG_AGCY_CNTCT.CNTCT_DESC AS ContactDetails
, CASE
WHEN PRODUCER.LST_NM IS NULL THEN ' '
ELSE LTRIM(RTRIM(PRODUCER.FRST_NM)) + ' ' + LTRIM(RTRIM(PRODUCER.LST_NM)) END AS Producers
, CASE
WHEN MLM_EMPL.LST_NM IS NULL THEN ' '
ELSE LTRIM(RTRIM(MLM_EMPL.FRST_NM)) + ' ' + LTRIM(RTRIM(MLM_EMPL.LST_NM)) END AS Employees
, CASE
WHEN PROD_CAT.CODE_NM IS NULL THEN ' '
ELSE LTRIM(RTRIM(PROD_CAT.CODE_NM)) END AS ProductCategory
FROM
AG_AGCY_CNTCT
INNER JOIN PT_AGCY_DTL
ON AG_AGCY_CNTCT.AGCY_PID = PT_AGCY_DTL.PARTY_ID
INNER JOIN PT_PARTY AS AGENCY
ON AGENCY.PARTY_ID = AG_AGCY_CNTCT.AGCY_PID
LEFT OUTER JOIN PT_PARTY_ADDR AS AGCY_ADDR
ON AGCY_ADDR.PARTY_ID = AG_AGCY_CNTCT.AGCY_PID
INNER JOIN CD_CODE AS CONTACT_TYPE
ON CONTACT_TYPE.CODE_ID = AG_AGCY_CNTCT.CNTCT_TYP_CID
LEFT OUTER JOIN AG_AGCY_CNTCT_PRDCR_RLTNSHP
ON AG_AGCY_CNTCT_PRDCR_RLTNSHP.AGCY_CNTCT_ID = AG_AGCY_CNTCT.AGCY_CNTCT_ID
LEFT OUTER JOIN PT_PARTY AS PRODUCER
ON PRODUCER.PARTY_ID = AG_AGCY_CNTCT_PRDCR_RLTNSHP.PRDCR_PID
LEFT OUTER JOIN AG_AGCY_CNTCT_MLM_EMPL_RLTNSHP
ON AG_AGCY_CNTCT_MLM_EMPL_RLTNSHP.AGCY_CNTCT_ID = AG_AGCY_CNTCT.AGCY_CNTCT_ID
LEFT OUTER JOIN PT_PARTY AS MLM_EMPL
ON MLM_EMPL.PARTY_ID = AG_AGCY_CNTCT_MLM_EMPL_RLTNSHP.MLM_EMPL_PID
LEFT OUTER JOIN AG_AGCY_CNTCT_PROD_CAT_TYP_RLTNSHP
ON AG_AGCY_CNTCT_PROD_CAT_TYP_RLTNSHP.AGCY_CNTCT_ID = AG_AGCY_CNTCT.AGCY_CNTCT_ID
LEFT OUTER JOIN CD_CODE AS PROD_CAT
ON PROD_CAT.CODE_ID = AG_AGCY_CNTCT_PROD_CAT_TYP_RLTNSHP.PROD_CAT_TYP_CID
AND AGCY_ADDR.ADDR_TYP_CID = '30' -- business address
AND AGCY_ADDR.REC_STS_TYP_CID = 'A' -- active
WHERE
PT_AGCY_DTL.MLM_AGCY_NBR ='4759' --@AgencyID (this is the FILTER)
ORDER BY ContactDt DESC, ContactID DESC
| 0 | [
2,
5407,
4421,
3331,
800,
3726,
3726,
26,
109,
1215,
15,
51,
25597,
25,
2485,
17938,
11295,
9,
31,
589,
749,
20,
1600,
21,
5407,
4421,
25597,
9,
92,
737,
2247,
494,
55,
98,
25,
1389,
29,
51,
25597,
60,
3669,
26,
154,
448,
9,
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... |
android, show active GPS coordinates in own app
===
is there a code that lets you show your acitve coordinates in selfmade app? I have troubels with my google maps and i wabt to see what my active coordinates are. I prefer if to be shown as i look at the google maps in my app, like a second layer of information. Thanks all ! | 0 | [
2,
13005,
15,
298,
1348,
18298,
13714,
19,
258,
4865,
800,
3726,
3726,
25,
80,
21,
1797,
30,
6884,
42,
298,
154,
21,
1892,
38,
195,
13714,
19,
1119,
5781,
4865,
60,
31,
57,
26894,
3512,
18,
29,
51,
8144,
6867,
17,
31,
3142,
220,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
modifying a multiple selects validation with jqury
===
hi this the code i have now
http://jsfiddle.net/heera/m4tyC/1/
what i want is to add class "invalid" for the select if it was not selected in it's row and remove this class if the 3 selects in the row is selected but if no select rather than the first row is selected i only submit the form with at least one row of selects
this is the HTML and the js is included in the fiddle link above :
<form id="productOptions" name="product-options">
<div class="selects s1">
<select name="selectss1" id="size1" class="product-select-options-size">
<option>-Size</option>
<option>Small</option>
<option>Medium</option>
<option>Large</option>
<option>X-large</option>
</select>
<select name="selectsc1" id="color1" class="product-select-options-color">
<option>-Color</option>
<option>Green</option>
<option>Pink</option>
<option>White</option>
<option>Yellow</option>
</select>
<select name="selectsq1" id="qty1" class="product-select-options-qty">
<option>-QTY</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div class="selects s2">
<select name="selectss2" id="size2" class="product-select-options-size">
<option>-Size</option>
<option>Small</option>
<option>Medium</option>
<option>Large</option>
<option>X-large</option>
</select>
<select name="selectsc2" id="color2" class="product-select-options-color">
<option>-Color</option>
<option>Green</option>
<option>Pink</option>
<option>White</option>
<option>Yellow</option>
</select>
<select name="selectsq2" id="qty2" class="product-select-options-qty">
<option>-QTY</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div class="selects s3">
<select name="selectss3" id="size3" class="product-select-options-size">
<option>-Size</option>
<option>Small</option>
<option>Medium</option>
<option>Large</option>
<option>X-large</option>
</select>
<select name="selectsc3" id="color3" class="product-select-options-color">
<option>-Color</option>
<option>Green</option>
<option>Pink</option>
<option>White</option>
<option>Yellow</option>
</select>
<select name="selectsq3" id="qty3" class="product-select-options-qty">
<option>-QTY</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<p><a href="#" class="add-more">+ Add more at one time</a></p>
<!-- End select options -->
<input type="image" name="product-options" src="/media/blackheart/images/blackheart/add-to-cart.png" />
</form>
Kindly advice | 0 | [
2,
17579,
68,
21,
1886,
5407,
18,
27999,
29,
487,
5495,
622,
800,
3726,
3726,
4148,
48,
14,
1797,
31,
57,
130,
7775,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
438,
2615,
118,
79,
300,
1084,
150,
118,
8197,
98,
31,
259,
25,
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... |
Get textarea contents as an array using Javascript with/without jQuery
===
I am trying to find out a way to get the textarea data as an array using javascript.
I am tied to following conditions:
- A maximum of 5 lines may be entered
- Each line shall contain a maximum of 30 characters (including
spaces and punctuation)
- No words longer than 30 characters may be used
- A wrap will be enforced after 30 characters are on each of the
first four lines, bringing the preceding uninterrupted string of text
to the next line.
- A space, ‘Enter’, Period, Comma, and a ‘-‘ will be considered the
three methods to determine where to break a line for wrapping
- A user may not wrap from the last line
- When line 5 is full, do not allow the user to add any more characters
at the end.
Here is [JS Fiddle][1] that I have tried. Any help or thoughts would be Great!.
Thanks all!
[1]: http://jsfiddle.net/rajes189/wY42N/ | 0 | [
2,
164,
1854,
17760,
8478,
28,
40,
7718,
568,
8247,
8741,
29,
118,
14506,
487,
8190,
93,
800,
3726,
3726,
31,
589,
749,
20,
477,
70,
21,
161,
20,
164,
14,
1854,
17760,
1054,
28,
40,
7718,
568,
8247,
8741,
9,
31,
589,
3802,
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... |
Virtual host not working in zend framework
===
Following is my virtual host in /etc/apache2/sites-available:
<VirtualHost *:80>
DocumentRoot "/var/www/roomstays/public"
ServerName roomstays
#This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "/var/www/roomstays/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Also it enabled on /etc/apache2/sites-enabled folder
And following is my host file:
127.0.0.1 localhost
127.0.0.1 roomstays
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I configured my site in var/www/roomstays. But when I entered roomstays on it not opening the site and showing this message :
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
What's wrong with virtual host. | 0 | [
2,
6599,
2015,
52,
638,
19,
10526,
43,
6596,
800,
3726,
3726,
249,
25,
51,
6599,
2015,
19,
13,
118,
1198,
150,
118,
7738,
2569,
9298,
18,
6359,
8,
4961,
947,
579,
45,
13,
1,
8145,
38,
6948,
11694,
1637,
45,
2887,
1,
4492,
14032,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.