unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Fancybox: detect when the events are set? === I want to dynamically generate a fancybox popup on one of my page. The idea is, I generate an image, apply fancybox and it, and then directly show the popup At the moment, I do: // Image generation... // At the end I get the image then apply the fancbox jQuery('a#myimage').fancybox(); // Then I would like the popup to appear directly so I do... jQuery('a#myimage').click(); ... But it doens't work because sometimes, the fancybox is not yet active when the click fires ! Is there a way to execute the click when the fancybox has fully initialized ? Thanks in advance
0
[ 2, 12251, 5309, 45, 9092, 76, 14, 963, 50, 309, 60, 800, 3726, 3726, 31, 259, 20, 7782, 1326, 7920, 21, 12251, 5309, 1675, 576, 27, 53, 16, 51, 2478, 9, 14, 882, 25, 15, 31, 7920, 40, 1961, 15, 5645, 12251, 5309, 17, 32, 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...
Extending the enumerations === I have a design problem. I have a polymorphic structure with an interface A (abstract one) and a workflow implemented in class W which uses the interface A without knowing the derived classes. This is implemented in DLL1 and I have a factory interface F capable of returning A*. In DLL2, I have the concrete implementations of A, which could be A1, A2 etc. and a factory implementation F1 capable of creating A1 and A2 instances. The factory interface which I have is something like this. enum ObjectType{typeA1, typeA2}; class F { public: A* create(enum ObjectType) = 0; } Some client class which knows both DLL1 and DLL2 will give me the concrete object type. But this is ugly since I will have to know the possible types of the concrete classes upfront when I write my DLL1. And this almost defeats my purpose of the polymorphic design. I don't want to do this. The alternative option which I can think of is to use strings, instead of the enumeration. But, I like to avoid strings as they are not type-safe and are prone to errors. I wish I had a chance to extend the enums by inheritance, just like the classes. My questions : Is there a better way out? Is extension of enums possible in C++11? (I don't have it now, though)
0
[ 2, 8176, 14, 26940, 5757, 800, 3726, 3726, 31, 57, 21, 704, 1448, 9, 31, 57, 21, 3446, 12498, 596, 1411, 29, 40, 6573, 21, 13, 5, 2297, 18, 19915, 53, 6, 17, 21, 170, 9990, 6807, 19, 718, 619, 56, 2027, 14, 6573, 21, 366, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Image Bending transform in ios === *I think we cannot have any bending transform in ios, not even with 3D transformation, But can we define some transformation matrix and acheive it? Or how do we draw images to a spherical/ cylindrical context in OpenGl ES? I'd like to bend images in my iphone app. And these bending is variable dependend on the curvature of the context. A typical example would be a photo on a mug All your helps are appreciated
0
[ 2, 1961, 16879, 8007, 19, 13, 7760, 800, 3726, 3726, 1637, 49, 277, 95, 1967, 57, 186, 16879, 8007, 19, 13, 7760, 15, 52, 166, 29, 203, 43, 6978, 15, 47, 92, 95, 9267, 109, 6978, 8187, 17, 14187, 1284, 32, 60, 54, 184, 107, 95...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Overring rails named routes based on a condition === I am writing an admin system (using a rails 3 mountable engine) for a parish of churches that I want to be to use for either an app that supports multiple churches eg www.parish.com/church/all-saints/pages or a single church www.church.com/pages I want to use the same views and therefore the same named routes for all cases, so that based on a condition (such as whether a @church variable returned a certain value) the named routes would route to different places pages_path => /pages if @church.nil? pages_path => /church/1/pages if @church Is there a way that I can modify all named routes based on a condition, or would I have to write custom helper methods that override all of the existing named routes? Thanks!
0
[ 2, 84, 2090, 2240, 18, 377, 5050, 432, 27, 21, 2874, 800, 3726, 3726, 31, 589, 1174, 40, 21, 43, 2160, 329, 13, 5, 12655, 21, 2240, 18, 203, 2149, 579, 1406, 6, 26, 21, 1818, 16, 3864, 30, 31, 259, 20, 44, 20, 275, 26, 694, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Duplicated code above and inside while loop === Consider the following code: std::string::size_type von = find_first_not_of(str, splitter); std::string::size_type bis = find_first_of(str, splitter, von); while (von != bis) { result.push_back(str.substr(von, bis - von)); von = find_first_not_of(str, splitter, bis); bis = find_first_of(str, splitter, von); } There are duplicated calls to `find_first_not_of` and `find_first_of` which could be eliminated by various techniques. For example, I could place the function calls inside the loop condition: std::string::size_type von, bis = 0; while (von = find_first_not_of(str, splitter, bis), bis = find_first_of(str, splitter, von), von != bis) { result.push_back(str.substr(von, bis - von)); } Or I could use an endless loop from which I manually break in the middle: std::string::size_type von, bis = 0; for (; ;) { von = find_first_not_of(str, splitter, bis); bis = find_first_of(str, splitter, von); if (von == bis) break; result.push_back(str.substr(von, bis - von)); } Both ways remove the code duplication, but do they actually improve the overall quality of the code?
3
[ 2, 19429, 43, 1797, 784, 17, 572, 133, 5293, 800, 3726, 3726, 3563, 14, 249, 1797, 45, 354, 43, 45, 45, 11130, 45, 45, 10454, 1, 4474, 2110, 800, 477, 1, 3552, 1, 1270, 1, 1041, 5, 9729, 15, 2132, 815, 6, 73, 354, 43, 45, 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...
Javascript TypeError: Object Has No Method === For whatever reason I'm getting `TypeError: Object #<Num> has no method 'getNumber'` when creating `numberOne` as an instance of `Num` function Num(n) { var number = n; var getNumber = function() { return number; }; } var numberOne = new Num(5); console.log(numberOne.getNumber());
0
[ 2, 8247, 8741, 1001, 29992, 45, 3095, 63, 90, 2109, 800, 3726, 3726, 26, 2099, 1215, 31, 22, 79, 1017, 13, 1, 4474, 29992, 45, 3095, 6926, 1, 6336, 1, 63, 90, 2109, 13, 22, 3060, 16299, 22, 1, 76, 2936, 13, 1, 16299, 849, 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...
Strange behaviour of System.in.read() === <br /> Can anyone please explain why the following code behaving strangely: public class UserInputTest { public static void main(String[] args) throws IOException { int n=3; char[] arr = new char[n]; for (int i=0; i<n; i++) { System.out.println(i+1 + " character :"); arr[i] = ((char)System.in.read()); } System.out.println("You Entered : "); for (int i=0; i<n; i++) { System.out.println(arr[i]); } } } **OUTPUT:** <br/> 1 character :<br/> u<br/> 2 character :<br/> 3 character :<br/> You Entered : <br/> u<br/> I was expecting it to block three times for a user to input values. Any comments ? <br/><br/> Thanks,<br/> Mohit
0
[ 2, 2578, 7727, 16, 329, 9, 108, 9, 10647, 5, 6, 800, 3726, 3726, 13, 1, 5145, 13, 118, 1, 92, 1276, 2247, 3271, 483, 14, 249, 1797, 44, 13693, 16432, 45, 317, 718, 4155, 108, 4881, 10543, 13, 1, 317, 12038, 11364, 407, 5, 1113...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
xsl and php is good choice or bad for large site? === I have found my all questions here are mostly useless or funny, lol (i am sorry for that) I am working on one site where previous coder has used xsl and xml in php site and its really painful to understand. So, wanted to ask if this choice of php and xml + xsl is good for large sites or not? Thx for reading. Shashi
4
[ 2, 993, 18, 255, 17, 13, 26120, 25, 254, 1837, 54, 896, 26, 370, 689, 60, 800, 3726, 3726, 31, 57, 216, 51, 65, 2346, 235, 50, 1555, 12858, 54, 5066, 15, 13, 20248, 13, 5, 49, 589, 1875, 26, 30, 6, 31, 589, 638, 27, 53, 68...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Walk all edges of an unidirected graph only once === I am looking for an algorithm that would tell me if it is possible to walk all the edges of an unidirected graph only once. The algorithm would have to be able to start from any node and walk the entire graph without revisiting the same edge.
0
[ 2, 1466, 65, 7840, 16, 40, 9911, 14147, 7210, 104, 382, 800, 3726, 3726, 31, 589, 699, 26, 40, 9083, 30, 83, 494, 55, 100, 32, 25, 938, 20, 1466, 65, 14, 7840, 16, 40, 9911, 14147, 7210, 104, 382, 9, 14, 9083, 83, 57, 20, 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...
GAE with Datastore (JDO) === I am new to GAE and especially for Datastore (JDO) I have an Object Composition : User object has a reference of Contact object. I am able to store them in datastore.. But the code allows to store multiple objects with same “username” which is defined as primary key. Here is the code snippet //User class @PersistenceCapable (identityType = IdentityType.APPLICATION) public class User{ @PrimaryKey @Persistent (valueStrategy = IdGeneratorStrategy.IDENTITY) String username; @Persistent Contact contact; //getters and setters } // Contact class @PersistenceCapable (identityType = IdentityType.APPLICATION) public class Contact { @PrimaryKey @Persistent (valueStrategy = IdGeneratorStrategy.IDENTITY) private Key username; @Persistent String Phone1; } //DAO class public void register() { User user = new User(); user.setUserName("abc"); Contact contact=new Contact(); contact.setEmail("abc@gmail.com"); user.setContact(contact); pm.makePersistent(user); } If I call this register method twice ( or equivalent to submit a registration form twice with same set of username and email id !!) ,the datastore is not complaining about duplicate key Exception.. Since I am creating "username" as my KEY I am expecting to get duplicate key Exception. But why this is not happening? thanks Ma
0
[ 2, 13, 17721, 29, 1054, 16828, 13, 5, 728, 537, 6, 800, 3726, 3726, 31, 589, 78, 20, 13, 17721, 17, 1118, 26, 1054, 16828, 13, 5, 728, 537, 6, 31, 57, 40, 3095, 4046, 13, 45, 4155, 3095, 63, 21, 2801, 16, 2203, 3095, 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...
what are these parameters mean in python? === Many different representation of parameters in python such as : urllib2.urlopen(url[, data][, timeout]) urllib2.build_opener([handler, ...]) cookielib.MozillaCookieJar(filename, delayload=None, policy=None) I know that the parameter in second method is a list,and common to see the third.But i am really confuse on the first one.what is the difference betweent urllib2.urlopen(url[, data][, timeout]) and urllib2.urlopen(url,data,timeout) Does the first one means all the url ,data and timeout can be passed as list?
0
[ 2, 98, 50, 158, 12905, 884, 19, 20059, 60, 800, 3726, 3726, 151, 421, 5442, 16, 12905, 19, 20059, 145, 28, 13, 45, 13, 911, 211, 4598, 135, 9, 911, 16942, 103, 5, 911, 255, 2558, 15, 1054, 500, 2558, 15, 85, 1320, 500, 6, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using NavigationService without XAML files === I'm trying to create some pages in my Windows Phone application without the use of any XAML. Everything is working, however, I'm failing to use NavigationService/ Journal with this approach and all my attempts to utilize it are answered by the usual "No XAML was found at the location {0}'" response. Yes, I can add an almost empty XAML file to get everything working, but is this kind of boiler plate code really necessary? Is it maybe possible to use the UriMapping to map certain Uris to specific classes instead of *.xaml files?
0
[ 2, 568, 8368, 11449, 366, 13, 6791, 8184, 6488, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 109, 4434, 19, 51, 1936, 1132, 3010, 366, 14, 275, 16, 186, 13, 6791, 8184, 9, 796, 25, 638, 15, 207, 15, 31, 22, 79, 7250, 20, 275, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
fsockopen() error about sending mail in php === i wanna send a confirmation e-mail to user when the user has registered and i am using xampp. but when i run my php file, it returns the following error: Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in C:\xampp\htdocs\class.smtp.php on line 122 Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in C:\xampp\htdocs\class.smtp.php on line 122 Message has not been sent. related part in my php file : try { require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Mailer = "smtp"; $mail->SMTPSecure = "ssl"; $mail->Host = "ssl://smtp.gmail.com"; $mail->Port = 465; $mail->SMTPAuth = true; $mail->CharSet="utf-8"; $mail->Username = "user@gmail.com"; $mail->Password = "password"; $mail->From = "user@gmail.com"; $mail->FromName="DBE Yazılım"; $mail->AddAddress($_POST['UserMail']); $mail->Subject = "Registration Information"; $mail->Body = "Hello your password is " . $userpass; //$mail->AddAttachment($path); $mail->Send(); if($mail->Send()) echo 'Message has been sent.'; else echo 'Message has not been sent.'; } catch(Exception $e) { echo 'hata'.$e->getMessage(); } i have looked at forums and this error is generally about ssl. they say that `extension=php_openssl.dll` must add into php.ini . i added this part but anything did not change. is this about xampp ? thanks in advance
0
[ 2, 398, 18, 5668, 10157, 5, 6, 7019, 88, 4907, 4216, 19, 13, 26120, 800, 3726, 3726, 31, 11024, 2660, 21, 15939, 13, 62, 8, 8079, 20, 4155, 76, 14, 4155, 63, 3801, 17, 31, 589, 568, 993, 765, 3421, 9, 47, 76, 31, 485, 51, 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...
Creating .zip file : PHP === I am trying to save **files** from **one folder** to **another .zip folder** placed in different directory . And I have written the following codes: **archive.php** <?php $zip = new ZipArchive(); $zip->open('example.zip', ZipArchive::CREATE); $srcDir = "/home/sam/uploads/"; $files= scandir($srcDir); //var_dump($files); unset($files[0],$files[1]); foreach ($files as $file) { $zip->addFile("{$file}"); } $zip->close(); ?> But sadly I am not able to create the .zip folder. Is there any step I missed? Please help me out . Thanks in advance...
0
[ 2, 2936, 13, 9, 2553, 306, 3893, 13, 45, 13, 26120, 800, 3726, 3726, 31, 589, 749, 20, 2079, 13, 1409, 16877, 18, 1409, 37, 13, 1409, 849, 19294, 1409, 20, 13, 1409, 14945, 13, 9, 2553, 306, 19294, 1409, 1037, 19, 421, 16755, 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...
GPU accelaration then an application is running as a server === Is it possible to use gpu acceleration then an application is running as a service under windows 7?
0
[ 2, 489, 4201, 7602, 3442, 5946, 94, 40, 3010, 25, 946, 28, 21, 8128, 800, 3726, 3726, 25, 32, 938, 20, 275, 489, 4201, 17661, 94, 40, 3010, 25, 946, 28, 21, 365, 131, 1936, 453, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Strip image URLs from data using Regex in Classic ASP === I was just wondering how to write a function which takes a string and strips out everything which isn't an image URL? I presume the best course would be regEx but I'm not sure. I did have a go but to no avail. Function RegExResults(strTarget, strPattern) Set regEx = New RegExp regEx.Pattern = strPattern regEx.Global = true Set RegExResults = regEx.Execute(strTarget) Set regEx = Nothing End Function Set arrResults = RegExResults(data, "(http://)([a-zA-Z0-9\/\.])*") For each result in arrResults Response.Write(result.Submatches(0)) & "<br>" Next Set arrResults = Nothing
0
[ 2, 4998, 1961, 13, 911, 7532, 37, 1054, 568, 7953, 1706, 19, 2732, 28, 306, 800, 3726, 3726, 31, 23, 114, 5712, 184, 20, 2757, 21, 1990, 56, 1384, 21, 3724, 17, 15383, 70, 796, 56, 2532, 22, 38, 40, 1961, 287, 6362, 60, 31, 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...
camera preview fixed in potrait but showing lower half black screen === lot of questions are already here to fix camera preview in potrait,i gone through them and fixed rotation in potrait by `camera.setDisplayOrientation(90);` but now preview is only on upper half and lower half of screen is black.i tried this on samsung galaxy s2,galaxy y,lg optimus,sony erricsson luminia.but all have same result.can anyone plz suggest me complete solution for using camera preview in both landscape and potrait. thanks in advance.
0
[ 2, 3336, 16121, 3535, 19, 3997, 525, 242, 47, 3187, 987, 519, 319, 2324, 800, 3726, 3726, 865, 16, 2346, 50, 614, 235, 20, 6098, 3336, 16121, 19, 3997, 525, 242, 15, 49, 1042, 120, 105, 17, 3535, 9431, 19, 3997, 525, 242, 34, 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...
Creating new android project in Eclipse Juno === I have downloaded SDK to the Eclipse but when I want to create a new Android project all I get is : File -> New ->(No Applicable Items). How can I solve this? Thanks.
0
[ 2, 2936, 78, 13005, 669, 19, 11652, 21715, 800, 3726, 3726, 31, 57, 23887, 13, 18, 43, 197, 20, 14, 11652, 47, 76, 31, 259, 20, 1600, 21, 78, 13005, 669, 65, 31, 164, 25, 13, 45, 3893, 13, 8, 1, 78, 13, 8, 1, 5, 251, 14535...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
jquery id filter works in msie === I am trying to use the .each() function of JQuery on a body load to assign functionality to different areas in an imagemap. It works fine in MSIE but fails completely in any other browser. If I hardcode the javascript function and call it using: href="javascript:cInfo(mapHeadG)" as an attribute for each area it works in all browsers so I know its not the code itself. I am guessing it has to be the filter I am using. Any suggestions would be most helpful! Here is the image map element: <map id="mMap1" name="mMap1"> <area coords="44, 13, 116, 14, 123, 21, 36, 21" shape="poly" alt="" id="mapHeadG" class="mLink" /> <area coords="37, 66, 113, 65, 117, 73, 34, 76" shape="poly" alt="" id="mapNeckG" /> <area coords="8, 83, 141, 79, 144, 88, 126, 97, 9, 96, 2, 92" shape="poly" alt="" id="mapShoulderG" /> </map> Here is the JQuery I use to assign the functionality: $(document).ready(function () { $('*[id*=map]:visible').each(function () { var sec = $(this).attr('id'); alert(sec); $(this).hover(function () { //Do something here. }, function () { //Do something here. }); $(this).click(function () { //Do something else here }) }); }); *(The sec variable is just a test to see if I am getting any information, this fires in MSIE but not in the other browsers)* You will see the alert(sec) line in the javascript, this is how I know the function is working in MSIE but not in the others, well this and the fact that when I click the mapped areas in MSIE this works but fails in the others. Like I said before, I am almost positive it has to do with the filter itself, but I can't seem to find it. Thanks in advance for any help!
0
[ 2, 487, 8190, 93, 4924, 11945, 693, 19, 307, 4157, 800, 3726, 3726, 31, 589, 749, 20, 275, 14, 13, 9, 14322, 5, 6, 1990, 16, 487, 8190, 93, 27, 21, 358, 6305, 20, 13952, 18548, 20, 421, 924, 19, 40, 1961, 15022, 9, 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...
Can two phones have the same bluetooth address? === I am writing a code which can show nearby friends whose bluetooth devices (phones) are switched on. My codes uses the devices addresses of the users to keep track of their presence but I need to know whether this figure is unique or not. If not how can I generate a unique id for each phone, let's say for example address + friendly name (which unfortunately is not unique). Thanks
0
[ 2, 92, 81, 14830, 57, 14, 205, 705, 15808, 3218, 60, 800, 3726, 3726, 31, 589, 1174, 21, 1797, 56, 92, 298, 1754, 954, 1196, 705, 15808, 4690, 13, 5, 7709, 18, 6, 50, 6667, 27, 9, 51, 11358, 2027, 14, 4690, 12636, 16, 14, 3878...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Understanding IIS 7 log files === I'm trying to debug a 405 error that is occurring in an ASP.NET 4.0 website with a jQuery AJAX post, and I've got the following from an IIS log file. 2012-07-02 15:15:37 XXX.XX.XX.XXX POST /AjaxWebMethods.aspx/TestWebMethod - 443 - XXX.XX.XX.XX Mozilla/5.0+(Windows+NT+5.1;+rv:13.0)+Gecko/20100101+Firefox/13.0.1 405 0 0 218 **My question:** what does the "405 0 0 218" at the end of the log signify? I'm assuming that the 405 portion is the client error number, but what are the 3 remaining numbers?
0
[ 2, 3260, 595, 18, 453, 6738, 6488, 800, 3726, 3726, 31, 22, 79, 749, 20, 121, 16254, 21, 13, 21817, 7019, 30, 25, 10428, 19, 40, 28, 306, 9, 2328, 268, 9, 387, 2271, 29, 21, 487, 8190, 93, 20624, 678, 15, 17, 31, 22, 195, 33...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Including template inside global template in VBulletin === I need to do something like this in VBulletin. There should be several templates (I added them through admincp), that should be "included" in the global template called **"footer"**. In fact only one of them should be included depending on somecondition. So in this **footer** I have <vb:if condition="$my_variable == 1"> <p>CASE_1</p> <vb:elseif condition="$my_variable == 2" /> <p>CASE_2</p> <vb:else /> <p>CASE_3</p> </vb:if> So in this if cases I need to change the CASE-s with a code to include other templates (i.e. "footer1", "footer2", "footer3"). Is there a way to do that?
0
[ 2, 215, 22894, 572, 2062, 22894, 19, 566, 9077, 1336, 108, 800, 3726, 3726, 31, 376, 20, 107, 301, 101, 48, 19, 566, 9077, 1336, 108, 9, 80, 378, 44, 238, 22894, 18, 13, 5, 49, 905, 105, 120, 21, 43, 2160, 7439, 6, 15, 30, 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...
Virtual Size causing program to run out of memory === A server application I'm working on built using C++ on Windows runs out of memory when Virtual Size reaches somewhere around 2GB (32-bit application, with large address aware enabled). I notice, however, that Private Bytes is significantly smaller. The current statistics are: Virtual Size: 2.6GB Private Bytes: 1.6GB The difference in these two numbers is 1GB. So my questions are: 1. What does this 1GB difference represent? 2. Is my application running out of memory due to Virtual Size or Private Bytes? I've also run my application through the VMMap utility and I notice that "Private Data" is usually an order of magnitude higher than the committed size. In other words, total size for Private Data might be 200MB, but the committed size is only 20MB. I'm not really sure what private data is, but based on my research so far it seems to indicate it's just part of the heap.
0
[ 2, 6599, 1072, 3242, 625, 20, 485, 70, 16, 1912, 800, 3726, 3726, 21, 8128, 3010, 31, 22, 79, 638, 27, 392, 568, 272, 20512, 27, 1936, 1461, 70, 16, 1912, 76, 6599, 1072, 5539, 3493, 140, 172, 11400, 13, 5, 3125, 8, 3326, 3010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS Upload multiple files at once === Is it possible to upload two (or more) files in only one request?? I've been trying to do so with NSMutableURLRequest and NSURLConnection but no success so far, and I have found no convincing answers online. It's easy to upload a single file (using code from [here][1]) but the [HTML Specs][2] mention that when uploading more than one file you have to embed a multipart/mixed header inside the multipart/form-data, and the files to be uploaded within that multipart/mixed header. The problem with the code linked above is that the one file that is being uploaded has it's Content-Disposition set to "form-data" (I guess that means that the single file is "all" of the form's data?) which I think leaves "no room" to attach another file. Please correct me if i'm wrong. Thanks. [1]: http://stackoverflow.com/questions/8042360/nsdata-and-uploading-images-via-post-in-ios [2]: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
0
[ 2, 13, 7760, 71, 8294, 1886, 6488, 35, 382, 800, 3726, 3726, 25, 32, 938, 20, 71, 8294, 81, 13, 5, 248, 91, 6, 6488, 19, 104, 53, 3772, 60, 60, 31, 22, 195, 74, 749, 20, 107, 86, 29, 13, 2172, 7903, 579, 911, 255, 99, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 8 Metro Style App Samples === I'm getting this kind of errors while compiling any of the Win 8 Metro style app samples provided by Microsoft (VS 2012 RC): > Fehler 1 Source file 'C:\Users\me\Desktop\Windows 8 Release Preview > Metro style app samples - C#, VB.NET, C++, JavaScript\XAML images > sample\C#\obj\Release\App.g.i.cs' could not be > found C:\Users\me\Desktop\Windows 8 Release Preview Metro style app > samples - C%23%2c VB.NET%2c C%2b%2b%2c JavaScript\XAML images > sample\C#\CSC Images > > Fehler 2 Source file 'C:\Users\ha\Desktop\Windows 8 Release Preview > Metro style app samples - C#, VB.NET, C++, JavaScript\XAML images > sample\C#\obj\Release\App.g.cs' could not be > found C:\Users\ha\Desktop\Windows 8 Release Preview Metro style app > samples - C%23%2c VB.NET%2c C%2b%2b%2c JavaScript\XAML images > sample\C#\CSC Images Any idea what I am doing wrong?
0
[ 2, 1936, 469, 3986, 1034, 4865, 7855, 800, 3726, 3726, 31, 22, 79, 1017, 48, 825, 16, 11908, 133, 24378, 186, 16, 14, 628, 469, 3986, 1034, 4865, 7855, 1173, 34, 7099, 13, 5, 710, 18, 563, 16462, 6, 45, 13, 1, 398, 26495, 137, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
cursor with AND in where clause === How do I add an `AND` to my `WHERE` clause in an Android `Cursor`? *** For example: Cursor cursor = data.query( Banana.URI, new String[]{BananaColumns._ID}, BananaColumns.NAME + "=? AND " + BananaColumns.COLLECTION + "=?", new String[]{bananaData.getName(), bananaData.getCategory()}, null); This returns an empty `Cursor`. But the `Table` contains data that should be found by that query. Is my formatting wrong? Thanks
0
[ 2, 29588, 29, 17, 19, 113, 9040, 800, 3726, 3726, 184, 107, 31, 3547, 40, 13, 1, 290, 1, 20, 51, 13, 1, 2798, 1, 9040, 19, 40, 13005, 13, 1, 4734, 18, 248, 1, 60, 8980, 26, 823, 45, 29588, 29588, 800, 1054, 9, 8190, 93, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How hard is it to convert a script which is using AJAX to work within wordpress? === I have a html form which calls a jQuery script for validation and uses AJAX to then submit the form. I am trying to integrate it in to a wordpress theme but I'm really struggling to understand what needs to be changed. I know that I must reference admin-ajax.php instead of the .php file which I was previously passing values to, but if that is the case how do pass values to the php which was in my original .php file? For example, I have a .js file which I am using for form validation and sending the values via AJAX to a .php file. What do I need to change to use these with wordpress? Should the contents of the .php file be moved in to functions.php?
0
[ 2, 184, 552, 25, 32, 20, 8406, 21, 3884, 56, 25, 568, 20624, 20, 170, 363, 833, 5890, 60, 800, 3726, 3726, 31, 57, 21, 13, 15895, 505, 56, 3029, 21, 487, 8190, 93, 3884, 26, 27999, 17, 2027, 20624, 20, 94, 12298, 14, 505, 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...
FFmpeg MPEG-2 ts decoder behaviour === What is the behavior of ffmpeg MPEG2-ts decoder when a frame is lost? - **I-frame**: use last I-frame received? - **P-frame**: ? - **B-frame**: ? Is it possible to change the behaviour? Thanks, DMS.
0
[ 2, 13, 2460, 79, 20427, 307, 20427, 8, 135, 13, 38, 18, 12015, 1157, 7727, 800, 3726, 3726, 98, 25, 14, 3257, 16, 13, 2460, 79, 20427, 307, 20427, 135, 8, 38, 18, 12015, 1157, 76, 21, 3523, 25, 529, 60, 13, 8, 13, 1409, 49, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 can't implementing classes define an overriding method as static? === I'm confused why the following is not allowed: public interface MyInterface { MyInterface getInstance(String name); } public class MyImplementation implements MyInterface { public MyImplementation(String name) { } @Override public static MyInterface getInstance() { // static is not allowed here return new MyImplementation(name) } } I understand why a method in the interface cannot be static, but why can't the overriding method be? I want all classes to implement the `getInstance(String name)` method, but I'm currently limited to only being able to call the method if the object has already been instantiated which kind of defeats the purpose...
0
[ 2, 483, 92, 22, 38, 17333, 2684, 9267, 40, 84, 5175, 68, 2109, 28, 12038, 60, 800, 3726, 3726, 31, 22, 79, 4230, 483, 14, 249, 25, 52, 1159, 45, 317, 6573, 51, 6280, 6413, 13, 1, 51, 6280, 6413, 164, 108, 384, 2416, 5, 11130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 improve Performance of asp.net web page === Can any one give me links of good performance in asp.net pages.
0
[ 2, 184, 20, 3545, 956, 16, 28, 306, 9, 2328, 2741, 2478, 800, 3726, 3726, 92, 186, 53, 590, 55, 6271, 16, 254, 956, 19, 28, 306, 9, 2328, 4434, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Dynamically build GUI based on model === i have a question regarding the dynamic coposition of a GUI with respect to the data that this GUI should display. is there any kind of best practice or pattern how to dynamically build a GUI and still maintain a clean seperation of concerns / layering strategy? here is my business case: i want do wirte a tool for creating a large number of random sharepoint list items i a sharepoint list. therefore i want to provide the tool the list URL. the tool will then query the list and provide a text box to enter a set of random values for every list column. since the colums vary from list to list, i cant buld a static UI / view. i have to build this view dynamically after getting the list information. my current idea is to buld some kind of presentation logic, that reads the list metadata and then creates the textbox controls with respect to this metadata. this could happen in some kind of event handler. thinking in the direction of MVC i dont got a static view which is (common) in MVC in my situation. would it be good design if the view examines the list metadata in its initialising routine, then builds the input controls (textboxes) dynamically and then binds / links them to the corresponding list columns? Thanks for your feedback and best regards Patrick
0
[ 2, 7782, 1326, 1895, 9457, 432, 27, 1061, 800, 3726, 3726, 31, 57, 21, 1301, 3467, 14, 7782, 326, 9339, 16, 21, 9457, 29, 2873, 20, 14, 1054, 30, 48, 9457, 378, 3042, 9, 25, 80, 186, 825, 16, 246, 1345, 54, 3732, 184, 20, 7782...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting the updated position of a Ellipse in C# === I am currently working on a Kinect project for fall detection. I am only doing a basic detection of the head because that's the only way I know how to. Anyway I need to get the updated position of the MousePointer of a Ellipse. I tried using the MouseMove function but it seems to only update once. I need it to update constantly when it moves. Is there a way to do this?
0
[ 2, 1017, 14, 6372, 649, 16, 21, 13, 4223, 1919, 62, 19, 272, 5910, 800, 3726, 3726, 31, 589, 871, 638, 27, 21, 6399, 11557, 669, 26, 1080, 11643, 9, 31, 589, 104, 845, 21, 2125, 11643, 16, 14, 157, 185, 30, 22, 18, 14, 104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how do i make favorites from table rows of a table layout in android === I have made a table layout which contains 6 or 7 table rows of song names.I have also given a check box like star for favorites in all rows. Now i want whenever I will click on any checkbox(star) in any row it will move to my favorites column or class and when I will unchecked it then it will have to delete from favorites and remain only my table view. So please give me an example for that I am facing a lot of problems due this. Thanks In advance
0
[ 2, 184, 107, 31, 233, 3839, 18, 37, 859, 11295, 16, 21, 859, 9106, 19, 13005, 800, 3726, 3726, 31, 57, 117, 21, 859, 9106, 56, 1588, 400, 54, 453, 859, 11295, 16, 338, 1817, 9, 49, 57, 67, 504, 21, 2631, 1649, 101, 778, 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...
Query optimisation, NOT IN === On the page i have an one query, which is bring page loading speed down. **SELECT * FROM users1 WHERE user_id NOT IN (SELECT user_id FROM users2)** USERS1 is the table with all users of the site, alot of data. USERS2 is the table of following eachother users. so, i need to select some users, which is not alredy following. Any ways of optimisation?
0
[ 2, 25597, 19259, 4330, 15, 52, 19, 800, 3726, 3726, 27, 14, 2478, 31, 57, 40, 53, 25597, 15, 56, 25, 1499, 2478, 12797, 1362, 125, 9, 13, 1409, 18, 16964, 1637, 37, 3878, 165, 113, 4155, 1, 1340, 52, 19, 13, 5, 18, 16964, 4155...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
I am having issue with my splash screen as am not getting into the next activity === This is an example of splash screen but facing difficulty with it as I couldn't view my MainActivity class, couldn't be able to recognize the issue.Tried in manifest file by changing the action and the category name as well but could not be able to resolve to it. Basically changed my Intent intent = new Intent(); as well but still the same goes on. package com.mainsplashcreen; import android.app.Activity; import android.content.Intent; import android.media.MediaPlayer; import android.os.Bundle; public class SplashActivity extends Activity { MediaPlayer player; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); player = MediaPlayer.create(SplashActivity.this, R.raw.splash); player.start(); Thread timer = new Thread() { @Override public void run() { try { sleep(4000); }catch(InterruptedException e) { e.printStackTrace(); } finish(); Intent intent = new Intent(); intent.setClass(SplashActivity.this, MainActivity.class); startActivity(intent); stop(); } }; timer.start(); } @Override protected void onPause() { super.onPause(); player.release(); finish(); } } and here is my manifest file -- <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mainsplashcreen" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/android_splash" android:label="@string/app_name" > <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name=".SplashActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
0
[ 2, 31, 589, 452, 1513, 29, 51, 13873, 2324, 28, 589, 52, 1017, 77, 14, 328, 2358, 800, 3726, 3726, 48, 25, 40, 823, 16, 13873, 2324, 47, 4325, 6967, 29, 32, 28, 31, 711, 22, 38, 1418, 51, 407, 19348, 718, 15, 711, 22, 38, 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...
Adding JScrollPane with JTextArea into JDailog === public class DailogDemo { private JDialog chatdailog; private JTextArea chatHistory; private JScrollPane mScrollMessage; DailogDemo() { chatdailog=new JDialog(); chatdailog.setSize(300, 400); chatHistory=new JTextArea(); chatHistory.setPreferredSize(new Dimension(150,100)); mScrollMessage=new JScrollPane(); mScrollMessage.add(chatHistory); mScrollMessage.setBounds(4, 10, 150, 100); mScrollMessage.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); chatdailog.add(mScrollMessage); chatdailog.show(); } public static void main(String args[]) { new DailogDemo(); } } in the above code, i can't able to see the JTextArea in JScrollPane.can anyone please notice whats the mistake i done.thanks in advance
0
[ 2, 4721, 487, 3862, 8694, 16660, 29, 487, 11969, 17760, 77, 487, 9394, 5567, 800, 3726, 3726, 317, 718, 7655, 5567, 19274, 13, 1, 932, 487, 4286, 5567, 6615, 9394, 5567, 73, 932, 487, 11969, 17760, 6615, 16853, 73, 932, 487, 3862, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cannot find "Grammar.txt" in python-sphinx === When I'm trying to generate html documentation using Python Sphinx under Windows, I get the following error: > IOError: [Errno 2] No such file or directory: > 'c:\\python27\\sphinx.egg\\sphinx\\pycode\\Grammar.txt' However, when I open the sphinx.egg, the file "Grammar.txt" is present... Here's the log it provided > # Sphinx version: 1.1.3 > # Python version: 2.7.3 > # Docutils version: 0.9.1 release > # Jinja2 version: 2.6 Traceback (most recent call last): File "c:\python27\sphinx.egg\sphinx\cmdline.py", line 188, in main > warningiserror, tags) File "c:\python27\sphinx.egg\sphinx\application.py", line 114, in __init__ > self.setup_extension(extension) File "c:\python27\sphinx.egg\sphinx\application.py", line 247, in > setup_extension > mod = __import__(extension, None, None, ['setup']) File "c:\python27\sphinx.egg\sphinx\ext\autodoc.py", line 26, in <module> > File "c:\python27\sphinx.egg\sphinx\pycode\__init__.py", line 25, in > <module> File > "c:\python27\sphinx.egg\sphinx\pycode\pgen2\driver.py", line 126, in > load_grammar > g = pgen.generate_grammar(gt) File "c:\python27\sphinx.egg\sphinx\pycode\pgen2\pgen.py", line 383, in > generate_grammar > p = ParserGenerator(filename) File "c:\python27\sphinx.egg\sphinx\pycode\pgen2\pgen.py", line 15, in > __init__ > stream = open(filename) IOError: [Errno 2] No such file or directory: 'c:\\python27\\sphinx.egg\\sphinx\\pycode\\Grammar.txt' Anyone has a clue why ?
0
[ 2, 1967, 477, 13, 7, 25208, 139, 9, 38, 396, 38, 7, 19, 20059, 8, 18, 19931, 396, 800, 3726, 3726, 76, 31, 22, 79, 749, 20, 7920, 13, 15895, 13945, 568, 20059, 27274, 131, 1936, 15, 31, 164, 14, 249, 7019, 45, 13, 1, 13, 196...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to validate a value before it is set with eclipse EMF validation framework? === The way I understand how eclipse validation framework works: - generate an object with a factory - set a value for an attribute in this object - check validation For example: public class ValidateNameTest { public static void main(String[] args) { ExtlibraryPackageImpl.init(); ExtlibraryFactory factory = ExtlibraryFactory.eINSTANCE; Writer writer = factory.createWriter(); // comment next line for false result in console writer.setName("test"); writer.setFirstName("test"); writer.setLastName("test"); boolean isNull = (writer.getName() == null) ? true : false; System.out.println("writer name is null : " + isNull); boolean result = validateObject(writer); System.err.println("result = " + result); boolean result2 = validateObject2(writer); System.err.println("result2 = " + result2); boolean result3 = validateObject3(writer); System.err.println("result3 = " + result3); boolean result4 = validateObject5(writer); System.out.println("result4 = " + result4); } public static boolean validateObject(Writer writer) { ExtlibraryValidator validator = ExtlibraryValidator.INSTANCE; if (!validator.validateWriter_hasValidName(writer, null, null)) { return false; } return true; } public static boolean validateObject2(EObject eObject) { EValidator validator = EValidator.Registry.INSTANCE .getEValidator(eObject.eClass().getEPackage()); if (validator != null) { if (!validator.validate(eObject, null, null)) { return false; } } return true; } public static boolean validateObject3(EObject eObject) { Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject); return diagnostic.getSeverity() == Diagnostic.OK; } public static boolean validateObject5(EObject eObject) { Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject); if (diagnostic.getSeverity() == Diagnostic.ERROR || diagnostic.getSeverity() == Diagnostic.WARNING) { System.err.println(diagnostic.getMessage()); for (Diagnostic childDiagnostic : diagnostic.getChildren()) { switch (childDiagnostic.getSeverity()) { case Diagnostic.ERROR: case Diagnostic.WARNING: System.err.println("\t" + childDiagnostic.getMessage()); } } return false; } return true; } } But I want to check if a value is valid for the model **before** I call the setter for the attribute. Is this possible with eclipse EMF validation framework ? Can somebody give an example please ?
0
[ 2, 25, 32, 938, 20, 7394, 1373, 21, 1923, 115, 32, 25, 309, 29, 11652, 3579, 410, 27999, 6596, 60, 800, 3726, 3726, 14, 161, 31, 1369, 184, 11652, 27999, 6596, 693, 45, 13, 8, 7920, 40, 3095, 29, 21, 3129, 13, 8, 309, 21, 1923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
uploadify queueData error === I am using Uploadify 3.1 and am getting the error "Uncaught TypeError: Cannot read property 'queueData' of undefined" when clicking the upload button. Below is my code. Not sure what the problem is. Upload field:`<input type="file" name="file_upload" id="file_upload"/>` Javascript: $(document).on("click",'.batchImportElements',function(){ $('#objectDetails').hide().html(''); $('#objectList').show(); $('#objectList').html('<img src="images/loading.gif"/> Loading').show(); $.ajax({ type:"POST", data:{ multiple:1 }, url:'/index.php/elements_handler/importElements', success:function(response){ checkResponse(response); $('#objectList').html(response); $('#file_upload').uploadify({ 'swf':'/js/uploadify-v3.1/uploadify.swf', 'uploader':'/js/uploadify-v3.1/uploadify.php', 'uploadFolder':'/uploads/', 'auto':false, 'multi':true, 'height':19, 'width':94, 'onUploadError':function(file,errorCode,errorMsg,errorString){ alert('The file ' + file.name + ' could not be uploaded: ' + errorString); }, 'onUploadSuccess':function(file, data, response){ $.ajax({ type:"POST", data:{ multiple:1, companies_id:companies_id, file:file, data:data, folderPath:1 }, url:'/index.php/elements_handler/importElements', success:function(response){ checkResponse(response); } }); } }); $(document).on("click",'.batchImport',function(){ $('.batchImport').uploadify('upload'); }); } }); }); The `$('.batchImport')` is the button being used to fire the upload. Any help would be appreciated.
0
[ 2, 71, 8294, 8612, 22521, 18768, 7019, 800, 3726, 3726, 31, 589, 568, 71, 8294, 8612, 203, 9, 165, 17, 589, 1017, 14, 7019, 13, 7, 1020, 150, 12647, 1001, 29992, 45, 1967, 1302, 1354, 13, 22, 2005, 4185, 18768, 22, 16, 367, 13439,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
XAML Toolkit with FxCop 10.0 === I am currently trying to write custom rules to test my programs. Is there any way that I could get XAML Toolkit that is complied for FxCop 10.0 rather than FxCop 1.36? Reason being, FxCop 10.0 uses references of FxCopSdk version 10 while XAML Toolkit uses FxCopSdk version 9. Also is there a way to get the source code for XAML Toolkit?
0
[ 2, 13, 6791, 8184, 5607, 13703, 29, 13, 16488, 9734, 332, 9, 387, 800, 3726, 3726, 31, 589, 871, 749, 20, 2757, 5816, 1761, 20, 1289, 51, 1726, 9, 25, 80, 186, 161, 30, 31, 110, 164, 13, 6791, 8184, 5607, 13703, 30, 25, 27498, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 nullPointerException when referencing multidimensional array list === In my project i need to store objects in cells of a grid. My current idea is a three-dimensional array list; 1st dimension is x, 2nd is y, and third is the actual list of objects within each cell. (Note: the grid will be pretty static, but the lists in the cells must be dynamic) My Code: Initialization: public ArrayList<ArrayList<ArrayList<Entity>>> mapGridx; public void init(){ mapGridx = new ArrayList<ArrayList<ArrayList<Entity>>>(); for(int i = 0; i < mapwidth / cellSize; i++){ mapGridx.add(new ArrayList<ArrayList<Entity>>()); for(int j = 0; j < mapheight / cellSize; j++){ mapGridx.get(i).add(new ArrayList<Entity>()); } } Now, any time I reference that list, it crashes with a nullPointerException. Example: mapGridx.get(i).get(j).add(this); or mapGridx.get(i).get(j).remove(mapGridx.get(i).get(j).indexOf((Entity)this)); (Note: I use the Entity object in a different one-dimensional ArrayList, which works fine. I've isolated the issue to only the 3-dimensional arraylist) Anyone have any ideas? or would a different way of creating this grid work better? any help would be appreciated.
0
[ 2, 8247, 16203, 3132, 106, 10066, 872, 76, 13, 29254, 1889, 7865, 7718, 968, 800, 3726, 3726, 19, 51, 669, 31, 376, 20, 1718, 3916, 19, 2934, 16, 21, 7354, 9, 51, 866, 882, 25, 21, 132, 8, 7865, 7718, 968, 73, 137, 384, 9547, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Classes for new View Controller in Storyboard === I'm very new to Objective-C and xCode and have a really basic question that I can't find the answer to on Google. In my storyboard I drag on a new View Controller to add controls and such on. So my SB will have two view controllers, the main one that came when I created the file, and the one a dragged on. When I go into the 'assistant editor' and select the main view controller, I get the ViewController.h class. But when I select the other controller I get UIViewController.h which is an apple file... How do I like/create these classes for each View Controller? Is there an automated way to do this, or am I not doing it right... Thanks in advance.
0
[ 2, 2684, 26, 78, 1418, 9919, 19, 609, 2806, 800, 3726, 3726, 31, 22, 79, 253, 78, 20, 7038, 8, 150, 17, 993, 9375, 17, 57, 21, 510, 2125, 1301, 30, 31, 92, 22, 38, 477, 14, 1623, 20, 27, 8144, 9, 19, 51, 609, 2806, 31, 550...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 does math.random work with exponents work in Lua? === I am trying to get a random 16 digit number in Lua. What I have written isn't working out for me when logically it should. How does math.random work with exponents? This is what I keep getting. > return math.random(10^15, 10^16) > -1637272360
0
[ 2, 184, 630, 5057, 9, 2195, 5555, 170, 29, 25220, 18, 170, 19, 1612, 58, 60, 800, 3726, 3726, 31, 589, 749, 20, 164, 21, 5477, 347, 15611, 234, 19, 1612, 58, 9, 98, 31, 57, 642, 2532, 22, 38, 638, 70, 26, 55, 76, 11545, 102,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Virtualenvwrapper not found === Given what I know about Python, the problem I'm having shouldn't been happening. I installed virtualenvwrapper on Mac OS X Snow Leopard with pip. It's there in /Library/Python/2.6/site-packages. But when I try to import virtualenvwrapper, Python tells me there's no such module with that name. Other modules (e.g. virtualenv) load just fine, and /Library/Python/2.6/site-packages is right at the top of my Python path. So is there something weird about virtualenvwrapper so that Python isn't finding it?
0
[ 2, 6599, 219, 710, 499, 525, 8763, 52, 216, 800, 3726, 3726, 504, 98, 31, 143, 88, 20059, 15, 14, 1448, 31, 22, 79, 452, 5714, 22, 38, 74, 4942, 9, 31, 4066, 6599, 219, 710, 499, 525, 8763, 27, 1572, 13, 759, 993, 2224, 15446,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Applescript send variable parameters to xslt file === I have an applescript that is using xmltransform to transform a xml using and external xlst file. I would like to add a variable in applescript to be picked up by the xslt file. The satimage dictionary talks about the use of xsl params as part of xmltransform but i cannot find any examples. Using the template `XMLTransform xmlFile with xsltFile in outputpath ` how would i define the variables both in the applescript and in the following xsl file example. <xsl:stylesheet version="1.0"> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="xmeml/list/name"> <xsl:value-of select="VARIABLE NAME"/> </xsl:template> </xsl:stylesheet> many thanks.
0
[ 2, 4037, 8741, 2660, 7612, 12905, 20, 993, 18, 255, 38, 3893, 800, 3726, 3726, 31, 57, 40, 4037, 8741, 30, 25, 568, 23504, 7028, 4190, 20, 8007, 21, 23504, 568, 17, 4886, 993, 24239, 3893, 9, 31, 83, 101, 20, 3547, 21, 7612, 19,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Open Embedded startup difficulties === So, I am currently trying to get a hold on Open Embedded\* to build for an i.MX53 platform, but i have some difficulties in understanding the main outline of the OE concept, as well as how the folder structure should be, gaining an upper view. So, I was hoping someone could in a few words summarize why not just using the make command in the kernel root. more importantly(for me ), i would like to know how the folder structure should be, having a Oe-core\*\* and the meta-fsl-arm\*\*\* layer built for an i:MX53QSB\*\*\*\*. Which file am I supposed to run with bitbake\*\*\*\*\* to get a custom image for my device? \* http://www.openembedded.org/wiki/Getting_started \*\* http://cgit.openembedded.org/cgit.cgi/openembedded-core/ \*\*\*http://github.com/Freescale/meta-fsl-arm \*\*\*\*http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB \*\*\*\*\*http://developer.berlios.de/projects/bitbake/
0
[ 2, 368, 12138, 20205, 8075, 800, 3726, 3726, 86, 15, 31, 589, 871, 749, 20, 164, 21, 1027, 27, 368, 12138, 1, 2483, 20, 1895, 26, 40, 31, 9, 79, 396, 4022, 2452, 15, 47, 31, 57, 109, 8075, 19, 3260, 14, 407, 11160, 16, 14, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ZSH search for function definition === Is there a mechanism for getting a function definition from console without grepping manually files ? I search for a way to find fast a definition of known function name. For example I want to know where "_kill" autocompletion function is defined. In ruby with the use of pry I can get something like this: >show-method find >From: app/models/search/object.rb @ line 2: >Number of lines: 7 def self.find(conditions = {}, options = {}) type = extract_object_type raise 'do not call Search::Object directly' if type == 'Object' search_logic = "Search::#{type.camelize}Logic".constantize.new(conditions, options) search_logic.process! search_logic.execute end
0
[ 2, 2052, 1635, 2122, 26, 1990, 5465, 800, 3726, 3726, 25, 80, 21, 6534, 26, 1017, 21, 1990, 5465, 37, 8650, 366, 5604, 5574, 23671, 6488, 13, 60, 31, 2122, 26, 21, 161, 20, 477, 1512, 21, 5465, 16, 167, 1990, 204, 9, 26, 823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Determine if mailbox exists using Exchange Web Services === Using the Exchange Web Services API, is it possible to determine whether a mailbox/e-mail address such as *someone@mydomain.com* exists within an organization? If so, which is the simplest way to do this and is it possible without the use of impersonation? *I've been searching around a lot for this, but can't seem to find anything on this topic specifically related to EWS - only SMTP e-mail addresses in general.* **Case:** A Windows Service regularly sends e-mails to people within the organization. It does not have any explicit knowledge about their e-mail adresses. It only knows their username and assumes that their e-mail address is *username*@mydomain.com. This is true for all users except for a few that do not have mailboxes. In these cases, it should not attempt to send the e-mail in the first place.
0
[ 2, 3746, 100, 4216, 5309, 5636, 568, 1950, 2741, 687, 800, 3726, 3726, 568, 14, 1950, 2741, 687, 21, 2159, 15, 25, 32, 938, 20, 3746, 1472, 21, 4216, 5309, 118, 62, 8, 8079, 3218, 145, 28, 1637, 16251, 1, 915, 537, 6232, 9, 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...
REST API: Create Deployment throwing error BadRequest === We are trying to access the Create Deployment method stated below http://msdn.microsoft.com/en-us/library/windowsazure/ee460813 We have uploaded the Package in the blob and browsing the configuration file. We have checked trying to upload manually the package and config file in Azure portal and its working fine. Below is the code we have written for creating deployment where "AzureEcoystemCloudService" is our cloud service name where we want to deploy our package. byte[] bytes = new byte[fupldConfig.PostedFile.ContentLength + 1]; fupldConfig.PostedFile.InputStream.Read(bytes, 0, bytes.Length); string a = Encoding.UTF8.GetString(bytes, 0, bytes.Length); string base64ConfigurationFile = a.ToBase64(); X509Certificate2 certificate = CertificateUtility.GetStoreCertificate (ConfigurationManager.AppSettings["thumbprint"].ToString()); HostedService.CreateNewDeployment(certificate, ConfigurationManager.AppSettings ["SubscriptionId"].ToString(), "2012-03-01", "AzureEcoystemCloudService", Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot.staging, "AzureEcoystemDeployment", "http://shubhendustorage.blob.core.windows.net/shubhendu storage/Infosys.AzureEcoystem.Web.cspkg", "AzureEcoystemDeployment", base64ConfigurationFile, true, false); /// <summary> /// /// </summary> /// <param name="certificate"></param> /// <param name="subscriptionId"></param> /// <param name="version"></param> /// <param name="serviceName"></param> /// <param name="deploymentSlot"></param> /// <param name="name"></param> /// <param name="packageUrl"></param> /// <param name="label"></param> /// <param name="base64Configuration"></param> /// <param name="startDeployment"></param> /// <param name="treatWarningsAsError"></param> public static void CreateNewDeployment(X509Certificate2 certificate, string subscriptionId,string version, string serviceName, Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot deploymentSlot, string name, string packageUrl, string label, string base64Configuration, bool startDeployment, bool treatWarningsAsError) { Uri uri = new Uri(String.Format(Constants.CreateDeploymentUrlTemplate, subscriptionId, serviceName, deploymentSlot.ToString())); XNamespace wa = Constants.xmlNamespace; XDocument requestBody = new XDocument(); String base64ConfigurationFile = base64Configuration; String base64Label = label.ToBase64(); XElement xName = new XElement(wa + "Name", name); XElement xPackageUrl = new XElement(wa + "PackageUrl", packageUrl); XElement xLabel = new XElement(wa + "Label", base64Label); XElement xConfiguration = new XElement(wa + "Configuration", base64ConfigurationFile); XElement xStartDeployment = new XElement(wa + "StartDeployment", startDeployment.ToString().ToLower()); XElement xTreatWarningsAsError = new XElement(wa + "TreatWarningsAsError", treatWarningsAsError.ToString().ToLower()); XElement createDeployment = new XElement(wa + "CreateDeployment"); createDeployment.Add(xName); createDeployment.Add(xPackageUrl); createDeployment.Add(xLabel); createDeployment.Add(xConfiguration); createDeployment.Add(xStartDeployment); createDeployment.Add(xTreatWarningsAsError); requestBody.Add(createDeployment); requestBody.Declaration = new XDeclaration("1.0", "UTF-8", "no"); XDocument responseBody; RestApiUtility.InvokeRequest( uri, Infosys.AzureEcosystem.Entities.Enums.RequestMethod.POST.ToString(), HttpStatusCode.Accepted, requestBody, certificate, version, out responseBody); } /// <summary> /// A helper function to invoke a Service Management REST API operation. /// Throws an ApplicationException on unexpected status code results. /// </summary> /// <param name="uri">The URI of the operation to invoke using a web request.</param> /// <param name="method">The method of the web request, GET, PUT, POST, or DELETE.</param> /// <param name="expectedCode">The expected status code.</param> /// <param name="requestBody">The XML body to send with the web request. Use null to send no request body.</param> /// <param name="responseBody">The XML body returned by the request, if any.</param> /// <returns>The requestId returned by the operation.</returns> public static string InvokeRequest( Uri uri, string method, HttpStatusCode expectedCode, XDocument requestBody, X509Certificate2 certificate, string version, out XDocument responseBody) { responseBody = null; string requestId = String.Empty; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri); request.Method = method; request.Headers.Add("x-ms-Version", version); request.ClientCertificates.Add(certificate); request.ContentType = "application/xml"; if (requestBody != null) { using (Stream requestStream = request.GetRequestStream()) { using (StreamWriter streamWriter = new StreamWriter( requestStream, System.Text.UTF8Encoding.UTF8)) { requestBody.Save(streamWriter, SaveOptions.DisableFormatting); } } } HttpWebResponse response; HttpStatusCode statusCode = HttpStatusCode.Unused; try { response = (HttpWebResponse)request.GetResponse(); } catch (WebException ex) { // GetResponse throws a WebException for 4XX and 5XX status codes response = (HttpWebResponse)ex.Response; } try { statusCode = response.StatusCode; if (response.ContentLength > 0) { using (XmlReader reader = XmlReader.Create(response.GetResponseStream())) { responseBody = XDocument.Load(reader); } } if (response.Headers != null) { requestId = response.Headers["x-ms-request-id"]; } } finally { response.Close(); } if (!statusCode.Equals(expectedCode)) { throw new ApplicationException(string.Format( "Call to {0} returned an error:{1}Status Code: {2} ({3}):{1}{4}", uri.ToString(), Environment.NewLine, (int)statusCode, statusCode, responseBody.ToString(SaveOptions.OmitDuplicateNamespaces))); } return requestId; } But every time we are getting the below error from the line response = (HttpWebResponse)request.GetResponse(); <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Code>BadRequest</Code> <Message>The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.</Message> </Error> Thanks, Shubhendu
0
[ 2, 760, 21, 2159, 45, 1600, 10475, 6033, 7019, 896, 99, 10351, 800, 3726, 3726, 95, 50, 749, 20, 1381, 14, 1600, 10475, 2109, 1240, 1021, 7775, 6903, 79, 18, 43, 103, 9, 22019, 12980, 9, 960, 118, 219, 8, 267, 118, 1210, 2559, 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...
Should I run the all unicorn processes as www-data (non-root)? === I'm running a a Rails 3 application with Unicorn and Nginx. Currently, Unicorns runs as root and due to this line in unicorn.rb: user "www-data" but I'm wondering whether I should just run all Unicorn process as www-data. Would there be any problem doing that? I'm using a file socket, so opening a port (<1024) is not an issue I'll have. Anything else I should be aware of?
0
[ 2, 378, 31, 485, 14, 65, 21190, 5102, 28, 13, 6483, 8, 18768, 13, 5, 3951, 8, 14032, 6, 60, 800, 3726, 3726, 31, 22, 79, 946, 21, 21, 2240, 18, 203, 3010, 29, 21190, 17, 13, 2723, 108, 396, 9, 871, 15, 21190, 18, 1461, 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...
Code for update and delete a row in grid view === what is the code for updating and saving from grid view data directly in a web form.This is the code i have.Help me out for delete record and update record. protected void CancelRecord(object sender, GridViewCancelEditEventArgs e) { gridRegistrationTableDetails.EditIndex = -1; BindData(); } protected void EditRecord(object sender, GridViewEditEventArgs e) { gridRegistrationTableDetails.EditIndex = e.NewEditIndex; BindData(); } protected void UpdateRecord(object sender, GridViewUpdateEventArgs e) { } protected void DeleteRecord(object sender, GridViewDeleteEventArgs e) {} i need to edit the four columns Emp name,Emp address,emp dept,emp mail.emp ID is the primary key.pls help me on this..
0
[ 2, 1797, 26, 11100, 17, 27448, 21, 3131, 19, 7354, 1418, 800, 3726, 3726, 98, 25, 14, 1797, 26, 71, 43, 1880, 17, 7599, 37, 7354, 1418, 1054, 1703, 19, 21, 2741, 505, 9, 1565, 25, 14, 1797, 31, 57, 9, 14593, 55, 70, 26, 27448,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pair Android Bluetooth without passkey to PC === my issue is that I have a PC host to manage Bluetooth connections in a wide room, e.g. a shopping center. And I want that any customer who wants to pair to that host, which provides a service, do it automatically without asking for a passkey by the PC, since this will not be managed by anyone. My real application is a platform which manages this kind of connection and I want to pair BT devices to it, but not asking for any passkey at least from PC side. Thanks in advance.
0
[ 2, 2146, 13005, 705, 15808, 366, 1477, 4237, 20, 5168, 800, 3726, 3726, 51, 1513, 25, 30, 31, 57, 21, 5168, 2015, 20, 4705, 705, 15808, 6760, 19, 21, 1051, 337, 15, 13, 62, 9, 263, 9, 21, 4884, 459, 9, 17, 31, 259, 30, 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...
Running java helloworld === I tried to google this, went to oracle.com and read all the questions on this forum related to this. I wrote a simple "Helloworld: program package helloworld `public class Helloworld {` ` public static void main(String[] args) {` `System.out.println("Hello World!"); }}` NetBeans compiles the source code into a .class file. I move that file to C:\MyJava I try to run it by `C:\MyJava> java -cp . Helloworld' and all possible variations of such. I keep getting the .NoClassDefFoundError: Helloworld (wrong name: helloworld/Helloworld). To make sure. There's a question almost exactly like this (difference in "wrong name"). The solution to that question does not work in my case.
0
[ 2, 946, 8247, 10975, 4423, 800, 3726, 3726, 31, 794, 20, 8144, 48, 15, 296, 20, 15759, 9, 960, 17, 1302, 65, 14, 2346, 27, 48, 5691, 1597, 20, 48, 9, 31, 738, 21, 1935, 13, 7, 11515, 4423, 45, 625, 6030, 10975, 4423, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Include/Exclude files when creating Azure package === I am creating an azure package using Visual Studio (right click on azure project -> package). I would like to include and exclude some files in the package similar to this: http://stackoverflow.com/questions/2747081/how-do-you-include-additional-files-using-vs2010-web-deployment-packages What do I need to do to get this working for the azure package function?
0
[ 2, 468, 118, 1706, 150, 17405, 6488, 76, 2936, 25715, 6030, 800, 3726, 3726, 31, 589, 2936, 40, 25715, 6030, 568, 3458, 1120, 13, 5, 4183, 10840, 27, 25715, 669, 13, 8, 1, 6030, 6, 9, 31, 83, 101, 20, 468, 17, 21077, 109, 6488, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 save List<String> === Is there anyway I can save a List<String> variable to the Androids phone internal or external memory? I know I can save primitive data, yet not sure about this one. Thanks in advance.
0
[ 2, 13005, 2079, 968, 1, 11130, 1, 800, 3726, 3726, 25, 80, 2774, 31, 92, 2079, 21, 968, 1, 11130, 1, 7612, 20, 14, 13005, 18, 1132, 3117, 54, 4886, 1912, 60, 31, 143, 31, 92, 2079, 11473, 1054, 15, 768, 52, 562, 88, 48, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Codeblocks compiles but doesn't run executable === I have a new Codeblocks install with mingw32 compiler. Created new c++ console project with default hello world stuff and I hit F9 (Build and Run). Compiles without problems but doesn't run the executable. I created new entry under tools ... ![](https://lh4.googleusercontent.com/-4ffCz0MmWpg/T-jZ0BTj8iI/AAAAAAAAAuM/wAtWViiuwuY/s144/tool.png) ... and when I execute it from the tools menu it opens the cb_console_runner and its all good. So how do I configure Codeblocks to run my custom tools entry after building (when I hit F9)? The funny thing is that I have already managed to do this but I forgot exactly how and now I'm unable to find the link.
0
[ 2, 1797, 12048, 18, 26561, 18, 47, 1437, 22, 38, 485, 1396, 17194, 5924, 800, 3726, 3726, 31, 57, 21, 78, 1797, 12048, 18, 16146, 29, 12069, 499, 3125, 21486, 9, 679, 78, 272, 20512, 8650, 669, 29, 12838, 10975, 126, 3217, 17, 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...
Cookie not being detected in Wordpress === I am setting up a simple mobile/desktop redirect using the technique from [this page](http://www.squidoo.com/php-mobile-redirect). I am also setting a cookie on the mobile site so that if the user wants to link back to the desktop site, that cookie will be read and the redirect will **not** take place. I am dealing with Wordpress sites and while the redirect **does** work, the cookie is **not** working properly. Here is what is happening: - Mobile redirect **does** work - Cookie **is successfully set** (confirmed with a test page outside WP) - When the user clicks back to the desktop site, the cookie isn't **not** being seen and the user gets dumped back to the mobile site again. I tested my code using 2 external static pages, and everything works 100%. Just not when I use the same exact code in Wordpress. Here is my code from the header.php files on each site: **Desktop site** <?php include('Mobile_Detect.php'); $detect = new Mobile_Detect(); if ( $detect->isMobile() && isset($_COOKIE["mobile"]) ) { $detect = "false"; } else if ( $detect->isMobile() ) { header("Location:http://m.example.com"); } ?> **Mobile site** <?php setcookie('mobile','m', time()+3600, '/','.example.com'); ?> The PHP code is the **first** thing in the file, before any HTML and there is no errant whitespace before or after it. I've tested this code by echoing some text and the script **is** there and doing what it should. It's just that one problem of the cookie not being seen and stopping the redirect to the mobile site like it should. After many hours, I need some help please!
0
[ 2, 19980, 52, 142, 11968, 19, 833, 5890, 800, 3726, 3726, 31, 589, 2697, 71, 21, 1935, 3241, 118, 3196, 197, 3880, 302, 14706, 568, 14, 4873, 37, 636, 1565, 2478, 500, 5, 21127, 6903, 6483, 9, 18, 3003, 12473, 9, 960, 118, 26120, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I capture any keypress event in the system using Ruby? === Writing a little screenshoting program, so I need to capture keypress event in any window, but I can do it only in console where the ruby script is running.
0
[ 2, 184, 107, 31, 3683, 186, 1246, 5890, 807, 19, 14, 329, 568, 10811, 60, 800, 3726, 3726, 1174, 21, 265, 2324, 7868, 68, 625, 15, 86, 31, 376, 20, 3683, 1246, 5890, 807, 19, 186, 1463, 15, 47, 31, 92, 107, 32, 104, 19, 8650, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Android Change image during animation by seekbar === I am trying to change images with different size with use of seekbar. But it's not changing. Here is the code, }if(item.getItemId() == R.id.size_config){ Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.dialog); dialog.setTitle("Set size!"); dialog.setCancelable(true); //there are a lot of settings, for dialog, check them all out! dialog.show(); seekbar = (SeekBar) dialog.findViewById(R.id.size_seekbar); final TextView tv_dialog_size = (TextView) dialog.findViewById(R.id.set_size_help_text); final SampleView viewd = new SampleView(getApplicationContext()); seekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { int value = progress; if(value < 34){ tv_dialog_size.setText("Small Size Snow flake."); if(colorRed){ snow_flake = null; snow_flake = getResources().getDrawable( R.drawable.snow_flake_big_white); Log.d("Color Red Snow", snow_flake.toString()); viewd.invalidate(); }else if(colorWhite){ snow_flake = null; snow_flake = getResources().getDrawable( R.drawable.snow_flake_big_white); Log.d("Color White Snow", snow_flake.toString()); viewd.invalidate(); }else if(colorBlue){ snow_flake = null; snow_flake = getResources().getDrawable( R.drawable.snow_flake_small_blue); Log.d("Color Blue Snow", snow_flake.toString()); viewd.invalidate(); }else{ snow_flake = null; snow_flake = getResources().getDrawable( R.drawable.snow_flake_small_pink); Log.d("Color Pink Snow", snow_flake.toString()); viewd.invalidate(); } } SampleView view = new SampleView(getApplicationContext()); view.invalidate(); } I am trying to change value of snow_flake variable which previously initialized with different drawable, I expect by changing value of snow_flake variable changes the image of animation. I use viewd.invalidate() to update the canvas. Still I get the old animation, it doesn't update with new image. I am totally lost, so any suggestion is really appreciated. Here is full code, http://pastie.textmate.org/4150847
0
[ 2, 13005, 753, 1961, 112, 6236, 34, 5048, 1850, 800, 3726, 3726, 31, 589, 749, 20, 753, 3502, 29, 421, 1072, 29, 275, 16, 5048, 1850, 9, 47, 32, 22, 18, 52, 4226, 9, 235, 25, 14, 1797, 15, 13, 1, 821, 5, 2119, 79, 9, 3060, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
An article or book visually describing the CPU, chipset, NB, south bridge, etc. from the past decade to recent QPI, HyperTransport === Does anyone know of a document that visually explains exactly how far is L2 cache from the CPU, what is a chipset in today's world? How is main memory spoken to? Via FSB or QPI? Is there a better place than SO to post this on? Like a Systems SO website?
0
[ 2, 40, 2002, 54, 360, 20747, 7153, 14, 17578, 15, 12602, 1198, 15, 13, 13502, 15, 180, 955, 15, 2722, 9, 37, 14, 640, 3953, 20, 1764, 2593, 2159, 15, 5443, 7028, 1993, 800, 3726, 3726, 630, 1276, 143, 16, 21, 4492, 30, 20747, 73...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Opening SSL URLs with Mechanize in Python === How do you use mechanize to open an SSL URL in Python? I'm attempting a trivial page retrieval like: import mechanize browser = mechanize.Browser() resp = browser.open('https://mydomain.com') but it throws the error: urllib2.URLError: <urlopen error [Errno 1] _ssl.c:504: error:140773E8:SSL routines:SSL23_GET_SERVER_HELLO:reason(1000)>
0
[ 2, 1214, 13, 18, 18, 255, 13, 911, 7532, 29, 55, 3606, 2952, 19, 20059, 800, 3726, 3726, 184, 107, 42, 275, 55, 3606, 2952, 20, 368, 40, 13, 18, 18, 255, 287, 6362, 19, 20059, 60, 31, 22, 79, 6314, 21, 13, 19712, 2478, 28419, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ember-data fixtures adapter not loading all data === I have an ember-data model definition that [looks like this][1]: Sylvius.Filter = DS.Model.extend({ title: DS.attr('string'), slug: DS.attr('string'), // Belongs to Atlas atlas: DS.belongsTo('Sylvius.Atlas'), // Has images images: DS.hasMany('Sylvius.Image'), // May have AtlasExtras extras: DS.hasMany('Sylvius.AtlasExtra'), // Structures for this filter structures: DS.hasMany('Sylvius.Structure'), // This is the path to the thumbnails sprite. // Each image will have an index on this sprite thumbnailUrl: DS.attr('string'), // How big is each thumbnail? thumbnailHeight: DS.attr('number'), thumbnailWidth: DS.attr('number'), // How big are the images? imageHeight: DS.attr('number'), // which image is selected? selectedImage: DS.belongsTo('Sylvius.Image') }); I have an ember-data fixture-adapter store set up like this: Sylvius.fixtureStore = DS.Store.create({ revision: 4, adapter: DS.fixtureAdapter }); ...and fixtures which look like this: Sylvius.Filter.FIXTURES = [{ "id": 1, "title": "Unlabeled", "slug": "unlabeled", "thumbnailUrl": "assets/img/surface_anatomy/photographic/srf-photo-unlabeled-tn.gif", "thumbnailWidth": 100, "thumbnailHeight": 75, "atlas_id": 1, "images": [1, 2, 3, 4, 5, 6, 7], "structures": [0] }]; (All this code is in [this jsfiddle][1] which demonstrates the problem.) Here's the issue: the title is accessible just fine. The slug is also there. The `thumbnailUrl`, `thumbnailWidth`, `thumbnailHeight`, are all undefined. Why? [1]: http://jsfiddle.net/pjmorse/NCUT6/
0
[ 2, 13, 19603, 8, 18768, 19914, 9924, 106, 52, 12797, 65, 1054, 800, 3726, 3726, 31, 57, 40, 13, 19603, 8, 18768, 1061, 5465, 30, 636, 5810, 18, 101, 48, 500, 2558, 165, 500, 45, 10993, 1755, 267, 9, 11924, 815, 800, 13, 43, 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...
Phonegap|Android 4 - App sometimes crashes when taking picture from PHOTOLIBRARY === I use the following code to get in Phonegap (cordova 1.9.0) a photo from a gallery or from camera and include it in the page: function getPhotoByGallery() { navigator.camera.getPicture(onPhotoSuccess, onFail, { quality : 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY }); } function getPhotoByCamera() { navigator.camera.getPicture(onPhotoSuccess, onFail, { quality : 50 }); } function onPhotoSuccess(data) { var viewport = document.getElementById('viewport'); //console.log(data); viewport.style.display = ""; document.getElementById("test_img").src = data; } Test-Device: Samsung Galaxy S3 with Android 4. Getting the Photos with the camera is no problem. But when I try to take a photo from the gallery several times, the app crashes frequently (without any usefull error) Not all the time but often and in different cycles. (Sometimes when picking an image from the gallery the third time, sometimes the fifth time and so on) I have no idea what the cause of the problem could be since the app doesn't give me any feedback of the problem it encountered...
0
[ 2, 1132, 1136, 306, 1, 290, 18524, 268, 13, 8, 4865, 1030, 21563, 76, 741, 2151, 37, 3056, 1210, 2559, 622, 800, 3726, 3726, 31, 275, 14, 249, 1797, 20, 164, 19, 1132, 1136, 306, 13, 5, 17213, 3496, 137, 9, 518, 9, 387, 6, 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...
Trying to Create a Virtual Machine Deployment in Azure via Service Management API === Trying to Create a Virtual Machine Deployment in Azure via Service Management API. But getting the 404 http error code , though the uri is correct.I am correctly setting the values in the below format, https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/ Anything else is missing ? Also am setting the certificates for SSL authentication.All other services seems to work but this alone is throwing a 404 http error
0
[ 2, 749, 20, 1600, 21, 6599, 1940, 10475, 19, 25715, 1197, 365, 1097, 21, 2159, 800, 3726, 3726, 749, 20, 1600, 21, 6599, 1940, 10475, 19, 25715, 1197, 365, 1097, 21, 2159, 9, 47, 1017, 14, 13, 23397, 7775, 7019, 1797, 13, 15, 362,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
InvalidOperationException with sharepoint 2010 and custom HttpModule === After adding our custom http module to render some assembly version one default sharepoint page we occassionaly get below exception. Event code: 3005 Event message: An unhandled exception has occurred. Event time: 2012-07-13 13:31:45 Event time (UTC): 2012-07-13 11:31:45 Event ID: 97c8552fb9df4c56817880b855eb089a Event sequence: 2176 Event occurrence: 6 Event detail code: 0 Application information: Application domain: /LM/W3SVC/501203163/ROOT-1-129866391651683991 Trust level: Full Application Virtual Path: / Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\80\ Machine name: SPEKO Process information: Process ID: 4008 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: InvalidOperationException Exception message: Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers. Either a native module in the pipeline has modified an HTTP_DATA_CHUNK structure associated with a managed post cache substitution callback, or a managed filter has modified the response. Request information: Request URL: http://speko/SitePages/Home.aspx Request path: /SitePages/Home.aspx User host address: 10.10.12.101 User: XXXXXXXXXX Is authenticated: True Authentication Type: Federation Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 9 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: True Stack trace: at System.Web.HttpWriter.GetIntegratedSnapshot(Boolean& hasSubstBlocks, IIS7WorkerRequest wr) at System.Web.HttpResponse.GetSnapshot() at System.Web.Caching.OutputCacheModule.OnLeave(Object source, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) public class FooterModule : IHttpModule { public void Dispose() { } public void Init(HttpApplication application) { application.BeginRequest += (new EventHandler(OnBeginRequest)); } private void OnBeginRequest(Object source, EventArgs e) { HttpApplication application = (HttpApplication)source; HttpContext context = application.Context; var requestUrl = context.Request.Url.ToString(); if (context.Request.HttpMethod == "GET") { var path = context.Request.Url.AbsolutePath; if (requestUrl.Contains("Home.aspx") || requestUrl.Contains("default.aspx")) { HttpContext.Current.Response.Filter = new FooterFilter(HttpContext.Current.Response.Filter); } } } } public class FooterFilter : MemoryStream { private readonly Stream _outputStream; public FooterFilter(Stream outputStream) { _outputStream = outputStream; } public override void Write(byte[] buffer, int offset, int count) { var contentInBuffer = Encoding.UTF8.GetString(buffer); var asmVer = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; FileVersionInfo fv = System.Diagnostics.FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); int index = contentInBuffer.LastIndexOf("</form>"); if (index > 0) { string versionParagraph = "<p id=\"footer\" style=\"display:block; color:#fff; position:absolute; top:2px; right:250px; \">Sharepoint : {0}</p></form>"; contentInBuffer = contentInBuffer.Replace("</form>", string.Format(versionParagraph, fv.FileVersion)); _outputStream.Write(Encoding.UTF8.GetBytes(contentInBuffer), offset, Encoding.UTF8.GetByteCount(contentInBuffer)); } else { _outputStream.Write(Encoding.UTF8.GetBytes(contentInBuffer), offset, Encoding.UTF8.GetByteCount(contentInBuffer)); } } }
0
[ 2, 16671, 11377, 10066, 872, 29, 1891, 3132, 498, 17, 5816, 7775, 19673, 62, 800, 3726, 3726, 75, 4721, 318, 5816, 7775, 12613, 20, 16535, 109, 1475, 615, 53, 12838, 1891, 3132, 2478, 95, 13, 2499, 5949, 5991, 58, 102, 164, 1021, 53...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
compass vertical rhythm not working === I'm having a problem with the newest version of compass (0.12.2) and sass (3.1.20) where the vertical alignment mixins are not taking effect. When trying to validate the generated css with `compass validate`, it fails on the `compass/reset` include, as well as the border-radius mixin among others. The code for the scss file in question can be found here in [this gist][1]. The errors I receive on validation are [here][2]. To see what the website looks like, go to [bitlimn.com][3]. The vertical spacing should be 1.5x, but it looks to be 1x. Basically, I don't see some of the code. It worked before I upgraded my compass and sass gems. Can anyone help me get back to fully functional compass/sass stylesheets? [1]: https://gist.github.com/3186271 [2]: https://gist.github.com/3186286 [3]: http://www.bitlimn.com
0
[ 2, 18879, 7035, 4568, 52, 638, 800, 3726, 3726, 31, 22, 79, 452, 21, 1448, 29, 14, 17175, 615, 16, 18879, 13, 5, 387, 9, 918, 9, 135, 6, 17, 9233, 18, 13, 5, 240, 9, 165, 9, 1323, 6, 113, 14, 7035, 12448, 2917, 108, 18, 50...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Pagination Function Not Displaying Properly === I have this function I have for pagination, and it's set to only show you 10 pages at a time in the links. So say there are 11 pages, then the links look like 1 | **2** | **3** | **4** | **5** | **6** | **7** | **8** | **9** | **10** | **Next »** | **Last »** And then on the 11 page it will look like **« First** | **« Prev** | 11 But, on the tenth page, this is what it looks like **« First** | **« Prev** | **11** | **Next »** | **Last »** Here's the PHP function I'm using (sorry, it's rather large) function get_paging_link($sql, $itemPerPage = 10, $strGet = '') { global $db2; global $q; $result = $db2->GetDataTable($sql); $pagingLink = ''; $totalResults = count($result); $totalPages = ceil($totalResults / $itemPerPage); $numLinks = 10; if ($totalPages > 1) { $self = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; if (isset($_POST['page']) && $_POST['page'] > 0) { $pageNumber = $_POST['page']; } else { $pageNumber = 1; } if ($pageNumber > 1) { $page = $pageNumber - 1; if ($page > 1) { $prev = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',$page);return false;\">&laquo; Prev <sp>|</sp></a> "; } else { $prev = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',$page);return false;\">&laquo; Prev <sp>|</sp></a> "; } $first = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',1);return false;\">&laquo; First <sp>|</sp></a> "; } else { $prev = ''; $first = ''; } if ($pageNumber < $totalPages) { $page = $pageNumber + 1; $next = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',$page);return false;\"><sp>|</sp> Next &raquo;</a> "; $last = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',$totalPages);return false;\"><sp>|</sp> Last &raquo;</a> "; } else { $next = ''; $last = ''; } $start = $pageNumber - ($pageNumber % $numLinks) + 1; $end = $start + $numLinks - 1; $end = min($totalPages, $end); $pagingLink = array(); for ($page = $start; $page <= $end; $page++) { if ($page == $pageNumber) { $pagingLink[] = " $page "; } else { if ($page == 1) { $pagingLink[] = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',1);return false;\">$page</a> "; } else { $pagingLink[] = " <a class=\"paginglink\" href=\"#\" onclick=\"refreshsearch('$q',$page);return false;\">$page</a> "; } } } $pagingLink = implode(' <sp>|</sp> ', $pagingLink); $pagingLink = $first . $prev . $pagingLink . $next . $last; } return $pagingLink; } I can't quite figure out what I'm doing wrong with the math. I've played around with the adding and subtracting of 1's but to no avail. Thanks in advance! And sorry for the tall post
0
[ 2, 13, 26120, 19006, 108, 857, 1990, 52, 17418, 7428, 800, 3726, 3726, 31, 57, 48, 1990, 31, 57, 26, 19006, 108, 857, 15, 17, 32, 22, 18, 309, 20, 104, 298, 42, 332, 4434, 35, 21, 85, 19, 14, 6271, 9, 86, 395, 80, 50, 547, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 does "streaming" over http work? === Each time I encounter the term streaming, the concept confuses me. Can you link me to any documentation about the concept and examples? (.net and c#)
1
[ 2, 184, 630, 13, 7, 11260, 68, 7, 84, 7775, 170, 60, 800, 3726, 3726, 206, 85, 31, 7007, 14, 981, 11920, 15, 14, 2420, 26465, 18, 55, 9, 92, 42, 3508, 55, 20, 186, 13945, 88, 14, 2420, 17, 3770, 60, 13, 5, 9, 2328, 17, 272...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
iphone camera uploading === in xcode 4.3 Im trying to take a picture using the camera from in the app and use that image or one from the picture library to add here-------> - (void) ShareButton { [AddThisSDK showAddThisButtonInView:self.view withFrame:CGRectMake(75, 50, 150, 50) forImage:[UIImage imageNamed:@"**HERE**"] withTitle:@"Share Your Dinner" description:@""]; } My camera is fully working i just don't know how to get the image name there if you need any more info or a better explanation feel free to ask
0
[ 2, 21024, 3336, 71, 16866, 800, 3726, 3726, 19, 993, 9375, 268, 9, 240, 797, 749, 20, 247, 21, 2151, 568, 14, 3336, 37, 19, 14, 4865, 17, 275, 30, 1961, 54, 53, 37, 14, 2151, 1248, 20, 3547, 235, 8, 8, 8, 8, 8, 8, 8, 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...
C# - Search in multiple MHT files === I build an application that has a list of products in sub folders. A sub folder exists for each product, and we store product details in the **Details.MHT**. ../Product A/detais.mht ../Product B/details.mht In application when user click on a product list item, related "details.mht" file will open. Now I want to add a content search in my app. I need search in details, but I don't know how can search in multiple mht files with high performance. Should I index files or its better to tag every mht file? Please tell me the best way.
0
[ 2, 272, 5910, 13, 8, 2122, 19, 1886, 307, 9020, 6488, 800, 3726, 3726, 31, 1895, 40, 3010, 30, 63, 21, 968, 16, 1985, 19, 972, 19294, 18, 9, 21, 972, 19294, 5636, 26, 206, 2374, 15, 17, 95, 1718, 2374, 3289, 19, 14, 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...
SmsManager.sendTextMessage from a BroadcastReceiver does nothing on CDMA phones === I've got a BroadcastReceiver that handles the `android.provider.Telephony.SMS_RECEIVED` action, and sends a text message as a reply in certain cases. My app has the `android.permission.SEND_SMS`, and works fine on GSM phones. However, it doesn't work on the only CDMA phone I have available to me at the moment, and I suspect it only occurs on CDMA phones. It works on all of the GSM phones I have tried, which are quite a few. `logcat` shows no errors nor warnings, only `D/SMSSMSSMSSMS( 260): TeleService: 4098` each time `sendSms` is called. Furthermore, I have tried the exact same code in an Activity, and it works perfectly fine. The code I'm using: private void sendSms(String destination, String message) { if(preferencesManager.smsRepliesEnabled()) { SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(destination, null, message, null, null); } } `preferencesManager.smsRepliesEnabled()` works as expected, and `destination` and `message` are set properly. I added a `Log.d` statement to confirm all three of these. Likewise, `PhoneNumberUtils.isWellFormedSmsAddress(destination)` returns `true`.
0
[ 2, 7613, 18, 22256, 9, 18, 2451, 11969, 3845, 18, 1303, 37, 21, 1992, 99, 1105, 19737, 630, 626, 27, 1745, 540, 14830, 800, 3726, 3726, 31, 22, 195, 330, 21, 1992, 99, 1105, 19737, 30, 3053, 18, 14, 13, 1, 290, 18524, 9, 26735, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Symfony2. Problems with custom URLs. Urlencoding === I have following route in my bundle <pre> /{category} </pre> And I have category with name <pre> Category/Brand </pre> If url is something like this: <pre> domain.com/Company/Brand </pre> then I get error 500 about / symbol. But if in twig I do <pre> company.name|url_encode() </pre> then I get <pre> Company%2F%Brand </pre> (Code might be wrong, dont remember right now) But nevertheless Symfony tells me that there is no route matching And gives me 404. How can I solve this problem?
0
[ 2, 13, 7261, 10229, 93, 135, 9, 1716, 29, 5816, 13, 911, 7532, 9, 13, 911, 2284, 15458, 800, 3726, 3726, 31, 57, 249, 858, 19, 51, 10194, 13, 1, 3515, 1, 13, 118, 1, 14375, 93, 1, 13, 1, 118, 3515, 1, 17, 31, 57, 3230, 29,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to bring the Video control to front at runtime while Animating === I have two videos on my screen and resize them based on user clicks.I am defining storyboards as : <Storyboard x:Key="AnimationSwapNearCamera"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderVideoDispalyLocal" Storyboard.TargetProperty="(FrameworkElement.Width)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="118"/> <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="395"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderVideoDispalyLocal" Storyboard.TargetProperty="(FrameworkElement.Height)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="96"/> <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="322"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderVideoDispalyLocal" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-72"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderVideoDispalyLocal" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-84"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderVideoDispalyRemote" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-58.5"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderVideoDispalyRemote" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="132"/> </DoubleAnimationUsingKeyFrames> </Storyboard> and on click triggering them: <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btnSwapNearCamera"> <RemoveStoryboard BeginStoryboardName="AnimationSwapFarCamera_BeginStoryboard"/> <RemoveStoryboard BeginStoryboardName="AnimationPIPNear_BeginStoryboard1"/> <RemoveStoryboard BeginStoryboardName="AnimationPIPFar_BeginStoryboard"/> <BeginStoryboard x:Name="AnimationSwapNearCamera_BeginStoryboard1" Storyboard="{StaticResource AnimationSwapNearCamera}"/> </EventTrigger> Now the problem is sometimes while animating, the control is overlapping the other control at the back. Is there a way I can bring that to front in run time. I have uploaded the video on youtube for clarity, check out for last animation when the video is hiding behind. http://youtu.be/v9tzkBtW_iQ
0
[ 2, 184, 20, 1499, 14, 763, 569, 20, 431, 35, 485, 891, 133, 14487, 1203, 800, 3726, 3726, 31, 57, 81, 6610, 27, 51, 2324, 17, 302, 10454, 105, 432, 27, 4155, 10840, 18, 9, 49, 589, 14684, 609, 2806, 18, 28, 13, 45, 13, 1, 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 post form data using rails integration test === my Rails 3.1 app works and now i'm setting up som tests and i'm new to that. In my controller that handels a users seach i get the posted values with this statement: @servicenumber = params[:searchform][:servicenumber] How do i post these values in an integration test? This doesn't work: post_via_redirect "/search", :servicenumber => "1001" The controller stumbles over the missing ":searchform" Thank's a lot for any hints!
0
[ 2, 184, 20, 678, 505, 1054, 568, 2240, 18, 8078, 1289, 800, 3726, 3726, 51, 2240, 18, 203, 9, 165, 4865, 693, 17, 130, 31, 22, 79, 2697, 71, 86, 79, 4894, 17, 31, 22, 79, 78, 20, 30, 9, 19, 51, 9919, 30, 22559, 18, 21, 387...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Save position of element with Jquery, PHP and MySQL === On the whole, I want to save position of the element, when it has dropped (for example, it's a link) : <a class="icon" style="left:20px;top:20px;" href="some_href"> <img src="some_src" /> name </a> Elements with this class are draggable. I think,that here must be ajax, but how to do this correctly - don't know. I am a php - mysql programmer, and so noob in jQuery and JS :( Thank for all answers and sorry for my bad English! :)
1
[ 2, 2079, 649, 16, 4520, 29, 487, 8190, 93, 15, 13, 26120, 17, 51, 18, 22402, 800, 3726, 3726, 27, 14, 979, 15, 31, 259, 20, 2079, 649, 16, 14, 4520, 15, 76, 32, 63, 1539, 13, 5, 1106, 823, 15, 32, 22, 18, 21, 3508, 6, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MVC3 Razor coding a add button === I am new to MVC3 and really would love your assistance. I would love to allow my add button to do the same as the create new actionlink using ajax or any other solution. Your help would be really appreciated. Cant seem to find a clear example. Thanks in advance.
1
[ 2, 307, 8990, 240, 14282, 13, 15458, 21, 3547, 5167, 800, 3726, 3726, 31, 589, 78, 20, 307, 8990, 240, 17, 510, 83, 339, 154, 4067, 9, 31, 83, 339, 20, 1655, 51, 3547, 5167, 20, 107, 14, 205, 28, 14, 1600, 78, 1028, 6258, 568,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I add a delay timer? === I have this code that makes menu items slide down and up. I want to add a timer so there is a delay in the slide down then back up. $(function() { $("#menu").find("li").each(function() { if ($(this).find("ul").length > 0) { $(this).mouseenter(function() { $(this).find("ul").stop(true, true).slideDown(); }); $(this).mouseleave(function() { $(this).find("ul").stop(true, true).slideUp(); }); } }); });
0
[ 2, 184, 107, 31, 3547, 21, 7255, 85, 139, 60, 800, 3726, 3726, 31, 57, 48, 1797, 30, 1364, 11379, 3755, 6464, 125, 17, 71, 9, 31, 259, 20, 3547, 21, 85, 139, 86, 80, 25, 21, 7255, 19, 14, 6464, 125, 94, 97, 71, 9, 5579, 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...
C# app blocks when calling method from dll === I'm currently exploring DLL exported functions and P/invoke in C#. I've created very simple .dll: Test.h #ifndef TEST_DLL_H #define TEST_DLL_H extern "C" __declspec(dllexport) const char * __cdecl hello (); extern "C" __declspec(dllexport) const char * __cdecl test (); #endif // TEST_DLL_H Test.cpp #include <stdlib.h> #include "test.h" #include <string.h> const char* hello() { char *novi = (char *)malloc(51); strcpy(novi, "Test."); return novi; } const char * test() { return "Test."; } I've compiled it and used in C# project like this: [DllImport("test.dll", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr hello(); [DllImport("test.dll", CallingConvention = CallingConvention.Cdecl)] public static extern string test(); private void button1_Click(object sender, EventArgs e) { MessageBox.Show(test()); IntPtr a = hello(); MessageBox.Show(Marshal.PtrToStringAnsi(a)); } But it isn't working. `test()` gets called successfully and I get back correct string. But `hello()` just hangs up the program. If I remove malloc line from the `hello()` definition and return constant, everything works, so I guess there's a problem with malloc that I'm now aware of. Also, somewhere I've seen that string shouldn't be used when return type is char*. If that's true, why should we use IntPtr?
0
[ 2, 272, 5910, 4865, 5198, 76, 2555, 2109, 37, 13, 43, 211, 800, 3726, 3726, 31, 22, 79, 871, 11748, 13, 43, 211, 18011, 3719, 17, 351, 118, 108, 2625, 1048, 19, 272, 5910, 9, 31, 22, 195, 679, 253, 1935, 13, 9, 43, 211, 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...
How can I find the name of the printer chosen in the Print Options dialog? === In xcode, for an iPad app, how can I find out the name of the printer chosen (or accepted) by the user in the Print Options dialog? I thought the name would be in the PrintInfo property of the PrintInteractionController, but that does not seem to be the case. I'd also like to be sure that the discovery process is the same in the case where there is only 1 printer available so that the user always chooses the default printer as the case where there are several printers available and the user might have chosen a printer other than the default. As far as I can tell, when there's only 1 printer, the PrintInteractionController assumes defaults, does not create a PrintInfo object and therefore there's no opportunity to obtain the name of the intended printer. I have not yet looked at the case where there are several printers available. Thanks
0
[ 2, 184, 92, 31, 477, 14, 204, 16, 14, 12925, 2519, 19, 14, 4793, 6368, 28223, 60, 800, 3726, 3726, 19, 993, 9375, 15, 26, 40, 31, 8240, 4865, 15, 184, 92, 31, 477, 70, 14, 204, 16, 14, 12925, 2519, 13, 5, 248, 2217, 6, 34, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I know which QTcpSocket emitted the readyRead() signal? === I've created a hello-world program to help me understand how QTcpServer and QTcpSocket work. In it the QTcpServer accepts new connections and connects their `readyRead()` signal to the `MainWindow::onNewData()` slot where their new data is appended to a plain text control. The problem is that **multiple sockets can be opened simultaneously**. So when I get the `readyRead()` signal and I want to read the data with `readAll()`, how do I know which socket emitted it? Here's the relevant parts of the code. // constructor server = new QTcpServer(this); connect(server, SIGNAL(newConnection()), this, SLOT(onNewConnection())); server->listen(QHostAddress::LocalHost, 3333); void MainWindow::onNewConnection() { QTcpSocket* socket = server->nextPendingConnection(); connect(socket, SIGNAL(disconnected()), socket, SLOT(deleteLater())); connect(socket, SIGNAL(readyRead()), this, SLOT(onNewData())); } void MainWindow::onNewData() { ui->plainTextEdit->appendPlainText(WHICH_SOCKET_EMITTED_IT()->readAll()); }
0
[ 2, 184, 107, 31, 143, 56, 2593, 38, 7439, 18, 5668, 1198, 25675, 14, 1451, 10647, 5, 6, 2800, 60, 800, 3726, 3726, 31, 22, 195, 679, 21, 10975, 8, 4423, 625, 20, 448, 55, 1369, 184, 2593, 38, 7439, 10321, 106, 17, 2593, 38, 74...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Chapter 9, Hartl ROR Section 9.2.2 === I Keep getting the same failure message, but I can't seem to figure out what's wrong. Failures: 1) Authentication authorization for non-signed-in users in the Users controller visiting the edit page Failure/Error: it { should have_selector('title', text: 'Sign in') } expected css "title" with text "Sign in" to return something # ./spec/requests/authentication_pages_spec.rb:69:in `block (6 levels) in <top (required)>' 2) Authentication authorization for non-signed-in users in the Users controller submitting to the update action Failure/Error: specify { response.should redirect_to(signin_path) } Expected response to be a <:redirect>, but was <200> # ./spec/requests/authentication_pages_spec.rb:74:in `block (6 levels) in <top (required)>' Finished in 2.31 seconds 69 examples, 2 failures Failed examples: rspec ./spec/requests/authentication_pages_spec.rb:69 # Authentication authorization for non-signed-in users in the Users controller visiting the edit page rspec ./spec/requests/authentication_pages_spec.rb:74 # Authentication authorization for non-signed-in users in the Users controller submitting to the update action Here is the authentication_pages_spec.rb: require 'spec_helper' describe "Authentication" do subject { page } describe "signin page" do before { visit signin_path } it { should have_selector('h1', text: 'Sign in') } it { should have_selector('title', text: 'Sign in') } end describe "signin" do before { visit signin_path } describe "with invalid information" do before { click_button "Sign in" } it { should have_selector('title', text: 'Sign in') } it { should have_selector('div.alert.alert-error', text: 'Invalid') } describe "after visiting another page" do before { click_link "Home" } it { should_not have_selector('div.alert.alert-error') } end end describe "with valid information" do let(:user) { FactoryGirl.create(:user) } before do fill_in "Email", with: user.email fill_in "Password", with: user.password click_button "Sign in" end it { should have_selector('title', text: user.name) } it { should have_link('Profile', href: user_path(user)) } it { should have_link('Sign out', href: signout_path) } it { should_not have_link('Sign in', href: signin_path) } describe "followed by signout" do before { click_link "Sign out" } it { should have_link('Sign in') } end end end describe "with valid information" do let(:user) { FactoryGirl.create(:user) } before {sign_in user } it { should have_selector('title', text: user.name) } it { should have_link('Profile', href: user_path(user)) } it { should have_link('Settings', href: edit_user_path(user)) } it { should have_link('Sign out', href: signout_path) } it { should_not have_link('Sign in', href: signin_path) } end describe "authorization" do describe "for non-signed-in users" do let(:user) { FactoryGirl.create(:user) } describe "in the Users controller" do describe "visiting the edit page" do before { visit edit_user_path(user) } it { should have_selector('title', text: 'Sign in') } end describe "submitting to the update action" do before { put user_path(user) } specify { response.should redirect_to(signin_path) } end end end end end Here is the user_pages_spec.rb require 'spec_helper' describe "User Pages" do subject { page } describe "signup page" do before { visit signup_path } it { should have_selector('h1', text: 'Sign up') } it { should have_selector('title', text: 'Sign up') } end describe "signup" do before { visit signup_path } let(:submit) { "Create my account" } describe "with invalid information" do it "should not create a user" do expect { click_button submit }.not_to change(User, :count) end describe "error messages" do before { click_button submit } it { should have_selector('title', text: 'Sign up') } it { should have_content('error') } end end describe "with valid information" do before do fill_in "Name", with: "Example User" fill_in "Email", with: "user@example.com" fill_in "Password", with: "foobar" fill_in "Confirmation", with: "foobar" end it "should create a user" do expect { click_button submit }.to change(User, :count).by(1) end describe "after saving the user" do before { click_button submit } let(:user) { User.find_by_email('user@example.com') } it { should have_selector('title', text: user.name) } it { should have_selector('div.alert.alert-success', text: 'Welcome') } it { should have_link('Sign out') } end end end describe "profile page" do let(:user) { FactoryGirl.create(:user) } before { visit user_path(user)} it { should have_selector('h1', text: user.name) } it { should have_selector('title', text: user.name) } end describe "edit" do let(:user) { FactoryGirl.create(:user) } before do sign_in user visit edit_user_path(user) end describe "page" do it { should have_selector('h1', text: "Update your profile") } it { should have_selector('title', text: "Edit user") } it { should have_link('change', href: 'http://gravatar.com/emails') } end describe "with invalid information" do before { click_button "Save changes" } it { should have_content('error') } end describe "with valid information" do let(:new_name) { "New Name" } let(:new_email) { "new@example.com" } before do fill_in "Name", with: new_name fill_in "Email", with: new_email fill_in "Password", with: user.password fill_in "Confirm Password", with: user.password click_button "Save changes" end it { should have_selector('title', text: new_name) } it { should have_selector('div.alert.alert-success') } it { should have_link('Sign out', href: signout_path) } specify { user.reload.name.should == new_name } specify { user.reload.email.should == new_email } end end end Here is the users_controller.rb: class UsersController < ApplicationController def show @user = User.find(params[:id]) end def new @user = User.new end def create @user = User.new(params[:user]) if @user.save sign_in @user flash[:success] = "Welcome to the Sample App!" redirect_to @user else render 'new' end end def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) if @user.update_attributes(params[:user]) flash[:success] = "Profile updated" sign_in @user redirect_to @user else render 'edit' end end private def signed_in_user redirect_to signin_path, notice: "Please sign in." unless signed_in? end end Here is the edit.html.erb: <% provide(:title, "Edit user") %> <h1>Update your profile</h1> <div class="row"> <div class="span6 offset3"> <%= form_for(@user) do |f| %> <%= render 'shared/error_messages' %> <%= f.label :name %> <%= f.text_field :name %> <%= f.label :email %> <%= f.text_field :email %> <%= f.label :password %> <%= f.password_field :password %> <%= f.label :password_confirmation, "Confirm Password" %> <%= f.password_field :password_confirmation %> <%= f.submit "Save changes", class: "btn btn-large btn-primary" %> <% end %> <%= gravatar_for @user %> <a href="http://gravatar.com/emails">change</a> </div> </div> here is the utilities.rb: def full_title(page_title) base_title = "Ruby on Rails Tutorial Sample App" if page_title.empty? base_title else "#{base_title} | #{page_title}" end end def sign_in(user) visit signin_path fill_in "Email", with: user.email fill_in "Password", with: user.password click_button "Sign in" cookies[:remember_token] = user.remember_token end here is the _header.html.erb: <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <%= link_to "sample app", root_path, id: "logo" %> <nav> <ul class="nav pull-right"> <li><%= link_to "Home", root_path %></li> <li><%= link_to "Help", help_path %></li> <% if signed_in? %> <li><%= link_to "Users", '#' %></li> <li id="fat-menu" class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> Account <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><%= link_to "Profile", current_user %></li> <li><%= link_to "Settings", edit_user_path(current_user) %></li> <li class="divider"></li> <li> <%= link_to "Sign out", signout_path, method: "delete" %> </li> </ul> </li> <% else %> <li><%= link_to "Sign in", signin_path %></li> <% end %> </ul> </nav> </div> </div> </header> Those are the files I've made changes to in Chapter 9, but if there are others that you think might be the problem please let me know and I can post them. Thanks!
0
[ 2, 1260, 561, 15, 4316, 255, 761, 248, 1050, 561, 9, 135, 9, 135, 800, 3726, 3726, 31, 643, 1017, 14, 205, 2990, 2802, 15, 47, 31, 92, 22, 38, 2260, 20, 1465, 70, 98, 22, 18, 1389, 9, 2990, 18, 45, 137, 6, 27963, 22677, 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...
Multiple && operators === I need the correct markup for this. This is a passage from my script (form validation) ... if (!$erremail && !$errname && !$errmessage) { echo 'Vielen Dank - Ihre E-Mail wurde erfolgreich versendet.'; } ... The last operator will not included by the validation. Thanks
1
[ 2, 1886, 279, 1569, 9475, 800, 3726, 3726, 31, 376, 14, 4456, 943, 576, 26, 48, 9, 48, 25, 21, 4849, 37, 51, 3884, 13, 5, 4190, 27999, 6, 13, 9, 9, 9, 100, 13, 5, 187, 4403, 106, 99, 8079, 279, 1569, 13, 187, 4403, 106, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using storyboard to seque from a tableview to a webview === Good afternoon all. I'm pretty new to iOS programming. Been developing for VB for years and this is a huge difference. I've written a small Storyboarded app, with a splash, a tableview, and ultimately a web view to display a web page. The Storyboard works great, the tableview works great, however, when I try to push the URL to the web view, all I get is: "Application tried to push a nil view controller on target <UINavigationController:" I've read that i did not alloc correctly somewhere, but hesitate to copy ALL of my code here as that's a lot of wasted space. When pressing one of the table rows, this is the code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [[self navigationController] pushViewController:self.detailViewController animated:YES]; NSURL *urlInSafari = [NSURL URLWithString:@"http://www.google.com"]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:urlInSafari]; [self.detailViewController.webView loadRequest:urlRequest]; } I am not sure what this does, but when the app was created by default it stuck in a label that would take a date/time when a table row was pressed. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"showDetail"]) { NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; NSDate *object = [_objects objectAtIndex:indexPath.row]; [[segue destinationViewController] setDetailItem:object]; } } Do I need to change the destinationViewController to the WebView that is on my DetailViewController? Everything works but the opening of the link on the WebView. Any help would be greatly appreciated.
0
[ 2, 568, 609, 2806, 20, 1353, 2005, 37, 21, 859, 4725, 20, 21, 2741, 4725, 800, 3726, 3726, 254, 3435, 65, 9, 31, 22, 79, 1772, 78, 20, 13, 7760, 3143, 9, 74, 3561, 26, 13, 20468, 26, 122, 17, 48, 25, 21, 2329, 2841, 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...
How pass two parameters to url (without GET)? === A while back I was given the advice to not use the GET approach in my urls when using Django as its cleaner this way. That works pretty nice with one parameter: (r'^call/add/(?P<call_id>\d+)/$', call_view), http://127.0.0.1:8000/call/add/1/ But how could I possibly use the same approach with two parameters? As I am still learning, please enlighten me about better approaches. Thank you,
0
[ 2, 184, 1477, 81, 12905, 20, 287, 6362, 13, 5, 14506, 164, 6, 60, 800, 3726, 3726, 21, 133, 97, 31, 23, 504, 14, 4978, 20, 52, 275, 14, 164, 2141, 19, 51, 13, 911, 7532, 76, 568, 3857, 14541, 28, 82, 19585, 48, 161, 9, 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...
Solve the word game Ghost (as seen on xkcd) - spelling letters without making a word === How can one solve the word game Ghost? [Ghost](http://en.wikipedia.org/wiki/Ghost_(game)) is a two player word game. Players take turns adding letters to a growing word fragment. Quoting [Randall Munroe](http://blog.xkcd.com/2007/12/31/ghost/) > To play Ghost, you alternate saying letters. The first person to either (a) spell a word, or (b) create a string that cannot be the start of a word, loses. So you alternate building a word, and you have to always be working toward a word, but you can’t be the one to end it. Sample games, with players one and two alternating letters: > > G-A-M-E — Player 1 loses by spelling “Game” > > A-B-S-O-R-B — Player 2 loses by spelling “ABSORB” > > B-Z-”Challenge” — Player 1, seeing “Z”, says “Challenge.” meaning “I think you’re not building toward a word. Name a word that starts with ‘BZ’ and prove you’re not just making stuff up.” Player 2 can’t, and loses. If he could, he’d win. Munroe then blags that he solved the game (against a particular dictionary) on a flight. He * asserts the first player can always win * exhibits a short crib sheet the first player can use to gaurantee a win * exhibits a short crib sheet the second player can use to win if the first player errs For example, if the first player opens with 'L', the second player can reply with another 'L', forcing the first player to lose at 'LLAMA'. Munroe didn't share his algorithm or his code :( How did he solve Ghost? * * * There's also a [harder variant](http://everything2.com/user/%252Fdev%252Fjoe/writeups/Ghost) where letters can be prepended to the word fragment.
0
[ 2, 8402, 14, 833, 250, 3995, 13, 5, 472, 541, 27, 993, 197, 6324, 6, 13, 8, 11292, 2516, 366, 544, 21, 833, 800, 3726, 3726, 184, 92, 53, 8402, 14, 833, 250, 3995, 60, 636, 24277, 500, 5, 21127, 6903, 219, 9, 17375, 26132, 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...
Advanced DataMapper search for Many to Many relation === Give the [Tag/Photo exemple][1] on DataMapper documentation: class Photo include DataMapper::Resource property :id, Serial has n, :taggings has n, :tags, :through => :taggings end class Tag include DataMapper::Resource property :id, Serial has n, :taggings has n, :photos, :through => :taggings end class Tagging include DataMapper::Resource belongs_to :tag, :key => true belongs_to :photo, :key => true end I want to select all tags that has no photos I know I can do Tag.select { |tag| tag.photos.size < 1} But I'd like more Datamapper syntax. Something like Tag.all :photos.count.lt => 1 #not works Is there a way to do this? Does anyone knows a nice Datamapper documentation for advanced queries? [Documentation at the site][2] is very nice, but too basic. Tkz [1]: http://datamapper.org/docs/associations.html [2]: http://datamapper.org/docs/find.html
0
[ 2, 2255, 1054, 540, 8763, 2122, 26, 151, 20, 151, 5827, 800, 3726, 3726, 590, 14, 636, 8628, 118, 25445, 1396, 1503, 5106, 500, 2558, 165, 500, 27, 1054, 540, 8763, 13945, 45, 718, 3056, 468, 1054, 540, 8763, 45, 45, 99, 12097, 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...
Media Query in Bootstrap using Rails === I would like to use the following media query in my rails app. @media (min-width: 768px) { .center.navbar .nav, .center.navbar .nav > li { display:inline-block; float:none; vertical-align:top; width:100%; } .center .dropdown-menu { display: none; text-align:left; } .center .dropdown.open ul { display: block; } I am using bootstrap as my framework for the front end. Normally if I want to override a piece of Bootstrap CSS I put my code in the override stylesheet, however I am not sure where to put media queries. Ive tried the main stylesheet and also the override stylesheet but its not reading it. I’m sure I’m missing a basic rule here and would appreciate it if anyone could point me in the right direction
0
[ 2, 941, 25597, 19, 5894, 16514, 568, 2240, 18, 800, 3726, 3726, 31, 83, 101, 20, 275, 14, 249, 941, 25597, 19, 51, 2240, 18, 4865, 9, 13, 1, 8260, 13, 5, 2160, 8, 3976, 43, 96, 45, 453, 4279, 306, 396, 6, 13, 1, 13, 9, 126...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
changing syntax from sqlplus format to mysql format === I am currently trying to change the syntax from sqlplus to mysql to set the look and feel of an report file so can be more organized /* set pagesize 66 set linesize 75 ttitle center EarthOrientation Parameters (U) 2 column year heading "Year" format 9999 column month heading "Month" format 99 column day heading "Day" format 99 column mjd heading "MJD" format 99999 select year, month , day , mjd, from TB_PARAMETER_UI order by year,month,day,mjd; */ does anyone know the correct replacement for setpage size and set line size and tittle and how to set columns in mysql?
0
[ 2, 4226, 22649, 37, 4444, 255, 13349, 2595, 20, 51, 18, 22402, 2595, 800, 3726, 3726, 31, 589, 871, 749, 20, 753, 14, 22649, 37, 4444, 255, 13349, 20, 51, 18, 22402, 20, 309, 14, 361, 17, 583, 16, 40, 1330, 3893, 86, 92, 44, 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...
speech to text javascript,html5 === How to do speech to text using javascript or html5,i have done it in chrome using x-webkit-speech,but its not supported in other browsers.So is there any api's or libraries to do speech recognition.any answers will be appreciated.Thank you.
0
[ 2, 2974, 20, 1854, 8247, 8741, 15, 15895, 264, 800, 3726, 3726, 184, 20, 107, 2974, 20, 1854, 568, 8247, 8741, 54, 13, 15895, 264, 15, 49, 57, 677, 32, 19, 13, 12985, 568, 993, 8, 14113, 13703, 8, 18, 1664, 7455, 15, 811, 82, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Safari Adds Trailing Slash === I've got an ASP.NET website that uses URLRewrite 2 to remove trailing slashes from the URL. We noticed that Safari on Mac does not obey this rule. It always leaves the trailing slash in the URL. SEO Moz is showing both URLs which appears to be a potential duplicate content issue. Here is the URLRewrite rule in our Web.Config <rule name="Remove trailing slash" stopProcessing="true"> <match url="(.*)/$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="{R:1}" /> </rule> Here is the website in question: http://www.kurtzandblum.com/ (the slash will be removed except in Safari) I'm trying to decide if... 1. This is a harmless bug in Safari? 2. My rewrite script is flawed. 3. I should switch it to "add" trailing slashes. Google says slash or no slash will work http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html Thanks for any insight.
0
[ 2, 25055, 10621, 14323, 14098, 800, 3726, 3726, 31, 22, 195, 330, 40, 28, 306, 9, 2328, 2271, 30, 2027, 287, 6362, 99, 23716, 172, 20, 4681, 14323, 14098, 160, 37, 14, 287, 6362, 9, 95, 2711, 30, 25055, 27, 1572, 630, 52, 15410, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JPQL equivalent of SQL query with EXISTS and relationships === I'm using Play Framwork 1.2.4 I have created 3 Model classes with relationships : Header <1 - n> Line - 1> LineType @Entity public class Header extends Model { @OneToMany(mappedBy="header" , cascade=CascadeType.ALL) public List<Line> lines; ... } @Entity public class Line extends Model{ @ManyToOne public Header header ; @ManyToOne publicLineType lineType; ... } @Entity public class LineType extends Model { public Integer code ; ... } I want to make a filter on the linetype during a header search. How to write the equivalent of this SQL query using JPQL (or other) in Play Framework ? Select * from header where exists(select 1 from line,typeline where line.header=header.id and line.lineType=linetype.id and linetype.code = 'X')
0
[ 2, 13, 12851, 22402, 4602, 16, 4444, 255, 25597, 29, 5636, 17, 5833, 800, 3726, 3726, 31, 22, 79, 568, 418, 8345, 79, 3783, 137, 9, 135, 9, 300, 31, 57, 679, 203, 1061, 2684, 29, 5833, 13, 45, 157, 106, 13, 1, 165, 13, 8, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to do hoverintent without jquery? === I don't want to include jquery in all my pages, but I'm adding a global 'popdown' menu on hover of a section, but I don't want it immediate as it's annoying when just moving the mouse around. Usually I would do this with jquery and hoverintent, but not this time. I guess I could set a timeout on `onmouseover` for the area, but not sure if it's just that simple (like, wouldn't it fire like thousands of times while the mouse moves?) Current code is like this... <div onMouseOver="showCart();">Hover here!</div> so would changing that to this work?: <div onMouseOver="setTimeout(showCart, 50);">Hover here!</div>
0
[ 2, 184, 20, 107, 21350, 6391, 2291, 366, 487, 8190, 93, 60, 800, 3726, 3726, 31, 221, 22, 38, 259, 20, 468, 487, 8190, 93, 19, 65, 51, 4434, 15, 47, 31, 22, 79, 4721, 21, 2062, 13, 22, 6057, 2968, 22, 11379, 27, 21350, 16, 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...
Delphi Aero Style in Windows XP === Is it possible to make Aero Glass Effect of form and other components in Windows XP using DelphiXE2. If so please tell me how?
0
[ 2, 23030, 8914, 1034, 19, 1936, 23045, 800, 3726, 3726, 25, 32, 938, 20, 233, 8914, 1350, 1590, 16, 505, 17, 89, 5090, 19, 1936, 23045, 568, 23030, 13012, 135, 9, 100, 86, 2247, 494, 55, 184, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Resizeing a 3D array in C# === I am attempting re size a 3D array in C# The vb6 code reads - ReDim Combos(ProductNum, 4, 3) Since I cannot use Array.Resize for a 3D array is there another way for me to do this function in C#? I have already declared the array as a 3D array - int[ , , ] Combos; But I am having trouble resizing it. Any Ideas? -Thanks
0
[ 2, 302, 10454, 68, 21, 203, 43, 7718, 19, 272, 5910, 800, 3726, 3726, 31, 589, 6314, 302, 1072, 21, 203, 43, 7718, 19, 272, 5910, 14, 13, 20468, 379, 1797, 11137, 13, 8, 402, 1660, 22621, 18, 5, 14086, 6336, 15, 268, 15, 203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Choropleth with Google Maps API V3 === I am currently trying to implement a simple choropleth map into my map (using google maps api v3). I will later on be using either xml or json to retrieve my data but at the moment I am just trying to use hardcoded data. It worked on V2 API google maps but not on the v3. I am not sure what im doing wrong. My code is below: <script type="text/javascript"> var geocoder; var map; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(51.500152, -0.126236); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.TERRAIN } map = new google.maps.Map(document.getElementById("map"), myOptions); var cartographer = Cartographer( map, { colorize:"#000", colorizeAlpha:.3 } ); cartographer.choropleth([ {region:"US-MN",val:6}, {region:"US-IA",val:10}, {region:"US-WI",val:8}, {region:"US-SD",val:7}, {region:"US-ND",val:9}, {region:"US-MI",val:12} ], { colorScheme:"BuPu"}); } function codeAddress() { var address = document.getElementById("address").value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert("Geocode was not successful for the following reason: " + status); } }); } </script> </head> <body onload="initialize()"> <input id="address" type="textbox" value="London"> <input type="button" value="Search" onclick="codeAddress()"> <div id="map" style="height:100%;top:0px"></div> </body> If you know of an alternative method I could use (but with google maps API v3 as a background) please let me know I would be willing to look into it and give it a try. I have already imported raphael and cartography libraries in the code. Thanks
0
[ 2, 568, 12024, 111, 5106, 96, 29, 8144, 6867, 21, 2159, 566, 240, 800, 3726, 3726, 31, 589, 871, 749, 20, 8713, 21, 1935, 12024, 111, 5106, 96, 2942, 77, 51, 2942, 13, 5, 12655, 8144, 6867, 21, 2159, 566, 240, 6, 9, 31, 129, 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...
SQL Syntax errror === $query = sprintf("SELECT * FROM sorular WEHERE test_id='%s' ORDER BY id LIMIT '%s', '%s'", mysql_real_escape_string(htmlentities(stripslashes($testid))), mysql_real_escape_string(htmlentities(stripslashes($start))), mysql_real_escape_string(htmlentities(stripslashes($perpage)))); and i am getting error: 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 'test_id='1' ORDER BY id LIMIT '4', '2'' at line 1 How can i fix it?
0
[ 2, 4444, 255, 22649, 13, 106, 5932, 248, 800, 3726, 3726, 5579, 8190, 93, 800, 6672, 410, 5, 7, 18, 16964, 1637, 37, 7779, 7451, 95, 6836, 1289, 1, 1340, 3726, 22, 11881, 18, 22, 389, 34, 4924, 4496, 13, 22, 11881, 18, 22, 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...
Crash C++ application using sprintf_s without specifying string length === I have a c++ application, in which customer reported a crash.But the crash is not easily reproducible. After analysing some logs and all i found that the crash may occure in between the following code portions. Please tell me there is any chance of getting crashed the application if i have these code statements in it? //Tesrt std::string strAppName = "App1\0"; int nSize = 10; sprintf_s(szBuff, "The appname %s have %d dependancies ", strAppName.c_str(), nSize); //Then use the szBuff to log to a text file //Test end
0
[ 2, 4597, 272, 20512, 3010, 568, 6672, 410, 1, 18, 366, 19077, 68, 3724, 1476, 800, 3726, 3726, 31, 57, 21, 272, 20512, 3010, 15, 19, 56, 7705, 1117, 21, 4597, 9, 811, 14, 4597, 25, 52, 2351, 302, 2740, 8484, 3426, 9, 75, 40, 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...
[PersistenceException: Error getting sequence nextval] === i am getting this error while trying to save data into model in db. @Entity public class User extends Model { @Required public String name; @Email public String email; @Required @MaxLength(value=10) public String username; @Required @MinLength(value=4) public String password; @Id public int id; } this is my Class. this is the error while i am trying to save the model into db. ![enter image description here][1] [1]: http://i.stack.imgur.com/tQZLr.png i will appreciate any effort for help! many thanks.
0
[ 2, 636, 7490, 702, 2940, 10066, 872, 45, 7019, 1017, 4030, 328, 3377, 500, 800, 3726, 3726, 31, 589, 1017, 48, 7019, 133, 749, 20, 2079, 1054, 77, 1061, 19, 13, 9007, 9, 13, 1, 2291, 856, 317, 718, 4155, 9073, 1061, 13, 1, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
test android app on lg p-690 === can I test the app on this device if I don't have a data cable? I don't know how to do it or even if it is possible. Do you need some specific phones in order to test the application? Thank you, Ryan
0
[ 2, 1289, 13005, 4865, 27, 13, 10641, 351, 8, 23954, 800, 3726, 3726, 92, 31, 1289, 14, 4865, 27, 48, 3646, 100, 31, 221, 22, 38, 57, 21, 1054, 4454, 60, 31, 221, 22, 38, 143, 184, 20, 107, 32, 54, 166, 100, 32, 25, 938, 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...
Issue in caching using coffeescript === I've this script class Raffler.Views.EntriesIndex extends Backbone.View div: $('#input') initialize: -> console.log @div.val() As you can see this is a backbone's view. I would like to cache `$('#div')` into a variable and call it. See the `console.log @div.val()`. But this seems not working.. Using normal javascript I'd write something like this: var ToDoView = Backbone.View.extend({ div : $('#input'), initialize: function(){ console.log(this.div.val()); } }) And this is working fine. Where I'm going wrong with coffeescript?
0
[ 2, 1513, 19, 1658, 7192, 568, 2364, 8741, 800, 3726, 3726, 31, 22, 195, 48, 3884, 718, 4652, 4372, 106, 9, 4725, 18, 9, 2291, 2829, 25671, 9073, 24036, 9, 4725, 13, 12916, 45, 5579, 5, 22, 5910, 108, 4881, 22, 6, 2104, 2952, 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...