unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Storyboard change Target Control WP7
===
I have created a Storyboard through Expression Blend. The Storyboard animated an Ellipse has a sortof placeholder. Now that I am back in Visual Studio, how can I make the Storyboard do the exact same thing but to a different control? I have a list of images:
private List<Image> items = new List<Image>();
Each object in items has been assigned with a name using the Name property:
items[i].Name = i.ToString();
'i' in this case is the counter.
How do I therefore make the Storyboard target "one" specific object within the list for the moment. Later, I shall try to make the Storyboard do the same for all of them.
Any help is highly appreciated. | 0 | [
2,
609,
2806,
753,
2935,
569,
13,
13790,
465,
800,
3726,
3726,
31,
57,
679,
21,
609,
2806,
120,
1803,
11138,
9,
14,
609,
2806,
5784,
40,
13,
4223,
1919,
62,
63,
21,
2058,
1041,
209,
12427,
9,
130,
30,
31,
589,
97,
19,
3458,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
making object movement smooth in a java applet
===
Hi friends i'm trying to write a simple program that will move a little square right,left,up, and down smoothly.
As is, the square will indeed move in the four directions but there is a noticeable delay when trying to change the direction of the square. I plan on eventually writing a little game similar to the 'brick' game but in order to do that my object has to move smoothly. Can someone give me some advice on how to achieve this?
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseListener;
public class FutureGame extends Applet implements KeyListener{
int deltax;
int deltay;
public void init(){
deltax = 0;
deltay = 0;
this.addKeyListener(this);
}
@Override
public void keyPressed(KeyEvent ke) {
if(ke.getKeyCode() == ke.VK_RIGHT){
deltax = deltax +10;
}
if(ke.getKeyCode() == ke.VK_LEFT){
deltax = deltax - 10;
}
if(ke.getKeyCode() == ke.VK_UP){
deltay = deltay - 10;
}
if(ke.getKeyCode() == ke.VK_DOWN){
deltay = deltay +10;
}
this.repaint();
}
@Override
public void keyReleased(KeyEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void keyTyped(KeyEvent arg0) {
// TODO Auto-generated method stub
}
public void paint(Graphics g){
g.drawRect(deltax, deltay, 10, 10);
}
} | 0 | [
2,
544,
3095,
1018,
3905,
19,
21,
8247,
4037,
38,
800,
3726,
3726,
4148,
954,
31,
22,
79,
749,
20,
2757,
21,
1935,
625,
30,
129,
780,
21,
265,
735,
193,
15,
9742,
15,
576,
15,
17,
125,
17532,
9,
28,
25,
15,
14,
735,
129,
405... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Silverlight MediaElement Grayscale playback
===
Is it possible to playback a color video as grayscale? Ideally it would be wonderful if I could just switch there and back between the two modes instantly, just like applying a filter to the render engine.
Any ideas, experiences about this? | 0 | [
2,
1172,
3130,
941,
27567,
2030,
5093,
21306,
800,
3726,
3726,
25,
32,
938,
20,
21306,
21,
1665,
763,
28,
2030,
5093,
60,
5628,
102,
32,
83,
44,
5934,
100,
31,
110,
114,
5521,
80,
17,
97,
128,
14,
81,
12770,
6064,
15,
114,
101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
Iterate of a Class´ attributes
===
there exists following class.
class Reaction(object):
Var1 = "lorem"
Var2 = "impsum"
Var3 = "dolor"
I'd like to iterate over the attributes of this class, like in following code.
for value in Reaction:
print value
This should produce following output.
lorem
ipsum
dolor
I've already found this topic: http://stackoverflow.com/questions/2280961/how-to-iterate-over-a-the-attributes-of-a-class-in-the-order-they-were-defined, but it doesn't really help me.
How can I make my class iterable? | 0 | [
2,
32,
106,
1373,
16,
21,
718,
13422,
800,
3726,
3726,
80,
5636,
249,
718,
9,
718,
3006,
5,
23793,
6,
45,
4033,
165,
800,
13,
7,
16052,
79,
7,
4033,
135,
800,
13,
7,
8983,
18,
723,
7,
4033,
240,
800,
13,
7,
537,
7386,
7,
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... |
Starting an app using Dalvikvm in Android adb shell
===
This is the way one can start an app form the Android adb shell.
am start -n com.package.name/com.package.name.ActivityName
It is also possible to invoke dalvikvm in the adb shell, deatiled in the article [Basic Dalvik VM Invocation][1].
Whats the realtion between these two commands? Is it possible to launch an app directly using dalvik vm? If not, why not?
[1]: http://www.milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html | 0 | [
2,
1422,
40,
4865,
568,
6868,
8280,
20147,
19,
13005,
21,
9007,
3593,
800,
3726,
3726,
48,
25,
14,
161,
53,
92,
799,
40,
4865,
505,
14,
13005,
21,
9007,
3593,
9,
589,
799,
13,
8,
103,
13,
960,
9,
8573,
1303,
9,
7259,
118,
960,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android Actionbar with Tabs
===
I am very new to Android and Java programming. What I am trying to do is to get Actionbar with couple of tabs (11 in final). I have managed to install ActionBar Sherlock but then I am stuck. Is there a simple solution how to make that work. | 0 | [
2,
13005,
1028,
1850,
29,
6523,
18,
800,
3726,
3726,
31,
589,
253,
78,
20,
13005,
17,
8247,
3143,
9,
98,
31,
589,
749,
20,
107,
25,
20,
164,
1028,
1850,
29,
1335,
16,
6523,
18,
13,
5,
1306,
19,
426,
6,
9,
31,
57,
1471,
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... |
validation in rhomobile application
===
how to perform validation in rhomobile application.since the model is not accepting validation code.I have performed following steps:
1)Add rh-validatable and json to your build.yml
extensions:
- json
- rh-validatable
2)installation:
cd rhodes_project_directory
git clone git://github.com/artemk/rh-validatable.git extensions/rh-validatable
3)require "validatable" in application.rb
4)include 'validatable' in model
5)put validation code in model
such as validates_presence_of :name
still i am getting error and can't figure out the error since i am running application in a simulator
| 0 | [
2,
27999,
19,
9270,
12571,
3010,
800,
3726,
3726,
184,
20,
2985,
27999,
19,
9270,
12571,
3010,
9,
7412,
14,
1061,
25,
52,
10894,
27999,
1797,
9,
49,
57,
986,
249,
2382,
45,
137,
6,
14854,
13,
10288,
8,
3377,
3405,
5924,
17,
487,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
git ls-files with date?
===
On GitHub you have this nice feature on each folder page, it lists the file name along with the age of the last commit to that file. This is similar to the `ls -l` command.
Is there a way to mimic this behavior from the command line? Something like
git ls-files -l | 0 | [
2,
13,
10404,
644,
18,
8,
16877,
18,
29,
1231,
60,
800,
3726,
3726,
27,
13,
10404,
20926,
42,
57,
48,
2210,
1580,
27,
206,
19294,
2478,
15,
32,
7227,
14,
3893,
204,
303,
29,
14,
348,
16,
14,
236,
9686,
20,
30,
3893,
9,
48,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't accessing django profile with query from db while it get profile of logged in user
===
I am developing a site in django and having two types of profiles. One of them named Person. So I am trying to access a Person object, using following code:
from django.contrib.auth.forms import UserCreationForm
from django.template import RequestContext
from django.shortcuts import render_to_response,get_object_or_404
from django.core import urlresolvers
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from accounts.forms import UserRegistrationForm, UserProfileForm
from pprint import pprint
from django.http import HttpResponse
from models import User
from models import UserProfile
def profile(request, url,template_name='person/profile.html'):
user=User(username=url).get_profile().person;
return HttpResponse(user)
And it gives error:
DoesNotExist at /p/Haafiz/
UserProfile matching query does not exist.
At another place, I am trying to do so with following code:
from django.contrib.auth.forms import UserCreationForm
from django.template import RequestContext
from django.shortcuts import render_to_response,get_object_or_404
from django.core import urlresolvers
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from accounts.forms import UserRegistrationForm, UserProfileForm
from pprint import pprint
from django.http import HttpResponse
from accounts.forms import UserProfile
@login_required
def dashboard(request,template_name="account/dashboard.html"):
return HttpResponse(request.user.get_profile().person)
And in this case, it is working fine. So can some one tell what can be problem at first place where I am trying to access profile from object getting from db ? Please tell if some more information is required from me to give you better idea. thanks in advance guys, both these cases seems same to me but it is having problem in the above one, so any help will be appreciated. | 0 | [
2,
92,
22,
38,
1381,
68,
3857,
14541,
5296,
29,
25597,
37,
13,
9007,
133,
32,
164,
5296,
16,
13,
19287,
19,
4155,
800,
3726,
3726,
31,
589,
3561,
21,
689,
19,
3857,
14541,
17,
452,
81,
2551,
16,
5296,
18,
9,
53,
16,
105,
377,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Transitioning a project from Cocos2d v1.x to v2.x and then to ARC.. issues in refactoring added classes - XCode bug?
===
I might sound lazy but I am slightly confused on how to proceed on this subject. I have followed [this guide][1] which is very well done.
My goal is to convert the Cocos2d v1.x game project to Cocos2d v2.x and then refactor the project code to ARC.
To get started I created an empty HelloWorld Cocos2d v2.x project and created the v2.x static library (as from Steffen's guide). I then rafactored the code to ARC and the HelloWorld worked smoothly.
The issue is when I try to add to the same project the classes I had already written that don't complain to ARC (assuming that there will be not many Cocos2d v2.x vs v1.x problems - e.g. use of deprecated methods and classes like TouchJSON - my project doesn't at least as far I can see). So, I added a couple of Game classes that don't depend from the rest of the game (to reduce the number of potential Cocos2d v2. Vs v1 issues) to the project to see if the ARC covnersion worked for those as a proof of concept. After adding them I choosed: EDIT->Refactor option from XCode.
But now the compiler gives me some ARC warning messages like "ARC forbids explicit message send of autorelease" in the following method:
return [[[self alloc] init] autorelease];
Or similar problems with the dealloc method already written.
I was assuming that EDIT->Refactor would have changed the added code but it appears to work only once. Any hint on this? **should I add all my code to the new project template before refactoring the code?**
It does seem that once the first conversion takes places the compiler enables ARC semantic and enforces it also **when choosing refactor to ARC from the XCode menu, which seem an XCode logic bug to me.**
In addition to this there are some other small issues (not XCode related, but Cocos2d v2.x related), like the fact that the **CDXPropertyModifierAction** is not automatically included to the CocosDenshion folder and I had to add it to the project after creating the static library (when I noticed the issue).. but I guess this is more template creation related.
Thanks for reading!
[1]: http://www.learn-cocos2d.com/2012/04/enabling-arc-cocos2d-project-howto-stepbystep-tutorialguide/
[2]: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:migrate_to_v2.0
| 0 | [
2,
4513,
68,
21,
669,
37,
22470,
18,
135,
43,
566,
165,
9,
396,
20,
566,
135,
9,
396,
17,
94,
20,
4686,
9,
9,
1549,
19,
302,
17455,
68,
905,
2684,
13,
8,
993,
9375,
6256,
60,
800,
3726,
3726,
31,
530,
646,
16792,
47,
31,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Magento 1.6 CE product save observer, runs fine, but expected data not found
===
Ive created an observer, that seems to be detected, and running fine.
The observer is used to add custom option data dynamically to products.
I was initially getting a MYSQL constraint violation, and after researching online, i think this was due to the observer trying to add custom option data to the database, BEFORE the new product i was creating, was actually saved to the database.
I changed my config.xml, so that 'catalog_product_save_before', is now 'catalog_product_save_after'.
The product saves fine, but the custom option data specified in my observer is not in the product details.
My config.xml:
<events>
<catalog_product_save_after>
<observers>
<micoavp>
<type>singleton</type>
<class>Bsm_Micoavp_Model_Observer</class>
<method>Add_CustomOptions_Automatically</method>
</micoavp>
</observers>
</catalog_product_save_after>
</events>
My observer code:
public function Add_CustomOptions_Automatically($observer) {
$event = $observer->getEvent();
$product = $event->getProduct();
$optionData = array(
'is_delete' => 0,
'is_require' => false,
'previous_group' => '',
'title' => 'want to preorder ? ',
'type' => 'checkbox',
'price_type' => 'fixed',
'price' => '20.0000',
'sort_order' => 0,
'values' => array(
array(
'is_delete' => 0,
'title' => 'preorder',
'price_type' => 'percent',
'price' => -20,
'sku' => 'product sku',
'option_type_id'=> -1,
))
);
$product->setHasOptions(1);
$opt = Mage::getModel('catalog/product_option');
$opt->setProduct($product);
$opt->addOption($optionData);
$opt->saveOptions();
Mage::log("option should be added now");
}
I got the code from this url, which states it is for 1.5 CE:
http://www.webmasterbulletin.net/2011/04/magento-programmatically-add-custom-options/1417
Does anyone know if there is a 1.6 related tweak needed to get this to work correctly?
The custom option data specified is just a test at this stage, once i can get it to work, i will be changing the option data to be added.
many thanks | 0 | [
2,
4723,
17050,
137,
9,
379,
4000,
2374,
2079,
9855,
15,
1461,
1123,
15,
47,
1727,
1054,
52,
216,
800,
3726,
3726,
5568,
679,
40,
9855,
15,
30,
2206,
20,
44,
11968,
15,
17,
946,
1123,
9,
14,
9855,
25,
147,
20,
3547,
5816,
4255,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LIBSVM easy.py and grid.py doing worse that svm-train
===
i am facing a problem with libsvm and i am hopin you can help me
when i use svm-train.exe with default parameters like this...
svm-train dikomou
svm-predict dikomou.t dikomou.model dikomou.t.predict
i get accuracy 84,72 %
when i use scaling to -1 1 ,and same scaling for training and testing file like this....
svm-scale -l -1 -u 1 -s range1 dikomou > dikomou.scale
svm-scale -r range1 dikomou.t > dikomou.t.scale
svm-train dikomou.scale
svm-predict dikomou.t.scale dikomou.scale.model dikomou.t.predict
i get less accuracy 81,94
if i do the scaling for 0 to 1 i get accuracy 87,5
so i keep the 0 to 1 scaling.
BUT when i use grind.py with the 0 to 1 scaled data like this
grid.py dikomou.scale
..
8 0.0078125 84 ,25
$ ./svm-train -c 8 -g 0.0078125 dikomou.scale
$ ./svm-predict dikomou.t.scale dikomou.scale.model dikomou.t.predict
i get cross validation rate 84 ,25 and total accuracy of 79,166 and best given c = 8 gamma= 0.0078125
so the grid.py gives me less!!! acuracy than the one using the svm train with defaults. so i have two questions.
1 ) how is this possible??
and 2) what are the default values of c and gamma the svm train uses?? ( i cant find this clrearly in thedocumentation. is gamma 1/ number of feauters and c = 1? ) and why the do better than when i use the grid.py?
easy.py also gives me worse results than the defaults. what can i do?
thanks in advanced for your time
| 0 | [
2,
13,
8326,
18,
20147,
2010,
9,
6448,
17,
7354,
9,
6448,
845,
3105,
30,
11209,
79,
8,
11809,
800,
3726,
3726,
31,
589,
4325,
21,
1448,
29,
13,
8326,
18,
20147,
17,
31,
589,
5469,
108,
42,
92,
448,
55,
76,
31,
275,
11209,
79,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to Change the content of Facebook Share Option, PHP
===
I am creating a PHP web application, that has Facebook Share Functionality, the basic function of it is the share content usually shares the whole website, and the contents itself,
how do I change the content of the Facebook Share instead of using the content from the Home page? My codes are basic as it was in Facebook Developers. The application actually makes a transaction, and after the transaction has succeeded, I've added a share button, so I want to share the content of the successful transaction not the whole website itself. Thanks | 0 | [
2,
184,
20,
753,
14,
2331,
16,
9090,
1891,
4255,
15,
13,
26120,
800,
3726,
3726,
31,
589,
2936,
21,
13,
26120,
2741,
3010,
15,
30,
63,
9090,
1891,
18548,
15,
14,
2125,
1990,
16,
32,
25,
14,
1891,
2331,
951,
5945,
14,
979,
2271,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Auto update data on a page with comet
===
I can update a part of my webpage with
function ()
{
var myvariable;
myvariable="<? echo $myvariable; ?>"
$('.liveupdate').load('record_count.php?myvariable='+myvariable).fadeIn("slow");
}, 1000); // refresh every 10000 milliseconds</script>
in the header and
<div class="liveupdate"> </div>
in the body.
With this the record_count.php uses GET to retrieve the variable and perform a task with it and echos the result into the div.
What I want to do is have more than one divs, each one passing it's own variable to record_count.php
Can anyone help? | 0 | [
2,
3108,
11100,
1054,
27,
21,
2478,
29,
15625,
800,
3726,
3726,
31,
92,
11100,
21,
141,
16,
51,
2741,
6486,
29,
1990,
13,
5,
6,
13,
1,
4033,
51,
8220,
579,
73,
51,
8220,
579,
3726,
7,
1,
60,
8117,
5579,
915,
8220,
579,
73,
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... |
Ajax on sucess set the value of field to empty
===
I want to empty the listed field value to empty on success. In the following code a url is called and passed value to the page and on that page the values are get and inserted in to mysql, so on succees function I want the field from which the value is get to become empty.
$('#datacouform').click(function() {
var couname = $('#namecoun').attr('value');
var coucode = $('#codecoun').attr('value');
if((couname === '') || (coucode === '')){
$('p#errorcou').show(200);
return false;
}
else if((!couname.match( /^[a-zA-Z]+$/)) || (!coucode.match( /^[a-zA-Z]+$/))){
$('p#errorcou').hide(20);
$('p#errorcou').show(50);
return false;
} else{
$('a#counloader').show();
$.ajax({
type: 'POST',
url: 'adddata.php',
data: 'counname='+ couname +'&councode='+ coucode,
success: function(){
$('a#counloader').hide();
$('#addcountryform').hide(400);
$('#addcountry').show(400);
}
});
return false;
}
}); | 0 | [
2,
20624,
27,
21792,
160,
18,
309,
14,
1923,
16,
575,
20,
2424,
800,
3726,
3726,
31,
259,
20,
2424,
14,
1510,
575,
1923,
20,
2424,
27,
1280,
9,
19,
14,
249,
1797,
21,
287,
6362,
25,
227,
17,
1100,
1923,
20,
14,
2478,
17,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LINQ query on DataTable - Could not find an implementation of the query pattern
===
Can anyone tell me why this doesn't compile? The error is:
Could not find an implementation of the query pattern for source type 'System.Data.DataTable'. 'Where' not found.
Thanks very much,
SLB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace caLINQ
{
class Program
{
static void Main(string[] args)
{
string connectionString = "Data Source=STEVEN-PC\\SQLEXPRESS;Initial Catalog=linqtest;Integrated Security=True;Pooling=False";
using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(connectionString))
{
connection.Open();
String cmdText = "select * from customers";
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(cmdText, connection);
System.Data.SqlClient.SqlDataReader dr;
dr = cmd.ExecuteReader();
DataSet ds = new DataSet();
ds.Load(dr, LoadOption.OverwriteChanges, "tab1");
DataTable dt = ds.Tables[0];
var qy = from c in dt // error is here
where c.country == "Italy"
select c.name;
}
Console.ReadKey();
}
}
}
| 0 | [
2,
6294,
1251,
25597,
27,
1054,
5924,
13,
8,
110,
52,
477,
40,
6123,
16,
14,
25597,
3732,
800,
3726,
3726,
92,
1276,
494,
55,
483,
48,
1437,
22,
38,
26561,
60,
14,
7019,
25,
45,
110,
52,
477,
40,
6123,
16,
14,
25597,
3732,
26,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Textbox control in asp.net
===
i have a problem whith my small project asp.net.
I have a variable :
String pr_name;
and a textbox control.
I get data form textbox and set to variable:
String pr_name = Textbox1.Text;
but i received value :
System.Web.UI.WebControls.TextBox
or null.
WHY ?
| 0 | [
2,
1854,
5309,
569,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
57,
21,
1448,
5558,
252,
51,
284,
669,
28,
306,
9,
2328,
9,
31,
57,
21,
7612,
13,
45,
3724,
5396,
1,
7259,
73,
17,
21,
1854,
5309,
569,
9,
31,
164,
1054,
505,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
performSegueWithIdentifier crashes randomly
===
I have never had this problem before or heard of it happening. I am using a Master-Detail Application (splitview) for the ipad. I have a dynamic tableview for my MVC and am trying to transition each cell to a custom view controller.
Currently I only have two items in my table. When the program boots I can select either of them and it will transition to the correct view controller without any problems. But most of the time when I click on something a second time the program crashes. Sometimes it takes four or five clicks but it always eventually crashes.
Here is the code snippet:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *segueName = [self.tableObjects objectAtIndex:indexPath.row];
[self performSegueWithIdentifier:segueName sender:self];
}
tableObjects is an NSArray that I use to create the table items. If I throw a print statement in before the segue call it does print the correct segue name.
The error is always being thrown on the actual performSegueWithIdentifier call. I checked it with the debugger. The exception I keep getting is: **EXC_BAD_ACCESS**.
Again both of the segues work initially so I do not think it is a problem with this. Does this method sometimes get called randomly? Is there a way to double check that the method call is safe? Do I need to override performSegueWithIdentifier and do something there?
| 0 | [
2,
11563,
62,
3982,
1410,
13384,
16292,
21563,
21324,
800,
3726,
3726,
31,
57,
243,
41,
48,
1448,
115,
54,
752,
16,
32,
4942,
9,
31,
589,
568,
21,
1129,
8,
546,
8682,
3010,
13,
5,
25603,
4725,
6,
26,
14,
31,
8240,
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... |
In sicp, it says that in C memory consumption goes up even when recursive calls are actually iterative. why?
===
The original words are
> One reason that the distinction between process and procedure may be confusing is that most implementations of common languages (including Ada, Pascal, and C) are designed in such a way that the interpretation of any recursive procedure consumes an amount of memory that grows with the number of procedure calls, even when the process described is, in principle, iterative. As a consequence, these languages can describe iterative processes only by resorting to special-purpose ``looping constructs'' such as do, repeat, until, for, and while.
I am not familiar with C language, what about Java or C#? Is this true with them as well?
And why? | 0 | [
2,
19,
2769,
7439,
15,
32,
898,
30,
19,
272,
1912,
8330,
1852,
71,
166,
76,
302,
24244,
3029,
50,
1121,
32,
106,
3366,
9,
483,
60,
800,
3726,
3726,
14,
501,
715,
50,
13,
1,
53,
1215,
30,
14,
6519,
128,
953,
17,
7004,
123,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to play raw audio (PCM wav without header) in j2me?
===
here i got a j2me phone that supports playing normal .wav files as well as using byte buffer containing audio with header.
How can I play raw audio (PCM audio data without header ) through a Player object?
I know it is required to set the parameters for the raw data e.g bits per sample and sample rate to play it properly.. So where do i set these ..say similar to what we set during recording the audio set them in the string during recording audio | 0 | [
2,
184,
20,
418,
4333,
4023,
13,
5,
5779,
79,
3142,
710,
366,
157,
106,
6,
19,
487,
135,
790,
60,
800,
3726,
3726,
235,
31,
330,
21,
487,
135,
790,
1132,
30,
6747,
791,
1826,
13,
9,
1608,
710,
6488,
28,
134,
28,
568,
34,
591... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SurfaceView Animation
===
From what I've read I don't believe a SurfaceView can be animated but I'll ask the question:
I have a surfaceView object inside a ViewFlipper. When the ViewFlipper is animated left or right to a new "page", the SurfaceView from the prior page remains on the LCD. Kind of expected that.
Here's the question. Is there some way to solve this, even in a crude way? For example, as the ViewFlipper starts to move, could the surfaceView be made invisible or something?
SurfaceView is absolutely perfect for my needs and has solved all problems except this one remaining issue. Any ideas would be appreciated. Thanks. | 0 | [
2,
1490,
4725,
6236,
800,
3726,
3726,
37,
98,
31,
22,
195,
1302,
31,
221,
22,
38,
985,
21,
1490,
4725,
92,
44,
5784,
47,
31,
22,
211,
1349,
14,
1301,
45,
31,
57,
21,
1490,
4725,
3095,
572,
21,
1418,
4372,
49,
8763,
9,
76,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why would finding a type's initializer throw a NullReferenceException?
===
This has got me stumped. I was trying to optimize some tests for Noda Time, where we have some type initializer checking. I thought I'd find out whether a type *has* a type initializer (static constructor or static variables with initializers) before loading everything into a new `AppDomain`. To my surprise, a small test of this threw `NullReferenceException` - despite there being no null values in *my* code. It *only* throws the exception when compiled with no debug information.
Here's a short but complete program to demonstrate the problem:
using System;
class Test
{
static Test() {}
static void Main()
{
var cctor = typeof(Test).TypeInitializer;
Console.WriteLine("Got initializer? {0}", cctor != null);
}
}
And a transcript of compilation and output:
c:\Users\Jon\Test>csc Test.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.17626
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
c:\Users\Jon\Test>test
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
at System.RuntimeType.GetConstructorImpl(BindingFlags bindingAttr, Binder bin
der, CallingConventions callConvention, Type[] types, ParameterModifier[] modifi
ers)
at Test.Main()
c:\Users\Jon\Test>csc /debug+ Test.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.17626
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
c:\Users\Jon\Test>test
Got initializer? True
Now you'll notice I'm using .NET 4.5 (the release candidate) - which *may* be relevant here. It's somewhat tricky for me to test it with the various other original frameworks (in particular "vanilla" .NET 4) but if anyone else has easy access to machines with other frameworks, I'd be interested in the results.
Other details:
- I'm on an x64 machine, but this problem occurs with both x86 and x64 assemblies
- It's the "debug-ness" of the *calling* code which makes a difference - even though in the test case above it's testing it on its own assembly, when I tried this against Noda Time I didn't have to recompile `NodaTime.dll` to see the differences - just `Test.cs` which referred to it.
- Running the "broken" assembly on Mono 2.10.8 *doesn't* throw
Any ideas? Framework bug? | 0 | [
2,
483,
83,
3007,
21,
1001,
22,
18,
2104,
11907,
3814,
21,
16203,
28018,
10066,
872,
60,
800,
3726,
3726,
48,
63,
330,
55,
15781,
69,
9,
31,
23,
749,
20,
22864,
109,
4894,
26,
90,
593,
85,
15,
113,
95,
57,
109,
1001,
2104,
119... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Calling delegate method from popover
===
I work on a project with ios5, Xcode 4, iPad.
I have a popover triggered from a standard button in my main view. I have setup the popover in the storyboard with a segue anchored to the standard button.
The UIPopoverControllerDelegate is my main view controller
@interface ViewController : UIViewController <UIPopoverControllerDelegate>
When I select a row in the popover I want to
- dismiss the popover and
- call the UIPopoverControllerDelegate method popoverControllerDidDismissPopover.
This is the code in the table view delegate of my popover:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
myKey = [myArray objectAtIndex:indexPath.row];
[popoverController dismissPopoverAnimated:YES];
// [popoverController.delegate popoverControllerDidDismissPopover];
Without last line, all works OK, row selection and dismission included.
But I am confused with the last line of code
[popoverController.delegate popoverControllerDidDismissPopover];
If this line is uncommented I get a compiler error: "No known instance method for selector popoverControllerDidDismissPopover". The popover delegate is set in main view controller with this code:
- (void) prepareForSegue:(UIStoryboardPopoverSegue *) segue sender:(id) sender {
if ([[segue destinationViewController] isKindOfClass:[RGBViewController class]]) {
RGBViewController* viewController = (RGBViewController*)[segue destinationViewController];
UIStoryboardPopoverSegue* popoverSegue = (UIStoryboardPopoverSegue*)segue;
[viewController setPopoverController:[popoverSegue popoverController]];
[[popoverSegue popoverController] setDelegate:self];
}
}
Any help?
Thank you.
| 0 | [
2,
2555,
11300,
2109,
37,
1675,
2549,
800,
3726,
3726,
31,
170,
27,
21,
669,
29,
13,
7760,
264,
15,
993,
9375,
268,
15,
31,
8240,
9,
31,
57,
21,
1675,
2549,
15164,
37,
21,
1236,
5167,
19,
51,
407,
1418,
9,
31,
57,
18161,
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 make a PHP SOAP call using the SoapClient class
===
I'm used to writing PHP code, but do not often use Object-Oriented coding. I now need to interact with SOAP (as a client) and am not able to get the syntax right. I've got a WSDL file which allows me to properly set up a new connection using the SoapClient class. However, I'm unable to actually make the right call and get data returned. I need to send the following (simplified) data:
- Contact ID
- Contact Name
- General Description
- Amount
There are two functions defined in the WSDL document, but I only need one ("FirstFunction" below). Here is the script I run to get information on the available functions and types:
$client = new SoapClient("http://example.com/webservices?wsdl");
var_dump($client->__getFunctions());
var_dump($client->__getTypes());
And here is the output it generates:
array(
[0] => "FirstFunction Function1(FirstFunction $parameters)",
[1] => "SecondFunction Function2(SecondFunction $parameters)",
);
array(
[0] => struct Contact {
id id;
name name;
}
[1] => string "string description"
[2] => string "int amount"
}
Say I want to make a call to the FirstFunction with the data:
- Contact ID: 100
- Contact Name: John
- General Description: Barrel of Oil
- Amount: 500
What would be the right syntax? I've been trying all sorts of options but it appears the soap structure is quite flexible so there are very many ways of doing this. Couldn't figure it out from the manual either... | 0 | [
2,
184,
20,
233,
21,
13,
26120,
6447,
645,
568,
14,
6447,
150,
18513,
38,
718,
800,
3726,
3726,
31,
22,
79,
147,
20,
1174,
13,
26120,
1797,
15,
47,
107,
52,
478,
275,
3095,
8,
6800,
13,
15458,
9,
31,
130,
376,
20,
10001,
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... |
Reading Data From Excel SpreadSheet - Cannot perform runtime binding on a null reference
===
I have the code below to read data from an excel file, the problem I am running into is that when I try to read the range data, I get an exception "Cannot perform runtime binding on a null reference" on this line
if (Int32.TryParse(xlRange.Cells[0, 3].Value2.ToString(), out value))
What I want to know is how I do access the information in the range properly please. Thanks in advance
void ReadFromExcelToGrid2(String fileNameString)
{
try
{
Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(fileNameString);
//get list of worksheets associated with the current workbook
Microsoft.Office.Interop.Excel.Sheets worksheets = xlWorkbook.Worksheets;
//list the work books in a dropdownlist
IDictionary<int, String> sheets = new Dictionary<int, String>();
foreach (Microsoft.Office.Interop.Excel.Worksheet displayWorksheet in xlWorkbook.Worksheets)
{
sheets.Add(displayWorksheet.Index, displayWorksheet.Name);
}
cmbWorksheets.DataSource = new BindingSource(sheets, null);;
cmbWorksheets.DisplayMember = "Value";
cmbWorksheets.ValueMember = "Key";
Microsoft.Office.Interop.Excel.Worksheet xlWorksheet = xlWorkbook.Sheets[4]; // assume it is the first sheet
Microsoft.Office.Interop.Excel.Range xlRange = xlWorksheet.UsedRange; // get the entire used range
int value = 0;
if (Int32.TryParse(xlRange.Cells[0, 3].Value2.ToString(), out value)) // get the F cell from the first row
{
int numberOfColumnsToRead = value * 4;
for (int col = 7; col < (numberOfColumnsToRead + 7); col++)
{
Console.WriteLine(xlRange.Cells[1, col].Value2.ToString()); // do whatever with value
}
}
}
catch (Exception ex)
{
throw ex;
}
}
| 0 | [
2,
1876,
1054,
37,
20700,
1789,
17627,
13,
8,
1967,
2985,
485,
891,
8728,
27,
21,
16203,
2801,
800,
3726,
3726,
31,
57,
14,
1797,
1021,
20,
1302,
1054,
37,
40,
20700,
3893,
15,
14,
1448,
31,
589,
946,
77,
25,
30,
76,
31,
1131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 MySQL error
===
I know there are hundreds of questions like this but I can't find a solution , I'm trying to insert an IP address into my table with the following code:
<?php
$connect = mysql_connect('localhost','root','');
if (!$connect)
{
echo 'Failed to connect to database'."</br>";
die(mysql_error());
}
else
{
echo 'Connected to database'."</br>";
mysql_select_db('users', $connect);
if (mysql_query("INSERT INTO user_info (IP) VALUES (`127.0.0.1`)",$connect))
{
echo 'query success';
}
else
{
echo 'query failed'."</br>".mysql_error();
}
mysql_close($connect);
}
?>
But it keeps returning the following error:
Unknown column '127.0.0.1' in 'field list'
What's wrong with my query? The type is set to Varchar(15) and yes i know i'm vulnerable to SQL injections right now.
Nubcake | 0 | [
2,
13,
26120,
51,
18,
22402,
7019,
800,
3726,
3726,
31,
143,
80,
50,
4541,
16,
2346,
101,
48,
47,
31,
92,
22,
38,
477,
21,
4295,
13,
15,
31,
22,
79,
749,
20,
14692,
40,
15735,
3218,
77,
51,
859,
29,
14,
249,
1797,
45,
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... |
Objective-C: Trouble with "MKMapView (delegate) didUpdateUserLocation"
===
I'm new to objective-c and I'm trying to understand Xcode.
Right now, I'm in really big trouble with the following code:
AppDelegate.h
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate, CLLocationManagerDelegate, MKMapViewDelegate> {
IBOutlet UIActivityIndicatorView *activityIndicator;
IBOutlet UITextField *locationTitleField;
IBOutlet MKMapView *worldView;
IBOutlet CLLocationManager *locationManager;
}
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UIViewController *viewController;
@end
AppDelegate.m
#import "AppDelegate.h"
#import "ViewController.h"
@implementation AppDelegate
@synthesize window = window;
@synthesize viewController = viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
locationManager = [[CLLocationManager alloc]init];
[locationManager setDelegate:self];
[locationManager setDistanceFilter:kCLDistanceFilterNone];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
[worldView setShowsUserLocation:YES];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation {
// Yes, no code here, but here's the point, where I'm getting crashes, no matter if
// there is some code in here, or not
}
@end
The problem is, when I try to start the app, everything is fine. But the "didUpdateUserLocation" is really driving me nuts. I have turned on the Zombie Objects and now Xcode is telling me:
[AppDelegate mapView:didUpdateUserLocation:]: message sent to deallocated instance 0xde1b700
(lldb)
I had (!) turned on the new ARC stuff, but I've turned it off, still getting the same error. As you can see, I'm not even having at least one release in my code. | 0 | [
2,
7038,
8,
150,
45,
2572,
29,
13,
7,
79,
197,
15022,
4725,
13,
5,
24249,
3322,
6,
144,
576,
8209,
16704,
19032,
7,
800,
3726,
3726,
31,
22,
79,
78,
20,
7038,
8,
150,
17,
31,
22,
79,
749,
20,
1369,
993,
9375,
9,
193,
130,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Template
===
This is about jQuery Template
I use NuGet to install it. The information is in [GitHub][1]. So I guess I am using the correct package.
`jQuery.tmpl.min.js` is added and referenced in the `ASP.NET MVC 4` project.
The problem is, when I test using
$('#files-list').tmpl(data).appendTo('#Container');
It works.
But if I changes to:
var t = "div" + tmplName;
$(t).tmpl(data).appendTo('#Container');
It fails. And the FireBug gives me some console error like `$(t).tmpl(data).appendTo is not a function`.
Can anyone tell me why I cannot do this? and how can I fix it?
Thank you.
[1]: https://github.com/jquery/jquery-tmpl | 0 | [
2,
487,
8190,
93,
22894,
800,
3726,
3726,
48,
25,
88,
487,
8190,
93,
22894,
31,
275,
3152,
3060,
20,
16146,
32,
9,
14,
676,
25,
19,
636,
10404,
20926,
500,
2558,
165,
500,
9,
86,
31,
2321,
31,
589,
568,
14,
4456,
6030,
9,
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... |
Text to Keyword (sms gateway software) SET UP
===
I'm looking for a software that can be configured to manage mobile marketing campaign. They are many companies online that advertise their services such as mobile coupon, sms appointment reminders, sms voting, sms polls, text to screen, text to subscribe. But I havent been able to find a software that can control the gateway and manage it correctly.
I Know I have to hook up my installation to the local sms provider in order to provide a godo service as the quantity of message will be pretty big.
I dont want to be using a cellphone to be sending sms or receiving them as I need to create a keyword for sms replies.
Anyone have some suggesions will be deeply appreciated. | 4 | [
2,
1854,
20,
1246,
9587,
13,
5,
18,
79,
18,
12171,
2306,
6,
309,
71,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
2306,
30,
92,
44,
28895,
20,
4705,
3241,
4743,
1150,
9,
59,
50,
151,
1532,
2087,
30,
28490,
66,
687,
145,
28,
324... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
performance issue galaxy s3
===
So i have this Augmented reality compass on the market for free. I developed it as a test for an AR engine i am building for a completely different app. I have run the app on three different devices: Droid X with android 2.3, Galaxy Nexus with 4.04, and the Galaxy S3 with 4.04. it runs really really smooth on DroidX and Nexus, so i totally expected it to run smooth on the S3 as well especially since the frame rate on the S3 and processor power is supposed to surpass both of the others.. but it actually is really laggy on the S3. the app can be downloaded here for free: https://play.google.com/store/apps/details?id=com.eliddell.AR&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5lbGlkZGVsbC5BUiJd
I am wondering if it has something to do with the the accelerometer update rate on this device.. any ideas?
| 0 | [
2,
956,
1513,
9358,
13,
18,
240,
800,
3726,
3726,
86,
31,
57,
48,
22392,
2902,
18879,
27,
14,
1135,
26,
551,
9,
31,
885,
32,
28,
21,
1289,
26,
40,
13,
512,
1406,
31,
589,
353,
26,
21,
1524,
421,
4865,
9,
31,
57,
485,
14,
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... |
Gradle: Trying to start Jetty with JVM option....
===
I am trying to start jetty with a JVM option "-javaagent:/home/spring-framework-3.0.5/org.springframework.instrument-3.0.5.RELEASE.jar"
/usr/java/default/bin/java -Dorg.gradle.appname=gradle -javaagent:/home/spring-framework-3.0.5/org.springframework.instrument-3.0.5.RELEASE.jar -classpath /home/gradle/gradle-1.0/lib/gradle-launcher-1.0.jar org.gradle.launcher.GradleMain startJetty
or by
export GRADLE_OPTS="-javaagent:/home/spring-framework-3.0.5/org.springframework.instrument-3.0.5.RELEASE.jar"
gradle startJetty
I am getting the following exception
Caused by: java.lang.IllegalStateException: ClassLoader [org.mortbay.jetty.webapp.WebAppClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
at org.springframework.context.weaving.DefaultContextLoadTimeWeaver.setBeanClassLoader(DefaultContextLoadTimeWeaver.java:83)
at
.........................
this is my implementation for running jetty
apply plugin: 'jetty'
task startJetty(type: jettyRunWar.getClass()) {
webApp = file("myWar.war")
httpPort = 8090
}
Any clue what can be wrong here?
| 0 | [
2,
13,
7691,
413,
45,
749,
20,
799,
17341,
93,
29,
487,
20147,
4255,
9,
9,
9,
9,
800,
3726,
3726,
31,
589,
749,
20,
799,
17341,
93,
29,
21,
487,
20147,
4255,
13,
7,
8,
1004,
1385,
58,
7685,
45,
118,
8167,
118,
15827,
8,
8361... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 do JNI thread program?
===
I am learning JNI program.
Before I start working on my real project, I made simple program which prints "Hello World" in thread. If I add native declaration in thread, I cannot generate header file. Please, tell me problem of code below. And I could not find any JNI thread example so far. Is there any JNI thread example?
public class HelloJni extends Activity // HelloJni.java
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Thread thread = new PrintJni();
thread.start();
}
}
class PrintJni extends Thread {
public native void print();
public void run() {
PrintJni jni = new PrintJni();
jni.print();
}
static {
System.loadLibrary("hello-jni");
}
}
JNIEXPORT void JNICALL
Java_com_hellojni_PrintJni_print(JNIEnv *env, jobject obj) // hello-jni.c
{
printf("Hello World!\n");
return;
}
| 0 | [
2,
184,
20,
107,
487,
889,
9322,
625,
60,
800,
3726,
3726,
31,
589,
2477,
487,
889,
625,
9,
115,
31,
799,
638,
27,
51,
683,
669,
15,
31,
117,
1935,
625,
56,
12202,
13,
7,
11515,
126,
7,
19,
9322,
9,
100,
31,
3547,
1275,
7098... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Push data to page without checking periodically for it?
===
Is there any way you can push data to a page rather than checking for it periodically?
Obviously you can check for it periodically with ajax, but is there any way you can force the page to reload when a php script is executed?
Theoretically you can improve an ajax request's speed by having a table just for when the ajax function is supposed to execute (update a value in the table when the ajax function should retrieve new data from the database) but this still requires a sizable amount of memory and a mysql connection as well as still some waiting time while the query executes even when there isn't an update/you don't want to execute the ajax function that retrieves database data.
Is there any way to either make this even more efficient than querying a database and checking the table that stores the 'if updated' data OR tell the ajax function to execute from another page?
I guess node.js or HTML5 webSocket could be a viable solution as well?
Or you could store 'if updated' data in a text file? Any suggestions are welcome. | 0 | [
2,
3250,
1054,
20,
2478,
366,
9886,
19886,
26,
32,
60,
800,
3726,
3726,
25,
80,
186,
161,
42,
92,
3250,
1054,
20,
21,
2478,
864,
119,
9886,
26,
32,
19886,
60,
4409,
42,
92,
2631,
26,
32,
19886,
29,
20624,
15,
47,
25,
80,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 message Jquery mobile
===
I am developing a mobile application using jquery mobile. Whenever the showPageLoadingMsg() called, it executes the below ".ui-loader" class. But, instead I want to load the external image. Is it possible?
.ui-loader { display: none; position: absolute; opacity: .85; image:url('img/loader.gif'); z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; }
Help will be appreciated.
Thanks in advance.
| 0 | [
2,
12797,
2802,
487,
8190,
93,
3241,
800,
3726,
3726,
31,
589,
3561,
21,
3241,
3010,
568,
487,
8190,
93,
3241,
9,
6634,
14,
298,
6486,
16866,
79,
18,
263,
5,
6,
227,
15,
32,
15644,
18,
14,
1021,
13,
7,
9,
5661,
8,
8294,
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... |
Why does mod_rewrite fail to work on different webhost and how can I fix it
===
Options -Indexes
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)(\.)(.*)$ index.php?url=$1.$3 [L,QSA]
RewriteRule ^ajax$ _res/ajax.php [QSA]
#RewriteRule ^(.*)$ index.php?t=$1 [L,QSA]
</IfModule>
This is my current .htaccess file. It worked fine on another web host but on my current one it doesn't. It doesn't rewrite properly, so no link works like it should do (I am getting 404)
I've tried `RewriteBase /` but It didn't help. I am not really sure what more information I could provide so, what have I done wrong in the .htaccess or what can I change to make it work? | 0 | [
2,
483,
630,
7226,
1,
99,
23716,
7476,
20,
170,
27,
421,
2741,
11694,
17,
184,
92,
31,
6098,
32,
800,
3726,
3726,
6368,
13,
8,
25671,
160,
6926,
617,
27891,
1761,
9,
13,
1,
821,
19673,
62,
7226,
1,
99,
23716,
9,
150,
1,
27891,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Matching index values
===
This is my current code, I want to check the two values(lines) to check for matches in the files.
def checkOS():
fid1 = open("C:/Python/NSRLOS.txt", 'r')
fid2 = open("C:/Python/sha_sub_hashes.out", 'r')
outdata = open("osMatches.txt", 'w')
line1 = fid1.readline()
line2 = fid2.readline()
while(line1 and line2):
xline= line1.split(',')[1]
yline = line2.split("|")[3]
zline = xline.replace('"','')
if (yline == zline):
outdata.append([yline , zline])
print xline, zline
if __name__=="__main__":
checkOS()
The only problem is I'm not sure what I've written does that, all the code before the if statement is just reformatting to be able to pull from the index of the line. What I want to know is if the statement I used works in that sense and is it efficient? Then I want to output the equal values. | 0 | [
2,
10120,
4348,
4070,
800,
3726,
3726,
48,
25,
51,
866,
1797,
15,
31,
259,
20,
2631,
14,
81,
4070,
5,
7939,
6,
20,
2631,
26,
1717,
19,
14,
6488,
9,
6312,
2631,
759,
5,
6,
45,
13,
15817,
165,
800,
368,
5,
7,
150,
45,
118,
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... |
Problems With 64bit Posix Write In Mac OS X? (2gb+ Dataset in HDF5)
===
I'm having some issues with HDF5 on Mac os x (10.7). After some testing, I've confirmed that POSIX write seems to have issues with buffer sizes exceeding 2gb. I've written a test program to demonstrate the issue:
#define _FILE_OFFSET_BITS 64
#include <iostream>
#include <unistd.h>
#include <fcntl.h>
void writePosix(const int64_t arraySize, const char* name) {
int fd = open(name, O_WRONLY | O_CREAT);
if (fd != -1) {
double *array = new double [arraySize];
double start = 0.0;
for (int64_t i=0;i<arraySize;++i) {
array[i] = start;
start += 0.001;
}
ssize_t result = write(fd, array, (int64_t)(sizeof(double))*arraySize);
printf("results for array size %lld = %ld\n", arraySize, result);
close(fd);
} else {
printf("file error");
}
}
int main(int argc, char *argv[]) {
writePosix(268435455, "/Users/tpav/testfolder/lessthan2gb");
writePosix(268435456, "/Users/tpav/testfolder/equal2gb");
}
Output:
results for array size 268435455 = 2147483640
results for array size 268435456 = -1
As you can see, I've even tried defining the file offsets. Is there anything I can do about this or should I start looking for a workaround in the way I write 2gb+ chunks? | 0 | [
2,
1716,
29,
4384,
3326,
2353,
6742,
2757,
19,
1572,
13,
759,
993,
60,
13,
5,
135,
11400,
2430,
1054,
3554,
19,
8590,
410,
264,
6,
800,
3726,
3726,
31,
22,
79,
452,
109,
1549,
29,
8590,
410,
264,
27,
1572,
13,
759,
993,
13,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Application closes while sending position phonegap android
===
I have spent last 3 days until I got gps working on android using phonegap to develope application.
I am using example to understand how it works but I have some problem when I try to send position to a data base.
This is my code:
<!DOCTYPE html>
<html>
<head>
<title>Device Properties Example</title>
<script type="text/javascript" charset="utf-8" src="cordova-1.8.1.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
navigator.geolocation.getCurrentPosition(onSuccess, onError, {
enableHighAccuracy : true,
maximumAge : Infinity,
timeout : 15000
});
}
// onSuccess Geolocation
//
function onSuccess(position) {
var element = document.getElementById('geolocation');
var id = 1;
pagina = window.open( "http://mywebpage:80/open/posicionCamion.php?lat=" + position.coords.latitude + "&lon=" + position.coords.longitude + "&id=" + id);
pagina.close();
element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +
'Longitude: ' + position.coords.longitude + '<br />' +
'Altitude: ' + position.coords.altitude + '<br />' +
'Accuracy: ' + position.coords.accuracy + '<br />' +
'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '<br />' +
'Heading: ' + position.coords.heading + '<br />' +
'Speed: ' + position.coords.speed + '<br />' +
'Timestamp: ' + position.timestamp + '<br />';
}
// onError Callback receives a PositionError object
//
function onError(error) {
alert('code: ' + error.code + '\n' +
'message: ' + error.message + '\n');
}
</script>
</head>
<body>
<p id="geolocation">Finding geolocation...</p>
</body>
</html>
If I delete pagina.window and pagina.close lines, it works fine. But I want to send position to a php file each 15 seconds and this php file will update the DB each time.
With these lines, application closes but nothing is sended. There is a way to do what I want?
I tested php file using a webbrowser and it works fine.
Thanks. | 0 | [
2,
3010,
543,
18,
133,
4907,
649,
1132,
1136,
306,
13005,
800,
3726,
3726,
31,
57,
1111,
236,
203,
509,
163,
31,
330,
18298,
638,
27,
13005,
568,
1132,
1136,
306,
20,
2803,
62,
3010,
9,
31,
589,
568,
823,
20,
1369,
184,
32,
693,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# Window Form Web browser URL in textbox
===
Look this picture:http://g1206.hizliresim.com/y/x/8yb1k.png
i want to look webbrowser1.Navigate in textbox1. How to do this.
| 1 | [
2,
272,
5910,
1463,
505,
2741,
16495,
287,
6362,
19,
1854,
5309,
800,
3726,
3726,
361,
48,
2151,
45,
21127,
6903,
263,
918,
3370,
9,
1822,
18061,
7735,
8672,
9,
960,
118,
93,
118,
396,
21701,
93,
220,
165,
197,
9,
306,
2723,
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... |
maven assembly - only include transitive dependencies
===
Here is my project structure:
/
|
| module 1
| module 2
| assembly
The assembly module will create the deployable artifact.
I want to separate the module 1 and 2 artifacts and their dependencies to difference folder say bin and lib folder in the assembly.
Right now i have to exclude the module1 and module2 in assembly dependencySet but doing this result in all module1 & 2 transitive dependencies being excluded.
| 0 | [
2,
1216,
3124,
1475,
13,
8,
104,
468,
13,
28558,
29411,
800,
3726,
3726,
235,
25,
51,
669,
1411,
45,
13,
118,
13,
1,
13,
1,
12613,
137,
13,
1,
12613,
172,
13,
1,
1475,
14,
1475,
12613,
129,
1600,
14,
17617,
579,
22929,
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... |
Template keeps redrawing, despite no change to the underlying data
===
can anyone tell me why the rendered Live HTML in this example keeps clearing then redrawing in an infinite loop? This example code maxes out the CPU on my laptop..
Environment:
- Meteor 0.3.7
- Mac OS Lion
- tested in Safari 5.1.7, Chrome Canary 22.0.1189, Chrome 21.0.1180, Firefox 11.0 & 13.0
initial project creation:
meteor create test
cd test
meteor add coffeescript
mv test.js test.coffee
meteor
test.coffee:
Records = new Meteor.Collection("records")
if Meteor.is_client
Template.table.records = ->
Records.find()
Template.table.rowCount = ->
Records.find().count()
if Meteor.is_server
Meteor.startup ->
if Records.find().count() is 0
for i in [1..1000]
Records.insert({some:"test", data: "just", to: "check"})
test.html:
<head>
<title>test</title>
</head>
<body>
{{> table}}
</body>
<template name="table">
<table>
<caption>{{rowCount}}</caption>
{{#each records}}
<tr>
<td>{{some}}</td>
<td>{{data}}</td>
<td>{{to}}</td>
</tr>
{{/each}}
</table>
</template> | 0 | [
2,
22894,
8968,
402,
12404,
68,
15,
869,
90,
753,
20,
14,
10974,
1054,
800,
3726,
3726,
92,
1276,
494,
55,
483,
14,
10877,
515,
13,
15895,
19,
48,
823,
8968,
8130,
94,
402,
12404,
68,
19,
40,
9698,
5293,
60,
48,
823,
1797,
2049,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Storing temp values in session array to use in mysql query
===
I have a view that needs updating with a list of id's. So I am storing the values that have been selected to remove from the view in a session variable that then goes into the mySQL query as below. Then when the form is reset the values are also reset out of the array.
But its not working... this is what I've got.
Any help would be appreciated.
if($_POST['flag']=='flag'){
//collect deleted rows
$_SESSION['delete-row'][] = $_POST['idval'];
//Split session array
$idavls = join(',' , $_session['delete-row'];
$sqlDelete = "CREATE OR REPLACE VIEW filtetbl AS SELECT * FROM `".$page['db-name']."`.`leads_tbl` WHERE ".$_SESSION['filter-view']." AND `lead_status` = '1' AND `lead_id` NOT IN (".$idvals.") ORDER BY `lead_added`";
$result = mysql_query($sqlDelete);
if($result){
echo true;
}
else{
echo mysql_error();
}
} | 0 | [
2,
25615,
13,
9577,
4070,
19,
3723,
7718,
20,
275,
19,
51,
18,
22402,
25597,
800,
3726,
3726,
31,
57,
21,
1418,
30,
2274,
71,
43,
1880,
29,
21,
968,
16,
4924,
22,
18,
9,
86,
31,
589,
25615,
14,
4070,
30,
57,
74,
1704,
20,
46... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
wsdl to schema conversion for request and response
===
I have the below wsdl which references a schema. As per the wsdl we can have the below request and response xml. What i want is, to have two sets of schemas, one for request and one for response xml. I believe i should convert trade.wsdl to a schema, one for request and one for response. I would like to use those sets of schema, if i generate xml(like the option we have in eclipse, generate xml from schema), I should be able to get the same copy of request and the response xmls(using the set of schemas for response).
Is there a way to convert the wsdl to schema, one for request and one for response?
In this case trade.wsdl, with some modifications we should have one set, which is like traderequest.xsd(which in turn references trade.xsd), another set traderesponse.xsd(which in turn references trade.xsd)
trade.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://com.joemo.schema.tradeservice"
xmlns="http://com.joemo.schema.tradeservice"
xmlns:tr="http://com.joemo.schema.trade"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="http://com.joemo.schema.tradeservice">
<xsd:import namespace="http://com.joemo.schema.trade" schemaLocation="trade.xsd" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="tradeInput">
<wsdl:part name="trade" element="tr:trade" />
</wsdl:message>
<wsdl:message name="tradeOutput">
<wsdl:part name="status" element="tr:status" />
</wsdl:message>
<wsdl:portType name="TradeService">
<wsdl:operation name="book">
<wsdl:input message="tradeInput" />
<wsdl:output message="tradeOutput" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TradeServiceHTTPBinding" type="TradeService">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="book">
<wsdlsoap:operation soapAction="" />
<wsdl:input>
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TradeServicePorts">
<wsdl:port binding="TradeServiceHTTPBinding" name="TradeService">
<wsdlsoap:address
location="http://localhost:9084/tradeService/TradeServicePorts" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
trade.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://com.joemo.schema.trade" xmlns="http://com.joemo.schema.trade"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- web service input types -->
<xsd:element name="trade">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="security" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="quantity" type="xsd:integer" minOccurs="1" maxOccurs="1" />
<xsd:element name="comments" type="comment" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="comment">
<xsd:sequence>
<xsd:element name="message" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="author" type="xsd:string" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
<!-- web service output types -->
<xsd:element name="status">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="message" type="xsd:string" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
request xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.joemo.schema.trade">
<soapenv:Header/>
<soapenv:Body>
<com:trade>
<security>?</security>
<quantity>?</quantity>
<!--1 or more repetitions:-->
<comments>
<message>?</message>
<author>?</author>
</comments>
</com:trade>
</soapenv:Body>
</soapenv:Envelope>
response xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.joemo.schema.trade">
<soapenv:Header/>
<soapenv:Body>
<com:status>
<id>?</id>
<message>?</message>
</com:status>
</soapenv:Body>
</soapenv:Envelope>
| 0 | [
2,
619,
18,
8643,
20,
23874,
6263,
26,
3772,
17,
1627,
800,
3726,
3726,
31,
57,
14,
1021,
619,
18,
8643,
56,
7231,
21,
23874,
9,
28,
416,
14,
619,
18,
8643,
95,
92,
57,
14,
1021,
3772,
17,
1627,
23504,
9,
98,
31,
259,
25,
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... |
JMeter with Java 7 Issue
===
Has anyone encountered any problems with running JMeter under Java 7?
I did. In the past three days I've tried to load test a web application with JMeter. After several loop (>20), even for 1 thread sometimes I kept receiving the same error, for around 20% of the requests:
java.net.SocketTimeoutException: Connection reset
I identified the problem as being a select query performed by hibernate. I tested the query by using the same JMeter (JDBC Request). It ran smoothly. I changed the application so that the query was still executed but the result was not brought in the interface (around 270 Strings of, lets say 50 characters). Again, it ran perfectly with heavy loads. I gave the same test plan to a coleague of mine, this time reverting back to the initial app (the results were sent to the user). It worked on his machine. We checked his Java version. It was 6 (64-bit version - OS and JDK)!!! I repeted the same test on 32-bit OS with Java 6 it worked fine.
S,o I installed JRE 6 on my workstation, ran the JMeter with it, and it worked, again!
I tried to report the bug to Apache but they didn't send me a confirmation e-mail for the account validation. | 0 | [
2,
487,
7307,
29,
8247,
453,
1513,
800,
3726,
3726,
63,
1276,
8208,
186,
1716,
29,
946,
487,
7307,
131,
8247,
453,
60,
31,
144,
9,
19,
14,
640,
132,
509,
31,
22,
195,
794,
20,
6305,
1289,
21,
2741,
3010,
29,
487,
7307,
9,
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... |
JavaScript: is there any better way to do a for loop with callback function?
===
for(var i=1; i<496; i++) {
(function(num) {
myApp.getTerm(num, function (term, def){
myApp.quizlet[0].terms[num] = { term: term, definition: def};
});
})(i);
};
I'm calling a function with callback inside a for-loop. The *callback function need to access the current loop's iteration i*. I'm coming up with the solution above.
**Is there any other way to do things like this?** I'm a newbie with JavaScript, sorry if my question is silly.. :) | 0 | [
2,
8247,
8741,
45,
25,
80,
186,
574,
161,
20,
107,
21,
26,
5293,
29,
645,
1958,
1990,
60,
800,
3726,
3726,
26,
5,
3311,
31,
3726,
165,
73,
31,
1,
300,
4060,
73,
31,
20512,
6,
13,
1,
13,
5,
22359,
5,
6336,
6,
13,
1,
51,
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... |
AsyncTask.onCancelled() not being called after cancel(true)
===
Android SDK v15 running on a 2.3.6 device.
I'm having an issue where onPostExecute is still being called when I am calling cancel within a doInBackground call.
Here is my code:
@Override
public String doInBackground(String... params) {
try {
return someMethod();
} catch (Exception e) {
cancel(true);
}
return null;
}
public String someMethod() throws Exception {
...
}
I am forcing someMethod to throw an exception to test this out, and instead of onCancelled being called, I always return to onPostExecute. If I check isCancelled() the returned value is true, so I know that cancel(true) is being executed.
Any ideas? | 0 | [
2,
21,
9507,
20255,
3656,
9,
218,
1245,
9725,
69,
5,
6,
52,
142,
227,
75,
14815,
5,
13398,
6,
800,
3726,
3726,
13005,
13,
18,
43,
197,
566,
1193,
946,
27,
21,
172,
9,
240,
9,
379,
3646,
9,
31,
22,
79,
452,
40,
1513,
113,
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... |
Sql IF THEN ELSE with SELECT
===
Hi i am trying to make a script faster and i decided to include some calculations that used to happen in php inside sql. So i have to make an if statement wich decides weather to use insert or update if its needed with the code :
IF (EXISTS (SELECT * FROM `edenteva` WHERE `Time`='1340252716' and `Code`='571119'))
THEN IF (EXISTS (SELECT * FROM `map` WHERE `mega`='571119'))
THEN UPDATE `map` SET `edenteva`='571119' WHERE `mega`='571119'
ELSE INSERT INTO `map`(`mega`,`edenteva`) VALUES ('571119','571119');
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF (EXISTS (SELECT * FROM `edenteva` WHERE `Time`='1340252716' and `Code`='57111' at line 1
but i am getting a syntax error, can u see whats wrong? | 0 | [
2,
4444,
255,
100,
94,
962,
29,
5407,
800,
3726,
3726,
4148,
31,
589,
749,
20,
233,
21,
3884,
4233,
17,
31,
868,
20,
468,
109,
19186,
30,
147,
20,
2384,
19,
13,
26120,
572,
4444,
255,
9,
86,
31,
57,
20,
233,
40,
100,
3331,
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 dynamically draw markers on google map
===
Since the markers are too many and data is very large. I want to only draw the screen bounded region of markers. while I pan to other region, I can dynamically issue new request only for those not-shown markers. In case of overlapping region, the original-shown markers should not be re-drawn. For some reason,I need to use python as the back-end server script.A typical ajax approach should be used I think
Is there any way to do this? Any idea would be appreciated! | 0 | [
2,
184,
20,
7782,
1326,
2003,
19482,
27,
8144,
2942,
800,
3726,
3726,
179,
14,
19482,
50,
266,
151,
17,
1054,
25,
253,
370,
9,
31,
259,
20,
104,
2003,
14,
2324,
10906,
632,
16,
19482,
9,
133,
31,
1809,
20,
89,
632,
15,
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... |
How to calculate Azimuth & Elevation of objects relative to camera using cam quaternion ...?
===
I have a camera quaternion (a,b,c,d) and a cam position (camX, camY, camZ)
I have an object with 3d coordinates (x,y,z)
I need to calculate azimuth, elevation of objects relatively to the cam view direction & plane.
First question
If I put the object in center of my view, f I rotate the cam, translate it, I should have the same azimuth value, right ??
I don't have that.
Second question, the calculation.
I'm doing object coordinates - cam position, in order to translate the object to the cam.
I'm taken the resulting coordinates and make the sandwich product with the quaternion and its conjugate. (I followed this for the pseudo code : [http://fr.wikipedia.org/wiki/Quaternions_et_rotation_dans_l'espace][1])
Then, I have a vector result and I take X & Z component and calculate the atan2
Does it seem right ?
any leads or explanation would help me a lot in my struggle
[1]: http://fr.wikipedia.org/wiki/Quaternions_et_rotation_dans_l%27espace | 0 | [
2,
184,
20,
18469,
13,
10514,
18136,
279,
4960,
16,
3916,
4543,
20,
3336,
568,
5373,
7131,
8766,
872,
13,
9,
9,
9,
60,
800,
3726,
3726,
31,
57,
21,
3336,
7131,
8766,
872,
13,
5,
58,
15,
220,
15,
150,
15,
43,
6,
17,
21,
5373,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 POST not being called
===
I have written a script that fires a jQuery POST to retrieve data from a server side file as JSON, the code is below:
$.post("myfile.php", function(authDataset) {
alert(authDataset);
});
A sample of what would be returned is:
{"firstName":"x","lastName":"y","boximg":"z"}
The handler file is working perfectly, when provided with the data the function all works fine, hoever the jquery POST function just isn't working. I've also tried GET and AJAX.
**It is placed within the document.ready tag**, I have ran every error checker including jsLint and jsFiddle but for some reason it's not firing at all.
I've used alerts inside and outside the post function, but the post() isn't getting called.
Can anyone offer a suggestion?
Thanks | 0 | [
2,
487,
8190,
93,
678,
52,
142,
227,
800,
3726,
3726,
31,
57,
642,
21,
3884,
30,
11327,
21,
487,
8190,
93,
678,
20,
11917,
1054,
37,
21,
8128,
270,
3893,
28,
487,
528,
15,
14,
1797,
25,
1021,
45,
5579,
9,
6962,
5,
7,
915,
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... |
Android, TabLayout (tabhost), switching tabs disables edittext on second tab. How do I prevent this?
===
I have a tablayout that consists of two tabs that are each its own activity, so three activities, one tab, two content.
Both of the two content activities consist of a button and one edittext field.
When I load up, the first activity shows, and I am able to click on the edittext field (which is highlighted in yellow) and the keyboard comes up. When I switch to the second tab, the edittext which is not highlighted in yellow, does not allow me to select it to bring up the keyboard.
If I switch back to the first tab after this point then back to the second, I am able to use the keyboard on both, and it works for the duration of the app.
I don't expect first time uses to play around and figure that out.
My question is, how would I be able to have the keyboard work on the first occurrence of the second tab?
If you need any code let me know. | 0 | [
2,
13005,
15,
6523,
4414,
1320,
13,
5,
15783,
11694,
6,
15,
13027,
6523,
18,
1460,
579,
18,
9392,
11969,
27,
153,
6523,
9,
184,
107,
31,
2501,
48,
60,
800,
3726,
3726,
31,
57,
21,
6523,
4414,
1320,
30,
2043,
16,
81,
6523,
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... |
Best way to reload a "grid" of UITableViews?
===
I have a UITableView with reusable cells, and inside each cell is an EasyTableView (pretty much a UITableView rotated 90 degrees). When I reload my content, I notice a slight hesitation in the UI. I have about 15 visible rows, and each EasyTableView has about about 8 visible rows (columns).
I am doing this:
for(UITableViewCell *cell in self.masterTableView.visibleCells){
EasyTableView *easyTableView = (EasyTableView*)[cell viewWithTag: 123];
[easyTableView.tableView reloadRowsAtIndexPaths: easyTableView.tableView.indexPathsForVisibleRows]
}
What is the best way to reload my cells without locking up the UI? I've also tried to performSelectorOnMainThread, and also gcd dispatch on main thread. Thanks for any input. | 0 | [
2,
246,
161,
20,
27339,
21,
13,
7,
16375,
7,
16,
13,
11193,
579,
4725,
18,
60,
800,
3726,
3726,
31,
57,
21,
13,
11193,
579,
4725,
29,
302,
267,
579,
2934,
15,
17,
572,
206,
1667,
25,
40,
2010,
5924,
4725,
13,
5,
21542,
212,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Framework 2.0 - Changes to database evolutions not being detected
===
I am currently trying to fix a faulty database evolution script--in fact, my first one (1.sql) for the web application. I applied the fix to the file, but the unfixed file is the one being run in both a live instance my Specs2 tests.
So, for instance, if I changed:
CREATE TABLE dbname.Account ( ... );
to:
CREATE TABLE IF NOT EXISTS dbname.Account ( ... );
in my evolution script, and then ran a test or ran the actual instance,
CREATE TABLE dbname.Account ( ... );
would be what it still sees, as shown in the test log and in the live instance's error screen that shows up when an evolution is not applied correctly.
I've tried cleaning, recompiling, and deleting my target folder. None of those worked. Any ideas?
Thanks. | 0 | [
2,
418,
6596,
172,
9,
387,
13,
8,
1693,
20,
6018,
5680,
18,
52,
142,
11968,
800,
3726,
3726,
31,
589,
871,
749,
20,
6098,
21,
4173,
93,
6018,
5680,
3884,
8,
8,
108,
837,
15,
51,
64,
53,
13,
5,
165,
9,
18,
22402,
6,
26,
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... |
GWT SuggestBox mapping of European characters to American keyboard
===
I have a GWT Suggestbox that contains a mix of European and American words. For example, some words have European characters, such as français. My target audience is American so I would like to allow automatic mapping of similar letters on an American keyboard to the European characters. For example, instead of typing "français", the suggestbox would allow the user to type "francais" (c instead of ç). The page would then submit the form with the proper word "français" as the suggestbox value rather than exactly what the user typed in.
I'm hoping this might have been handled by somebody else already? Is this supported by a library?
Otherwise I'm assuming I would need to map the words with the European characters to American characters for the suggestbox and then map them back to the original European versions for submission back to the server. Perhaps there is a better way?
| 0 | [
2,
14094,
38,
5601,
5309,
13305,
16,
733,
1766,
20,
189,
8896,
800,
3726,
3726,
31,
57,
21,
14094,
38,
5601,
5309,
30,
1588,
21,
2917,
16,
733,
17,
189,
715,
9,
26,
823,
15,
109,
715,
57,
733,
1766,
15,
145,
28,
26177,
9,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
onclick grab post values with ajax
===
I have set up some rows that when **open** is clicked it will do a database update to set the status to open ticket.
But for some reason i cant take the master $id with it? i need it to do some other things with it and prefer not to do a second query or JOIN on the next page just to get the master id.
i have this in my query ( i excluded all the connection code etc.. ):
<?php start query { ?>
<a href="javascript:void(0)" id="<?php echo $cid;?>" onclick="open(cid)">Open</a>
<input type="hidden" id="REF<?php echo $cid;?>" value="<?php echo $id;?>">
<?php } // end query ?>
i have this in my ajax:
function open(cid) {
var txt = $.ajax({
url: 'actions/open.php',
async: true,
type:'POST',
data:({
cid: cid,
id: $('#REF'+cid).val()
})
}).success;
alert( cid,id );
setTimeout(function(){window.location.href='view.php?mode=Preview&cid='+cid+'&id='+id;},200);
}
My problem is that it keeps telling me that id is null in firebug
If i change it to just grab the cid and do a test it works fine?
I have tried **document.getElementById** but for some strange reason nothing works?
Anything wrong with my code? am i missing something?
Thanks in advance :)
Jonny | 0 | [
2,
27,
150,
10129,
4931,
678,
4070,
29,
20624,
800,
3726,
3726,
31,
57,
309,
71,
109,
11295,
30,
76,
13,
1409,
10157,
1409,
25,
15802,
32,
129,
107,
21,
6018,
11100,
20,
309,
14,
1782,
20,
368,
6133,
9,
47,
26,
109,
1215,
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... |
Windows services "sandbox"
===
We are faced with the problem maintaining lots of windows services.
The idea is to reorganize windows services in to class libraries and connect libraries to one master windows service. Is there a good idea ? Any advices please)
| 0 | [
2,
1936,
687,
13,
7,
18,
290,
5309,
7,
800,
3726,
3726,
95,
50,
3110,
29,
14,
1448,
8215,
7503,
16,
1936,
687,
9,
14,
882,
25,
20,
302,
6826,
2952,
1936,
687,
19,
20,
718,
8649,
17,
6379,
8649,
20,
53,
1129,
1936,
365,
9,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... |
Beginner questions about vim
===
Question #1:
if I have a C++ code like this
#include <iostream>
using namesapce std;
int main() {
int a;
cin >> a;
cout << a << endl;
return 0;
}
I don't know if this is called (debugging, compiling, or building), but I just want to run this program so I can give it the input and see the output, and see errors such as "missing ';' " or "missing '}' ".
exe file, and other things are not important for me.
Question #2:
if I have a C++ code that I write every time like this
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
How can I make vim insert this code every time I open a .cpp file with vim ?
I have Windows 7 32-bit and my .vimrc file is the default one that comes when I install vim | 0 | [
2,
26931,
2346,
88,
1790,
79,
800,
3726,
3726,
1301,
4253,
45,
100,
31,
57,
21,
272,
20512,
1797,
101,
48,
6926,
22640,
13,
1,
1963,
11260,
1,
568,
1817,
2552,
1105,
354,
43,
73,
19,
38,
407,
5,
6,
13,
1,
19,
38,
21,
73,
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... |
simple if statements (not short hand)
===
So today, as everyday, I was programming. Going along my usual business, typing away, listening to Daft Punk and various other groovy tunes. Then out of the blue, I had to write something along the lines of:
$x = 'a'; // For instance
if ($x == 'a' || $x == 'b') {
// ...
}
Simple enough, not too shabby I say. But wait! I thought to myself `"there must be an easier way to do that - I'm repeating myself"`. So I set about attempting to solve this with the following code:
if ($x == ('a' || 'b')) {
// ...
}
However, that doesn't work. At all. It's _always_ true. If `$x` is equal to `a`, `b`, `c` or `cake`. So I sulked, cried a little bit and have decided to ask Stackoverflow if any of you guys know why.
Thanks! | 0 | [
2,
1935,
100,
9015,
13,
5,
1270,
502,
224,
6,
800,
3726,
3726,
86,
786,
15,
28,
10789,
15,
31,
23,
3143,
9,
228,
303,
51,
3820,
508,
15,
25266,
229,
15,
4948,
20,
1331,
3072,
6769,
17,
617,
89,
3452,
2026,
93,
15568,
9,
94,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get the hashtag value of a url in Javascript?
===
I have a url like http://www.mydomain.com/folder/file.html#val=90&type="test"&set="none"&value="reset"
Now I need to get the portion of url from starting from #, How do I get that, I tried using window.location.search.substr(); but looks like that searches for ? in a url. is there a method to get the value of url after #
Thanks,
Michael | 0 | [
2,
184,
20,
164,
14,
19170,
8628,
1923,
16,
21,
287,
6362,
19,
8247,
8741,
60,
800,
3726,
3726,
31,
57,
21,
287,
6362,
101,
7775,
6903,
6483,
9,
915,
537,
6232,
9,
960,
118,
8814,
106,
118,
16877,
9,
15895,
5910,
3377,
3726,
316... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to keep data in cache across mvc application
===
In my application I have a list of schools that can be read off a database table. I want to use this list in many places in my website such as the registration form, different drop downs across my site etc. What is the best way to keep track of this data if it does not change often, I was thinking of storing it in cache, but at what point in the application do I load that cache? Also do I use dependency injection and create some custom class that retrieves this data? The data set is not large, its at most 20 or so schools. | 0 | [
2,
246,
161,
20,
643,
1054,
19,
16522,
464,
307,
8990,
3010,
800,
3726,
3726,
19,
51,
3010,
31,
57,
21,
968,
16,
1055,
30,
92,
44,
1302,
168,
21,
6018,
859,
9,
31,
259,
20,
275,
48,
968,
19,
151,
1489,
19,
51,
2271,
145,
28,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to post and image to a Page - not a user's account - but a sub-page
===
I've read everything I could find here about how to upload images using the Graph API. There is some very helpful information about how to get images to a user's page. And that seems to work very well (switching out "/me" for "/[user_id]"). But when I try the same thing using the ID for a sub-page, it always sends the image to "/me".
It's almost acting like the path for the sub-page fails to resolve and reverts to a fail safe, rather than generating an error. | 0 | [
2,
184,
20,
678,
17,
1961,
20,
21,
2478,
13,
8,
52,
21,
4155,
22,
18,
2176,
13,
8,
47,
21,
972,
8,
6486,
800,
3726,
3726,
31,
22,
195,
1302,
796,
31,
110,
477,
235,
88,
184,
20,
71,
8294,
3502,
568,
14,
7210,
21,
2159,
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... |
Breakpoint never hit when dll would be called
===
I have added a managed c++ dll to my c#.net project (using "add resource"); it finds the class I'm trying to instantiate just fine, no compiler errors. But somehow, fields I know I instantiated are getting null reference exceptions. So I put in a breakpoint at the top of the method that sets the field... and it's never hit. If I comment out the line using the class from the .dll, it hits the breakpoint. Uncomment that and the method never executes despite being called. What's happening here?
The dll is ManagedSpyLib, the class is [ControlProxy][1], if that helps any. The call is inside the DoWork method of a backgroundworker which is most definitely getting started asynchronously -- could that entire thread be crashing silently without even alerting the debugger? How can I debug this?
[1]: http://msdn.microsoft.com/en-us/magazine/cc164593.aspx?code=true&level=root,ManagedSpyLib&file=ControlProxy.cpp | 0 | [
2,
1442,
3132,
243,
770,
76,
13,
43,
211,
83,
44,
227,
800,
3726,
3726,
31,
57,
905,
21,
1471,
272,
20512,
13,
43,
211,
20,
51,
272,
5910,
9,
2328,
669,
13,
5,
12655,
13,
7,
14854,
6577,
7,
6,
73,
32,
3797,
14,
718,
31,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python: How to access an a possibly existing element derived from a JSON data tree?
===
I have a rather complex data structure derived from JSON with `json.load(<filehandle>)`, e.g.
{
"sensors": {
"measurements": [
[
null,
null,
null
],
[
{
"sensor": "Fields 341",
"remote": null,
"mark": "reliable",
"duration": 81.54296875
},
{
"sensor": "Fields 341",
"remote": null,
"mark": "reliable",
"duration": 61.54534875
}
]
]
}
}
The result are nested dictionaries and lists, e.g.
{u'sensors': {u'measurements': [[None, None, None],
[{u'duration': 81.54296875,
u'mark': u'reliable',
u'remote': None,
u'sensor': u'Fields 341'},
{u'duration': 61.545348750000002,
u'mark': u'reliable',
u'remote': None,
u'sensor': u'Fields 341'}]]}}
The goal is to take the data and stuff it in a database via sqlalchemy. Like this:
for item in sensors["measurements"]:
DBTable.DBField = item[0]["sensor"]
...
The problem with this is: Any parts in the data could be replaced with `null/None` in case the measurements where erroneous (like the first one). If so the DBFields should be assigned `None`. If this is the case the assignment raises an exception:
TypeError: 'NoneType' object is unsubscriptable
Is there a sane way to get the for loop to run without raising the exception (maybe using .get() of somekind)? If not, what is the best way to handle this non-existent data structures? Any suggestions welcome.
Thanks a lot!
| 0 | [
2,
20059,
45,
184,
20,
1381,
40,
21,
2879,
3149,
4520,
3981,
37,
21,
487,
528,
1054,
1541,
60,
800,
3726,
3726,
31,
57,
21,
864,
1502,
1054,
1411,
3981,
37,
487,
528,
29,
13,
1,
728,
528,
9,
8294,
5,
1,
16877,
3203,
413,
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 change the event in [XTK]
===
**Hello,
I wonder how do I change my mouse event
because I would like to X.Caption activates only when I right-clicked on it.
thank you very much** | 0 | [
2,
184,
753,
14,
807,
19,
636,
396,
38,
197,
500,
800,
3726,
3726,
13,
1409,
11515,
15,
31,
2666,
184,
107,
31,
753,
51,
7567,
807,
185,
31,
83,
101,
20,
993,
9,
4666,
3309,
18163,
18,
104,
76,
31,
193,
8,
150,
10129,
69,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
It is possible to use GCM (push notifications) to achieve these needs?
===
We have a system that generates android apps automatically. The users enter in our website and login in their accounts and the users make a description of wich functionalities want and our system automatically generates the signed android apk and publishes on market.
The apps are published on the market with our developer account, not with the user account.
Such users would need PUSH notifications, for example, through GCM, to their applications. Therefore, we need to know if there is any way to automate the process so that users only have to enter on our website their google accounts and the message they want to send their applications, and our system must automatically send the messages to the phones that uses the user applications.
You have to remember and highlight the following factors:
- Applications are published in the market under our developer account.
- Users who have created their apps through our system have their own google accounts (not developer accounts) and want to send their messages from their accounts of Google and to its applications only, not those of others users and not using our google developer account.
- The whole process should be automatic and transparent to the user, since they should only provide these data, their google account, the message they want to send, and the app that must receive the message.
Would it be possible to do this by GCM?
There is a GCM API with which to communicate to perform all these steps automatically?
Thanks | 0 | [
2,
32,
25,
938,
20,
275,
489,
9095,
13,
5,
26973,
52,
4634,
18,
6,
20,
4689,
158,
2274,
60,
800,
3726,
3726,
95,
57,
21,
329,
30,
7920,
18,
13005,
4865,
18,
7499,
9,
14,
3878,
2830,
19,
318,
2271,
17,
6738,
108,
19,
66,
5310... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use a different formatter on Highcharts in each curve of the same graphic?
===
I am using Highcharts and i want to use a different formatter for the numbers displayed in the tooltip, for each curve in the same graphic.
Thank you | 0 | [
2,
184,
20,
275,
21,
421,
26,
24700,
27,
183,
5433,
38,
18,
19,
206,
7101,
16,
14,
205,
8479,
60,
800,
3726,
3726,
31,
589,
568,
183,
5433,
38,
18,
17,
31,
259,
20,
275,
21,
421,
26,
24700,
26,
14,
2116,
6115,
19,
14,
5607,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
having a ClassCastException on HorizontalListView
===
so i been working with this one
[http://www.dev-smart.com/archives/34][1]
[1]: http://www.dev-smart.com/archives/34
i inserted this listview inside another and getting ClassCastException
07-04 16:44:19.028: E/AndroidRuntime(668): java.lang.ClassCastException: android.widget.ListView 07-04 16:44:19.028:
E/AndroidRuntime(668): at com.applabs.data.HomeAdapter.bindView(HomeAdapter.java:71) 07-04 16:44:19.028:
E/AndroidRuntime(668): at com.applabs.data.HomeAdapter.newView(HomeAdapter.java:170)
in my bindview
public void bindView(View view, Context context, Cursor c) {
...
HorizontalListView listview = (HorizontalListView) view.findViewById(R.id.lv2);
listview.setAdapter(new GalleryAdapter(context, gp.setGallery(cursor,
crv, id)));
...
}
in my newview
@Override
public View newView(Context context, Cursor c1, ViewGroup parent) {
// LayoutInflater mInflater = LayoutInflater.from(context);
// TODO Auto-generated method stub
LayoutInflater inflater = LayoutInflater.from(context);
View v = inflater.inflate(R.layout.dummy, parent, false);
bindView(v, context, c1);
return v;
}
| 0 | [
2,
452,
21,
718,
6146,
10066,
872,
27,
10095,
5739,
4725,
800,
3726,
3726,
86,
31,
74,
638,
29,
48,
53,
636,
21127,
6903,
6483,
9,
14438,
8,
18,
9534,
9,
960,
118,
23941,
18,
118,
3965,
500,
2558,
165,
500,
636,
165,
500,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Looking for a Java based SCSS to CSS Converter
===
I'm looking for a Java based SCSS to CSS Converter to write a [Jawr][1] Preprocessor for this.
So it's important to keep comments for [building Sprites with Jawr][2].
I just found [SAC][3] which seems to be a great base start writing one.
CSS Level 3 has to be supported - that's why [CSS Parser][4] isn't a choice.
If I have to write my own (which will be Open Source and hosted on [GitHub][5] for sure):
Is there any SCSS Parser? If not, can I write my own based on SAC as well?
Would anyone help me?
[1]: http://jawr.java.net/
[2]: http://jawr.java.net/tutorials/jawrSpriteImage.html
[3]: http://www.w3.org/Style/CSS/SAC/
[4]: http://cssparser.sourceforge.net/
[5]: http://github.com/ | 0 | [
2,
699,
26,
21,
8247,
432,
4729,
18,
18,
20,
272,
18,
18,
25893,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
8247,
432,
4729,
18,
18,
20,
272,
18,
18,
25893,
20,
2757,
21,
636,
22971,
139,
500,
2558,
165,
500,
782,
16835,
248,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript url management
===
I need help because I am trying to create a lib with javascript in order to create, modify, delete params in my url, I explain :
**www.mydomain.com/thing/?id=1&et=67&type=chercher**
How u can see, my params are random, it's dynamic, It's not every time the same url, I had this url, one time I can have ?id=1&et=67&type=chercher and other time I can have **?id=1&type=chercher** or for example just **?id=1** or others params.
So it's not easy because of user action, the url with params will change, so is there an lib or an application written with javascript which can do this easily ?
Thx everyOne for your futures responses !!!! | 0 | [
2,
8247,
8741,
287,
6362,
1097,
800,
3726,
3726,
31,
376,
448,
185,
31,
589,
749,
20,
1600,
21,
13,
8326,
29,
8247,
8741,
19,
389,
20,
1600,
15,
17579,
15,
27448,
2258,
79,
18,
19,
51,
287,
6362,
15,
31,
3271,
13,
45,
13,
1409... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 CROP error
===
Sometime I have an error, when I'm trying to make a crop from camera only in samsung galaxy s2. How can I solve it?
07-03 17:25:13.643: E/AndroidRuntime(12485): FATAL EXCEPTION: main
07-03 17:25:13.643: E/AndroidRuntime(12485): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cooliris.media/com.cooliris.media.CropImage}: java.lang.NullPointerException
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1968)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.ActivityThread.access$600(ActivityThread.java:127)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.os.Handler.dispatchMessage(Handler.java:99)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.os.Looper.loop(Looper.java:137)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.ActivityThread.main(ActivityThread.java:4507)
07-03 17:25:13.643: E/AndroidRuntime(12485): at java.lang.reflect.Method.invokeNative(Native Method)
07-03 17:25:13.643: E/AndroidRuntime(12485): at java.lang.reflect.Method.invoke(Method.java:511)
07-03 17:25:13.643: E/AndroidRuntime(12485): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
07-03 17:25:13.643: E/AndroidRuntime(12485): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
07-03 17:25:13.643: E/AndroidRuntime(12485): at dalvik.system.NativeStart.main(Native Method)
07-03 17:25:13.643: E/AndroidRuntime(12485): Caused by: java.lang.NullPointerException
07-03 17:25:13.643: E/AndroidRuntime(12485): at com.cooliris.media.CropImage.loadBitmap(CropImage.java:447)
07-03 17:25:13.643: E/AndroidRuntime(12485): at com.cooliris.media.CropImage.onCreate(CropImage.java:430)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.Activity.performCreate(Activity.java:4465)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
07-03 17:25:13.643: E/AndroidRuntime(12485): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932)
07-03 17:25:13.643: E/AndroidRuntime(12485): ... 11 more
07-03 17:25:13.653: E/android.os.Debug(1973): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
| 0 | [
2,
13005,
9833,
7019,
800,
3726,
3726,
8530,
31,
57,
40,
7019,
15,
76,
31,
22,
79,
749,
20,
233,
21,
9833,
37,
3336,
104,
19,
22981,
9358,
13,
18,
135,
9,
184,
92,
31,
8402,
32,
60,
13,
2984,
8,
3601,
369,
45,
1811,
45,
1543... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Twitter API similar to Facebook links.getStats needed
===
I was programming some stuffs using the Facebook API where I landed up at the Facebook links.getStats API which provides the sharing statistics for any particular link of Facebook.
Was just wondering if there exists any similar API for twitter where I could get the statistics for a link on twitter ?? | 0 | [
2,
10623,
21,
2159,
835,
20,
9090,
6271,
9,
3060,
10631,
18,
851,
800,
3726,
3726,
31,
23,
3143,
109,
3217,
18,
568,
14,
9090,
21,
2159,
113,
31,
4388,
71,
35,
14,
9090,
6271,
9,
3060,
10631,
18,
21,
2159,
56,
1927,
14,
6126,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 trying to access to unexisting repo
===
I am working on a large project with remote private repository.
Someone set one of the reposirories as `http://central`
And on every child's module build maven tries to download from this repo.
(I dont have any access to it)
Now I am getting this error
Could not transfer metadata com.company.project:child-lib-ui:01.111.00.00-SNAPSHOT/maven-metadata.xml from/to central (http://central): Error transferring file: Server returned HTTP response code: 503 for URL: http://central/
A have already deleted all mentioned "http://central" from all pom's, cleared all local repository, but now Im still getting this repo in build.
What can I do to skip this repo? | 0 | [
2,
1216,
3124,
749,
20,
1381,
20,
367,
21341,
302,
1638,
800,
3726,
3726,
31,
589,
638,
27,
21,
370,
669,
29,
5388,
932,
24869,
9,
737,
309,
53,
16,
14,
302,
14882,
661,
2829,
28,
13,
1,
21127,
6903,
6306,
1,
17,
27,
352,
850,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VBA- Pivot Table
===
I have mange to modify the code for pivoting the table. But i now require to save the pivoted table in a different workbook. what should be the modifications in the code?? code is:
Sub ReversePivotTable()
' Before running this, make sure you have a summary table with column headers.
' The output table will have three columns.
Dim SummaryTable As Range, OutputRange As Range
Dim OutRow As Long
Dim r As Long, c As Long
On Error Resume Next
Set SummaryTable = ActiveCell.CurrentRegion
If SummaryTable.Count = 1 Or SummaryTable.Rows.Count < 3 Then
MsgBox "Select a cell within the summary table.", vbCritical
Exit Sub
End If
SummaryTable.Select
Set OutputRange = Application.InputBox(prompt:="Select a cell for the 3-column output", Type:=8)
' Convert the range
OutRow = 2
Application.ScreenUpdating = False
OutputRange.Range("A1:C3") = Array("Column1", "Column2", "Column3")
For r = 2 To SummaryTable.Rows.Count
For c = 2 To SummaryTable.Columns.Count
OutputRange.Cells(OutRow, 1) = SummaryTable.Cells(r, 1)
OutputRange.Cells(OutRow, 2) = SummaryTable.Cells(1, c)
OutputRange.Cells(OutRow, 3) = SummaryTable.Cells(r, c)
OutputRange.Cells(OutRow, 3).NumberFormat = SummaryTable.Cells(r, c).NumberFormat
OutRow = OutRow + 1
Next c
Next r
Application.ScreenUpdating = True
End Sub | 0 | [
2,
566,
969,
8,
20670,
859,
800,
3726,
3726,
31,
57,
169,
834,
20,
17579,
14,
1797,
26,
20670,
68,
14,
859,
9,
47,
31,
130,
4077,
20,
2079,
14,
20670,
69,
859,
19,
21,
421,
170,
5199,
9,
98,
378,
44,
14,
13922,
19,
14,
1797,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple locking task (threading)
===
I need to implement the class that should perform locking mechanism in our framework.
We have several threads and they are numbered 0,1,2,3.... We have a static class called ResourceHandler, that should lock these threads on given objects. The requirement is that n Lock() invokes should be realeased by m Release() invokes, where n = [0..] and m = [0..]. So no matter how many locks was performed on single object, only one Release call is enough to unlock all. Even further if o object is not locked, Release call should perform nothing. Also we need to know what objects are locked on what threads.
I have this implementation:
public class ResourceHandler
{
private readonly Dictionary<int, List<object>> _locks = new Dictionary<int, List<object>>();
public static ResourceHandler Instance {/* Singleton */}
public virtual Lock(int threadN, object obj)
{
Monitor.Enter(obj);
if (!_locks.ContainsKey(threadN)) {_locks.Add(new List<object>());}
_locks[threadN].Add(obj);
}
public virtual void Release(int threadN, object obj)
{
// Check whether we have threadN in _lock and skip if not
var count = _locks[threadN].Count(x => x == obj);
_locks[threadN].RemoveAll(x => x == obj);
for (int i=0; i<count; i++)
{
Monitor.Exit(obj);
}
}
// .....
}
Actually what I am worried here about is thread-safety. I'm actually not sure, is it thread-safe or not, and it's a real pain to fix that. Am I doing the task correctly and how can I ensure that this is thread-safe? | 0 | [
2,
1886,
17538,
3005,
13,
5,
96,
22883,
6,
800,
3726,
3726,
31,
376,
20,
8713,
14,
718,
30,
378,
2985,
17538,
6534,
19,
318,
6596,
9,
95,
57,
238,
20396,
17,
59,
50,
9824,
713,
15,
15793,
15,
240,
9,
9,
9,
9,
95,
57,
21,
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... |
Delphi with external libraries, error handling
===
I am trying to work with openCV library.
That applications comes with a sets of the libraries for different platform and with two version: 1 normal and 2 with "d" - I assume that is the debug version...
Now, executing the dll method, delphi 7 reports error: External exception E06D7363.
Is there a chance to get a detailed error?
| 0 | [
2,
23030,
29,
4886,
8649,
15,
7019,
7988,
800,
3726,
3726,
31,
589,
749,
20,
170,
29,
368,
12732,
1248,
9,
30,
3767,
1624,
29,
21,
3415,
16,
14,
8649,
26,
421,
2452,
17,
29,
81,
615,
45,
137,
1826,
17,
172,
29,
13,
7,
43,
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... |
Windows: Disable / Enable USB Hub WITHOUT reboot
===
I would like to be able to programmatically disable or enable a USB hub in order to make the USB devices connected to it unavailable or available, respectively. I did some testing using device manager and then using ***Devcon***, and found that when certain devices are connected to the hub (specifically some Android phones), it cannot be disabled right away, and it is marked for disabling after reboot instead.
I tried to get over this problem by trying to also disable problematic devices connected to the hub, but this also failed.
I also tried using the ***SetupDixxx*** API directly, and even some USB IOCTLs, but I did not manage to get this task done.
I believe there ought to be a way of forcing immediate disable of a hub without reboot. I would appreciate it if anyone could point me to the right way.
Thanks in advance,
Ziv | 0 | [
2,
1936,
45,
1460,
579,
13,
118,
9240,
182,
220,
5814,
366,
25312,
800,
3726,
3726,
31,
83,
101,
20,
44,
777,
20,
625,
6732,
1326,
1460,
579,
54,
9240,
21,
182,
220,
5814,
19,
389,
20,
233,
14,
182,
220,
4690,
2587,
20,
32,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CodeIgniter - can't delete particular cache
===
I have this model:
> public function Vote($data) {
$gameid = $this->input->post('gameid');
$userid = $this->input->post('userid');
$rate = $this->input->post('rate');
$ins = array(
'user_id' => $userid,
'game_id' => $gameid,
'rate' => $rate
);
$q = $this->db->insert('rates', $ins);
$this->db->cache_delete('games',$gameid);
}
It inserts data and then it **should** clear the cache. But it's not - it does nothing. When I go with `cache_delete_all` it works. What am I doing wrong? | 0 | [
2,
1797,
9693,
242,
106,
13,
8,
92,
22,
38,
27448,
1498,
16522,
800,
3726,
3726,
31,
57,
48,
1061,
45,
13,
1,
317,
1990,
2018,
5,
4403,
18768,
6,
13,
1,
5579,
5128,
1340,
800,
5579,
1565,
8,
1,
108,
4881,
8,
1,
6962,
5,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL Find in array
===
I know you can search for an id from an array using id IN ($array) like
$ids = join(',',$galleries);
$sql = "SELECT * FROM galleries WHERE id IN ($ids)";
Can this be done in reverse so there's a column of ids stored in the table and you pass it a single id as a condition in a where clause?
| 0 | [
2,
51,
18,
22402,
477,
19,
7718,
800,
3726,
3726,
31,
143,
42,
92,
2122,
26,
40,
4924,
37,
40,
7718,
568,
4924,
19,
13,
5,
4403,
8576,
93,
6,
101,
5579,
9178,
800,
1865,
5,
22,
15,
22,
15,
4403,
14074,
8337,
18,
6,
73,
5579,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PDO UPDATE creates a new record instead of updating one
===
I'm using the following code to update a record. Bad thing is that it's not updating a record but it's adding a new record.
What am I doing wrong? I want it to update the record and not create a now one.
My modify url looks like this: http://randomsite.com/modify.php?id=1
**Modify.php code:**
<?php
require_once("connect.php");
$query = "SELECT * FROM cars WHERE id = :id";
$result = $odb->prepare($query);
$result->execute(array(':id' => $_REQUEST['id']) );
while ($row = $result->fetch(PDO::FETCH_ASSOC)) { ?>
<h1>Modify a car</h1>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Brand: <input type="text" name="brand" value="<?php echo $row['brand']; ?>" /><br />
Model: <input type="text" name="model" value="<?php echo $row['model']; ?>" /><br />
Year: <input type="text" name="year" value="<?php echo $row['year']; ?>" /><br />
ID: <input type="text" name="id" value="<?php echo $row['id']; }?>" /><br />
<input type="submit" value="Modify" />
</form>
<?php
if(isset($_POST['submit'])) {
$id = $_POST['id'];
$brand = $_POST['brand'];
$model = $_POST['model'];
$year = $_POST['year'];
$q = "UPDATE cars WHERE id = $_GET[id] (id, brand, model, year) VALUES(:id, :brand, :model, :year)";
$query = $odb->prepare($q);
$results = $query->execute(array(
":id" => $id,
":brand" => $brand,
":model" => $model,
":year" => $year,
));
}
?> | 0 | [
2,
351,
537,
11100,
9695,
21,
78,
571,
700,
16,
71,
43,
1880,
53,
800,
3726,
3726,
31,
22,
79,
568,
14,
249,
1797,
20,
11100,
21,
571,
9,
896,
584,
25,
30,
32,
22,
18,
52,
71,
43,
1880,
21,
571,
47,
32,
22,
18,
4721,
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 set infinite shared access signature policy in azure?
===
I am trying to set a shared access policy so that the user has infinite SharedAccessExpiryTime. I will track their access policies so that they can be revoked if needed.
From [this thread][1], the answer states there is a mechanism for setting an infinite expiration time. I did some searching and was not able to find this, how can this be done?
Currently, I simulate infinite by providing some large values for expiration time:
SharedAccessTablePolicy policy = new SharedAccessTablePolicy()
{
SharedAccessExpiryTime = DateTime.UtcNow.AddYears(500),
Permissions = SharedAccessTablePermissions.Add
| SharedAccessTablePermissions.Delete
| SharedAccessTablePermissions.Update
| SharedAccessTablePermissions.Update
};
[1]: http://stackoverflow.com/questions/10135133/how-do-you-setup-shared-access-signature-with-more-than-1-year-expiration-at-azu | 0 | [
2,
184,
20,
309,
9698,
2592,
1381,
7810,
1486,
19,
25715,
60,
800,
3726,
3726,
31,
589,
749,
20,
309,
21,
2592,
1381,
1486,
86,
30,
14,
4155,
63,
9698,
2592,
20604,
6899,
49,
622,
891,
9,
31,
129,
792,
66,
1381,
4845,
86,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 do prepared statements protect against injections?
===
I've come os far as to gaining basic understanding of prepared statements and I get that they prevent SQL-injection attacks. But I have yet to understand WHY they protect against said attacks. I know there are similar questions asked but I didn't find the answers entirely satisfying.<br>
Example - very unsafe code<br>
So here we have the most basic way to communicate with our database:
$query = "SELECT * FROM users where id=$username";
Without any protection, a user can input malicious code and thus "trick" the database engine to execute a devastating query:
$username = "1; DROP TABLE users;"
SELECT * FROM users where id=1; DROP TABLE users;
What I don't understand is how a prepared statement manages to "filter out" such data. What is the mechanic behind it that does NOT lure the database to generate such a SQL-query as shown above? Is just as simple as escaping certain characters, like semicolon in the example above, or is it more complicated?<br>
If I was to do the exact injection attack as in the example, but running it through a prepared statement, what kind of command string would reach the database engine?
| 0 | [
2,
483,
107,
3268,
9015,
2196,
149,
13646,
18,
60,
800,
3726,
3726,
31,
22,
195,
340,
13,
759,
463,
28,
20,
8299,
2125,
3260,
16,
3268,
9015,
17,
31,
164,
30,
59,
2501,
4444,
255,
8,
108,
17759,
872,
3080,
9,
47,
31,
57,
768,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 SignalR to find out if someone pushed a button on another website
===
<br>
I'm trying to find out if there is a way to use SignalR and be notified (in real-time) if a visitor has pushed a button on another site (different domain). First off, is SignalR the best way of doing this? Second, I have all the Javascript logic to find out if the visitor has actually clicked the button of interest but don't know how to relay that message to my server (where the real-time tracker will be). <br><br>
Second, There is no way of knowing what kind of technology (php, asp.net, regular html) will be running on the other end of the where the signal will be generated, will this be a problem? <br><br>
Lastly, the biggest reason why I would like to use SignalR (other than to start using it and learn it :) ) is so that I can have near real-time reporting of the activity on the dashboard. If there is a better solution (other than regular javascript polling and updating) by all means please let me know. <br><br>
I guess by these questions you can easily find out that I'm a newbee in the SignalR world and would need as much help as possible as this is going to be my first project in this field.<br>
Thank you,<br>
Hiva | 0 | [
2,
568,
2800,
139,
20,
477,
70,
100,
737,
2007,
21,
5167,
27,
226,
2271,
800,
3726,
3726,
13,
1,
5145,
1,
31,
22,
79,
749,
20,
477,
70,
100,
80,
25,
21,
161,
20,
275,
2800,
139,
17,
44,
22904,
13,
5,
108,
683,
8,
891,
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 get reference to element in resources, WPF?
===
I have problem with WPF - I'm quiet new in this smart technology. So the problem is:
I have a window. In this window's resources I have stored an element - eg. a Grid with unique key (assume x:Key="myGrid"). In this Grid I have a TextBox identified by a name (x:Name="myTextBox").
My Window contains only an empty Grid (named eg. winGrid). I programmatically set the myGrid as a child of the winGrid. And now, in runtime, I want to get a reference to the myTextBox object. I spent plenty of time googling, but nothing worked for me (FindName and similar methods).
Do you have please any idea, what I have to do to get the ball rolling?
Here is (pseudo)code snippet once more:
<Window x:Class="LoginForm.RidicWindow"
...>
<Window.Resources>
<Grid x:Key="myGrid">
<Border...
<Grid...
...
<TextBlock x:Name="myTextBlock" Grid.Column="0".../>
</Grid>
</Grid>
</Window.Resources>
<Grid x:Name="winGrid">
...
</Grid>
And now I set the myGrid as a child of winGrid:
(something like)
winGrid.Childrens.Clear();
winGrid.Childrens.Add((Grid)FindResource(myGrid));
And now I want to get a reference to myTextBlock, which is descendant of the myGrid.
I tried something like
((Grid)FindResource(myGrid)).FindByName("myTextBlock");
this, of course, doesn't work.
Hope you understand me, what I want to get.
Lot of thanks! | 0 | [
2,
184,
20,
164,
2801,
20,
4520,
19,
2566,
15,
619,
7721,
60,
800,
3726,
3726,
31,
57,
1448,
29,
619,
7721,
13,
8,
31,
22,
79,
2401,
78,
19,
48,
3978,
1099,
9,
86,
14,
1448,
25,
45,
31,
57,
21,
1463,
9,
19,
48,
1463,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Concrete5 error with no result
===
I am using concrete to render my site, it uses the following error system;
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
if (isset($error) && $error != '') {
if ($error instanceof Exception) {
$_error[] = $error->getMessage();
} else if ($error instanceof ValidationErrorHelper) {
$_error = $error->getList();
} else if (is_array($error)) {
$_error = $error;
} else if (is_string($error)) {
$_error[] = $error;
}
?>
<?php if ($format == 'block') { ?>
<div class="alert-message error">
<?php foreach($_error as $e): ?>
<?php echo $e?><br/>
<?php endforeach; ?>
</div>
<?php } else { ?>
<ul class="ccm-error">
<?php foreach($_error as $e): ?>
<li><?php echo $e?></li>
<?php endforeach; ?>
</ul>
<?php } ?>
<?php } ?>
This is used to detect errors in the system, or validation errors.
My problem is that the error div is being displayed but there is no errors, e.g.:
![Error DIV][1]
I have tried dumping the variables and this is the result (in this case):
Array object(ValidationErrorHelper)#89 (1) { ["error:protected"]=> array(0) { } }
This is the ValidationErrorHelper system:
<?php
defined('C5_EXECUTE') or die("Access Denied.");
class ValidationErrorHelper {
protected $error = array();
public function reset() {
$this->error = array();
}
public function add($e) {
if ($e instanceof ValidationErrorHelper) {
$this->error = array_merge($e->getList(), $this->error);
} else if (is_object($e) && ($e instanceof Exception)) {
$this->error[] = $e->getMessage();
} else {
$this->error[] = $e;
}
}
public function getList() {
return $this->error;
}
public function has() {
return (count($this->error) > 0);
}
public function output() {
if ($this->has()) {
print '<ul class="ccm-error">';
foreach($this->getList() as $error) {
print '<li>' . $error . '</li>';
}
print '</ul>';
}
}
}
?>
Is there any way to remove this? or diagnose it?
[1]: http://i.stack.imgur.com/OvbF5.jpg | 0 | [
2,
4105,
264,
7019,
29,
90,
829,
800,
3726,
3726,
31,
589,
568,
4105,
20,
16535,
51,
689,
15,
32,
2027,
14,
249,
7019,
329,
73,
13,
1,
60,
26120,
2811,
5,
22,
150,
264,
1,
1706,
17194,
591,
22,
6,
54,
1327,
5,
1,
5,
7,
206... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ImageMagick resizing to an abstract rectangle
===
I'm given an image of unknown size. I want to shrink it such that it will fit in _either_ 640x480 or 480x640, preserving aspect ratio. I want the image to shrink the minimum amount (e.g. the result should be the maximum size which fits in either 640x480 or 480x640).
For example, if I have a 800x800 image, it should shrink to 480x480. If I have a 500x1000 image, it should shrink to 320x640. Similarly, 1000x500 should become 640x320.
Can I do this in ImageMagick in one command? No cropping should occur, and the aspect ratio of the original image should be preserved. Thanks! | 0 | [
2,
1961,
21200,
197,
10719,
3335,
20,
40,
8502,
27181,
800,
3726,
3726,
31,
22,
79,
504,
40,
1961,
16,
2562,
1072,
9,
31,
259,
20,
16269,
32,
145,
30,
32,
129,
2742,
19,
13,
1,
18840,
1,
13,
19780,
396,
16318,
54,
13,
16318,
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... |
How to implement a robust truncate method in C#?
===
I know .NET has one built-in but it's an external call. Anyone knows why?
But the actual question is how to implement a truncate from scratch where the user will be able to specify how many digits to keep? Is multiplying a number by say 100 and then dividing it by the same amount enough? Or is there a better implementation?
Something like:
Truncate(12.3456789, 3);
// returns 12.345
| 0 | [
2,
184,
20,
8713,
21,
15313,
22328,
62,
2109,
19,
272,
5910,
60,
800,
3726,
3726,
31,
143,
13,
9,
2328,
63,
53,
392,
8,
108,
47,
32,
22,
18,
40,
4886,
645,
9,
1276,
3620,
483,
60,
47,
14,
3463,
1301,
25,
184,
20,
8713,
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... |
slf4j without toString()
===
When you do something like `LOG.debug("Exported {}.", product)` in slf4j it will eventually call toString() on the arguments, e.g. `product`.
For certain reasons, I can't override toString() on all the classes I want to use as arguments. Some classes come from third party jars, others will have their toString() called in other contexts, too, where the information I want to print in my log statement isn't available.
However, I have a class for debugging purposes which has a method `DebugFormatter.format(Object)` that has a long cascade of instanceofs that selects the routine to find some useful debugging information about that object.
My question is: Is it possible to configure slf4j so that it calls such a static method instead of toString()?
Of course, I could call my format method on the object before passing it as a parameter to `Logger.debug()` but then it would be executed even when the respective logger is not enabled. So I had to surround it with `if (LOG.isDebugEnabled())` which means that the whole point of having arguments in debug() was missed. | 0 | [
2,
13,
18,
9641,
300,
728,
366,
20,
11130,
5,
6,
800,
3726,
3726,
76,
42,
107,
301,
101,
13,
1,
5567,
9,
546,
16254,
5,
7,
1706,
1993,
69,
13,
1,
9,
7,
15,
2374,
6,
1,
19,
13,
18,
9641,
300,
728,
32,
129,
878,
645,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to put window as a undocked window of netbeans platfrom applicaion at the starting of app?
===
I made Desktop app in netbeans platform in Java Swing.I want my Window class as a undocked which is in explorer mode. so , how to do that? | 0 | [
2,
184,
20,
442,
1463,
28,
21,
367,
11458,
69,
1463,
16,
4275,
863,
5950,
6568,
38,
2665,
4865,
16904,
872,
35,
14,
1422,
16,
4865,
60,
800,
3726,
3726,
31,
117,
17404,
4865,
19,
4275,
863,
5950,
2452,
19,
8247,
5587,
9,
49,
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... |
limiting align-current in LaTeX-mode
===
In a LaTeX document `align-current` aligns `&` and `\\`, but does so for entire sections at a time. Anyone have any idea as to how one limits its range (in a new macro) to say the current environment?
I seldom need to do an align of anythis other than a matrix or a table.
My attempts to build something on top of `align-regexp` have not been successful.
Ideas? | 2 | [
2,
17567,
23389,
8,
17657,
19,
456,
396,
8,
15570,
800,
3726,
3726,
19,
21,
456,
396,
4492,
13,
1,
192,
9693,
8,
17657,
1,
23389,
18,
13,
1,
1569,
1,
17,
13,
1,
15,
47,
630,
86,
26,
1078,
4501,
35,
21,
85,
9,
1276,
57,
186... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Group Video Chat using Mono for Android
===
I need to write a Group Video Chat app using Mono for Android. I have already written the same app using Adobe AIR. But that works only on high end phones. So, could anybody let me know where to start.
I have already had a look at SIPDroid, but that's in java and only for google voice users.
Best Regards,
Ram | 0 | [
2,
214,
763,
6615,
568,
4129,
26,
13005,
800,
3726,
3726,
31,
376,
20,
2757,
21,
214,
763,
6615,
4865,
568,
4129,
26,
13005,
9,
31,
57,
614,
642,
14,
205,
4865,
568,
20299,
282,
9,
47,
30,
693,
104,
27,
183,
241,
14830,
9,
86,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIImageView animation - using perform selector after delay to display last image in the array
===
Basically, I have a UIImageView that will loop through 8 PNGs over 0.5 seconds. At the same time I start the animation, I do a performSelector with afterDelay of 0.5 seconds. So after my UIImageView has finished animating it will call animationTickDone which will set the last image hidden to no.
Here's the code anyway:
.h
@interface ViewController : UIViewController{
IBOutlet UIView *scannedView;
IBOutlet UIImageView *animatedTickLast;
}
@property (nonatomic, retain) IBOutlet UIView *scannedView;
@property (nonatomic, retain) IBOutlet UIImageView *animatedTickLast;
.m
-(void)Found{
[self.view addSubview:scannedView];
[animatedTickLast setHidden:YES];
//place animated tick images into an array
NSMutableArray *animatedTickImages;
animatedTickImages = [[NSMutableArray alloc] init];
NSUInteger nimages = 0;
for (nimages=0; nimages<8; nimages++){
NSString *tickImageName = [NSString stringWithFormat:@"tick_%d.png", (nimages + 1)];
[animatedTickImages addObject:[UIImage imageNamed:tickImageName]];
}
//set up animated tick
UIImageView *animatedTick = [[UIImageView alloc] initWithFrame:CGRectMake(98, 213, 125, 90)];
[animatedTick setAnimationImages:animatedTickImages];
[animatedTick setAnimationDuration:0.5];
[animatedTick setAnimationRepeatCount:1];
[animatedTick startAnimating];
NSLog(@"animation started");
[self performSelector:@selector(animationTickDone) withObject:nil afterDelay:0.5];
[scannedView addSubview:animatedTick];
NSLog(@"animation added into view");
[animatedTickImages release];
}
- (void)animationTickDone{
NSLog(@"delay function begins");
[animatedTickLast setHidden:NO];
sleep(1); //sleep so that scannedView stays on screen for at least 1.5 seconds (0.5 after animation + 1 from sleep);
}
Now, the problem. The animation itself is fine, and works great. But when Found() is first called, animatedTickLast will become visible after the animation. But when ever Found is called again afterwords, animatedTickDone never appears again, it's just an empty space.
After hours looking around the web searching and playing with it, I just cannot understand what the issue is as to why it doesn't appear. I thought at one point sleep() was getting called before my animatedTickLast could get chance to set hidden to no, but after removing sleep() it still didn't work.
Driving me nuts now so any help is greatly appreciated.
Thanks! | 0 | [
2,
13,
5661,
22039,
4725,
6236,
13,
8,
568,
2985,
23946,
75,
7255,
20,
3042,
236,
1961,
19,
14,
7718,
800,
3726,
3726,
11374,
15,
31,
57,
21,
13,
5661,
22039,
4725,
30,
129,
5293,
120,
469,
351,
2723,
18,
84,
713,
9,
264,
2582,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Deserializing from JSON back to joda DateTime in Play 2.0
===
I can't figure out the magic words to allow posting JSON for a DateTime field in my app. When queried, `DateTime`s are returned as microseconds since the epoch. When I try to post in that format though (`{"started":"1341006642000","task":{"id":1}}`), I get "Invalid value: started".
I also tried adding `@play.data.format.Formats.DateTime(pattern="yyyy-MM-dd HH:mm:ss")` to the `started` field and posting `{"started":"2012-07-02 09:24:45","task":{"id":1}}` which had the same result.
The controller method is:
@BodyParser.Of(play.mvc.BodyParser.Json.class)
public static Result create(Long task_id) {
Form<Run> runForm = form(Run.class).bindFromRequest();
for (String key : runForm.data().keySet()) {
System.err.println(key + " => " + runForm.apply(key).value() + "\n");
}
if (runForm.hasErrors())
return badRequest(runForm.errorsAsJson());
Run run = runForm.get();
run.task = Task.find.byId(task_id);
run.save();
ObjectNode result = Json.newObject();
result.put("id", run.id);
return ok(result);
}
I can also see from the output that the values are being received correctly. Anyone know how to make this work?
| 0 | [
2,
1746,
106,
2815,
3335,
37,
487,
528,
97,
20,
2640,
593,
1231,
891,
19,
418,
172,
9,
387,
800,
3726,
3726,
31,
92,
22,
38,
1465,
70,
14,
2154,
715,
20,
1655,
15669,
487,
528,
26,
21,
1231,
891,
575,
19,
51,
4865,
9,
76,
93... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Escaping parameters passed to perl script within Windows Shell
===
I have a perl script that was provided by a vendor, and that takes a series of parameters. I would like to call this via a Windows Shell object in ASP classic.
If I type the following in the cmd line on the web server, it works just fine:
path_to_perl\perl.exe path_to_pl\myfile.pl --arg1 "something" --arg2 "somethingelse"
If I do the following in ASP classic, it doesn't work:
strCMD = "path_to_perl\perl.exe path_to_pl\myfile.pl --arg1 ""something"" --arg2 ""somethingelse"""
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("cmd.exe /c " & strCMD)
The issue is that the argument have all sorts of special characters, so I need to quote them. I have read conflicting information as to how I should escape them - via a caret or a back-slash. Any help would be greatly appreciated! | 0 | [
2,
14700,
12905,
1100,
20,
416,
255,
3884,
363,
1936,
3593,
800,
3726,
3726,
31,
57,
21,
416,
255,
3884,
30,
23,
1173,
34,
21,
23510,
15,
17,
30,
1384,
21,
231,
16,
12905,
9,
31,
83,
101,
20,
645,
48,
1197,
21,
1936,
3593,
309... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 move an element along a curved path based on forces?
===
I'm working on movement for a game in javascript. Left and right arrow keys rotate an image of a spaceship while up arrow causes it to accelerate. Using the degree of rotation and the speed, I can calculate movement in terms of x and y with Math.sin() and Math.cos(), but this means that the ship handles like a car. Seeing as it's supposed to be in space, I'd like to make the rotation of the ship only affect its path while accelerating and to take into account the ship's current movement.
I messed around with it a lot and tried dividing the movement into two separate forces, the current direction and speed and the desired direction, but nothing seems even close to how it should feel.
Sorry if that was confusing, here's the simplified code for the original movement:
if(keyStates[39]) // Right arrow pressed?
ship.deg+=8;
if(keyStates[37]) // Left arrow pressed?
ship.deg-=8;
if(keyStates[38]) // Up arrow pressed?
{
if(ship.speed<16)
ship.speed+=1;
}
var shift=getXYshift(ship.deg,ship.speed);
function getXYshift(deg,speed)
{
return {x:Math.round(Math.cos((90-deg)*Math.PI/180)*speed*-1), y:Math.round(Math.sin((90-deg)*Math.PI/180)*speed)};
} | 0 | [
2,
184,
20,
780,
40,
4520,
303,
21,
9279,
2013,
432,
27,
879,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
1018,
26,
21,
250,
19,
8247,
8741,
9,
225,
17,
193,
7409,
5534,
21448,
40,
1961,
16,
21,
23368,
133,
71,
7409,
4047,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to make CMake execute some script after it generates visual studio solution
===
I am using CMake to build a project. I want to execute some script(say python script) after CMake is done generating the solution so that I won't have to execute it manually everytime.
I am using Cmake 2.8. Does anybody know any userhook or something which Cmake provides for this purpose? | 0 | [
2,
184,
20,
233,
272,
11115,
15644,
109,
3884,
75,
32,
7920,
18,
3458,
1120,
4295,
800,
3726,
3726,
31,
589,
568,
272,
11115,
20,
1895,
21,
669,
9,
31,
259,
20,
15644,
109,
3884,
5,
6366,
20059,
3884,
6,
75,
272,
11115,
25,
677,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 setResizable(false) changes the window size (swing)
===
i have a strange problem.
i am using the null layout for a window(= JFrame and on windows) and if i use setResizable(false) the window size gets bigger(to right and bottom, around 10 pixels i would say).
i do not know why.
the two println´s return the same sizes, what is strange, also...
mainWnd.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainWnd.setTitle(wndTitle);
mainWnd.setBounds(wndPosX, wndPosY, wndWidth, wndHeight);
System.out.println(mainWnd.getHeight() + mainWnd.getWidth());
mainWnd.setResizable(false);
System.out.println(mainWnd.getHeight() + mainWnd.getWidth());
does somebody has an idea? why does the window gets resized? | 0 | [
2,
8247,
309,
99,
18,
3186,
579,
5,
13192,
870,
6,
1693,
14,
1463,
1072,
13,
5,
18,
3546,
6,
800,
3726,
3726,
31,
57,
21,
2578,
1448,
9,
31,
589,
568,
14,
16203,
9106,
26,
21,
1463,
5,
3726,
487,
8361,
17,
27,
1936,
6,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add NSCustomView to Window
===
I know how to do this in iOS but cannot figure it how to it in Cocoa.
I want to capture keyboard events and I think I need to override the acceptsFirstResponder method to accomplish that (keyDown method being triggered). So I created a class extending NSCustomView and tried to add it in the main Window but I just cannot understand how to do it. So far I added a Custom View to the main View, mapped its view to my Custom View. Tried to add it programmatically like
`TestView *view = [[TestView alloc] init];
[[_window contentView] addSubview:view];`
but this is not working. So how can I do this? | 0 | [
2,
184,
20,
3547,
13,
2172,
4636,
6015,
4725,
20,
1463,
800,
3726,
3726,
31,
143,
184,
20,
107,
48,
19,
13,
7760,
47,
1967,
1465,
32,
184,
20,
32,
19,
24507,
9,
31,
259,
20,
3683,
8896,
963,
17,
31,
277,
31,
376,
20,
84,
118... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Persisting data in property list
===
I am using plist to store and retrieve my favorite list. Everything works fine till I restart my Iphone. The favorite list disappears.
My question is can I use plist to persist data?
Please can someone assist if possible ?
Thanks
| 0 | [
2,
22084,
68,
1054,
19,
1354,
968,
800,
3726,
3726,
31,
589,
568,
351,
5739,
20,
1718,
17,
11917,
51,
3839,
968,
9,
796,
693,
1123,
3924,
31,
22767,
51,
21024,
9,
14,
3839,
968,
20341,
9,
51,
1301,
25,
92,
31,
275,
351,
5739,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
I have HTML5 video in a lightbox. Why do I multiple videos playing and how do I stop it?
===
I have a Fancybox2 window popping up with the following code:
var mediaElementPlayers = [];
$("#video_list_widget a.video_link").fancybox({
padding : 0,
width:500,
height: 360,
closeBtn: false,
content: '<video width="500" height="360" controls="controls" autoplay="autoplay" preload="auto">
<source type="video/mp4" src="http://pathtomyvideo.mp4" />
<source type="video/webm" src="http://pathtomyvideo.webm" />
</video>',
afterShow: function() {
var mediaElementPlayers = [];
$('video,audio').each(function(){
mediaElementPlayers.push(new MediaElementPlayer(this));
console.log(mediaElementPlayers);
});
},
beforeClose: function(){
for (var i=0; i<mediaElementPlayers.length; i++){
console.log(mediaElementPlayers);
mediaElementPlayers[i].pause(); // pause
mediaElementPlayers[i].setCurrentTime(0); // rewind
}
$('.fancybox-inner').empty();
},
afterClose: function (){
$('video').remove();
}
});
The first time I click the `a.video_link`, it pops up and plays just fine. Let's call this one Video 1. If I close the lightbox without stopping the video, it's stopped and killed. No problem.
If I click on the `a.video_link` again, it pops up and starts from the beginning (let's call this Video 2), but with the audio from Video 1 also playing over the top of it. If I now close Video 2's lightbox, the audio from Video 1 keeps playing. If I open the lightbox a third time, the audio from Video 2 also starts. This keeps going, so I can have lots of layers of audio over one another.
Can anyone suggest a solution? | 0 | [
2,
31,
57,
13,
15895,
264,
763,
19,
21,
471,
5309,
9,
483,
107,
31,
1886,
6610,
791,
17,
184,
107,
31,
747,
32,
60,
800,
3726,
3726,
31,
57,
21,
12251,
5309,
135,
1463,
24157,
71,
29,
14,
249,
1797,
45,
4033,
941,
27567,
14049... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 File Upload - How to allow submit without selecting files
===
<form id="fileupload" action="/Test/jQueryFileUpload2" method="POST" enctype="multipart/form-data">
<div class="row fileupload-buttonbar">
<div class="span7">
<span class="btn btn-success fileinput-button">
<i class="icon-plus icon-white"></i>
<span>Add files...</span>
<input type="file" name="files[]"/>
</span>
</div>
<div class="span5 fileupload-progress fade">
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="bar" style="width:0%;"></div>
</div>
<div class="progress-extended"> </div>
</div>
</div>
<div class="fileupload-loading"></div>
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
<br/>
Description: @Html.TextBoxFor(model=>model.Description)
<br/>
<div class="fileupload-buttonbar">
<input id="btn-submit" class="start" type="submit" value="Save" />
</div>
</form>
If user don't select any file, the form cannot be submitted when click on button "Save". How to customize the jQuery File Upload to do this? | 0 | [
2,
487,
8190,
93,
3893,
71,
8294,
13,
8,
184,
20,
1655,
12298,
366,
20764,
6488,
800,
3726,
3726,
13,
1,
4190,
4924,
3726,
7,
16877,
576,
8294,
7,
1028,
3726,
7,
118,
10543,
118,
728,
8190,
93,
16877,
576,
8294,
135,
7,
2109,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.